@ckeditor/ckeditor5-revision-history 48.1.0 → 48.8.1-alpha.1
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
|
-
_0x222574(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x3e9d47){super(),this['id']=_0x3e9d47['id']||_0x34aeba(),this['creator']=_0x3e9d47['creator']||null,this['authors']=_0x3e9d47['authors']||[],this['diffData']=_0x3e9d47['diffData']||null,this['toVersion']=_0x3e9d47['toVersion']||0x0,this['fromVersion']=_0x3e9d47['fromVersion']||0x0,this['set']('name',_0x3e9d47['name']||''),this['set']('createdAt',_0x3e9d47['createdAt']||new Date()),this['set']('attributes',_0x3e9d47['attributes']||{});}['setName'](_0xdad03){this['_update']({'name':_0xdad03});}['setAttribute'](_0x55ce07,_0x564c6a){const _0x463b57=_0x104e0e(this['attributes']);_0x561c8d(_0x463b57,_0x55ce07,_0x564c6a),this['_update']({'attributes':_0x463b57});}['removeAttribute'](_0x4bf15d){const _0x48db2e=_0x104e0e(this['attributes']);_0x92fc94(_0x48db2e,_0x4bf15d),this['_update']({'attributes':_0x48db2e});}['_update'](_0x328a49,_0x1b0ea4=!0x1){let _0x367786=!0x1;const _0x3ef914={'id':this['id']},_0x2cd7be=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0xcbd9f1 of _0x2cd7be){const _0x280cdf=_0x328a49[_0xcbd9f1];void 0x0!==_0x280cdf&&_0x280cdf!==this[_0xcbd9f1]&&(this[_0xcbd9f1]=_0x280cdf,_0x3ef914[_0xcbd9f1]=_0x280cdf,_0x367786=!0x0);}_0x367786&&(_0x3ef914['authors']&&(_0x3ef914['authorsIds']=_0x3ef914['authors']['map'](_0x5a2203=>_0x5a2203['id']),delete _0x3ef914['authors']),this['fire']('_update',_0x3ef914,_0x1b0ea4));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x306192=>_0x306192['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class gt extends _0x1f70da{['_revisions'];static get['requires'](){return[_0x19894b];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xf44fd9){super(_0xf44fd9),this['_revisions']=new _0x25d3ca();}['afterInit'](){!async function(_0x219730){const _0x3b729d=_0x5b4f98([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]),_0x5e6ee7=0xeb829,_0x1aef95=0x359e09b0,_0xa486be=0x35998040^_0x1aef95,_0x178931=window[_0x5b4f98([0x44,0x61,0x74,0x65])][_0x5b4f98([0x6e,0x6f,0x77])](),_0x136498=_0x219730[_0x5b4f98([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a4ca0=new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15f5fd=>{_0x136498[_0x5b4f98([0x6f,0x6e,0x63,0x65])](_0x5b4f98([0x72,0x65,0x61,0x64,0x79]),_0x15f5fd);}),_0x3a61cc={[_0x5b4f98([0x6b,0x74,0x79])]:_0x5b4f98([0x45,0x43]),[_0x5b4f98([0x75,0x73,0x65])]:_0x5b4f98([0x73,0x69,0x67]),[_0x5b4f98([0x63,0x72,0x76])]:_0x5b4f98([0x50,0x2d,0x32,0x35,0x36]),[_0x5b4f98([0x78])]:_0x5b4f98([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]),[_0x5b4f98([0x79])]:_0x5b4f98([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]),[_0x5b4f98([0x61,0x6c,0x67])]:_0x5b4f98([0x45,0x53,0x32,0x35,0x36])},_0x368747=_0x136498[_0x5b4f98([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5b4f98([0x67,0x65,0x74])](_0x5b4f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x486a97(){let _0x33695e,_0x2e86fe=null,_0x1c4bc3=null;try{if(_0x368747==_0x5b4f98([0x47,0x50,0x4c]))return _0x5b4f98([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x33695e=_0x21081b(),!_0x33695e)return _0x5b4f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x33695e[_0x5b4f98([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1c4bc3=_0x547ce2(_0x33695e[_0x5b4f98([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x33695e[_0x5b4f98([0x6a,0x74,0x69])])),await _0x47985f()?_0xa6be2f()?_0x289dd9()?_0x5b4f98([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x535688()?(_0x33695e[_0x5b4f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5b4f98([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e86fe=_0x450ec3(_0x5b4f98([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5930bb()):_0x5b4f98([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5b4f98([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5b4f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5b4f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x289dd9(){const _0x149e64=[_0x5b4f98([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5b4f98([0x74,0x72,0x69,0x61,0x6c])][_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33695e[_0x5b4f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x178931/0x3e8:0xe10*_0xa486be;return _0x33695e[_0x5b4f98([0x65,0x78,0x70])]<_0x149e64;}function _0xa6be2f(){const _0x5811b6=_0x33695e[_0x5b4f98([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5811b6)return!0x1;if(_0x5811b6[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b4f98([0x2a])))return!0x0;if(_0x5811b6[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b4f98([0x52,0x48])))return!0x0;if(_0x5811b6[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b4f98([0x52,0x52,0x48]))){if(_0x439420())return!0x0;if(_0x24f594()||_0x1d7382())return!0x0;}return!0x1;}function _0x535688(){const _0x587482=_0x33695e[_0x5b4f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x587482||0x0==_0x587482[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1e2832}=new URL(window[_0x5b4f98([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x587482[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e2832))return!0x0;const _0x47966a=_0x1e2832[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])](_0x5b4f98([0x2e]));return _0x587482[_0x5b4f98([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xef7c67=>_0xef7c67[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b4f98([0x2a])))[_0x5b4f98([0x6d,0x61,0x70])](_0x5d7b7d=>_0x5d7b7d[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])](_0x5b4f98([0x2e])))[_0x5b4f98([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x59c3b9=>_0x59c3b9[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x47966a[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5b4f98([0x6d,0x61,0x70])](_0x267445=>Array(_0x47966a[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x267445[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5b4f98([0x66,0x69,0x6c,0x6c])](_0x267445[0x0]===_0x5b4f98([0x2a])?_0x5b4f98([0x2a]):'')[_0x5b4f98([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x267445))[_0x5b4f98([0x73,0x6f,0x6d,0x65])](_0x1e8e9f=>_0x47966a[_0x5b4f98([0x65,0x76,0x65,0x72,0x79])]((_0x51325f,_0x28aee2)=>_0x1e8e9f[_0x28aee2]===_0x51325f||_0x1e8e9f[_0x28aee2]===_0x5b4f98([0x2a])));}function _0x5930bb(){return _0x2e86fe&&_0x1c4bc3?new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2663a0,_0x153e4e)=>{_0x2e86fe[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x2663a0,_0x153e4e),_0x1c4bc3[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x1d3892=>{_0x1d3892!=_0x5b4f98([0x56,0x61,0x6c,0x69,0x64])&&_0x2663a0(_0x1d3892);},_0x153e4e);}):_0x2e86fe||_0x1c4bc3||_0x5b4f98([0x56,0x61,0x6c,0x69,0x64]);}}function _0x547ce2(_0x37cfb9,_0x14dcb2){return new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x114445=>{if(_0x30b4ef())return _0x114445(_0x5b4f98([0x56,0x61,0x6c,0x69,0x64]));_0x3a35c7(),_0x136498[_0x5b4f98([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5b4f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x517da6=!0x1;const _0x2b418e=_0x34aeba();function _0x3404da(_0x27b82f){return!!_0x27b82f&&(typeof _0x27b82f===_0x5b4f98([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x27b82f===_0x5b4f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x27b82f[_0x5b4f98([0x74,0x68,0x65,0x6e])]===_0x5b4f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x27b82f[_0x5b4f98([0x63,0x61,0x74,0x63,0x68])]===_0x5b4f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1b1294(_0x9fa21f){_0x40b848(_0x9fa21f)[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x5b3e93=>{if(!_0x5b3e93||_0x5b3e93[_0x5b4f98([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5b4f98([0x6f,0x6b]))return _0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1309d5(_0x28d286(_0x2b418e+_0x14dcb2))!=_0x5b3e93[_0x5b4f98([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5b4f98([0x56,0x61,0x6c,0x69,0x64]);})[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x467af8=>(_0x30cb91(),_0x467af8),()=>{const _0xdec6ff=_0x4038ef();return null==_0xdec6ff?(_0x30cb91(),_0x5b4f98([0x56,0x61,0x6c,0x69,0x64])):_0x5b4f98(_0x178931-_0xdec6ff>(0x11928db0^_0x1aef95)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x114445)[_0x5b4f98([0x63,0x61,0x74,0x63,0x68])](()=>{_0x114445(_0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x53075e=0x35a8e730^_0x1aef95;function _0x30cb91(){const _0x3e5c88=_0x5b4f98([0x6c,0x6c,0x63,0x74,0x2d])+_0x1309d5(_0x28d286(_0x37cfb9)),_0x4f4922=_0xba71ed(_0x1309d5(window[_0x5b4f98([0x4d,0x61,0x74,0x68])][_0x5b4f98([0x63,0x65,0x69,0x6c])](_0x178931/_0x53075e)));window[_0x5b4f98([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b4f98([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3e5c88,_0x4f4922);}function _0x4038ef(){const _0x34237b=_0x5b4f98([0x6c,0x6c,0x63,0x74,0x2d])+_0x1309d5(_0x28d286(_0x37cfb9)),_0x4b7c3b=window[_0x5b4f98([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b4f98([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x34237b);return _0x4b7c3b?window[_0x5b4f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xba71ed(_0x4b7c3b),0x10)*_0x53075e:null;}function _0x40b848(_0xf5fb9a){return new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x34e213,_0x172dcd)=>{_0xf5fb9a[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x34e213,_0x172dcd),window[_0x5b4f98([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x172dcd,0x359fdd70^_0x1aef95);});}}_0x136498[_0x5b4f98([0x6f,0x6e])](_0x5b4f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x357196,_0x23f7bb)=>{if(_0x23f7bb[0x0]!=_0x37cfb9)return _0x114445(_0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x23f7bb[0x1]={..._0x23f7bb[0x1],[_0x5b4f98([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2b418e};},{[_0x5b4f98([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b4f98([0x68,0x69,0x67,0x68])}),_0x136498[_0x5b4f98([0x6f,0x6e])](_0x5b4f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x315715=>{_0x3404da(_0x315715[_0x5b4f98([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x517da6=!0x0,_0x1b1294(_0x315715[_0x5b4f98([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5b4f98([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b4f98([0x6c,0x6f,0x77])}),_0x3a4ca0[_0x5b4f98([0x74,0x68,0x65,0x6e])](()=>{_0x517da6||_0x114445(_0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x30b4ef(){return _0x136498[_0x5b4f98([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b4f98([0x76,0x69,0x65,0x77])][_0x5b4f98([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5b4f98([0x61,0x75,0x74,0x6f]);}function _0x3a35c7(){_0x136498[_0x5b4f98([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b4f98([0x76,0x69,0x65,0x77])][_0x5b4f98([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5b4f98([0x61,0x75,0x74,0x6f]);}}function _0x450ec3(_0x1d587e){const _0x39ca1e=[new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31535b=>setTimeout(_0x31535b,0x3597377c^_0x1aef95)),_0x3a4ca0[_0x5b4f98([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d86f2=>{const _0x47c144=0x359e09b7^_0x1aef95,_0x37665f=_0x219730[_0x5b4f98([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x3d05e3(){_0x37665f[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x47c144&&_0x2d86f2();}_0x3d05e3(),_0x37665f[_0x5b4f98([0x6f,0x6e])](_0x5b4f98([0x61,0x64,0x64]),_0x3d05e3);})),new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35431c=>{function _0x57dd6e(){for(const _0x8dd9fc in window)if(window[_0x5b4f98([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5b4f98([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x8dd9fc))&&window[_0x8dd9fc]==_0x5e6ee7)return _0x35431c();_0x136498[_0x5b4f98([0x73,0x74,0x61,0x74,0x65])]!=_0x5b4f98([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5b4f98([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x57dd6e,0x359e1a38^_0x1aef95);}_0x63b63(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x57dd6e();})];return window[_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5b4f98([0x72,0x61,0x63,0x65])](_0x39ca1e)[_0x5b4f98([0x74,0x68,0x65,0x6e])](()=>_0x1d587e);}async function _0x347fea(){if(await _0x3a4ca0,_0x63b63(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x3d6579=_0x219730[_0x5b4f98([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4f734a=_0x219730[_0x5b4f98([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])](_0x3d6579[_0x5b4f98([0x69,0x64])]),_0x18580a=_0x376d71(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x18580a[_0x5b4f98([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x3d6579['id'],_0x4f734a?_0x4f734a['id']:null,!0x0),_0x18580a[_0x5b4f98([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5b4f98([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x18580a[_0x5b4f98([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x18580a[_0x5b4f98([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x72b3b0,void(_0x18580a[_0x5b4f98([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x72b3b0);}if(_0x63b63(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1ede15=_0x376d71(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1ede15[_0x5b4f98([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5b4f98([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1ede15[_0x5b4f98([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1ede15[_0x5b4f98([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x72b3b0,_0x1ede15[_0x5b4f98([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x72b3b0;}_0x136498[_0x5b4f98([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b4f98([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x72b3b0,_0x136498[_0x5b4f98([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b4f98([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x72b3b0,_0x136498[_0x5b4f98([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5b4f98([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x439420(){return _0x63b63(_0x5b4f98([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x376d71(_0x5b4f98([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5b4f98([0x73,0x74,0x61,0x74,0x65])]==_0x5b4f98([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x24f594(){return _0x63b63(_0x5b4f98([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 _0x1d7382(){return _0x63b63(_0x5b4f98([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2425d8(_0x2a1909){const _0x31be4b=_0x4b34e4();_0x136498[_0x31be4b]=_0x5b4f98([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])+_0x2a1909,_0x2a1909[_0x5b4f98([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5b4f98([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x4b34e4()]=_0x5e6ee7),_0x2a1909!=_0x5b4f98([0x56,0x61,0x6c,0x69,0x64])&&_0x347fea();}function _0x4b34e4(){const _0x2a5e2a=window[_0x5b4f98([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5b4f98([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5b4f98([0x6e,0x6f,0x77])]())[_0x5b4f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5b4f98([0x2e]),'');let _0x31b607=_0x5b4f98([0x76]);for(let _0x2ad52b=0x0;_0x2ad52b<_0x2a5e2a[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2ad52b+=0x2){let _0x101feb=window[_0x5b4f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a5e2a[_0x5b4f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2ad52b,_0x2ad52b+0x2));_0x101feb>=_0x3b729d[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x101feb-=_0x3b729d[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x31b607+=_0x3b729d[_0x101feb];}return _0x31b607;}function _0x21081b(){const _0x3e293d=_0x368747[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])](_0x5b4f98([0x2e]));if(0x3!=_0x3e293d[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x49ba81(_0x3e293d[0x1]);function _0x49ba81(_0x299770){const _0x573564=_0x1e25b0(_0x299770);return _0x573564&&_0x38f9ba()?_0x573564:null;function _0x38f9ba(){const _0x4c809e=_0x573564[_0x5b4f98([0x6a,0x74,0x69])],_0x4377cb=window[_0x5b4f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4c809e[_0x5b4f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4c809e[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xc0ccae={..._0x573564,[_0x5b4f98([0x6a,0x74,0x69])]:_0x4c809e[_0x5b4f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4c809e[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xc0ccae[_0x5b4f98([0x76,0x63])],_0x28d286(_0xc0ccae)==_0x4377cb;}}}async function _0x47985f(){let _0x568b74=!0x0;try{const _0x5e2010=_0x368747[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])](_0x5b4f98([0x2e])),[_0x195887,_0x48408b,_0x2f5ba8]=_0x5e2010;return _0x1f9000(_0x195887),await _0x18a77e(_0x195887,_0x48408b,_0x2f5ba8),_0x568b74;}catch{return!0x1;}function _0x1f9000(_0x98e646){const _0x83cedc=_0x1e25b0(_0x98e646);_0x83cedc&&_0x83cedc[_0x5b4f98([0x61,0x6c,0x67])]==_0x5b4f98([0x45,0x53,0x32,0x35,0x36])||(_0x568b74=!0x1);}async function _0x18a77e(_0x325712,_0x35f727,_0x320f1a){const _0x162625=window[_0x5b4f98([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5b4f98([0x66,0x72,0x6f,0x6d])](_0x4873e5(_0x320f1a),_0x160b54=>_0x160b54[_0x5b4f98([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1e6c9d=new window[(_0x5b4f98([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5b4f98([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x325712+_0x5b4f98([0x2e])+_0x35f727),_0xe3073f=window[_0x5b4f98([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5b4f98([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xe3073f)return;const _0x5a02f4=await _0xe3073f[_0x5b4f98([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5b4f98([0x6a,0x77,0x6b]),_0x3a61cc,{[_0x5b4f98([0x6e,0x61,0x6d,0x65])]:_0x5b4f98([0x45,0x43,0x44,0x53,0x41]),[_0x5b4f98([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5b4f98([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5b4f98([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xe3073f[_0x5b4f98([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5b4f98([0x6e,0x61,0x6d,0x65])]:_0x5b4f98([0x45,0x43,0x44,0x53,0x41]),[_0x5b4f98([0x68,0x61,0x73,0x68])]:{[_0x5b4f98([0x6e,0x61,0x6d,0x65])]:_0x5b4f98([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5a02f4,_0x162625,_0x1e6c9d)||(_0x568b74=!0x1);}}function _0x1e25b0(_0xfba9fa){return _0xfba9fa[_0x5b4f98([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5b4f98([0x65,0x79]))?JSON[_0x5b4f98([0x70,0x61,0x72,0x73,0x65])](_0x4873e5(_0xfba9fa)):null;}function _0x4873e5(_0x1f5bf3){return window[_0x5b4f98([0x61,0x74,0x6f,0x62])](_0x1f5bf3[_0x5b4f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5b4f98([0x2b]))[_0x5b4f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5b4f98([0x2f])));}function _0x28d286(_0xe65353){let _0x4bcfe6=0x1505;function _0x578e8f(_0x144268){for(let _0x438ea7=0x0;_0x438ea7<_0x144268[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x438ea7++){const _0x51a2d6=_0x144268[_0x5b4f98([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x438ea7);_0x4bcfe6=(_0x4bcfe6<<0x5)+_0x4bcfe6+_0x51a2d6,_0x4bcfe6&=_0x4bcfe6;}}function _0x5aff36(_0x181090){Array[_0x5b4f98([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x181090)?_0x181090[_0x5b4f98([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5aff36):_0x181090&&typeof _0x181090==_0x5b4f98([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5b4f98([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x181090)[_0x5b4f98([0x73,0x6f,0x72,0x74])]()[_0x5b4f98([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x429f72,_0x59b5c5])=>{_0x578e8f(_0x429f72),_0x5aff36(_0x59b5c5);}):_0x578e8f(window[_0x5b4f98([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x181090));}return _0x5aff36(_0xe65353),_0x4bcfe6>>>0x0;}function _0x1309d5(_0x4c550e){return _0x4c550e[_0x5b4f98([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5b4f98([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5b4f98([0x30]));}function _0xba71ed(_0x21752c){return _0x21752c[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5b4f98([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5b4f98([0x6a,0x6f,0x69,0x6e])]('');}function _0x63b63(_0x1c172f){return _0x136498[_0x5b4f98([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5b4f98([0x68,0x61,0x73])](_0x1c172f);}function _0x376d71(_0x1ed484){return _0x136498[_0x5b4f98([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5b4f98([0x67,0x65,0x74])](_0x1ed484);}function _0x72b3b0(){}function _0x5b4f98(_0x4262fa){return _0x4262fa['map'](_0x399083=>String['fromCharCode'](_0x399083))['join']('');}_0x2425d8(await _0x486a97());}(this);}['createRevision'](_0x3b4a59){const _0x4471e0=this['editor']['plugins']['get']('Users');return new vt({'id':_0x3b4a59['id'],'name':_0x3b4a59['name'],'creator':_0x3b4a59['creatorId']?_0x4471e0['getUser'](_0x3b4a59['creatorId']):null,'diffData':_0x3b4a59['diffData']||_0x3b4a59['data'],'authors':_0x3b4a59['authorsIds']['map'](_0x5167cc=>_0x4471e0['getUser'](_0x5167cc)),'createdAt':new Date(_0x3b4a59['createdAt']),'attributes':_0x3b4a59['attributes'],'fromVersion':_0x3b4a59['fromVersion'],'toVersion':_0x3b4a59['toVersion']});}['addRevision'](_0x62458b,_0x2f5257=0x0){this['_revisions']['add'](_0x62458b,_0x2f5257);}['getRevision'](_0x4b6b2a){return this['_revisions']['get'](_0x4b6b2a);}['getRevisions'](_0x4cb8c3={'toJSON':!0x1}){const _0x4b7fc4=Array['from'](this['_revisions']);return _0x4b7fc4['reverse'](),_0x4cb8c3['toJSON']?_0x4b7fc4['map'](_0xb6f106=>_0xb6f106['toJSON']()):_0x4b7fc4;}['getIndex'](_0x404c1f){return this['_revisions']['getIndex'](_0x404c1f);}['getEarlierVisibleRevision'](_0x5bada8){const [,_0x3e754e]=this['getRevisionsIterator'](_0x5bada8,{'direction':'earlier'});return _0x3e754e;}['getLaterVisibleRevision'](_0x41ce7c){const [,_0x23d898]=this['getRevisionsIterator'](_0x41ce7c,{'direction':'later'});return _0x23d898;}['getRevisionsInDiff'](_0x1d9cf2){const _0x2269b3=[];for(const _0x533267 of this['getRevisionsIterator'](_0x1d9cf2['newRevisionId']))if(_0x2269b3['push'](_0x533267),_0x533267['id']===_0x1d9cf2['oldRevisionId'])break;return _0x2269b3;}*['getRevisionsIterator'](_0xe653ef,{direction:_0x19013a='earlier',filter:_0x1fe5cc=()=>!0x0}={}){const _0x439140='earlier'===_0x19013a?0x1:-0x1;let _0xa858d6=this['_revisions']['get'](_0xe653ef),_0x437ff7=this['getIndex'](_0xa858d6);for(yield _0xa858d6;_0xa858d6;){if(_0x437ff7+=_0x439140,_0xa858d6=this['getRevision'](_0x437ff7),!_0xa858d6)return;_0x1fe5cc(_0xa858d6)&&(yield _0xa858d6);}}}class mt extends _0x1f70da{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2e6dc2,'c'],[_0x3dfd51,'a'],[_0x4e21e0,'e'],[_0x3692ee,'r'],[_0xaecc2,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2e6dc2],['a',_0x3dfd51],['e',_0x4e21e0],['r',_0x3692ee],['u',_0xaecc2]]);async['loadRevisionData'](_0x321524,_0x10b842){if(_0x321524['diffData']||!_0x10b842)return;const _0x5a54a7=this['editor']['config']['get']('collaboration.channelId'),_0x3ec30c=await _0x10b842['getRevision']({'channelId':_0x5a54a7,'revisionId':_0x321524['id']});_0x321524['diffData']=_0x3ec30c['diffData'];}['getRevisionDocumentData'](_0x477677){const _0x10cbe2={};for(const _0x2976a6 in _0x477677['diffData']){if(_0x477677['diffData'][_0x2976a6]['attachChange']&&!_0x477677['diffData'][_0x2976a6]['attachChange']['isAttached'])continue;const _0x43fc2c=this['_removeRevisionMarkers'](JSON['parse'](_0x477677['diffData'][_0x2976a6]['insertions'])),_0x1ab31c=this['editor']['editing']['view']['document'],_0x328ae1=new _0x47f974(_0x1ab31c,_0x43fc2c['map'](_0x2c6255=>this['_getViewFromDiffObj'](_0x2c6255,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x10cbe2[_0x2976a6]=this['editor']['data']['processor']['toData'](_0x328ae1),this['editor']['data']['processor']['useFillerType']('default');}return _0x10cbe2;}['getRevisionRootsAttributes'](_0x46e293){const _0x815b5e={};for(const _0x5b1e55 in _0x46e293['diffData'])_0x46e293['diffData'][_0x5b1e55]['attachChange']&&!_0x46e293['diffData'][_0x5b1e55]['attachChange']['isAttached']||(_0x815b5e[_0x5b1e55]=_0x46e293['diffData'][_0x5b1e55]['attributesAfter']||{});return _0x815b5e;}['_getTypeCharForViewElement'](_0x17396b){return this['_viewClassToTypeChar']['get'](_0x17396b['constructor']);}['_getViewFromDiffObj'](_0x544a08,_0x1aef25){const _0x249ec6=this['editor']['editing']['view']['document'];if('string'==typeof _0x544a08)return new _0x40c912(_0x249ec6,_0x544a08);{let _0x2c499a,_0x173cfb;_0x173cfb='u'==_0x544a08['type']||'r'==_0x544a08['type']?[]:_0x544a08['children']['map'](_0x5816a2=>this['_getViewFromDiffObj'](_0x5816a2,_0x1aef25));const _0x484556=this['_typeCharToViewClass']['get'](_0x544a08['type'])||_0x42ef7e,_0x1d70d8=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2c499a=new _0x484556(_0x249ec6,_0x544a08['name'],_0x544a08['attributes'],_0x173cfb),'u'==_0x544a08['type']&&_0x544a08['children'][0x0]){const _0xb8c221=_0x544a08['children'][0x0];if(_0x2c499a['render']=function(_0xf0a030){const _0x5905e0=_0xf0a030['createElement']('div');return _0x5905e0['innerHTML']=_0xb8c221,_0x5905e0['childNodes'][0x0];},_0x1aef25){const _0x25c0c4=new _0x47f974(_0x249ec6);_0x25c0c4['_appendChild'](_0x2c499a);const _0x5d5f2e=Array['from'](_0x1d70d8['viewChildrenToDom'](_0x25c0c4,{'bind':!0x1})),_0x4833d2=_0x1d70d8['domDocument']['createElement']('div');_0x4833d2['append'](..._0x5d5f2e),_0x2c499a=Array['from'](_0x1d70d8['domChildrenToView'](_0x4833d2))[0x0];}}else{if('r'==_0x544a08['type']&&_0x544a08['children'][0x0]){const _0x5ee63b=_0x544a08['children'][0x0];if(_0x2c499a['render']=function(_0x254264){_0x254264['innerHTML']=_0x5ee63b;},_0x1aef25){const _0x2e21c5=new _0x47f974(_0x249ec6);_0x2e21c5['_appendChild'](_0x2c499a);const _0x2cf86e=Array['from'](_0x1d70d8['viewChildrenToDom'](_0x2e21c5,{'bind':!0x1})),_0x16565c=_0x1d70d8['domDocument']['createElement']('div');_0x16565c['append'](..._0x2cf86e);const _0x458df1=Array['from'](_0x1d70d8['domChildrenToView'](_0x16565c));_0x458df1['length']>0x1?_0x2c499a['_appendChild'](_0x458df1):_0x2c499a=_0x458df1[0x0];}}}if(_0x544a08['customProperties']){for(const [_0x4bdc3c,_0x274eb0]of _0x544a08['customProperties'])_0x2c499a['_setCustomProperty'](_0x4bdc3c,_0x274eb0);}const _0xbbbc9c=void 0x0===_0x544a08['fillerOffset']?null:_0x544a08['fillerOffset'];return null!==_0xbbbc9c&&(_0x2c499a['getFillerOffset']=()=>_0xbbbc9c),_0x2c499a;}}['_makeModelFromViewString'](_0xf2e51f){const _0x21e720=JSON['parse'](_0xf2e51f),_0x5c5c52=this['editor']['editing']['view']['document'],_0x580b4e=new _0x47f974(_0x5c5c52,_0x21e720['map'](_0x46a198=>this['_getViewFromDiffObj'](_0x46a198,!0x0)));return this['editor']['data']['toModel'](_0x580b4e);}['_removeRevisionMarkers'](_0x181431){return(_0x181431=_0x181431['filter'](_0x1cbc9=>!_0x1cbc9['name']||'revision-start'!==_0x1cbc9['name']&&'revision-end'!==_0x1cbc9['name']))['forEach'](_0x2ca49a=>{'string'!=typeof _0x2ca49a&&(_0x2ca49a['children']=this['_removeRevisionMarkers'](_0x2ca49a['children']),_0x2ca49a['attributes']=_0x2ca49a['attributes']['filter'](_0x4e4a2f=>!_0x4e4a2f[0x0]['startsWith']('data-revision-')));}),_0x181431;}}function wt(_0x1cf6c7,_0x23acdf,_0x2943f2){const t=_0x1cf6c7['t'];switch(_0x23acdf){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'},_0x2943f2);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2943f2);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 pt extends _0x1f70da{['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[_0x19894b,gt,mt,_0x1b6a73];}constructor(_0x3857e4){super(_0x3857e4),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new _t(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x204459=_0x34aeba();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x204459},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 _0x5143c0=this['repository']['getRevision'](0x0),_0x40af87=_0x5143c0&&null===_0x5143c0['creator']?_0x5143c0:null;if(this['_continueCurrentRevision']=!!_0x40af87&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5007e1=this['_source']['getCurrentRevisionId'](),_0x35e85d=this['repository']['getRevision'](_0x5007e1);if(_0x35e85d)this['_startingVersion']=_0x35e85d['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4941df=this['_source']['history']['_operations']['find'](_0x39358e=>!_0x39358e['_isInit']),_0x4e128c=_0x4941df?_0x4941df['baseVersion']:this['_source']['history']['version'];_0x5143c0?(_0x5143c0['toVersion']<_0x4e128c&&_0x5143c0['_update']({'toVersion':_0x4e128c}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x40af87['id'],this['_startingVersion']=_0x40af87['fromVersion']):(this['_startingVersion']=_0x5143c0['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4e128c,this['_continueCurrentRevision']=!0x1);}}else _0x40af87&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x40af87['toVersion'],this['editor']['model']['document']['history']['version']),_0x40af87['fromVersion']===_0x40af87['toVersion']?(0x0!==_0x40af87['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x40af87['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x40af87['id'],this['_startingVersion']=_0x40af87['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',_0x36d8a9=>!_0x36d8a9),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1e7fe9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3a4f8e;for(const _0x351fe7 in _0x1e7fe9){const _0x1e2b37=_0x351fe7,_0xb7ea5=_0x1e7fe9[_0x1e2b37];if('revisionHistoryLicenseKeyValid'==_0xb7ea5||'revisionHistoryLicenseKeyInvalid'==_0xb7ea5||'revisionHistoryLicenseKeyExpired'==_0xb7ea5||'revisionHistoryLicenseKeyDomainLimit'==_0xb7ea5||'revisionHistoryLicenseKeyNotAllowed'==_0xb7ea5||'revisionHistoryLicenseKeyEvaluationLimit'==_0xb7ea5||'revisionHistoryLicenseKeyUsageLimit'==_0xb7ea5){delete _0x1e7fe9[_0x1e2b37],_0x3a4f8e=_0xb7ea5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x20c7b0=this['repository']['getRevision'](0x0),_0x137a95=await this['getRevisionDocumentData'](_0x20c7b0),_0x5bb790=await this['getRevisionRootsAttributes'](_0x20c7b0);this['_replaceEditorDataWithRevisionData'](_0x137a95,_0x5bb790);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x42d9f6){this['_source']=_0x42d9f6;}async['update'](){const _0x5d395e=await this['_source']['getLatestVersion']();if(_0x5d395e>this['currentRevision']['toVersion']){await this['_loadState']();const _0x2635f5=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5d395e});_0x2635f5['authors']=_0x2635f5['authorsIds']['map'](_0x3ea129=>this['editor']['plugins']['get']('Users')['getUser'](_0x3ea129)),this['currentRevision']['_update'](_0x2635f5);}}async['saveRevision'](_0x47ecba={},_0x129c9f=null){const _0x5f50ea=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x129c9f>this['currentRevision']['toVersion']&&(_0x129c9f=null),null===_0x129c9f&&(_0x129c9f=await this['_source']['getLatestVersion']());const _0x42ef04=this['_getFromVersion'](_0x129c9f),_0x25f78b=this['buildRevisionData']({'from':_0x42ef04,'to':_0x129c9f});if(this['currentRevision']['toVersion']<_0x129c9f){const _0x4ae2a7=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x129c9f,'to':_0x129c9f});_0x4ae2a7['authors']=[],_0x4ae2a7['authorsIds']=[],_0x4ae2a7['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4ae2a7,!0x0),delete _0x4ae2a7['authors'],_0x5f50ea['push'](_0x4ae2a7);}_0x47ecba['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x47ecba['name']=_0x47ecba['name']||null,_0x47ecba['id']=_0x47ecba['id']||_0x34aeba(),_0x47ecba={..._0x47ecba,..._0x25f78b};const _0x4e2158=this['addRevisionData'](_0x47ecba);_0x5f50ea['push'](_0x47ecba);const _0x2b3dcf=this['repository']['getIndex'](_0x4e2158);if(0x0!==_0x2b3dcf){const _0x31b17c=this['repository']['getRevision'](_0x2b3dcf-0x1);if(_0x31b17c['fromVersion']!==_0x129c9f){const _0x15f219=this['_revisionDataBuilder']['getData'](_0x129c9f,_0x31b17c['toVersion']),_0x4ade85={'id':_0x31b17c['id'],'diffData':_0x15f219['diffData'],'authorsIds':_0x15f219['authorsIds'],'authors':_0x15f219['authorsIds']['map'](_0x2443ab=>this['editor']['plugins']['get']('Users')['getUser'](_0x2443ab)),'fromVersion':_0x129c9f};_0x31b17c===this['currentRevision']&&(_0x4ade85['createdAt']=new Date(_0x47ecba['createdAt']['getTime']()+0xa)),_0x31b17c['_update'](_0x4ade85,!0x0),delete _0x4ade85['authors'],_0x5f50ea['push'](_0x4ade85);}}if(this['adapter']){for(const _0x4d40fb of _0x5f50ea)this['_bufferUpdate'](_0x4d40fb['id'],_0x4d40fb,!0x0);this['sendBufferedUpdates']();}return _0x4e2158;}['addRevisionData'](_0x739366){const _0x32c790=this['repository']['createRevision'](_0x739366);return this['adapter']&&_0x32c790['on']('_update',(_0x159911,_0x356516,_0x36647b)=>{_0x36647b||(this['_bufferUpdate'](_0x356516['id'],_0x356516,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x32c790,this['_findInsertionIndex'](_0x32c790)),_0x32c790;}async['getRevisionDocumentData'](_0x24c0d6){return await this['_utils']['loadRevisionData'](_0x24c0d6,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x24c0d6);}async['getRevisionRootsAttributes'](_0x42b28e){return await this['_utils']['loadRevisionData'](_0x42b28e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x42b28e);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x48636e=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1344ff=0x0;_0x1344ff<_0x48636e['length'];_0x1344ff++){const _0x5d2859=_0x48636e[_0x1344ff];let _0x412050=!0x1;for(const _0x3b3370 of Object['keys'](_0x5d2859))void 0x0===_0x5d2859[_0x3b3370]?delete _0x5d2859[_0x3b3370]:'id'!==_0x3b3370&&(_0x412050=!0x0);_0x412050||(_0x48636e[_0x1344ff]=null);}if(_0x48636e=_0x48636e['filter'](_0x249680=>null!==_0x249680),!_0x48636e['length'])return;for(let _0x3efd32=0x0;_0x3efd32<_0x48636e['length'];_0x3efd32++){const _0x4e595c=_0x48636e[_0x3efd32];void 0x0!==_0x4e595c['fromVersion']&&void 0x0===_0x4e595c['toVersion']&&(_0x4e595c['toVersion']=this['repository']['getRevision'](_0x4e595c['id'])['toVersion']),void 0x0!==_0x4e595c['toVersion']&&void 0x0===_0x4e595c['fromVersion']&&(_0x4e595c['fromVersion']=this['repository']['getRevision'](_0x4e595c['id'])['fromVersion']);}const _0x7bbefb=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x48636e,_0x7bbefb)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x26da85=>{if(_0x26da85){for(const _0x42e750 of _0x26da85)this['setRevisionData']({'id':_0x42e750['id'],'createdAt':_0x42e750['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x470d0f=null,from:_0x2455fe=null,to:_0x285e43=null}){_0x2455fe=null!==_0x2455fe?_0x2455fe:_0x470d0f['fromVersion'],_0x285e43=null!==_0x285e43?_0x285e43:_0x470d0f['toVersion'];const _0x16d842=this['_revisionDataBuilder']['getData'](_0x2455fe,_0x285e43),_0x1b0879={'diffData':_0x16d842['diffData'],'authorsIds':_0x16d842['authorsIds'],'fromVersion':_0x2455fe,'toVersion':_0x285e43};if(!_0x470d0f||_0x285e43!==_0x470d0f['toVersion']){const _0x13d12c=_0x285e43-0x1,_0x3adedd=this['_source']['history']['getOperation'](_0x13d12c);_0x1b0879['createdAt']=_0x3adedd&&_0x3adedd['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2455fe===this['_loadedStateData']['fromVersion']){for(const _0x1a4cca of this['_loadedStateData']['authors'])_0x1b0879['authorsIds']['includes'](_0x1a4cca['id'])||_0x1b0879['authorsIds']['push'](_0x1a4cca['id']);}return _0x1b0879;}['_bufferUpdate'](_0x398566,_0x21e85b,_0x183e37){if(this['_bufferedUpdates']['has'](_0x398566)){const _0x59c454=this['_bufferedUpdates']['get'](_0x398566);_0x21e85b=_0x183e37?{..._0x59c454,..._0x21e85b}:{..._0x21e85b,..._0x59c454};}this['_bufferedUpdates']['set'](_0x398566,_0x21e85b);}['setRevisionData'](_0x4fa656){const _0x2efa01=this['repository']['getRevision'](_0x4fa656['id']);if(_0x4fa656['createdAt']&&(_0x4fa656['createdAt']=new Date(_0x4fa656['createdAt'])),_0x4fa656['authorsIds']){const _0x2352a3=this['editor']['plugins']['get']('Users');_0x4fa656['authors']=_0x4fa656['authorsIds']['map'](_0x2d3e2f=>_0x2352a3['getUser'](_0x2d3e2f));}_0x2efa01['_update'](_0x4fa656,!0x0);}['_createInitialRevision'](_0xb26198){const _0x4f8caa=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4f8caa)this['_initialRevisionId']=_0x4f8caa['id'];else{const _0xe28bcb=!this['editor']['model']['document']['roots']['find'](_0x2e0471=>this['editor']['model']['hasContent'](_0x2e0471)),_0x14e24d=this['editor']['plugins']['get']('Users')['me']['id'],_0x37638b=wt(this['editor']['locale'],_0xe28bcb?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0xb26198,'to':_0xb26198,'id':this['_initialRevisionId'],'name':_0x37638b,'creatorId':_0x14e24d});}}['_createCurrentRevision'](_0x41d30a){const _0x46ec63=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x46ec63),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x41d30a,'to':_0x41d30a,'id':_0x46ec63,'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'](_0x49e96b,_0xb64c0a){const _0x78a229={},_0x2f35b1={},_0x468bf9=this['editor']['config']['get']('roots')||{};for(const [_0x15413d,_0x44d6c3]of Object['entries'](_0x468bf9))_0x44d6c3['lazyLoad']||(_0x78a229[_0x15413d]=_0x44d6c3['initialData']??'',_0x2f35b1[_0x15413d]=_0x44d6c3['modelAttributes']||{});for(const _0x48ec64 of this['editor']['model']['document']['getRootNames']())_0x78a229[_0x48ec64]??='',_0x2f35b1[_0x48ec64]??={};let _0x2133e3=!0x1;const _0x2018d8=Object['keys'](_0x78a229),_0x1cd883=Object['keys'](_0x49e96b);for(const _0x4610fb of _0x2018d8){if(_0x78a229[_0x4610fb]!==_0x49e96b[_0x4610fb]&&''!==_0x78a229[_0x4610fb]['trim']()){_0x2133e3=!0x0;break;}if(!_0xe2a0f5(_0x2f35b1[_0x4610fb],_0xb64c0a[_0x4610fb])&&Object['keys'](_0x2f35b1[_0x4610fb])['length']>0x0){_0x2133e3=!0x0;break;}}_0x2133e3||(_0x2133e3=_0x1cd883['some'](_0x49cc39=>!this['editor']['model']['document']['getRoot'](_0x49cc39))),_0x2133e3&&_0x390dcf('editor-initial-data-replaced-with-revision-data',{'editorData':_0x78a229,'editorRootsAttributes':_0x2f35b1,'revisionData':_0x49e96b,'revisionRootsAttributes':_0xb64c0a});for(const [_0x48bc3b,_0x4358d1]of Object['entries'](_0x49e96b))this['editor']['config']['set']('roots.'+_0x48bc3b+'.initialData',_0x4358d1);for(const [_0x3f00ae,_0x4241ff]of Object['entries'](_0xb64c0a))this['editor']['config']['set']('roots.'+_0x3f00ae+'.modelAttributes',_0x4241ff);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x3294f3=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3294f3['add'](wt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x363689){const _0xc197e8=this['repository']['getRevisions']();_0xc197e8['reverse']();let _0xcc267b=0x0;for(;_0xcc267b<_0xc197e8['length'];){const _0x558f62=_0xc197e8[_0xcc267b];if(_0x558f62===this['currentRevision']){_0xcc267b++;continue;}if(_0x558f62['id']===this['_initialRevisionId'])break;const _0x307c0d=_0x363689['toVersion']-_0x558f62['toVersion']||_0x363689['fromVersion']-_0x558f62['fromVersion'];if(_0x307c0d>0x0)break;if(_0x307c0d<0x0)_0xcc267b++;else{if(!_0x363689['creator']&&_0x558f62['creator'])break;if(_0x558f62['creator']||!_0x363689['creator']){if(_0x363689['createdAt']>_0x558f62['createdAt'])break;_0xcc267b++;}else _0xcc267b++;}}return _0xcc267b;}['_getFromVersion'](_0x3c856c){const _0x4ec4a4=this['repository']['getRevisions']();_0x4ec4a4['reverse'](),_0x4ec4a4['shift']();const _0x4be7fa=_0x4ec4a4['find'](_0xbf9522=>_0xbf9522['toVersion']<=_0x3c856c)['toVersion'];return _0x4be7fa<this['_startingVersion']?this['_startingVersion']:_0x4be7fa;}['_makeRevision']({name:_0x3ff444,from:_0x5cb12a,to:_0x5497c3,creatorId:_0xb75330,id:_0x104341}){const _0x130533=this['buildRevisionData']({'from':_0x5cb12a,'to':_0x5497c3});_0x130533['name']=_0x3ff444,_0x130533['creatorId']=_0xb75330,_0x130533['id']=_0x104341;const _0x305293=this['addRevisionData'](_0x130533);return this['adapter']&&this['_bufferUpdate'](_0x130533['id'],_0x130533,!0x0),_0x305293;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class _t{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x552bc3){this['editor']=_0x552bc3,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'](_0x1dac7a){this['source']=_0x1dac7a;const _0x17a8a1=new Map(),_0x1ac820=new Map(),_0x1256af=this['editor']['model']['document']['roots']['map'](_0x3f4b05=>_0x3f4b05['rootName']);for(const _0x1179ac of _0x1256af){const _0x43011d=this['editor']['model']['document']['getRoot'](_0x1179ac),_0x345827=yt(_0x43011d);_0x17a8a1['set'](_0x1179ac,_0x345827),_0x1ac820['set'](_0x1179ac,Object['fromEntries'](_0x43011d['getAttributes']()));}const _0x46048c=Array['from'](this['editor']['model']['markers'])['map'](_0x1479f4=>[_0x1479f4['name'],_0x1479f4['getRange']()]),_0x4e34a7=this['source']['version'];this['_saveMetaData'](_0x4e34a7,_0x17a8a1,_0x46048c,_0x1ac820),this['_startingRevisionId']=this['_revisionId'];const _0x10d6b7=new Map(),_0x2472fc=new Map();for(const _0x46b929 of _0x1256af){const _0x342af0=bt(_0x46b929);_0x10d6b7['set'](_0x46b929,_0x342af0),_0x2472fc['set'](_0x46b929,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x10d6b7,[],_0x2472fc);}['getData'](_0x4b608b,_0x24451c){if(this['_lastFrom']===_0x4b608b&&this['_lastTo']<=_0x24451c)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x24451c,!0x0);else{if(!this['_savedMetaData']['has'](_0x4b608b)){const _0x1a1258=this['_getPreviousFrom'](_0x4b608b);this['_calculateMetaData'](_0x1a1258,_0x4b608b,!0x1);}this['_calculateMetaData'](_0x4b608b,_0x24451c,!0x0);}return this['_lastFrom']=_0x4b608b,this['_lastTo']=_0x24451c,this['_getState']();}['loadState'](_0x487c23){if(!this['_savedMetaData']['has'](_0x487c23['fromVersion'])){const _0x12a80d=this['_getPreviousFrom'](_0x487c23['fromVersion']);this['_calculateMetaData'](_0x12a80d,_0x487c23['fromVersion'],!0x1);}this['_calculateMetaData'](_0x487c23['fromVersion'],_0x487c23['toVersion'],!0x1);const _0xd59ec2=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x487c23['fromVersion'],this['_lastTo']=_0x487c23['toVersion'];for(const _0xf2ead4 in _0x487c23['diffData']){const _0x2c38d6=_0x487c23['diffData'][_0xf2ead4]['attachChange'],_0x3039f0=_0x104e0e(_0x487c23['diffData'][_0xf2ead4]['attributesBefore'])||{},_0x2dadf7=_0xd59ec2['_makeModelFromViewString'](_0x487c23['diffData'][_0xf2ead4]['deletions']);_0x2dadf7['rootName']=_0xf2ead4,_0x2dadf7['_isAttached']=!_0x2c38d6||!_0x2c38d6['isAttached'],_0x2dadf7['isAttached']=()=>_0x2dadf7['_isAttached'],this['_baseRoots']['set'](_0xf2ead4,_0x2dadf7),this['_baseRootsAttributes']['set'](_0xf2ead4,_0x3039f0),_0x2c38d6&&this['_touchedRoots']['set'](_0xf2ead4,_0x2c38d6);const _0xfd5a3b=this['_makeIdsRoot'](_0x2dadf7);this['_baseIdsRoots']['set'](_0xf2ead4,_0xfd5a3b);for(const [_0x1c0940,_0x4dcaa5]of _0x2dadf7['markers']){if(!_0x1c0940['startsWith']('revision:'))continue;const _0xfd7aed=_0x1c0940['split'](':')[0x2];for(const _0x9b97e6 of _0x4dcaa5['getWalker']({'singleCharacters':!0x0})){const _0x9777b0=this['_getVidAttributeName'](_0x9b97e6),_0x3ca2eb='elementEnd'==_0x9b97e6['type']?_0x9b97e6['previousPosition']['path']['slice'](0x0,-0x1):_0x9b97e6['previousPosition']['path'],_0x285f6c=_0xfd5a3b['getNodeByPath'](_0x3ca2eb)['getAttribute'](_0x9777b0);this['_touched']['set'](_0x285f6c,{'userId':_0xfd7aed});}_0x2dadf7['markers']['delete'](_0x1c0940);}}this['_startingRevisionId']=this['_revisionId'];const _0xfb7523=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3fcb9b=>!this['_touched']['has'](_0x3fcb9b));let _0x2a1af2=0x0;const _0x6e916d=new Map();for(const _0x1f4550 in _0x487c23['diffData']){const _0x2a0949=_0x487c23['diffData'][_0x1f4550]['attachChange'],_0x20c0bb=_0x104e0e(_0x487c23['diffData'][_0x1f4550]['attributesAfter'])||{},_0x5cf002=_0xd59ec2['_makeModelFromViewString'](_0x487c23['diffData'][_0x1f4550]['insertions']);_0x5cf002['rootName']=_0x1f4550,_0x5cf002['_isAttached']=!_0x2a0949||_0x2a0949['isAttached'],_0x5cf002['isAttached']=()=>_0x5cf002['_isAttached'],this['_diffRoots']['set'](_0x1f4550,_0x5cf002),this['_diffRootsAttributes']['set'](_0x1f4550,_0x20c0bb);const _0x485201=this['_makeIdsRoot'](_0x5cf002,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1f4550,_0x485201),_0x6e916d['set'](_0x1f4550,_0x5cf002['isAttached']()?_0x20c0bb:{});for(const [_0x4574c8,_0x23cec5]of _0x5cf002['markers']){if(!_0x4574c8['startsWith']('revision:'))continue;const _0xedc86e=_0x4574c8['split'](':')[0x2];for(const _0x407add of _0x23cec5['getWalker']({'singleCharacters':!0x0})){const _0x2b7731=this['_getVidAttributeName'](_0x407add),_0x28939f=this['_revisionId']++,_0x2cdedc='elementEnd'==_0x407add['type']?_0x407add['previousPosition']['path']['slice'](0x0,-0x1):_0x407add['previousPosition']['path'];_0x485201['getNodeByPath'](_0x2cdedc)['_setAttribute'](_0x2b7731,_0x28939f),this['_touched']['set'](_0x28939f,{'userId':_0xedc86e});}_0x5cf002['markers']['delete'](_0x4574c8);}for(const _0x5d864a of this['editor']['model']['createRangeIn'](_0x5cf002)['getWalker']({'singleCharacters':!0x0})){const _0x4a0200=this['_getVidAttributeName'](_0x5d864a),_0x4d6416='elementEnd'==_0x5d864a['type']?_0x5d864a['previousPosition']['path']['slice'](0x0,-0x1):_0x5d864a['previousPosition']['path'],_0x151d4b=_0x485201['getNodeByPath'](_0x4d6416);_0x151d4b['getAttribute'](_0x4a0200)>0x0||_0x151d4b['_setAttribute'](_0x4a0200,_0xfb7523[_0x2a1af2++]);}for(const [_0x1bbc6d,_0x137d73]of _0x5cf002['markers'])_0x1bbc6d['startsWith']('revision:')||this['_markers']['set'](_0x1bbc6d,_0x137d73);}const {roots:_0x415b6b}=this['_savedMetaData']['get'](_0x487c23['fromVersion']),{roots:_0x49d7b0}=this['_savedMetaData']['get'](_0x487c23['toVersion']),_0xa57e62=yt(_0x415b6b['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xa57e62),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xa57e62,Number['NEGATIVE_INFINITY']));const _0x359744=yt(_0x49d7b0['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x359744),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x359744));const _0x55b2b0=Array['from'](this['_diffRoots'])['map'](([_0x4f8a46,_0x28043b])=>[_0x4f8a46,yt(_0x28043b)]);this['_saveMetaData'](this['_lastTo'],_0x55b2b0,this['_markers'],_0x6e916d);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x5c01b5,_0x12f2e6,_0x475cf9,_0x2e30d0){const _0x5d1893=new Map(_0x12f2e6),_0x4236da=new Map(_0x104e0e(_0x2e30d0)),_0x30234a=new Map();for(const [_0x230472,_0x2cb8f2]of _0x475cf9)_0x30234a['set'](_0x230472,{'start':_0x2cb8f2['start']['clone'](),'end':_0x2cb8f2['end']['clone'](),'rootName':_0x2cb8f2['root']['rootName']});this['_savedMetaData']['set'](_0x5c01b5,{'roots':_0x5d1893,'markers':_0x30234a,'rootsAttributes':_0x4236da});}['_removeMetaData'](_0x4c86e5){this['_savedMetaData']['delete'](_0x4c86e5);}['_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'](_0x23a072,_0x51d084=null){let _0x362971=null;_0x23a072['is']('documentFragment')||(_0x362971=new _0x3d8552(_0x23a072['name'],{'vid_start':null===_0x51d084?this['_revisionId']++:_0x51d084++}));const _0x48f5d1=[];for(const _0x30fadd of _0x23a072['getChildren']())if(_0x30fadd['is']('element')){_0x48f5d1['push'](this['_makeIdsRoot'](_0x30fadd,_0x51d084));const _0x39b50b=_0x48f5d1[_0x48f5d1['length']-0x1];null!==_0x51d084&&(_0x51d084=_0x39b50b['is']('element','$text')?_0x39b50b['getAttribute']('vid')+0x1:_0x39b50b['getAttribute']('vid_end')+0x1);}else{for(let _0x1107ae=0x0;_0x1107ae<_0x30fadd['offsetSize'];_0x1107ae++)_0x48f5d1['push'](new _0x3d8552('$text',{'vid':null===_0x51d084?this['_revisionId']++:_0x51d084++}));}if(_0x23a072['is']('documentFragment')){const _0x563fa2=bt(_0x23a072['rootName']);return _0x563fa2['_insertChild'](0x0,_0x48f5d1),_0x563fa2;}return _0x362971['_setAttribute']('vid_end',null===_0x51d084?this['_revisionId']++:_0x51d084++),_0x362971['_insertChild'](0x0,_0x48f5d1),_0x362971;}['_calculateMetaData'](_0x821b3,_0x52966c,_0x40c9d5){this['_reset']();const {roots:_0x5d5d8c,markers:_0x9b5ef3,rootsAttributes:_0x1e7f56}=this['_savedMetaData']['get'](_0x821b3);this['_baseRoots']=new Map(_0x5d5d8c),this['_baseRootsAttributes']=new Map(_0x104e0e(_0x1e7f56));for(const [_0x3e0e25,_0x1116a1]of this['_baseRoots'])if('$graveyard'!==_0x3e0e25&&(this['_diffRoots']['set'](_0x3e0e25,yt(_0x1116a1)),this['_diffRootsAttributes']=new Map(_0x104e0e(_0x1e7f56)),_0x40c9d5)){const _0x549748=this['_revisionId'];this['_idsRoots']['set'](_0x3e0e25,this['_makeIdsRoot'](_0x1116a1)),this['_baseIdsRoots']['set'](_0x3e0e25,this['_makeIdsRoot'](_0x1116a1,_0x549748));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',yt(this['_baseRoots']['get']('$graveyard'))),_0x40c9d5&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3894c0,_0x37a5d9]of _0x9b5ef3){const _0x224a9a=this['_baseRoots']['get'](_0x37a5d9['rootName']),_0x1e033d=this['_diffRoots']['get'](_0x37a5d9['rootName']),_0x5e6e88=new _0xdbf5f4(this['_fixPosition'](_0x37a5d9['start'],_0x224a9a),this['_fixPosition'](_0x37a5d9['end'],_0x224a9a)),_0x3ad2b7=this['_fixRange'](_0x5e6e88,_0x1e033d);_0x224a9a['markers']['set'](_0x3894c0,_0x5e6e88),this['_markers']['set'](_0x3894c0,_0x3ad2b7);}this['_applyOperations'](_0x821b3,_0x52966c,_0x40c9d5);}['_applyOperations'](_0x561408,_0x223cd3,_0x4d9d04){for(const _0x5ccfe4 of this['source']['getOperations'](_0x561408,_0x223cd3))this['_handleOperation'](_0x5ccfe4,_0x4d9d04);for(const _0x5a1bec of this['_diffRoots']['values']())_0x5a1bec['markers']['clear']();for(const [_0x41bbb5,_0x6aec4e]of this['_markers']){this['_diffRoots']['get'](_0x6aec4e['root']['rootName'])['markers']['set'](_0x41bbb5,_0x6aec4e['clone']());}const _0x5b7a0e=new Map(),_0x56e0df=new Map();for(const [_0x576aa7,_0x23ecc1]of this['_diffRoots'])_0x5b7a0e['set'](_0x576aa7,yt(_0x23ecc1)),_0x56e0df['set'](_0x576aa7,this['_diffRootsAttributes']['get'](_0x576aa7));this['_saveMetaData'](_0x223cd3,_0x5b7a0e,this['_markers'],_0x56e0df);}['_getPreviousFrom'](_0x423470){const _0x2ea014=Array['from'](this['_savedMetaData']['keys']());_0x2ea014['sort']((_0x4fdbf3,_0x3b79d6)=>_0x4fdbf3-_0x3b79d6),_0x2ea014['reverse']();for(const _0x5cda4b of _0x2ea014)if(_0x5cda4b<_0x423470)return _0x5cda4b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x56d300,_0x35f246){const _0x5a6842=Array['from'](_0x35f246['markers'])['map'](([_0x31966e,_0x45c6c3])=>[_0x31966e,this['_fixRange'](_0x45c6c3,_0x56d300)]);_0x56d300['markers']=new Map(_0x5a6842);}['_transformMarkers'](_0x337338){for(const _0x546631 of this['_markers']['values']()){const _0x16c014=_0x546631['getTransformedByOperation'](_0x337338),_0x42833b=_0xdbf5f4['_createFromRanges'](_0x16c014);_0x546631['start']=_0x42833b['start'],_0x546631['end']=_0x42833b['end'];}}['_handleOperation'](_0x422c3e,_0x2e9691){if('addRoot'!=_0x422c3e['type']&&'detachRoot'!=_0x422c3e['type']){if('insert'==_0x422c3e['type']){const _0x2e89ce=_0x422c3e['position']['root']['rootName'];this['_diffRoots']['has'](_0x2e89ce)||(this['_diffRoots']['set'](_0x2e89ce,bt(_0x2e89ce,!0x0)),this['_diffRootsAttributes']['set'](_0x2e89ce,{}),_0x2e9691&&this['_idsRoots']['set'](_0x2e89ce,bt(_0x2e89ce,!0x0)));}else{if('addRootAttribute'==_0x422c3e['type']||'removeRootAttribute'==_0x422c3e['type']||'changeRootAttribute'==_0x422c3e['type'])return void this['_handleRootAttributeOperation'](_0x422c3e);'marker'==_0x422c3e['type']&&this['_handleMarkerOperation'](_0x422c3e);}if('marker'!==_0x422c3e['type']){const _0x4a291d=this['_cloneOperation'](_0x422c3e,this['_diffRoots']);_0x4a291d['_execute'](),this['_transformMarkers'](_0x4a291d);}if(_0x2e9691)switch(_0x422c3e['type']){case'insert':this['_handleInsertOperation'](_0x422c3e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x422c3e);break;case'merge':this['_handleMergeOperation'](_0x422c3e);break;case'split':this['_handleSplitOperation'](_0x422c3e);}}else this['_handleRootOperation'](_0x422c3e,_0x2e9691);}['_cloneOperation'](_0x2c9cf8,_0x1fdae7){const _0xde8efb=_0x2c9cf8['clone']();return _0xde8efb['_authorId']=_0x2c9cf8['_authorId'],this['_fixOperation'](_0xde8efb,_0x1fdae7),_0xde8efb;}['_getBaseVids'](_0x3ab39d){return _0x3ab39d['map'](_0x12db0f=>{const _0x217974=this['_getVidAttributeName'](_0x12db0f);return Number(_0x12db0f['item']['getAttribute'](_0x217974));});}['_generateTape'](_0x2b7292,_0x5b7a06){if(_0x2b7292['is']('element','$text'))_0x5b7a06['push']({'item':_0x2b7292,'type':'text'});else{_0x2b7292['is']('element')&&_0x5b7a06['push']({'item':_0x2b7292,'type':'elementStart'});for(const _0x2fce0f of _0x2b7292['getChildren']())this['_generateTape'](_0x2fce0f,_0x5b7a06);_0x2b7292['is']('element')&&_0x5b7a06['push']({'item':_0x2b7292,'type':'elementEnd'});}return _0x5b7a06;}['_getState'](){const _0x1db3ea=new Map(this['_touched']),_0x557c64=new Map(_0x1db3ea),_0x3800b7=new Map(),_0x3ae634={'insertions':{},'deletions':{}},_0x16c8f2={'insertions':{},'deletions':{}},_0xfdd736=new Map(),_0x4c3a89=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x4c3a89['delete']('$graveyard');for(const _0xc0c092 of _0x4c3a89){const _0x7468e0=this['_diffRoots']['get'](_0xc0c092)||bt(_0xc0c092,!0x1),_0x25a3d8=this['_baseRoots']['get'](_0xc0c092)||bt(_0xc0c092,!0x1);_0x7468e0['isAttached']()||_0x25a3d8['isAttached']()?(_0x3ae634['insertions'][_0xc0c092]=yt(_0x7468e0),_0x3ae634['deletions'][_0xc0c092]=yt(_0x25a3d8),this['_copyMarkers'](_0x3ae634['deletions'][_0xc0c092],_0x25a3d8),this['_copyMarkers'](_0x3ae634['insertions'][_0xc0c092],_0x7468e0),_0x16c8f2['insertions'][_0xc0c092]=this['_generateTape'](this['_idsRoots']['get'](_0xc0c092),[]),_0x16c8f2['deletions'][_0xc0c092]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xc0c092)||bt(_0xc0c092,!0x1),[])):_0x4c3a89['delete'](_0xc0c092);}for(const _0x2a8b3c of _0x4c3a89){const _0x214b36=_0x16c8f2['insertions'][_0x2a8b3c];for(const _0x3887ef of _0x214b36){const _0x442927=this['_getVidAttributeName'](_0x3887ef),_0x5ae6a3=_0x3887ef['item']['getAttribute'](_0x442927);_0x557c64['delete'](_0x5ae6a3),_0x5ae6a3>=this['_startingRevisionId']&&_0x3800b7['set'](_0x5ae6a3,_0x1db3ea['get'](_0x5ae6a3));}}for(const _0x574fbc of _0x4c3a89){const _0x43a9ed=_0x16c8f2['insertions'][_0x574fbc],_0x46adc8=this['_getBaseVids'](_0x16c8f2['deletions'][_0x574fbc]);let _0xd371f=0x0;for(const _0x2e14a8 of _0x43a9ed){const _0x3159b3=this['_getVidAttributeName'](_0x2e14a8),_0x30ba29=_0x2e14a8['item']['getAttribute'](_0x3159b3);if(!_0x3800b7['has'](_0x30ba29)&&!_0xfdd736['has'](_0x30ba29)){if(_0x557c64['has'](_0x30ba29))_0xd371f++;else{if(_0x30ba29!=_0x46adc8[_0xd371f]){const _0xb90cf4=_0x1db3ea['get'](_0x30ba29)||_0x1db3ea['get'](_0x46adc8[_0xd371f]);for(;_0x30ba29!=_0x46adc8[_0xd371f];)_0x557c64['has'](_0x46adc8[_0xd371f])||(_0xfdd736['set'](_0x46adc8[_0xd371f],_0xb90cf4),_0x1db3ea['set'](_0x46adc8[_0xd371f],_0xb90cf4)),_0xd371f++;}_0xd371f++;}}}}for(const _0x56f71e of _0x4c3a89){const _0x582a23=_0x16c8f2['insertions'][_0x56f71e];for(const _0xd9ff22 of _0x582a23){const _0x2a9d55=this['_getVidAttributeName'](_0xd9ff22),_0x2cb9eb=_0xd9ff22['item']['getAttribute'](_0x2a9d55);if(_0xfdd736['has'](_0x2cb9eb)){const _0x6d1076=_0xfdd736['get'](_0x2cb9eb);_0x557c64['has'](_0x2cb9eb)||_0x557c64['set'](_0x2cb9eb,{..._0x6d1076}),_0x3800b7['set'](_0x2cb9eb,{..._0x6d1076});}}}for(const _0x4f0c05 of _0x557c64['keys']())_0x4f0c05>=this['_startingRevisionId']&&_0x557c64['delete'](_0x4f0c05);const _0x51c7ea=new Map();for(const _0x302498 of _0x4c3a89){let _0x42fbda=_0x16c8f2['insertions'][_0x302498];for(const _0x3191f4 of _0x42fbda)if(_0x3191f4['item']['is']('element','tableCell')){const _0x5167e3=this['_getVidAttributeName'](_0x3191f4),_0x13728c=_0x3191f4['item']['getAttribute'](_0x5167e3);if(_0x3800b7['has'](_0x13728c)){const _0x3cc9e8=_0x3191f4['item']['parent']['parent']['getAttribute']('vid_start'),_0x4df484=_0x51c7ea['get'](_0x3cc9e8)||new Set();_0x4df484['add'](_0x3800b7['get'](_0x13728c)['userId']),_0x51c7ea['set'](_0x3cc9e8,_0x4df484);}}_0x42fbda=_0x16c8f2['deletions'][_0x302498];for(const _0x4a583c of _0x42fbda)if(_0x4a583c['item']['is']('element','tableCell')){const _0x5096bd=this['_getVidAttributeName'](_0x4a583c),_0x390f75=_0x4a583c['item']['getAttribute'](_0x5096bd);if(_0x557c64['has'](_0x390f75)){const _0x4cb719=_0x4a583c['item']['parent']['parent']['getAttribute']('vid_start'),_0xa23fb7=_0x51c7ea['get'](_0x4cb719)||new Set();_0xa23fb7['add'](_0x557c64['get'](_0x390f75)['userId']),_0x51c7ea['set'](_0x4cb719,_0xa23fb7);}}for(const _0x357a1c of _0x51c7ea['keys']())(_0x3800b7['has'](_0x357a1c)||_0x557c64['has'](_0x357a1c))&&_0x51c7ea['delete'](_0x357a1c);}for(const _0x32b817 of _0x4c3a89){const _0x1e13d1=_0x16c8f2['insertions'][_0x32b817];let _0x431eb4=null,_0x57eec0=null;for(const _0x41cea2 of _0x1e13d1){const _0xc09b2d=this['_getVidAttributeName'](_0x41cea2),_0x49593c=_0x41cea2['item']['getAttribute'](_0xc09b2d),_0x267c74=_0x51c7ea['get'](_0x49593c);_0x267c74&&'elementStart'==_0x41cea2['type']&&(_0x431eb4=Array['from'](_0x267c74)[0x0],_0x57eec0=_0x41cea2['item']['getAttribute']('vid_end')),_0x431eb4&&(_0x557c64['set'](_0x49593c,{'userId':_0x431eb4}),_0x3800b7['set'](_0x49593c,{'userId':_0x431eb4})),_0x49593c==_0x57eec0&&(_0x431eb4=null,_0x57eec0=null);}}const _0x735d34={},_0x133366=new Set();for(const _0x7cc4f5 of _0x4c3a89){const _0x2f2589=_0x3ae634['deletions'][_0x7cc4f5],_0xb20c1=_0x3ae634['insertions'][_0x7cc4f5];for(const {userId:_0x3be13d}of this['_touchedMarkers']['values']())null!==_0x3be13d&&_0x133366['add'](_0x3be13d);for(const {userId:_0x22d5a8}of this['_touchedRoots']['values']())null!==_0x22d5a8&&_0x133366['add'](_0x22d5a8);this['_markChanges'](_0xb20c1,_0x16c8f2['insertions'][_0x7cc4f5],_0x3800b7,'insertion',_0x133366),this['_markChanges'](_0x2f2589,_0x16c8f2['deletions'][_0x7cc4f5],_0x557c64,'deletion',_0x133366),_0x735d34[_0x7cc4f5]={'insertions':this['_prepareViewToSave'](_0xb20c1),'deletions':this['_prepareViewToSave'](_0x2f2589),'attachChange':this['_touchedRoots']['get'](_0x7cc4f5)||null,'attributesBefore':_0x104e0e(this['_baseRootsAttributes']['get'](_0x7cc4f5))||{},'attributesAfter':_0x104e0e(this['_diffRootsAttributes']['get'](_0x7cc4f5))};}return{'diffData':_0x735d34,'authorsIds':Array['from'](_0x133366)};}['_processRootBeforeSave'](_0x1741a3){for(const [,_0x31f37a]of _0x1741a3['markers']){const _0x380504=_0x31f37a['start']['getAncestors']()['filter'](_0x374adc=>'tableCell'==_0x374adc['name']);for(const _0x468da4 of _0x380504)0x1==_0x468da4['childCount']&&_0x468da4['getChild'](0x0)['is']('element','paragraph')&&_0x468da4['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3b8c93){this['_processRootBeforeSave'](_0x3b8c93);const _0x300c9e=this['editor']['data']['toView'](_0x3b8c93,{}),_0x2308e1=Array['from'](_0x300c9e['getChildren']())['map'](_0x2acc7a=>this['_getViewJson'](_0x2acc7a));return JSON['stringify'](_0x2308e1);}['_getViewJson'](_0x1e0aa7){if(_0x1e0aa7['is']('$text'))return _0x1e0aa7['data'];{const _0x3cf544=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x2a16ee=_0x1e0aa7,_0x57d86b=this['editor']['data']['htmlProcessor']['domConverter'],_0x11e492={'type':_0x3cf544['_getTypeCharForViewElement'](_0x2a16ee),'name':_0x2a16ee['name'],'attributes':Array['from'](_0x2a16ee['getAttributes']()),'children':Array['from'](_0x2a16ee['getChildren']())['map'](_0x5be4bf=>this['_getViewJson'](_0x5be4bf))};if(_0x1e0aa7['is']('uiElement')&&'$comment'!=_0x1e0aa7['name']){const _0x4fb797=_0x1e0aa7['render'](_0x57d86b['domDocument'],_0x57d86b);_0x11e492['children']['push'](_0x4fb797['outerHTML']);}else{if(_0x1e0aa7['is']('rawElement')){const _0x4ccf95=_0x57d86b['domDocument']['createElement'](_0x2a16ee['name']);_0x1e0aa7['render'](_0x4ccf95,_0x57d86b),_0x11e492['children']['push'](_0x4ccf95['innerHTML']);}}const _0x45f6cb=Array['from'](_0x2a16ee['getCustomProperties']());_0x45f6cb['length']>0x0&&(_0x11e492['customProperties']=_0x45f6cb);const _0x11a8b7=_0x2a16ee['getFillerOffset']();return null!==_0x11a8b7&&(_0x11e492['fillerOffset']=_0x11a8b7),_0x11e492;}}['_markChanges'](_0x388aa1,_0x152b32,_0x7600a6,_0x95b7dc,_0x3b4979){let _0x490c3f=null,_0x5e11ed=null,_0x3bddbf=0x0;const _0x185498=this['editor']['model'];for(let _0x3bad19=0x0;_0x3bad19<_0x152b32['length'];_0x3bad19++){const _0x7d83cb=this['_getVidAttributeName'](_0x152b32[_0x3bad19]),_0x189273=_0x152b32[_0x3bad19]['item']['getAttribute'](_0x7d83cb),_0x10e232=_0x7600a6['get'](_0x189273),_0x2d5590=_0x3bad19==_0x152b32['length']-0x1;(!_0x490c3f&&_0x10e232&&(_0x490c3f=_0x10e232,_0x5e11ed=_0x152b32[_0x3bad19]),_0x490c3f&&(!_0x10e232||_0x10e232['userId']!=_0x490c3f['userId']))&&(_0x12fcc4(_0x10e232,Rt(_0x5e11ed,_0x388aa1,_0x185498),Rt(_0x152b32[_0x3bad19],_0x388aa1,_0x185498)),_0x490c3f=_0x10e232||null,_0x5e11ed=_0x10e232?_0x152b32[_0x3bad19]:null),_0x490c3f&&_0x2d5590&&_0x12fcc4(_0x10e232,Rt(_0x5e11ed,_0x388aa1,_0x185498),kt(_0x152b32[_0x3bad19],_0x388aa1,_0x185498));}function _0x12fcc4(_0x393dd2,_0x263e44,_0x4c5623){const _0x46659b=_0x490c3f['userId'],_0x436068='revision:'+_0x95b7dc+':'+_0x46659b+':'+_0x3bddbf++,_0x2d5f85=_0x185498['createRange'](_0x263e44,_0x4c5623);_0x388aa1['markers']['set'](_0x436068,_0x2d5f85),null!==_0x46659b&&_0x3b4979['add'](_0x46659b);}}['_getVidAttributeName'](_0x5dbc47){switch(_0x5dbc47['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x9a9d16,_0x436025){_0x9a9d16['baseVersion']=null;for(const _0x15c092 in _0x9a9d16){const _0x173701=_0x9a9d16[_0x15c092];if(_0x173701 instanceof _0x3b35be){const _0x33bd03=_0x436025['get'](_0x173701['root']['rootName']);_0x9a9d16[_0x15c092]=this['_fixPosition'](_0x173701,_0x33bd03);}if(_0x173701 instanceof _0xdbf5f4){const _0x2a48da=_0x436025['get'](_0x173701['root']['rootName']);_0x9a9d16[_0x15c092]=this['_fixRange'](_0x173701,_0x2a48da);}'root'===_0x15c092&&(_0x9a9d16['root']=_0x436025['get'](_0x9a9d16['root']['rootName']));}}['_fixRange'](_0x4ac8ae,_0x4a12a9){return this['editor']['model']['createRange'](this['_fixPosition'](_0x4ac8ae['start'],_0x4a12a9),this['_fixPosition'](_0x4ac8ae['end'],_0x4a12a9));}['_fixPosition'](_0x37810c,_0x1f4eeb){return this['editor']['model']['createPositionFromPath'](_0x1f4eeb,_0x37810c['path'],_0x37810c['stickiness']);}['_handleInsertOperation'](_0x50e546){const _0x31c1dc=this['_idsRoots']['get'](_0x50e546['position']['root']['rootName']),_0x5364bd=this['_fixPosition'](_0x50e546['position'],_0x31c1dc),_0x31b8e8=null===_0x50e546['_authorId']?null:_0x50e546['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2b17db=_0x5364bd['parent'],_0x40869d=this['_revisionId'],_0x2de008=[];for(const _0x1eb661 of _0x50e546['nodes'])if(_0x1eb661['is']('element'))_0x2de008['push'](this['_makeIdsRoot'](_0x1eb661));else{for(let _0xf5592=0x0;_0xf5592<_0x1eb661['offsetSize'];_0xf5592++)_0x2de008['push'](new _0x3d8552('$text',{'vid':this['_revisionId']++}));}const _0xff38=this['_revisionId'];for(let _0x32ef89=_0x40869d;_0x32ef89<_0xff38;_0x32ef89++)this['_touched']['set'](_0x32ef89,{'userId':_0x31b8e8});_0x2b17db['_insertChild'](_0x5364bd['offset'],_0x2de008);}['_handleMoveOperation'](_0x90c08a){(_0x90c08a=this['_cloneOperation'](_0x90c08a,this['_idsRoots']))['_execute']();const _0x4a1632=null===_0x90c08a['_authorId']?null:_0x90c08a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x182ebd=_0x90c08a['getMovedRangeStart'](),_0x352f51=_0x182ebd['parent'],_0x10109e=_0x182ebd['offset'];!function _0x4d4f96(_0x310948,_0x46ddaf,_0x78081,_0x13be76){for(let _0x1b739a=_0x78081;_0x1b739a<_0x13be76;_0x1b739a++){const _0x9fc290=_0x46ddaf['getChild'](_0x1b739a);_0x9fc290['is']('element','$text')?_0x310948['set'](_0x9fc290['getAttribute']('vid'),{'userId':_0x4a1632}):(_0x310948['set'](_0x9fc290['getAttribute']('vid_start'),{'userId':_0x4a1632}),_0x4d4f96(_0x310948,_0x9fc290,0x0,_0x9fc290['childCount']),_0x310948['set'](_0x9fc290['getAttribute']('vid_end'),{'userId':_0x4a1632}));}}(this['_touched'],_0x352f51,_0x10109e,_0x10109e+_0x90c08a['howMany']);}['_handleMergeOperation'](_0x36e331){const _0x5162d2=null===(_0x36e331=this['_cloneOperation'](_0x36e331,this['_idsRoots']))['_authorId']?null:_0x36e331['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cd886=_0x36e331['targetPosition']['parent'],_0x1b7785=_0x36e331['sourcePosition']['parent'],_0x29a54c=_0x1cd886['getAttribute']('vid_end'),_0x37346b=_0x1b7785['getAttribute']('vid_start');_0x1cd886['_setAttribute']('vid_end',_0x1b7785['getAttribute']('vid_end')),_0x1b7785['_setAttribute']('vid_end',_0x29a54c),this['_touched']['set'](_0x37346b,{'userId':_0x5162d2}),this['_touched']['set'](_0x29a54c,{'userId':_0x5162d2}),_0x36e331['_execute']();}['_handleSplitOperation'](_0xc1814){const _0xd323a3=null===(_0xc1814=this['_cloneOperation'](_0xc1814,this['_idsRoots']))['_authorId']?null:_0xc1814['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x236f47=_0xc1814['graveyardPosition'],_0x2f7e5f=_0xc1814['splitPosition']['parent'];_0xc1814['_execute']();const _0x426ae1=_0x2f7e5f['getAttribute']('vid_end'),_0x26b786=_0xc1814['insertionPosition']['nodeAfter'];if(_0x236f47){const _0x390524=_0x26b786['getAttribute']('vid_end'),_0x86b752=_0x2f7e5f['getAttribute']('vid_end');_0x2f7e5f['_setAttribute']('vid_end',_0x390524),_0x26b786['_setAttribute']('vid_end',_0x86b752),this['_touched']['set'](_0x2f7e5f['getAttribute']('vid_end'),{'userId':_0xd323a3}),this['_touched']['set'](_0x26b786['getAttribute']('vid_start'),{'userId':_0xd323a3});}else{const _0x43bf14=this['_revisionId']++,_0x7a2ea6=this['_revisionId']++;_0x2f7e5f['_setAttribute']('vid_end',_0x43bf14),_0x26b786['_setAttribute']('vid_start',_0x7a2ea6),_0x26b786['_setAttribute']('vid_end',_0x426ae1),this['_touched']['set'](_0x43bf14,{'userId':_0xd323a3}),this['_touched']['set'](_0x7a2ea6,{'userId':_0xd323a3});}}['_handleMarkerOperation'](_0x58a42e){if(!_0x58a42e['affectsData'])return;const _0x42f0ed=(_0x58a42e=this['_cloneOperation'](_0x58a42e,this['_diffRoots']))['oldRange']?_0x58a42e['oldRange']['root']:null,_0x2639f0=_0x58a42e['newRange']?_0x58a42e['newRange']['root']:null;_0x42f0ed&&this['_markers']['delete'](_0x58a42e['name']),_0x2639f0&&this['_markers']['set'](_0x58a42e['name'],_0x58a42e['newRange']['clone']());const _0x57393e=null===_0x58a42e['_authorId']?null:_0x58a42e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x44cbca=_0x58a42e['name'];if(!this['_touchedMarkers']['has'](_0x44cbca))return void this['_touchedMarkers']['set'](_0x44cbca,{'range':_0x58a42e['oldRange'],'userId':_0x57393e});const _0x17c09a=this['_touchedMarkers']['get'](_0x44cbca),_0x3d3bc8=_0x17c09a['range'],_0x335720=_0x58a42e['newRange'];null==_0x3d3bc8&&null==_0x335720||_0x3d3bc8&&_0x335720&&_0x3d3bc8['isEqual'](_0x335720)?this['_touchedMarkers']['delete'](_0x58a42e['name']):_0x17c09a['userId']=_0x57393e;}['_handleRootOperation'](_0x5ad4c4,_0x3de2b5){this['_diffRoots']['has'](_0x5ad4c4['rootName'])?this['_diffRoots']['get'](_0x5ad4c4['rootName'])['_isAttached']=_0x5ad4c4['isAdd']:(this['_diffRoots']['set'](_0x5ad4c4['rootName'],bt(_0x5ad4c4['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5ad4c4['rootName'],{}),_0x3de2b5&&this['_idsRoots']['set'](_0x5ad4c4['rootName'],bt(_0x5ad4c4['rootName'],!0x0)));const _0x52df16=null===_0x5ad4c4['_authorId']?null:_0x5ad4c4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb5a44f=this['_touchedRoots']['get'](_0x5ad4c4['rootName']);_0xb5a44f&&_0xb5a44f['userId']===_0x52df16?this['_touchedRoots']['delete'](_0x5ad4c4['rootName']):this['_touchedRoots']['set'](_0x5ad4c4['rootName'],{'userId':_0x52df16,'isAttached':_0x5ad4c4['isAdd']});}['_handleRootAttributeOperation'](_0x350553){const _0x2a1775=this['_diffRootsAttributes']['get'](_0x350553['root']['rootName']);null===_0x350553['newValue']?delete _0x2a1775[_0x350553['key']]:_0x2a1775[_0x350553['key']]=_0x350553['newValue'];}}function yt(_0x577bde){const _0x488b0d=bt(_0x577bde['rootName'],_0x577bde['isAttached']());for(const _0x139e64 of _0x577bde['getChildren']()){const _0x2fb3a6=_0x139e64['_clone'](!0x0);_0x488b0d['_appendChild'](_0x2fb3a6);}return _0x488b0d;}function bt(_0x49765b,_0xf80cd4=!0x0){const _0x21c2b3=new _0x596efb();return _0x21c2b3['rootName']=_0x49765b,_0x21c2b3['_isAttached']=_0xf80cd4,_0x21c2b3['isAttached']=()=>_0x21c2b3['_isAttached'],_0x21c2b3;}function Rt(_0x428f1a,_0x1f0392,_0x40d948){const _0x581a63='elementEnd'==_0x428f1a['type']?_0x40d948['createPositionAt'](_0x428f1a['item'],'end'):_0x40d948['createPositionBefore'](_0x428f1a['item']);return _0x40d948['createPositionFromPath'](_0x1f0392,_0x581a63['path'],_0x581a63['stickiness']);}function kt(_0x49c72d,_0x132480,_0x569a1b){const _0x3225d9='elementStart'==_0x49c72d['type']?_0x569a1b['createPositionAt'](_0x49c72d['item'],0x0):_0x569a1b['createPositionAfter'](_0x49c72d['item']);return _0x569a1b['createPositionFromPath'](_0x132480,_0x3225d9['path'],_0x3225d9['stickiness']);}class At extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x222574(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x4cdef4){super(),this['id']=_0x4cdef4['id']||_0x34aeba(),this['author']=_0x4cdef4['author'],this['type']=_0x4cdef4['type'],this['data']=_0x4cdef4['data']||{},this['rootName']=_0x4cdef4['rootName'],this['set']('createdAt',_0x4cdef4['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class Et{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x27a9b1,_0x1d5c08){this['newRevisionId']=_0x27a9b1,this['oldRevisionId']=_0x1d5c08,this['changes']=new _0x25d3ca();}['_setChanges'](_0xc84eb4){for(const _0x47c62f of _0xc84eb4)this['changes']['add'](_0x47c62f);}}class St extends _0x1f70da{['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[_0x19894b,st,gt,mt];}constructor(_0x125873){super(_0x125873),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',(_0x330bd4,_0x2a943a,_0x590ac4)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0xa6465b=>{for(const _0x5b1f08 of this['editor']['editing']['view']['document']['roots'])_0x590ac4?_0xa6465b['removeClass']('ck-editor__editable__overlay',_0x5b1f08):_0xa6465b['addClass']('ck-editor__editable__overlay',_0x5b1f08);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x108485=>null!==_0x108485),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4d6a69,_0x396d0d,_0x42819d)=>_0x4d6a69&&_0x42819d?_0x396d0d['changes']['getIndex'](_0x42819d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1f7bcf,_0x9b50cc)=>_0x1f7bcf?_0x9b50cc['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](st);}['init'](){const _0x433a02=this['editor'],_0x72fdb5=new Mt(_0x433a02,{'direction':'backward'}),_0x114a21=new Mt(_0x433a02,{'direction':'forward'});(_0x433a02['commands']['add']('showPreviousChange',_0x72fdb5),_0x433a02['commands']['add']('showNextChange',_0x114a21),_0x433a02['commands']['add']('restoreRevision',new Ct(_0x433a02)),this['on']('change:numberOfChanges',()=>{_0x72fdb5['refresh'](),_0x114a21['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x433a02['enableReadOnlyMode']('revision-viewer'),_0x433a02['plugins']['has']('WidgetToolbarRepository'))&&_0x433a02['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x13fea5){return await this['_utils']['loadRevisionData'](_0x13fea5,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x13fea5);}async['getRevisionRootsAttributes'](_0xbf471e){return await this['_utils']['loadRevisionData'](_0xbf471e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xbf471e);}async['compare'](_0x5d2e84,_0x349d3a,_0x46c768=!0x1){if(!this['isEnabled'])return;const _0x573b85=this['diff'],_0x29ec56=this['repository'],_0x155df8='string'==typeof _0x5d2e84?_0x29ec56['getRevision'](_0x5d2e84):_0x5d2e84,_0x2bdc78='string'==typeof _0x349d3a?_0x29ec56['getRevision'](_0x349d3a):_0x349d3a,_0xb799ed=_0x155df8['id'],_0x3d9889=_0x2bdc78?_0x2bdc78['id']:null;if(!_0x46c768&&this['diff']&&this['diff']['newRevisionId']===_0xb799ed&&this['diff']['oldRevisionId']===_0x3d9889)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Et(_0xb799ed,_0x3d9889);const _0x1eb614=this['_getRevisionsRange'](_0x155df8,_0x2bdc78,!0x0)['map'](_0x4ff183=>this['_utils']['loadRevisionData'](_0x4ff183,this['adapter']));return _0x1eb614['push'](new Promise(_0x253bee=>{setTimeout(_0x253bee,0x14);})),Promise['all'](_0x1eb614)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1ddfaf=this['_getDiff'](_0xb799ed,_0x3d9889);for(const _0x1cf6b2 of _0x1ddfaf['changes'])this['_changeIdToChange']['set'](_0x1cf6b2['id'],_0x1cf6b2);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x54811b=>{for(const _0x489364 of this['editor']['model']['document']['getRootNames']())_0x54811b['detachRoot'](_0x489364);for(const _0x557049 of Object['keys'](_0x1ddfaf['model'])){const _0x3fd95d=_0x54811b['addRoot'](_0x557049);for(const _0x29021d of Object['keys'](_0x1ddfaf['attributes'][_0x557049]))_0x54811b['setAttribute'](_0x29021d,_0x1ddfaf['attributes'][_0x557049][_0x29021d],_0x3fd95d);_0x54811b['insert'](_0x1ddfaf['model'][_0x557049],_0x3fd95d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1ddfaf['changes'])),this['isReady']=!0x0;})['catch'](_0x3ad90c=>{console['error'](_0x3ad90c),this['_cleanUp'](),_0x573b85&&(this['diff']=_0x573b85),this['isReady']=!0x0;});}['addRevisionData'](_0x5d9d17,_0x56fac1){const _0x2b6c11=this['repository']['createRevision'](_0x5d9d17);return _0x2b6c11['on']('_update',(_0x2c9a80,_0x86c7e0,_0x47884e)=>_0x56fac1(_0x86c7e0,_0x47884e,_0x2b6c11)),this['repository']['addRevision'](_0x2b6c11),_0x2b6c11;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2aee21=>{for(const _0x1ca7e0 of this['editor']['model']['document']['getRootNames']())_0x2aee21['detachRoot'](_0x1ca7e0);});}['_sortAndFilterDiffChanges'](_0x35bbf7){const _0x81e98e=[],_0x13445b=new Map();for(const _0x3a11f4 of this['editor']['model']['document']['getRootNames']()){const _0xeb21ef=this['editor']['editing']['view']['getDomRoot'](_0x3a11f4);if(!_0xeb21ef)continue;const _0x8efdec=_0xeb21ef['getClientRects']()['item'](0x0);_0x8efdec&&(_0x81e98e['push'](_0x3a11f4),_0x13445b['set'](_0x3a11f4,_0x8efdec));}return _0x81e98e['sort']((_0x147acf,_0x299a07)=>{const _0x57b7f0=_0x13445b['get'](_0x147acf),_0x1a463b=_0x13445b['get'](_0x299a07);return _0x57b7f0['y']-_0x1a463b['y']||_0x57b7f0['x']-_0x1a463b['x'];}),(_0x35bbf7=_0x35bbf7['filter'](_0x5172f4=>_0x81e98e['includes'](_0x5172f4['rootName'])))['sort']((_0x5bb3d9,_0x335b41)=>_0x81e98e['indexOf'](_0x5bb3d9['rootName'])-_0x81e98e['indexOf'](_0x335b41['rootName'])),_0x35bbf7;}['_makeTape'](_0x563053){const _0x40fb1d=Array['from'](_0x563053['markers'])['filter'](([_0x2c5bee,_0x434d6a])=>_0x2c5bee['startsWith']('revision:')&&!_0x434d6a['isCollapsed']),_0x54cb30=Array['from'](this['editor']['model']['createRangeIn'](_0x563053)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x40fb1d['length'])for(const _0x22d5b3 of _0x54cb30){const [_0x214f97,_0x4ee32b]=_0x40fb1d[0x0],[,_0x41e31a,_0x554a95]=_0x214f97['split'](':');if(_0x4ee32b['end']['isEqual'](_0x22d5b3['nextPosition'])&&_0x40fb1d['shift'](),(_0x22d5b3['previousPosition']['isEqual'](_0x4ee32b['start'])||_0x22d5b3['previousPosition']['isAfter'](_0x4ee32b['start']))&&('insertion'==_0x41e31a?_0x22d5b3['isAdded']={'userId':_0x554a95}:'deletion'==_0x41e31a&&(_0x22d5b3['isRemoved']={'userId':_0x554a95})),0x0==_0x40fb1d['length'])break;}return _0x54cb30;}['_refreshStartEndIndex'](_0x10fdd4){const _0x3be5f8=new Map();for(let _0xeac2e1=0x0;_0xeac2e1<_0x10fdd4['length'];_0xeac2e1++)'text'===_0x10fdd4[_0xeac2e1]['type']?(_0x10fdd4[_0xeac2e1]['item']['startIndex']=_0xeac2e1,_0x10fdd4[_0xeac2e1]['item']['endIndex']=_0xeac2e1):('elementStart'===_0x10fdd4[_0xeac2e1]['type']?_0x10fdd4[_0xeac2e1]['item']['startIndex']=_0xeac2e1:'elementEnd'===_0x10fdd4[_0xeac2e1]['type']&&(_0x10fdd4[_0xeac2e1]['item']['endIndex']=_0xeac2e1),_0x3be5f8['set'](_0x10fdd4[_0xeac2e1]['id'],_0xeac2e1));for(const _0x614f7a of _0x3be5f8['values']())'elementStart'===_0x10fdd4[_0x614f7a]['type']?_0x10fdd4[_0x614f7a]['item']['endIndex']=_0x3be5f8['get'](_0x10fdd4[_0x614f7a]['pairId']):'elementEnd'===_0x10fdd4[_0x614f7a]['type']&&(_0x10fdd4[_0x614f7a]['item']['startIndex']=_0x3be5f8['get'](_0x10fdd4[_0x614f7a]['pairId']));}['_processTape'](_0x56dc62){for(let _0x1fea79=0x0;_0x1fea79<_0x56dc62['length'];_0x1fea79++){if('elementStart'===_0x56dc62[_0x1fea79]['type'])_0x56dc62[_0x1fea79]['item']['startIndex']=_0x1fea79;else{if('elementEnd'===_0x56dc62[_0x1fea79]['type']){_0x56dc62[_0x1fea79]['item']['endIndex']=_0x1fea79;const _0x59eb53=_0x56dc62[_0x1fea79]['item']['startIndex'];_0x56dc62[_0x59eb53]['pairId']=_0x56dc62[_0x1fea79]['id'],_0x56dc62[_0x1fea79]['pairId']=_0x56dc62[_0x59eb53]['id'];}else _0x56dc62[_0x1fea79]['item']['startIndex']=_0x1fea79,_0x56dc62[_0x1fea79]['item']['endIndex']=_0x1fea79,_0x56dc62[_0x1fea79]['pairId']=null;}_0x56dc62[_0x1fea79]['markersStart']||(_0x56dc62[_0x1fea79]['markersStart']=[],_0x56dc62[_0x1fea79]['markersEnd']=[]);}}['_markInsertions'](_0x1f142f,_0x3584a6){const _0x11cd6a=_0x1f142f['filter'](_0x58d534=>!_0x58d534['isAdded']);for(let _0xddf66e=0x0;_0xddf66e<_0x3584a6['length'];_0xddf66e++)_0x3584a6[_0xddf66e]['isAdded']&&(_0x11cd6a[_0xddf66e]['isAdded']=_0x3584a6[_0xddf66e]['isAdded']);}['_getDiff'](_0x13145e,_0x251739=null){const _0x2b2f8e=this['repository']['getRevision'](_0x13145e),_0x1b91df=_0x251739?this['repository']['getRevision'](_0x251739):null,_0x201a73=this['_getRevisionsRange'](_0x2b2f8e,_0x1b91df),_0x3f9085=_0x201a73[_0x201a73['length']-0x1],_0x2278c3=new Map(),_0x43e6e4={'model':{},'attributes':{},'changes':[]},_0x299cfe=new Set(),_0x59d0f2=new Map();for(let _0x4db08f=_0x201a73['length']-0x1;_0x4db08f>=0x0;_0x4db08f--){const _0xaafa98=_0x201a73[_0x4db08f];for(const _0xaa2e74 of Object['keys'](_0xaafa98['diffData']))if(_0xaafa98['diffData'][_0xaa2e74]['attachChange']){const _0x526b7a=_0xaafa98['diffData'][_0xaa2e74]['attachChange'];_0x526b7a['isAttached']?(_0x299cfe['add'](_0xaa2e74),_0x59d0f2['has'](_0xaa2e74)&&_0x59d0f2['get'](_0xaa2e74)['userId']==_0x526b7a['userId']?_0x59d0f2['delete'](_0xaa2e74):_0x59d0f2['set'](_0xaa2e74,_0x526b7a)):_0x59d0f2['has'](_0xaa2e74)?(_0x299cfe['delete'](_0xaa2e74),_0x59d0f2['delete'](_0xaa2e74)):(_0x299cfe['add'](_0xaa2e74),_0x59d0f2['set'](_0xaa2e74,_0x526b7a));}else _0x299cfe['add'](_0xaa2e74);}for(const _0x4551d2 of _0x299cfe){const _0x59ff28=_0x59d0f2['has'](_0x4551d2)&&!_0x59d0f2['get'](_0x4551d2)['isAttached'];let _0x485b57=_0x59ff28?_0x201a73['length']-0x1:0x0;const _0x114155=_0x59ff28?-0x1:0x1;for(;_0x201a73[_0x485b57];){const _0x5c6b2e=_0x201a73[_0x485b57];if(_0x5c6b2e['diffData'][_0x4551d2]){const _0x51ba04=_0x59ff28?_0x5c6b2e['diffData'][_0x4551d2]['attributesBefore']:_0x5c6b2e['diffData'][_0x4551d2]['attributesAfter'];_0x43e6e4['attributes'][_0x4551d2]=_0x51ba04?_0x104e0e(_0x51ba04):{};break;}_0x485b57+=_0x114155;}}for(const _0x12aa0e of _0x201a73){_0x12aa0e['model']={};for(const _0x470339 of _0x12aa0e['authors'])_0x2278c3['set'](_0x470339['id'],_0x470339);for(const _0x4b957 of _0x299cfe){const _0x114ab6=_0x12aa0e['diffData'][_0x4b957]?_0x12aa0e['diffData'][_0x4b957]['insertions']:'[]',_0x351b9f=_0x12aa0e['diffData'][_0x4b957]?_0x12aa0e['diffData'][_0x4b957]['deletions']:'[]';_0x12aa0e['model'][_0x4b957]={'insertions':this['_utils']['_makeModelFromViewString'](_0x114ab6),'deletions':this['_utils']['_makeModelFromViewString'](_0x351b9f)};}}for(const _0x587c30 of _0x299cfe){let _0x42b99e=null,_0x55ae90=0x0;const _0x33b002=new Map(Array['from'](_0x2b2f8e['model'][_0x587c30]['insertions']['markers'])['filter'](([_0x3800ad])=>!_0x3800ad['startsWith']('revision:')));let _0x3a278e=0x0;for(const _0x329d60 of _0x201a73){const _0x48ccee=this['_makeTape'](_0x329d60['model'][_0x587c30]['insertions']);_0x329d60==_0x2b2f8e?(_0x42b99e=_0x48ccee,_0x55ae90=_0x42b99e['length'],_0x42b99e['forEach'](_0x5d4ccb=>{_0x5d4ccb['id']=_0x3a278e++;}),this['_processTape'](_0x42b99e)):this['_markInsertions'](_0x42b99e,_0x48ccee);const _0xc9c8d2=_0x42b99e['filter'](_0x5d8d3d=>!_0x5d8d3d['isAdded'])['map'](_0x3f2f1e=>_0x3f2f1e['id']);let _0x15b0b4=0x0;const _0x3a673a=this['_makeTape'](_0x329d60['model'][_0x587c30]['deletions']);_0x3a673a['forEach'](_0x56d1c3=>{_0x56d1c3['isRemoved']?_0x56d1c3['id']=_0x55ae90++:_0x56d1c3['id']=_0xc9c8d2[_0x15b0b4++];}),this['_processTape'](_0x3a673a),this['_setDistance'](_0x42b99e,'isAdded'),this['_setDistance'](_0x3a673a,'isRemoved'),_0x329d60==_0x2b2f8e&&this['_markMarkers'](_0x42b99e,_0x33b002),_0x42b99e=this['_joinTapes'](_0x42b99e,_0x3a673a),this['_refreshStartEndIndex'](_0x42b99e),this['_setDistance'](_0x42b99e,'isRemoved');}_0x42b99e=_0x42b99e['filter'](_0x153a9a=>!(_0x153a9a['isAdded']&&_0x153a9a['isRemoved']));const _0x5908c0=new Map(_0x3f9085['model'][_0x587c30]['deletions']['markers']),_0x361dcf=new Set(_0x33b002['keys']());for(const _0x3a9dde of _0x5908c0['keys']())_0x361dcf['delete'](_0x3a9dde);this['_markSuggestions'](_0x42b99e,_0x361dcf),this['_fixObsoleteTags'](_0x42b99e),_0x42b99e=this['_removeMissingPairs'](_0x42b99e),_0x42b99e=this['_markMismatchedRemovedTags'](_0x42b99e),_0x42b99e=this['_removeUnsupportedChanges'](_0x42b99e);const {root:_0x28a408,changes:_0x363fcb}=this['_makeModelFromTape'](_0x42b99e,_0x2278c3,_0x587c30);_0x43e6e4['model'][_0x587c30]=_0x28a408;const _0x2b2720=_0x59d0f2['get'](_0x587c30);if(_0x2b2720){const _0x3f67e7=_0x2278c3['get'](_0x2b2720['userId']),_0x497ada=new xt({'author':_0x3f67e7,'type':_0x2b2720['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x587c30});_0x363fcb['unshift'](_0x497ada),_0x43e6e4['attributes'][_0x587c30]['revisionHistoryAttachChange']=_0x497ada['id'];}_0x43e6e4['changes']=_0x43e6e4['changes']['concat'](_0x363fcb);}return _0x43e6e4;}['_markMarkers'](_0x46df51,_0x3e2796){for(let _0x1cf4e1=0x0;_0x1cf4e1<_0x46df51['length'];_0x1cf4e1++)for(const [_0x5b818,_0x27bef2]of _0x3e2796)!_0x27bef2['isCollapsed']&&_0x27bef2['start']['isEqual'](_0x46df51[_0x1cf4e1]['previousPosition'])&&_0x46df51[_0x1cf4e1]['markersStart']['push'](_0x5b818),_0x27bef2['end']['isEqual'](_0x46df51[_0x1cf4e1]['nextPosition'])&&_0x46df51[_0x1cf4e1]['markersEnd']['push'](_0x5b818);}['_joinTapes'](_0x1ca3e5,_0x5e5d91){let _0x58b7c8=[],_0x30a770=0x0,_0x4fbcf1=0x0;for(;_0x30a770<_0x1ca3e5['length']||_0x4fbcf1<_0x5e5d91['length'];){const _0x38fd65=_0x1ca3e5[_0x30a770]||{},_0x4b1ead=_0x5e5d91[_0x4fbcf1]||{};if(_0x38fd65['id']==_0x4b1ead['id'])_0x30a770++,_0x4fbcf1++,_0x58b7c8['push'](_0x38fd65);else{if(_0x4b1ead['isRemoved']&&_0x38fd65['isAdded']){const {commonTape:_0x588220,iEnd:_0x8823c8,jEnd:_0x4d8051}=this['_threeWayMerge'](_0x1ca3e5,_0x30a770,_0x5e5d91,_0x4fbcf1);_0x58b7c8=_0x58b7c8['concat'](_0x588220),_0x30a770=_0x8823c8,_0x4fbcf1=_0x4d8051;}else _0x4b1ead['isRemoved']?(_0x4fbcf1++,_0x58b7c8['push'](_0x4b1ead)):(_0x30a770++,_0x58b7c8['push'](_0x38fd65));}}return _0x58b7c8;}['_markSuggestions'](_0x2e82c1,_0x35c177){const _0x2047c9=[];for(let _0x4b6f9f=0x0;_0x4b6f9f<_0x2e82c1['length'];_0x4b6f9f++){for(let _0x52d649=0x0;_0x52d649<_0x2e82c1[_0x4b6f9f]['markersStart']['length'];_0x52d649++){const _0x11668f=_0x2e82c1[_0x4b6f9f]['markersStart'][_0x52d649];if(!_0x35c177['has'](_0x11668f))continue;const {group:_0x45e41c,type:_0x377b57,authorId:_0x361dcc}=_0x3a0c69(_0x11668f);'revision-suggestion'!=_0x45e41c||'insertion'!=_0x377b57&&'deletion'!=_0x377b57||(_0x2047c9['unshift']({'type':_0x377b57,'name':_0x11668f,'userId':_0x361dcc}),_0x2e82c1[_0x4b6f9f]['markersStart']['splice'](_0x52d649,0x1),_0x52d649--);}_0x3ad53f(_0x2e82c1[_0x4b6f9f]);for(let _0x34345f=0x0;_0x34345f<_0x2e82c1[_0x4b6f9f]['markersEnd']['length'];_0x34345f++){const _0x5a2f24=_0x2e82c1[_0x4b6f9f]['markersEnd'][_0x34345f];if(!_0x35c177['has'](_0x5a2f24))continue;const {group:_0x5f3835,type:_0xd4ec46}=_0x3a0c69(_0x5a2f24);if('revision-suggestion'!=_0x5f3835||'insertion'!=_0xd4ec46&&'deletion'!=_0xd4ec46)continue;_0x2e82c1[_0x4b6f9f]['markersEnd']['splice'](_0x34345f,0x1),_0x34345f--;const _0x5724f6=_0x2047c9['findIndex'](_0x464f36=>_0x464f36['name']==_0x5a2f24);_0x5724f6>-0x1&&_0x2047c9['splice'](_0x5724f6,0x1);}}function _0x3a0c69(_0x3d1ada){const _0x2dde9c=_0x3d1ada['split'](':');return{'group':_0x2dde9c[0x0],'type':_0x2dde9c[0x1],'subType':_0x2dde9c['length']>=0x5?_0x2dde9c[0x2]:null,'id':_0x2dde9c['length']<0x5?_0x2dde9c[0x2]:_0x2dde9c[0x3],'authorId':_0x2dde9c['length']<0x5?_0x2dde9c[0x3]:_0x2dde9c[0x4],'markerCount':0x6==_0x2dde9c['length']?_0x2dde9c[0x5]:null};}function _0x3ad53f(_0x453131){for(let _0x2bbbb4=0x0;_0x2bbbb4<_0x2047c9['length'];_0x2bbbb4++){if(_0x453131['isAdded']&&'insertion'==_0x2047c9[_0x2bbbb4]['type']&&_0x453131['isAdded']['userId']==_0x2047c9[_0x2bbbb4]['userId'])return _0x453131['isAddSuggestion']=_0x2047c9[_0x2bbbb4],void delete _0x453131['isAdded'];if(!_0x453131['isAdded']&&!_0x453131['isRemoved']&&'deletion'==_0x2047c9[_0x2bbbb4]['type'])return void(_0x453131['isRemoveSuggestion']=_0x2047c9[_0x2bbbb4]);}}}['_setDistance'](_0x19efb0,_0x15b4f4){let _0x53cda3=0x0,_0xd0f2e2=!0x1;const _0x3ca6a8=new Map();for(const _0x29509f of _0x19efb0)_0x29509f[_0x15b4f4]?_0xd0f2e2&&(_0x53cda3++,_0xd0f2e2=!0x1):(_0x53cda3++,_0xd0f2e2=!0x0),_0x3ca6a8['set'](_0x29509f['id'],_0x53cda3);for(let _0x423b55=0x0;_0x423b55<_0x19efb0['length'];_0x423b55++){if('isRemoved'==_0x15b4f4&&_0x19efb0[_0x423b55]['isAdded']||'isAdded'==_0x15b4f4&&_0x19efb0[_0x423b55]['isRemoved'])continue;if('text'==_0x19efb0[_0x423b55]['type']){_0x19efb0[_0x423b55]['distance']=0x0;continue;}const _0x438d24=_0x3ca6a8['get'](_0x19efb0[_0x423b55]['pairId']),_0x4aa10f=_0x3ca6a8['get'](_0x19efb0[_0x423b55]['id']);_0x19efb0[_0x423b55]['distance']=_0x438d24-_0x4aa10f;}}['_getRevisionsRange'](_0x1aa1f9,_0x5695fb,_0x3f69e0=!0x1){const _0x284726=[];let _0x53b1ec=this['repository']['getIndex'](_0x1aa1f9),_0x495eb6=this['repository']['getIndex'](_0x5695fb);for(-0x1==_0x495eb6&&(_0x495eb6=this['repository']['_revisions']['length'],_0x3f69e0=!0x1);_0x53b1ec<_0x495eb6;)_0x284726['push'](this['repository']['getRevision'](_0x53b1ec)),_0x53b1ec++;return _0x3f69e0&&_0x284726['push'](this['repository']['getRevision'](_0x53b1ec)),_0x284726;}['_threeWayMerge'](_0x4b820a,_0x528dd2,_0x8a91db,_0x217f84){const _0x321133=this['editor']['model']['schema'];let _0x2ff7f6=_0x528dd2;for(;_0x4b820a[_0x2ff7f6]&&_0x4b820a[_0x2ff7f6]['isAdded'];)_0x2ff7f6++;let _0x53e148=_0x217f84;for(;_0x8a91db[_0x53e148]&&_0x8a91db[_0x53e148]['isRemoved'];)_0x53e148++;_0x2e7f8b(_0x4b820a,_0x528dd2,_0x2ff7f6),_0x2e7f8b(_0x8a91db,_0x217f84,_0x53e148);const _0x3bf42b=_0x8a91db['slice'](_0x217f84,_0x53e148)['concat'](_0x4b820a['slice'](_0x528dd2,_0x2ff7f6));return _0x3bf42b['sort']((_0x2be3ab,_0x5632d2)=>_0x2be3ab['side']!=_0x5632d2['side']?_0x2be3ab['side']-_0x5632d2['side']:_0x2be3ab['level']!=_0x5632d2['level']?_0x2be3ab['level']-_0x5632d2['level']:_0x2be3ab['distance']!=_0x5632d2['distance']?_0x5632d2['distance']-_0x2be3ab['distance']:!!_0x2be3ab['isAdded']!=!!_0x5632d2['isAdded']?-0x1==_0x2be3ab['side']||0x0==_0x2be3ab['side']?_0x2be3ab['isAdded']?-0x1:0x1:_0x2be3ab['isAdded']?0x1:-0x1:_0x2be3ab['index']-_0x5632d2['index']),{'commonTape':_0x3bf42b,'iEnd':_0x2ff7f6,'jEnd':_0x53e148};function _0x2e7f8b(_0x3a4f8d,_0x3186b2,_0x108468){let _0x48ded3=-0x1,_0x26e279=Number['POSITIVE_INFINITY'],_0x15347c=!0x0;for(let _0x2ee948=_0x3186b2;_0x2ee948<_0x108468;_0x2ee948++)if(_0x321133['isInline'](_0x3a4f8d[_0x2ee948]['item'])||(_0x15347c=!0x1),_0x3a4f8d[_0x2ee948]['item']['startIndex']<_0x3186b2&&(_0x48ded3=_0x2ee948),_0x3a4f8d[_0x2ee948]['item']['endIndex']>=_0x108468){_0x26e279=_0x2ee948;break;}_0x15347c&&(_0x48ded3=_0x108468-0x1);for(let _0x6efa1d=_0x3186b2;_0x6efa1d<_0x108468;_0x6efa1d++)_0x3a4f8d[_0x6efa1d]['side']=_0x6efa1d<=_0x48ded3?-0x1:_0x6efa1d<_0x26e279?0x0:0x1,_0x3a4f8d[_0x6efa1d]['index']=_0x6efa1d;let _0x4fe5b8=0x0;for(let _0x2bcf88=_0x3186b2;_0x2bcf88<=_0x48ded3;_0x2bcf88++)0x0==_0x3a4f8d[_0x2bcf88]['distance']?_0x3a4f8d[_0x2bcf88]['level']=_0x4fe5b8:(_0x4fe5b8++,_0x3a4f8d[_0x2bcf88]['level']=_0x4fe5b8,_0x4fe5b8++);for(let _0x25a20b=_0x3186b2;_0x25a20b<_0x108468;_0x25a20b++)0x0==_0x3a4f8d[_0x25a20b]['side']&&(_0x3a4f8d[_0x25a20b]['level']=_0x4fe5b8);_0x4fe5b8=0x0;for(let _0x1ab3bc=_0x108468-0x1;_0x1ab3bc>=_0x26e279;_0x1ab3bc--)0x0==_0x3a4f8d[_0x1ab3bc]['distance']?_0x3a4f8d[_0x1ab3bc]['level']=_0x4fe5b8:(_0x4fe5b8--,_0x3a4f8d[_0x1ab3bc]['level']=_0x4fe5b8,_0x4fe5b8--);}}['_fixObsoleteTags'](_0x446c83){const _0x500ae2=new Map(),_0x29ea64=this['editor']['model']['schema'];for(let _0x45b7d6=0x1;_0x45b7d6<_0x446c83['length'];_0x45b7d6++){let _0x5a1981,_0x53da7e,_0x5dbfa6;const _0x52e66b=_0x446c83[_0x45b7d6],_0x38d8eb=_0x446c83[_0x45b7d6-0x1];if('text'==_0x52e66b['type'])continue;if(_0x52e66b['type']!=_0x38d8eb['type'])continue;if(!_0x29ea64['isBlock'](_0x38d8eb['item'])||_0x29ea64['isLimit'](_0x38d8eb['item']))continue;if(!_0x29ea64['isBlock'](_0x52e66b['item'])||_0x29ea64['isLimit'](_0x52e66b['item']))continue;if((_0x446c83[_0x45b7d6]['isAdded']||_0x446c83[_0x45b7d6]['isAddSuggestion'])&&_0x446c83[_0x45b7d6-0x1]['isRemoved'])_0x5a1981=_0x446c83[_0x45b7d6],_0x53da7e=_0x446c83[_0x45b7d6-0x1],_0x5dbfa6=_0x45b7d6-0x1;else{if(!_0x446c83[_0x45b7d6]['isRemoved']||!_0x446c83[_0x45b7d6-0x1]['isAdded']&&!_0x446c83[_0x45b7d6-0x1]['isAddSuggestion'])continue;_0x5a1981=_0x446c83[_0x45b7d6-0x1],_0x53da7e=_0x446c83[_0x45b7d6],_0x5dbfa6=_0x45b7d6;}const _0x39530e=_0x5a1981['level']==_0x53da7e['level'],_0x3c2384=Math['abs'](_0x5a1981['level'])<Math['abs'](_0x53da7e['level'])&&0x0==_0x53da7e['distance'];(_0x39530e||_0x3c2384)&&(_0x500ae2['set'](_0x53da7e['id'],_0x5a1981['id']),_0x446c83['splice'](_0x5dbfa6,0x1),_0x45b7d6--,_0x5a1981['isAdded']=!0x1);}for(let _0x2d83fc=0x0;_0x2d83fc<_0x446c83['length'];_0x2d83fc++)_0x500ae2['has'](_0x446c83[_0x2d83fc]['pairId'])&&(_0x446c83[_0x2d83fc]['pairId']=_0x500ae2['get'](_0x446c83[_0x2d83fc]['pairId']));}['_removeMissingPairs'](_0x42a59b){const _0x45617b=new Set(_0x42a59b['map'](_0x261e58=>_0x261e58['id']));for(let _0x5be610=0x0;_0x5be610<_0x42a59b['length'];_0x5be610++)_0x45617b['has'](_0x42a59b[_0x5be610]['pairId'])||0x0==_0x42a59b[_0x5be610]['distance']||(_0x42a59b[_0x5be610]['isIncorrect']=!0x0);return _0x42a59b['filter'](_0x24095e=>!_0x24095e['isIncorrect']);}['_markMismatchedRemovedTags'](_0x41e64d){const _0x5a91c2=new Set();for(let _0x5257d1=0x0;_0x5257d1<_0x41e64d['length'];_0x5257d1++){if(_0x5a91c2['has'](_0x41e64d[_0x5257d1]['id'])&&_0x41e64d[_0x5257d1]['isRemoved']&&(_0x41e64d[_0x5257d1]['isIncorrect']=!0x0),_0x41e64d[_0x5257d1]['isIncorrect'])continue;if(0x0==_0x41e64d[_0x5257d1]['distance'])continue;if('elementStart'!=_0x41e64d[_0x5257d1]['type'])continue;if(null==_0x41e64d[_0x5257d1]['pairId'])continue;let _0x1ce4eb=_0x5257d1+0x1,_0x3b6506=0x0;for(;_0x41e64d[_0x1ce4eb]['id']!=_0x41e64d[_0x5257d1]['pairId'];)'elementStart'==_0x41e64d[_0x1ce4eb]['type']?_0x3b6506++:'elementEnd'==_0x41e64d[_0x1ce4eb]['type']&&_0x3b6506--,_0x1ce4eb++;if(0x0!=_0x3b6506){if(_0x41e64d[_0x5257d1]['isRemoved'])_0x41e64d[_0x5257d1]['isIncorrect']=!0x0;else{for(;_0x1ce4eb!=_0x5257d1;)_0x41e64d[_0x1ce4eb]['isRemoved']&&0x0!=_0x41e64d[_0x1ce4eb]['distance']&&(_0x41e64d[_0x1ce4eb]['isIncorrect']=!0x0,_0x5a91c2['add'](_0x41e64d[_0x1ce4eb]['pairId'])),_0x1ce4eb--;}}}return _0x41e64d['filter'](_0x305819=>!_0x305819['isIncorrect']);}['_removeUnsupportedChanges'](_0x1b2078){const _0x2731a6=this['editor']['model']['schema'];for(let _0x3f40a0=0x0;_0x3f40a0<_0x1b2078['length'];_0x3f40a0++){if(!(_0x1b2078[_0x3f40a0]['isAdded']||_0x1b2078[_0x3f40a0]['isAddSuggestion']||_0x1b2078[_0x3f40a0]['isRemoved']||_0x1b2078[_0x3f40a0]['isRemoveSuggestion']))continue;if(0x0==_0x1b2078[_0x3f40a0]['distance'])continue;const _0x28dffb=_0x1b2078[_0x3f40a0]['item'];_0x2731a6['isBlock'](_0x28dffb)||_0x2731a6['isLimit'](_0x28dffb)||(_0x1b2078[_0x3f40a0]['isAdded']&&delete _0x1b2078[_0x3f40a0]['isAdded'],_0x1b2078[_0x3f40a0]['isAddSuggestion']&&delete _0x1b2078[_0x3f40a0]['isAddSuggestion'],_0x1b2078[_0x3f40a0]['isRemoveSuggestion']&&delete _0x1b2078[_0x3f40a0]['isRemoveSuggestion'],_0x1b2078[_0x3f40a0]['isRemoved']&&(_0x1b2078[_0x3f40a0]['isIncorrect']=!0x0));}return _0x1b2078['filter'](_0x3311d1=>!_0x3311d1['isIncorrect']);}['_makeModelFromTape'](_0x305e74,_0x2834ea,_0x58e973){const _0x457fb9=new _0x596efb(),_0x5efeb7=[],_0x528b77=new Map(),_0x34360b=this['editor']['model'],_0xdca137=_0x34360b['schema'],_0x14075e=[_0x457fb9],_0x1c615b={},_0x599271={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x330d51=null;const _0x1e417b=[0x0];for(let _0x576da4=0x0;_0x576da4<_0x305e74['length'];_0x576da4++)if('elementStart'===_0x305e74[_0x576da4]['type']){_0x305e74[_0x576da4]['previousPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b);const _0x3b28cc=new _0x3d8552(_0x305e74[_0x576da4]['item']['name'],_0x305e74[_0x576da4]['item']['getAttributes']());_0x14075e[0x0]['_appendChild'](_0x3b28cc),_0x1e417b['push'](0x0),_0x14075e['unshift'](_0x3b28cc),_0x305e74[_0x576da4]['nextPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b);}else'elementEnd'===_0x305e74[_0x576da4]['type']?(_0x14075e['shift'](),_0x305e74[_0x576da4]['previousPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b),_0x1e417b['pop'](),_0x1e417b[_0x1e417b['length']-0x1]++,_0x305e74[_0x576da4]['nextPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b)):(_0x305e74[_0x576da4]['previousPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b),_0x330d51?_0x330d51['_data']+=_0x305e74[_0x576da4]['item']['data']:_0x330d51=new _0x2da680(_0x305e74[_0x576da4]['item']['data'],_0x305e74[_0x576da4]['item']['getAttributes']()),_0x305e74[_0x576da4+0x1]&&'text'===_0x305e74[_0x576da4+0x1]['type']&&_0x107236(_0x330d51,_0x305e74[_0x576da4+0x1]['item'])||(_0x14075e[0x0]['_appendChild'](_0x330d51),_0x330d51=null),_0x1e417b[_0x1e417b['length']-0x1]+=_0x305e74[_0x576da4]['item']['offsetSize'],_0x305e74[_0x576da4]['nextPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b));for(let _0x23d081=0x0;_0x23d081<_0x305e74['length'];_0x23d081++){const _0x15e465=_0x305e74[_0x23d081]['previousPosition'],_0x2dca89=_0x305e74[_0x23d081]['nextPosition'];for(const _0x582bab of _0x305e74[_0x23d081]['markersStart'])_0x528b77['set'](_0x582bab,{'start':_0x15e465,'end':null});_0x34df88('isRemoveSuggestion',_0x23d081,_0x15e465,_0x2dca89),_0x34df88('isAddSuggestion',_0x23d081,_0x15e465,_0x2dca89),_0x34df88('isRemoved',_0x23d081,_0x15e465,_0x2dca89),_0x34df88('isAdded',_0x23d081,_0x15e465,_0x2dca89);for(const _0x55d394 of _0x305e74[_0x23d081]['markersEnd']){const _0x36cf5b=_0x528b77['get'](_0x55d394);_0x36cf5b?_0x36cf5b['end']=_0x2dca89:_0x528b77['set'](_0x55d394,{'start':_0x2dca89,'end':_0x2dca89});}}for(const [_0x1dae9b,_0x1c79d0]of _0x528b77){const _0x26bbea=this['editor']['model']['createRange'](_0x1c79d0['start'],_0x1c79d0['end']);_0x457fb9['markers']['set'](_0x1dae9b,_0x26bbea);}return _0x5efeb7['sort']((_0xe87190,_0x1d89e4)=>{const _0x575e44=_0x457fb9['markers']['get']('revision:'+_0xe87190['id']),_0x324b4d=_0x457fb9['markers']['get']('revision:'+_0x1d89e4['id']);return _0x575e44['start']['isBefore'](_0x324b4d['start'])?-0x1:_0x575e44['start']['isAfter'](_0x324b4d['start'])?0x1:_0x575e44['end']['isBefore'](_0x324b4d['end'])?-0x1:_0x575e44['end']['isAfter'](_0x324b4d['end'])?0x1:'add'===_0xe87190['type']?-0x1:0x1;}),{'root':_0x457fb9,'changes':_0x5efeb7};function _0x34df88(_0x36a5f0,_0xde3079,_0x508b10,_0x42fe20){const _0x597378=!!_0x305e74[_0xde3079][_0x36a5f0],_0x46707a=_0x597378?_0x305e74[_0xde3079][_0x36a5f0]['userId']:null,_0x568fcc=_0xde3079===_0x305e74['length']-0x1,_0x4266af=_0x599271[_0x36a5f0][0x0],_0x502392=_0xdca137['isObject'](_0x305e74[_0xde3079]['item']);!_0x1c615b[_0x36a5f0]&&_0x597378?_0x1c615b[_0x36a5f0]={'start':_0x508b10,'tapeItem':_0x305e74[_0xde3079],'userId':_0x46707a,'type':_0x36a5f0}:_0x1c615b[_0x36a5f0]&&!_0x597378?(_0x1c615b[_0x36a5f0]['end']=_0x508b10,_0x273b61(_0x1c615b[_0x36a5f0]),_0x1c615b[_0x36a5f0]=null):_0x1c615b[_0x36a5f0]&&_0x597378&&_0x1c615b[_0x36a5f0]['userId']!==_0x46707a&&(_0x1c615b[_0x36a5f0]['end']=_0x508b10,_0x4266af&&_0x4266af['userId']===_0x1c615b[_0x36a5f0]['userId']||_0x273b61(_0x1c615b[_0x36a5f0]),_0x1c615b[_0x36a5f0]={'start':_0x508b10,'tapeItem':_0x305e74[_0xde3079],'userId':_0x46707a,'type':_0x36a5f0}),_0x1c615b[_0x36a5f0]&&_0x502392&&('elementStart'!==_0x305e74[_0xde3079]['type']||_0x4266af&&_0x4266af['userId']===_0x46707a||_0x599271[_0x36a5f0]['unshift']({'userId':_0x46707a,'object':_0x305e74[_0xde3079]['item'],'change':_0x1c615b[_0x36a5f0]}),'elementEnd'===_0x305e74[_0xde3079]['type']&&_0x4266af&&_0x4266af['object']===_0x305e74[_0xde3079]['item']&&(_0x599271[_0x36a5f0]['shift'](),_0x1c615b[_0x36a5f0]=_0x4266af['change'])),_0x1c615b[_0x36a5f0]&&_0x568fcc&&(_0x1c615b[_0x36a5f0]['end']=_0x42fe20,_0x273b61(_0x1c615b[_0x36a5f0]),_0x1c615b[_0x36a5f0]=null);}function _0x273b61({start:_0x5e3e1b,end:_0xda188e,tapeItem:_0x52e461,userId:_0x20ed14,type:_0x230d8d}){const _0x30daca=_0x52e461['item'],_0x14f814=_0x34360b['schema']['isBlock'](_0x30daca)&&!_0x34360b['schema']['isLimit'](_0x30daca),_0x1b4849=_0x5e3e1b['nodeAfter']==_0xda188e['parent']&&_0xda188e['isAtStart'];if(_0x14f814&&_0x1b4849)return;const _0x10488e=_0x34360b['createRange'](_0x5e3e1b,_0xda188e),_0x3884c0=_0x2834ea['get'](_0x20ed14),_0x287b7a=new xt({'author':_0x3884c0,'type':'isAdded'==_0x230d8d||'isAddSuggestion'==_0x230d8d?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x230d8d||'isRemoveSuggestion'==_0x230d8d},'createdAt':new Date(),'rootName':_0x58e973});_0x5efeb7['push'](_0x287b7a),_0x457fb9['markers']['set']('revision:'+_0x287b7a['id'],_0x10488e);}function _0x107236(_0x27142e,_0x5a70bf){const _0x1bd756=_0x27142e['getAttributes'](),_0xa3919=_0x5a70bf['getAttributes']();for(const _0x43914d of _0x1bd756){if(_0x43914d[0x1]!==_0x5a70bf['getAttribute'](_0x43914d[0x0]))return!0x1;_0xa3919['next']();}return _0xa3919['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x48c724=>{const _0x422a2e=_0x48c724['markerName']['split'](':')[0x1],_0x1633a0=this['_getChangeFromId'](_0x422a2e);if(!_0x1633a0)return null;const _0x367c99='add'==_0x1633a0['type']?'insertion':'deletion',_0x3cf5a5=['ck-suggestion-marker','ck-suggestion-marker-'+_0x367c99];return _0x1633a0['data']['isSuggestion']&&_0x3cf5a5['push']('ck-suggestion-marker-'+_0x367c99+'-new'),this['activeChange']==_0x1633a0&&_0x3cf5a5['push']('ck-suggestion-marker--active'),{'classes':_0x3cf5a5,'attributes':{'data-change-id':_0x422a2e}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4b0e61=>{_0x4b0e61['on']('element:pre',(_0x3dd7cf,_0xac49bc,_0x3e0bc4)=>{const _0x269d67=_0xac49bc['viewItem']['getChild'](0x0);if(!_0x269d67||!_0x269d67['is']('element','code'))return;if(!_0x3e0bc4['consumable']['consume'](_0x269d67,{'attributes':['vid_start','vid_end']}))return;const _0x1afcec=_0xac49bc['modelRange']['start']['nodeAfter'];_0x3e0bc4['writer']['setAttribute']('vid_start',_0x269d67['getAttribute']('vid_start'),_0x1afcec),_0x3e0bc4['writer']['setAttribute']('vid_end',_0x269d67['getAttribute']('vid_end'),_0x1afcec);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3f3476=>{_0x3f3476['on']('element',(_0x2185d2,_0x1baa14,_0x5acd47)=>{if(!_0x5acd47['consumable']['consume'](_0x1baa14['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1baa14['modelRange']['isCollapsed'])return;const _0x1ba5e2=_0x1baa14['modelRange']['start']['nodeAfter'];_0x1ba5e2['hasAttribute']('vid_start')||_0x1ba5e2['hasAttribute']('vid')||(_0x5acd47['writer']['setAttribute']('vid_start',_0x1baa14['viewItem']['getAttribute']('vid_start'),_0x1ba5e2),_0x5acd47['writer']['setAttribute']('vid_end',_0x1baa14['viewItem']['getAttribute']('vid_end'),_0x1ba5e2));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3e6bef=>_0x3e6bef['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1f6ac8,[,_0x453b83])=>{['vid_start','vid_end','vid']['includes'](_0x453b83)&&(_0x1f6ac8['return']=!0x0,_0x1f6ac8['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x31c443=>{_0x31c443['on']('attribute:vid',(_0xc69e5e,_0x1d8152,_0x549ddb)=>{if('\x20'!=_0x1d8152['item']['data']||_0x1d8152['item']['parent']['maxOffset']>0x1)return;if(!_0x549ddb['consumable']['consume'](_0x1d8152['item'],_0xc69e5e['name']))return;const _0xec9c8a=_0x549ddb['writer'],_0x4e30ad=_0x549ddb['mapper']['toViewRange'](_0x1d8152['range']);_0xec9c8a['wrap'](_0x4e30ad,_0xec9c8a['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4afd1a){const _0x150e4b=_0x4afd1a['plugins']['get']('RevisionViewer');return(_0x5a5561,_0x4d09a9,_0x5541b8)=>{const _0x18cbef=_0x4d09a9['markerName']['split'](':')[0x1],_0x4fc06f=_0x150e4b['_getChangeFromId'](_0x18cbef);if(!_0x4fc06f)return null;const _0x59bf78='add'==_0x4fc06f['type']?'split':'merge';if(!_0x5541b8['consumable']['test'](_0x4d09a9['markerRange'],_0x5a5561['name']))return;const _0x2734a4=_0x4d09a9['markerRange']['getWalker'](),_0x1c484f=_0x4d09a9['markerRange']['start'],_0x4ff2c6=_0x4afd1a['model']['schema'];let _0x5e56fc=null,_0x1afacc=null,_0x2b53cc=!0x1,_0x48f719=!0x1;for(const _0x2c566a of _0x2734a4){const _0x2f5ed9=_0x2c566a['item'];_0x2b53cc=_0x2b53cc||_0x4ff2c6['isContent'](_0x2f5ed9);const _0x2cb572=_0x5541b8['mapper']['toViewElement'](_0x2f5ed9);if(_0x2cb572&&_0x2cb572['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2c566a['type']&&(_0x4ff2c6['isBlock'](_0x2f5ed9)&&!_0x4ff2c6['isLimit'](_0x2f5ed9)&&(_0x2f5ed9['nextSibling']||_0x1c484f['isAtEnd']?_0x5e56fc&&_0x5e56fc['parent']==_0x2f5ed9||(_0x5e56fc=_0x2f5ed9,_0x515bfe(_0x2c566a['previousPosition']),_0x48f719=!0x0):_0x1afacc=_0x1afacc||_0x2c566a['previousPosition']));}function _0x515bfe(_0x2d42ad){const _0x1f28f=_0x5541b8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x59bf78}),_0x4e824c=_0x5541b8['mapper']['toViewPosition'](_0x2d42ad);_0x4fc06f['data']['isSuggestion']&&_0x5541b8['writer']['addClass']('ck-suggestion-marker-'+_0x59bf78+'-new',_0x1f28f),_0x150e4b['activeChange']==_0x4fc06f&&_0x5541b8['writer']['addClass']('ck-suggestion-marker--active',_0x1f28f),_0x5541b8['writer']['insert'](_0x4e824c,_0x1f28f),_0x5541b8['mapper']['bindElementToMarker'](_0x1f28f,_0x4d09a9['markerName']);}_0x2b53cc||_0x48f719||!_0x1afacc||_0x515bfe(_0x1afacc);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x7b3308,_0x22924b,_0x3686bf)=>{const _0x2d8a3f=_0x3686bf['mapper']['markerNameToElements'](_0x22924b['markerName']);if(_0x2d8a3f){for(const _0x422306 of _0x2d8a3f)(_0x422306['hasClass']('ck-suggestion-marker-split')||_0x422306['hasClass']('ck-suggestion-marker-merge'))&&(_0x3686bf['mapper']['unbindElementFromMarkerName'](_0x422306,_0x22924b['markerName']),_0x3686bf['writer']['remove'](_0x422306));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x499acb,_0x3b2a7f,_0x38c3f3)=>{const _0x173c57=_0x3b2a7f['markerName']['split'](':')[0x1],_0x11c6e0=this['_getChangeFromId'](_0x173c57);if(!_0x11c6e0)return null;const _0x5e30cd='add'==_0x11c6e0['type']?'split':'merge';if(_0x38c3f3['consumable']['test'](_0x3b2a7f['markerRange'],_0x499acb['name']))for(const _0xad3bbd of _0x3b2a7f['markerRange']['getItems']()){if(!_0xad3bbd['is']('element','softBreak'))continue;const _0x5ad9d1=_0x38c3f3['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5e30cd}),_0x1d7cd9=_0x38c3f3['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xad3bbd));_0x11c6e0['data']['isSuggestion']&&_0x38c3f3['writer']['addClass']('ck-suggestion-marker-'+_0x5e30cd+'-new',_0x5ad9d1),this['activeChange']==_0x11c6e0&&_0x38c3f3['writer']['addClass']('ck-suggestion-marker--active',_0x5ad9d1),_0x38c3f3['writer']['insert'](_0x1d7cd9,_0x5ad9d1),_0x38c3f3['mapper']['bindElementToMarker'](_0x5ad9d1,_0x3b2a7f['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x557e72=>{for(const _0x161f51 of this['editor']['model']['document']['getRootNames']()){const _0xdab4fb=this['editor']['model']['document']['getRoot'](_0x161f51),_0x2224e2=this['editor']['editing']['view']['document']['getRoot'](_0x161f51);if(_0x2224e2){const _0x31e2ba=_0xdab4fb['getAttribute']('revisionHistoryAttachChange');if(_0x557e72['removeAttribute']('data-change-id',_0x2224e2),_0x557e72['removeClass']('ck-revision-history-root-add',_0x2224e2),_0x557e72['removeClass']('ck-revision-history-root-remove',_0x2224e2),_0x557e72['removeClass']('ck-revision-history-root--active',_0x2224e2),_0x31e2ba){const _0x438985=this['_getChangeFromId'](_0x31e2ba);if(!_0x438985)return null;_0x557e72['setAttribute']('data-change-id',_0x31e2ba,_0x2224e2),_0x557e72['addClass']('ck-revision-history-root-'+_0x438985['type'],_0x2224e2),this['activeChange']==_0x438985&&_0x557e72['addClass']('ck-revision-history-root--active',_0x2224e2);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3aa64d=>'revision-comment:'+_0x3aa64d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5da479=>'revision-suggestion:'+_0x5da479,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3a70e9=>({'name':'suggestion:'+_0x3a70e9,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x118153=>{const _0x3873f5=_0x118153['markerName']['split'](':')[0x1];return'insertion'!=_0x3873f5&&'deletion'!=_0x3873f5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3873f5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ot(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ot(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x30e92e,_0x5d7f5a,_0x19a98d)=>{const _0x22977b=_0x19a98d['mapper']['markerNameToElements'](_0x5d7f5a['markerName']);if(_0x22977b){for(const _0x3be71f of _0x22977b)_0x3be71f['is']('uiElement')&&(_0x19a98d['mapper']['unbindElementFromMarkerName'](_0x3be71f,_0x5d7f5a['markerName']),_0x19a98d['writer']['remove'](_0x3be71f));}},{'priority':'high'});}['_getChangeFromId'](_0x928381){return this['_changeIdToChange']['get'](_0x928381);}['_getViewForChange'](_0xe63dd0){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0xe63dd0),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x36c79a,_0x43a70e,_0x5e2e4f,_0x5bf577)=>{_0x5bf577&&this['_balloon']['remove'](_0x5bf577),_0x5e2e4f&&(this['_balloon']['add']({'view':_0x5e2e4f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x35609d=this['editor']['editing'],_0x4feb9f=this['_getChangeFromId'](_0x5e2e4f['changeId']);let _0x44af78;if(_0x4feb9f['data']['isOnRoot']){const _0x16632f=_0x35609d['view']['getDomRoot'](_0x4feb9f['rootName']);_0x44af78=Array['from'](_0x16632f['getClientRects']());}else{const _0x55d556=this['editor']['model']['markers']['get']('revision:'+_0x5e2e4f['changeId']);_0x44af78=Array['from'](_0x35609d['mapper']['markerNameToElements'](_0x55d556['name']))['map'](_0x132f62=>_0x35609d['view']['domConverter']['mapViewToDom'](_0x132f62))['map'](_0x5dd100=>Array['from'](_0x5dd100['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x44af78[0x0];return _0x44af78['find'](_0x3dab2e=>_0x3dab2e['top']-0x3<=this['_activeViewTarget']['y']&&_0x3dab2e['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3dab2e['left']-0x3<=this['_activeViewTarget']['x']&&_0x3dab2e['right']+0x3>=this['_activeViewTarget']['x'])||_0x44af78[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x261792,_0x425131,_0x25a674,_0x4e1744)=>{this['activeView']=_0x25a674?this['_getViewForChange'](_0x25a674):null,this['editor']['model']['change'](()=>{const _0x293bd8=this['editor']['editing'];_0x4e1744&&(_0x4e1744['data']['isOnRoot']?_0x293bd8['view']['change'](_0x4500da=>{_0x4500da['removeClass']('ck-revision-history-root--active',_0x293bd8['view']['document']['getRoot'](_0x4e1744['rootName']));}):_0x293bd8['reconvertMarker']('revision:'+_0x4e1744['id'])),_0x25a674&&(_0x25a674['data']['isOnRoot']?_0x293bd8['view']['change'](_0x2cbafe=>{_0x2cbafe['addClass']('ck-revision-history-root--active',_0x293bd8['view']['document']['getRoot'](_0x25a674['rootName']));}):_0x293bd8['reconvertMarker']('revision:'+_0x25a674['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4199f4,_0x22e5f2)=>{if(this['activeChange'])return;const _0x3a784d=this['_findChangeIdFromDomTarget'](_0x22e5f2['target']),_0xaea23a=this['_changeIdToChange']['get'](_0x3a784d);_0xaea23a?(this['_activeViewTarget']={'x':_0x22e5f2['domEvent']['x'],'y':_0x22e5f2['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0xaea23a)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4cd3c4,_0x141d47)=>{const _0xf81e8d=this['_findChangeIdFromDomTarget'](_0x141d47['target']),_0x29757b=this['_changeIdToChange']['get'](_0xf81e8d);_0x29757b?(this['_activeViewTarget']={'x':_0x141d47['domEvent']['x'],'y':_0x141d47['domEvent']['y']},_0x29757b===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x29757b):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x48f677){do{const _0x364a00=_0x48f677['getAttribute']('data-change-id');if(_0x364a00)return _0x364a00;_0x48f677=_0x48f677['parent'];}while(_0x48f677);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x569d5b=>{for(const _0x470097 of this['editor']['model']['markers'])_0x569d5b['removeMarker'](_0x470097);});}}function Ot(_0x287a35,_0x36de96){return(_0x33de9e,_0x5db6aa,_0x317623)=>{if(!_0x317623['consumable']['test'](_0x5db6aa['markerRange'],_0x33de9e['name']))return;const _0x4f91f4=_0x5db6aa['markerRange']['getWalker'](),_0x40c80f=_0x5db6aa['markerRange']['start'],_0x4b63c9=_0x287a35['model']['schema'];let _0x1699a0=null,_0x18e856=null,_0x39825e=!0x1,_0x19fc20=!0x1;for(const _0x105440 of _0x4f91f4){const _0x463aef=_0x105440['item'];_0x39825e=_0x39825e||_0x4b63c9['isContent'](_0x463aef);const _0x4db07a=_0x317623['mapper']['toViewElement'](_0x463aef);if(_0x4db07a&&_0x4db07a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x105440['type']&&(_0x4b63c9['isBlock'](_0x463aef)&&!_0x4b63c9['isLimit'](_0x463aef)&&(_0x463aef['nextSibling']||_0x40c80f['isAtEnd']?_0x1699a0&&_0x1699a0['parent']==_0x463aef||(_0x1699a0=_0x463aef,_0x5c3a27(_0x105440['previousPosition']),_0x19fc20=!0x0):_0x18e856=_0x18e856||_0x105440['previousPosition']));}function _0x5c3a27(_0x7da0f3){const _0x3dd117=_0x317623['mapper']['toViewPosition'](_0x7da0f3),_0x2ed2d2=_0x317623['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x36de96});_0x317623['writer']['insert'](_0x3dd117,_0x2ed2d2),_0x317623['mapper']['bindElementToMarker'](_0x2ed2d2,_0x5db6aa['markerName']);}_0x39825e||_0x19fc20||!_0x18e856||_0x5c3a27(_0x18e856);};}class Ct extends _0x2d8837{constructor(_0x464048){super(_0x464048);const _0x56ede3=_0x464048['plugins']['get'](St);this['affectsData']=!0x1,this['listenTo'](_0x56ede3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x56ede3,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5e8cfb=this['editor'],_0x26e92f=_0x5e8cfb['plugins']['get'](St),_0x4d0db5=_0x26e92f['isReady']?_0x26e92f['diff']['newRevisionId']:null;_0x5e8cfb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4d0db5);}['refresh'](){const {isReady:_0x155697,isEnabled:_0x244edd,repository:_0x48821c,diff:_0x47d2a4}=this['editor']['plugins']['get'](St),_0x3e2fcd=_0x47d2a4&&_0x48821c['getLaterVisibleRevision'](_0x47d2a4['newRevisionId']);this['isEnabled']=_0x155697&&_0x244edd&&Boolean(_0x3e2fcd);}}class Mt extends _0x2d8837{['_step'];constructor(_0x510f77,{direction:_0x9bce4f}){super(_0x510f77);const _0x48ca81=_0x510f77['plugins']['get'](St);this['affectsData']=!0x1,this['_step']='forward'===_0x9bce4f?0x1:-0x1,this['listenTo'](_0x48ca81,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x48ca81,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x48ca81,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x530d6f=this['editor'],_0x5dd860=_0x530d6f['plugins']['get'](St),{isNavigationMode:_0x3461be,currentChangeNumber:_0x49b304}=_0x5dd860;let _0xb526f9;if(_0x5dd860['activeChange']=_0x3461be?_0x5dd860['diff']['changes']['get'](_0x49b304+this['_step']):_0x5dd860['diff']['changes']['first'],_0x5dd860['activeChange']['data']['isOnRoot'])_0xb526f9=_0x530d6f['editing']['view']['getDomRoot'](_0x5dd860['activeChange']['rootName']);else{const _0x464d69=_0x530d6f['model']['markers']['get']('revision:'+_0x5dd860['activeChange']['id']);_0xb526f9=_0x15495a(_0x530d6f['editing'],_0x464d69);}_0x18a7fa({'target':_0xb526f9,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4ba715,currentChangeNumber:_0x17f57b,numberOfChanges:_0x4b67c9,isReady:_0x55f0c6,isEnabled:_0x262790}=this['editor']['plugins']['get'](St);this['isEnabled']=!!(_0x262790&&_0x55f0c6&&_0x4b67c9)&&(!_0x4ba715||(0x1===this['_step']?_0x17f57b<_0x4b67c9-0x1:_0x17f57b>0x0));}}class Dt extends _0x34ccfc{constructor(_0x344733){super(_0x344733);const _0x3fc5ba=this['bindTemplate'],_0x2a1c6b=new _0x95bba8(_0x344733),_0x4c4c2a=new _0x95bba8(_0x344733);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',(_0x4a375c,_0x49f7b6)=>_0x4a375c&&_0x49f7b6>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4aebc4,_0x2b2f42,_0x29cfb3,_0x19e1b7)=>{if(!_0x4aebc4)return wt(_0x344733,'Loading...');if(!_0x29cfb3)return wt(_0x344733,'No\x20changes');const _0x2c784c=wt(_0x344733,'NUMBER_OF_CHANGES',_0x29cfb3);return _0x19e1b7?wt(_0x344733,'X_OF_Y_CHANGES',[_0x2b2f42+0x1,_0x29cfb3]):_0x2c784c;}),_0x2a1c6b['set']({'label':wt(_0x344733,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1ef2e5}),_0x4c4c2a['set']({'label':wt(_0x344733,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x437b8e}),_0x2a1c6b['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4c4c2a['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2a1c6b['on']('execute',()=>this['fire']('execute','backward')),_0x4c4c2a['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',_0x3fc5ba['if']('_isStatusLabelVisible','ck-hidden',_0x4cd788=>!_0x4cd788)]},'children':[{'text':_0x3fc5ba['to']('isNavigationMode',_0x54a928=>_0x54a928?wt(_0x344733,'EDIT_X_OF_Y_REVISIONS')+':\x20':wt(_0x344733,'Total')+':\x20')}]},{'text':_0x3fc5ba['to']('_statusText')}]},new et(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2a1c6b,_0x4c4c2a]}]});}}const Tt='ck-editor__editable__loading-overlay';class Vt extends _0x1f70da{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5b224e=this['editor']['editing']['view'];_0x5b224e['change'](_0x49f550=>{for(const _0x928b33 of _0x5b224e['document']['roots'])_0x49f550['addClass'](Tt,_0x928b33);});}['hide'](){const _0x23e828=this['editor']['editing']['view'];_0x23e828['change'](_0x403ae6=>{for(const _0x5cf6d0 of _0x23e828['document']['roots'])_0x403ae6['removeClass'](Tt,_0x5cf6d0);});}}class Ht extends _0x1f70da{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St,Vt];}['init'](){const _0x408332=this['editor'],_0x54ada2=_0x408332['plugins']['get'](St),_0x13887f=_0x408332['plugins']['get'](Vt);_0x408332['ui']['componentFactory']['add']('exitToEditing',_0x5cb91e=>{const _0x121da5=new _0x95bba8(_0x5cb91e);return _0x121da5['set']({'label':wt(_0x5cb91e,'Back\x20to\x20editing'),'icon':_0x2aa6fc,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x121da5,'execute',()=>{_0x408332['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x121da5;}),_0x408332['ui']['componentFactory']['add']('restoreRevision',_0xec6ee0=>{const _0x662105=new _0x95bba8(_0xec6ee0);return _0x662105['set']({'label':wt(_0xec6ee0,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x662105['bind']('isEnabled')['to'](_0x408332['commands']['get']('restoreRevision')),this['listenTo'](_0x662105,'execute',()=>_0x408332['execute']('restoreRevision')),_0x662105;}),_0x408332['ui']['componentFactory']['add']('changesNavigation',_0x56a9cd=>{const _0x1af74b=new Dt(_0x56a9cd),_0x51b52a=_0x408332['commands']['get']('showPreviousChange'),_0x8c09c5=_0x408332['commands']['get']('showNextChange');return _0x1af74b['bind']('isBackwardNavigationEnabled')['to'](_0x51b52a,'isEnabled'),_0x1af74b['bind']('isForwardNavigationEnabled')['to'](_0x8c09c5,'isEnabled'),_0x1af74b['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x54ada2),this['listenTo'](_0x1af74b,'execute',(_0xb9c60c,_0x2ca22e)=>{_0x408332['execute']('forward'===_0x2ca22e?'showNextChange':'showPreviousChange');}),_0x1af74b;}),_0x13887f['show'](),_0x54ada2['on']('change:isReady',(_0x27c726,_0x5c1ca5,_0x52fa74)=>{_0x52fa74?_0x13887f['hide']():_0x13887f['show']();});}}class Pt extends _0x3ffa9b{['_resizeObserver']=null;constructor(_0x5d4cc4,_0x935531){super(_0x5d4cc4,_0x935531);const _0x30fb9f=this['bindTemplate'];this['set']({'label':wt(_0x5d4cc4,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=wt(_0x5d4cc4,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x30fb9f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x17246d(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x1cc652=this['fieldView']['element'];this['_tooltipString']=_0x1cc652['scrollWidth']>_0x1cc652['clientWidth']&&_0x1cc652['value']||'';}}class Ut extends _0x34ccfc{constructor(_0x17e13c,_0x138289,_0x55aeb4){super(_0x17e13c);const _0x22a61a=new nt();_0x22a61a['set']({'content':_0x37026b,'viewBox':'0\x200\x2011\x2010'});const _0x29458e=['ck','ck-revision-history-sidebar__revision-author'];_0x55aeb4&&_0x29458e['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5a3379=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':wt(_0x17e13c,_0x55aeb4?'Revision\x20creator':'Revision\x20author')},'children':[_0x22a61a,_0x138289['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x29458e},'children':_0x5a3379});}}function Lt(_0x2ca8cd,_0x5cae0f){const _0x55b01e=_0x2ca8cd['bindTemplate'],_0x46967=_0x2ca8cd['locale'],_0x2d6482=_0x142c0e(_0x46967);_0x2d6482['panelPosition']='sw';const _0x559212=function(_0x210215,_0x5f3246){const _0x5e6c40=function(_0x52dabe,_0x143732){const _0x2e6aa6=_0x52dabe['locale'],_0x51b7fe={'Compare\x20against\x20selected':wt(_0x2e6aa6,'Compare\x20against\x20selected'),'Name\x20this\x20revision':wt(_0x2e6aa6,'Name\x20this\x20revision'),'Restore\x20this\x20revision':wt(_0x2e6aa6,'Restore\x20this\x20revision')};return _0x143732['map'](_0x47bbc1=>{const _0x1e4ad0=_0x51b7fe[_0x47bbc1['name']];return _0x1e4ad0&&_0x1e4ad0!==_0x47bbc1['name']&&(_0x47bbc1['name']=_0x1e4ad0),_0x47bbc1;});}(_0x210215,_0x5f3246),_0x1cd6eb=new _0x25d3ca();for(const _0x16dc13 of _0x5e6c40){const _0x15d194={'type':'button','model':new rt({'label':_0x16dc13['name'],'class':_0x16dc13['class'],'withText':!0x0,'role':'menuitem','_action':_0x16dc13['action']})};_0x15d194['model']['bind']('isEnabled')['to'](_0x210215,'isActionsDropdownOpen',_0x123150=>'function'!=typeof _0x16dc13['isEnabled']||(!_0x123150||_0x16dc13['isEnabled'](_0x210215))),_0x1cd6eb['add'](_0x15d194);}return _0x1cd6eb;}(_0x2ca8cd,_0x5cae0f);return _0x2ca8cd['bind']('isActionsDropdownOpen')['to'](_0x2d6482,'isOpen'),_0x2d6482['buttonView']['set']({'label':wt(_0x46967,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2afade}),_0x2d6482['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x55b01e['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x55b01e['to'](_0x215903=>_0x215903['stopPropagation']())}}),_0x2d6482['on']('execute',_0x23b870=>{_0x2ca8cd['isReady']&&'function'==typeof _0x23b870['source']['_action']&&_0x23b870['source']['_action'](_0x2ca8cd);}),ot(_0x2d6482,_0x559212,{'role':'menu'}),_0x2d6482['listenTo'](_0x2ca8cd,'change:isActionsDropdownOpen',(_0x459c0c,_0x54556b,_0x5d7983)=>{if(_0x5d7983)for(const _0x349357 of _0x2d6482['listView']['items']){const _0xcd6000=_0x349357['children']['first'],_0x5976f0=_0x5cae0f['find'](_0x5462be=>_0x5462be['action']===_0xcd6000['_action'])['isVisible'];_0x349357['isVisible']=void 0x0===_0x5976f0||_0x5976f0(_0x2ca8cd);}}),_0x2d6482;}class Ft extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x5304ce,uid as _0x5758ef,Collection as _0xdad0f8,logWarning as _0x534c37,FocusTracker as _0x2c6dd1,KeystrokeHandler as _0x20e870,scrollViewportToShowTarget as _0x27dbeb,ResizeObserver as _0x8e13cb,ElementReplacer as _0x4b5f5a,CKEditorError as _0x33164c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x16ea52,set as _0x4fe428,unset as _0x16d744,isEqual as _0xb22d47}from'es-toolkit/compat';import{Plugin as _0x226832,PendingActions as _0x3e99ec,Command as _0x372988,ElementApiMixin as _0x197c7d,Editor as _0x94765f}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x51f1bf,getMarkerDomElement as _0x4a57b1,ConfirmMixin as _0x4d06b1,sanitizeEditorConfig as _0x30d046}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x374ac6,ViewAttributeElement as _0x74307c,ViewEmptyElement as _0x42ed82,ViewRawElement as _0x1ab90c,ViewUIElement as _0x24d64c,ViewDocumentFragment as _0x5ce340,ViewText as _0x14c125,ViewElement as _0x1f29f7,ModelElement as _0xaddbbf,ModelRange as _0x124a01,ModelPosition as _0x42f956,ModelDocumentFragment as _0x33f300,ModelText as _0xfa93f5}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x4c4c60,IconChevronUp as _0x77416f,IconChevronDown as _0x1b082e,IconUndo as _0x5cb0fc,IconUser as _0x18cd72,IconThreeVerticalDots as _0x917af3}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x73555,View as _0x155b5e,submitHandler as _0x2ad37b,LabeledFieldView as _0x4aa119,createLabeledInputText as _0x50c24b,createDropdown as _0x5b8929,ListView as _0x1a859b,ListItemView as _0x15e6ab,ButtonView as _0x2ac8c4,MenuBarMenuView as _0x5815bc,MenuBarMenuListView as _0x32fcf3,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 ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x5304ce(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0xda391c){super(),this['id']=_0xda391c['id']||_0x5758ef(),this['creator']=_0xda391c['creator']||null,this['authors']=_0xda391c['authors']||[],this['diffData']=_0xda391c['diffData']||null,this['toVersion']=_0xda391c['toVersion']||0x0,this['fromVersion']=_0xda391c['fromVersion']||0x0,this['set']('name',_0xda391c['name']||''),this['set']('createdAt',_0xda391c['createdAt']||new Date()),this['set']('attributes',_0xda391c['attributes']||{});}['setName'](_0x153223){this['_update']({'name':_0x153223});}['setAttribute'](_0x3fab81,_0x4ee18e){const _0x3dbf94=_0x16ea52(this['attributes']);_0x4fe428(_0x3dbf94,_0x3fab81,_0x4ee18e),this['_update']({'attributes':_0x3dbf94});}['removeAttribute'](_0x156fe2){const _0x1cf9a7=_0x16ea52(this['attributes']);_0x16d744(_0x1cf9a7,_0x156fe2),this['_update']({'attributes':_0x1cf9a7});}['_update'](_0x4ccbac,_0x4be9a3=!0x1){let _0x399128=!0x1;const _0x101f1c={'id':this['id']},_0x544a30=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x2a5d5a of _0x544a30){const _0x4bde78=_0x4ccbac[_0x2a5d5a];void 0x0!==_0x4bde78&&_0x4bde78!==this[_0x2a5d5a]&&(this[_0x2a5d5a]=_0x4bde78,_0x101f1c[_0x2a5d5a]=_0x4bde78,_0x399128=!0x0);}_0x399128&&(_0x101f1c['authors']&&(_0x101f1c['authorsIds']=_0x101f1c['authors']['map'](_0x53e741=>_0x53e741['id']),delete _0x101f1c['authors']),this['fire']('_update',_0x101f1c,_0x4be9a3));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x188b7f=>_0x188b7f['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x226832{['_revisions'];static get['requires'](){return[_0x51f1bf];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x388910){super(_0x388910),this['_revisions']=new _0xdad0f8();}['afterInit'](){!async function(_0x4f508e){const _0x49aae5=_0x49d1d8([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]),_0x57d53c=0xeb829,_0x486de2=0x359e09b0,_0x88c4b=0x35998388^_0x486de2,_0x57e646=window[_0x49d1d8([0x44,0x61,0x74,0x65])][_0x49d1d8([0x6e,0x6f,0x77])](),_0x518398=_0x4f508e[_0x49d1d8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1cf9aa=new window[(_0x49d1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3eacba=>{_0x518398[_0x49d1d8([0x6f,0x6e,0x63,0x65])](_0x49d1d8([0x72,0x65,0x61,0x64,0x79]),_0x3eacba);}),_0x4d61a1={[_0x49d1d8([0x6b,0x74,0x79])]:_0x49d1d8([0x45,0x43]),[_0x49d1d8([0x75,0x73,0x65])]:_0x49d1d8([0x73,0x69,0x67]),[_0x49d1d8([0x63,0x72,0x76])]:_0x49d1d8([0x50,0x2d,0x32,0x35,0x36]),[_0x49d1d8([0x78])]:_0x49d1d8([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]),[_0x49d1d8([0x79])]:_0x49d1d8([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]),[_0x49d1d8([0x61,0x6c,0x67])]:_0x49d1d8([0x45,0x53,0x32,0x35,0x36])},_0x25ca7d=_0x518398[_0x49d1d8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x49d1d8([0x67,0x65,0x74])](_0x49d1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2d1ec2(){let _0x4b48be,_0x2b5b96=null,_0x17b9ca=null;try{if(_0x25ca7d==_0x49d1d8([0x47,0x50,0x4c]))return _0x49d1d8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4b48be=_0x26df0e(),!_0x4b48be)return _0x49d1d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4b48be[_0x49d1d8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x17b9ca=_0x5f57be(_0x4b48be[_0x49d1d8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4b48be[_0x49d1d8([0x6a,0x74,0x69])])),await _0x29c1ef()?_0x236e1d()?_0x44e96e()?_0x49d1d8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3652c3()?(_0x4b48be[_0x49d1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x49d1d8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2b5b96=_0x5e9acc(_0x49d1d8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x15f554()):_0x49d1d8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x49d1d8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x49d1d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x49d1d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x44e96e(){const _0x521ddf=[_0x49d1d8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x49d1d8([0x74,0x72,0x69,0x61,0x6c])][_0x49d1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b48be[_0x49d1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x57e646/0x3e8:0xe10*_0x88c4b;return _0x4b48be[_0x49d1d8([0x65,0x78,0x70])]<_0x521ddf;}function _0x236e1d(){const _0x3d6143=_0x4b48be[_0x49d1d8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3d6143)return!0x1;if(_0x3d6143[_0x49d1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49d1d8([0x2a])))return!0x0;if(_0x3d6143[_0x49d1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49d1d8([0x52,0x48])))return!0x0;if(_0x3d6143[_0x49d1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49d1d8([0x52,0x52,0x48]))){if(_0x257ead())return!0x0;if(_0xcd615f()||_0x4eb935())return!0x0;}return!0x1;}function _0x3652c3(){const _0x2db51f=_0x4b48be[_0x49d1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2db51f||0x0==_0x2db51f[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x84ba09}=new URL(window[_0x49d1d8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2db51f[_0x49d1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x84ba09))return!0x0;const _0x2e360a=_0x84ba09[_0x49d1d8([0x73,0x70,0x6c,0x69,0x74])](_0x49d1d8([0x2e]));return _0x2db51f[_0x49d1d8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xdecb7b=>_0xdecb7b[_0x49d1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49d1d8([0x2a])))[_0x49d1d8([0x6d,0x61,0x70])](_0x9c8819=>_0x9c8819[_0x49d1d8([0x73,0x70,0x6c,0x69,0x74])](_0x49d1d8([0x2e])))[_0x49d1d8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x580db7=>_0x580db7[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2e360a[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x49d1d8([0x6d,0x61,0x70])](_0x2bc699=>Array(_0x2e360a[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2bc699[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x49d1d8([0x66,0x69,0x6c,0x6c])](_0x2bc699[0x0]===_0x49d1d8([0x2a])?_0x49d1d8([0x2a]):'')[_0x49d1d8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2bc699))[_0x49d1d8([0x73,0x6f,0x6d,0x65])](_0x18d0b6=>_0x2e360a[_0x49d1d8([0x65,0x76,0x65,0x72,0x79])]((_0x2d3718,_0x117336)=>_0x18d0b6[_0x117336]===_0x2d3718||_0x18d0b6[_0x117336]===_0x49d1d8([0x2a])));}function _0x15f554(){return _0x2b5b96&&_0x17b9ca?new window[(_0x49d1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4329ab,_0x793174)=>{_0x2b5b96[_0x49d1d8([0x74,0x68,0x65,0x6e])](_0x4329ab,_0x793174),_0x17b9ca[_0x49d1d8([0x74,0x68,0x65,0x6e])](_0xcc9861=>{_0xcc9861!=_0x49d1d8([0x56,0x61,0x6c,0x69,0x64])&&_0x4329ab(_0xcc9861);},_0x793174);}):_0x2b5b96||_0x17b9ca||_0x49d1d8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5f57be(_0x2d616a,_0xb1af6d){return new window[(_0x49d1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1dbedc=>{if(_0x18ec82())return _0x1dbedc(_0x49d1d8([0x56,0x61,0x6c,0x69,0x64]));_0x30adfb(),_0x518398[_0x49d1d8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x49d1d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x149d3e=!0x1;const _0x3f99ba=_0x5758ef();function _0x24ea15(_0x4e91de){return!!_0x4e91de&&(typeof _0x4e91de===_0x49d1d8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4e91de===_0x49d1d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4e91de[_0x49d1d8([0x74,0x68,0x65,0x6e])]===_0x49d1d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4e91de[_0x49d1d8([0x63,0x61,0x74,0x63,0x68])]===_0x49d1d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x466fb1(_0x19374f){_0x31d751(_0x19374f)[_0x49d1d8([0x74,0x68,0x65,0x6e])](_0x4df908=>{if(!_0x4df908||_0x4df908[_0x49d1d8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x49d1d8([0x6f,0x6b]))return _0x49d1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xcb0c98(_0x3283c4(_0x3f99ba+_0xb1af6d))!=_0x4df908[_0x49d1d8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x49d1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x49d1d8([0x56,0x61,0x6c,0x69,0x64]);})[_0x49d1d8([0x74,0x68,0x65,0x6e])](_0x3eda97=>(_0x43531b(),_0x3eda97),()=>{const _0x2e6e75=_0x3aa0f4();return null==_0x2e6e75?(_0x43531b(),_0x49d1d8([0x56,0x61,0x6c,0x69,0x64])):_0x49d1d8(_0x57e646-_0x2e6e75>(0x11928db0^_0x486de2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x49d1d8([0x74,0x68,0x65,0x6e])](_0x1dbedc)[_0x49d1d8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1dbedc(_0x49d1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x28518b=0x35a8e730^_0x486de2;function _0x43531b(){const _0x1b7773=_0x49d1d8([0x6c,0x6c,0x63,0x74,0x2d])+_0xcb0c98(_0x3283c4(_0x2d616a)),_0x4d5365=_0x277fa8(_0xcb0c98(window[_0x49d1d8([0x4d,0x61,0x74,0x68])][_0x49d1d8([0x63,0x65,0x69,0x6c])](_0x57e646/_0x28518b)));window[_0x49d1d8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x49d1d8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b7773,_0x4d5365);}function _0x3aa0f4(){const _0xb26cfe=_0x49d1d8([0x6c,0x6c,0x63,0x74,0x2d])+_0xcb0c98(_0x3283c4(_0x2d616a)),_0x43a32a=window[_0x49d1d8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x49d1d8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xb26cfe);return _0x43a32a?window[_0x49d1d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x277fa8(_0x43a32a),0x10)*_0x28518b:null;}function _0x31d751(_0x524b59){return new window[(_0x49d1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x574f88,_0x537f3e)=>{_0x524b59[_0x49d1d8([0x74,0x68,0x65,0x6e])](_0x574f88,_0x537f3e),window[_0x49d1d8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x537f3e,0x359fdd70^_0x486de2);});}}_0x518398[_0x49d1d8([0x6f,0x6e])](_0x49d1d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4bb51a,_0x2471ac)=>{if(_0x2471ac[0x0]!=_0x2d616a)return _0x1dbedc(_0x49d1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2471ac[0x1]={..._0x2471ac[0x1],[_0x49d1d8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3f99ba};},{[_0x49d1d8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x49d1d8([0x68,0x69,0x67,0x68])}),_0x518398[_0x49d1d8([0x6f,0x6e])](_0x49d1d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x35c440=>{_0x24ea15(_0x35c440[_0x49d1d8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x149d3e=!0x0,_0x466fb1(_0x35c440[_0x49d1d8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x49d1d8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x49d1d8([0x6c,0x6f,0x77])}),_0x1cf9aa[_0x49d1d8([0x74,0x68,0x65,0x6e])](()=>{_0x149d3e||_0x1dbedc(_0x49d1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x18ec82(){return _0x518398[_0x49d1d8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x49d1d8([0x76,0x69,0x65,0x77])][_0x49d1d8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x49d1d8([0x61,0x75,0x74,0x6f]);}function _0x30adfb(){_0x518398[_0x49d1d8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x49d1d8([0x76,0x69,0x65,0x77])][_0x49d1d8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x49d1d8([0x61,0x75,0x74,0x6f]);}}function _0x5e9acc(_0x1651a6){const _0x7ecf4e=[new window[(_0x49d1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9a9692=>setTimeout(_0x9a9692,0x3597377c^_0x486de2)),_0x1cf9aa[_0x49d1d8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x49d1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe796b6=>{const _0x4b1296=0x359e09b7^_0x486de2,_0x35b4d6=_0x4f508e[_0x49d1d8([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x46713d(){_0x35b4d6[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x4b1296&&_0xe796b6();}_0x46713d(),_0x35b4d6[_0x49d1d8([0x6f,0x6e])](_0x49d1d8([0x61,0x64,0x64]),_0x46713d);})),new window[(_0x49d1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x590330=>{function _0x2e8367(){for(const _0x4e7005 in window)if(window[_0x49d1d8([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x49d1d8([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4e7005))&&window[_0x4e7005]==_0x57d53c)return _0x590330();_0x518398[_0x49d1d8([0x73,0x74,0x61,0x74,0x65])]!=_0x49d1d8([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x49d1d8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2e8367,0x359e1a38^_0x486de2);}_0x2f817a(_0x49d1d8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2e8367();})];return window[_0x49d1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x49d1d8([0x72,0x61,0x63,0x65])](_0x7ecf4e)[_0x49d1d8([0x74,0x68,0x65,0x6e])](()=>_0x1651a6);}async function _0x5a61b5(){if(await _0x1cf9aa,_0x2f817a(_0x49d1d8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x3f3e7b=_0x4f508e[_0x49d1d8([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x1d69de=_0x4f508e[_0x49d1d8([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])](_0x3f3e7b[_0x49d1d8([0x69,0x64])]),_0x4f7ff8=_0x53dece(_0x49d1d8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4f7ff8[_0x49d1d8([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x3f3e7b['id'],_0x1d69de?_0x1d69de['id']:null,!0x0),_0x4f7ff8[_0x49d1d8([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x49d1d8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4f7ff8[_0x49d1d8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4f7ff8[_0x49d1d8([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x4b6da8,void(_0x4f7ff8[_0x49d1d8([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x4b6da8);}if(_0x2f817a(_0x49d1d8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x220bfc=_0x53dece(_0x49d1d8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x220bfc[_0x49d1d8([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x49d1d8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x220bfc[_0x49d1d8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x220bfc[_0x49d1d8([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x4b6da8,_0x220bfc[_0x49d1d8([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x4b6da8;}_0x518398[_0x49d1d8([0x6d,0x6f,0x64,0x65,0x6c])][_0x49d1d8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b6da8,_0x518398[_0x49d1d8([0x6d,0x6f,0x64,0x65,0x6c])][_0x49d1d8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b6da8,_0x518398[_0x49d1d8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x49d1d8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x257ead(){return _0x2f817a(_0x49d1d8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x53dece(_0x49d1d8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x49d1d8([0x73,0x74,0x61,0x74,0x65])]==_0x49d1d8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xcd615f(){return _0x2f817a(_0x49d1d8([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 _0x4eb935(){return _0x2f817a(_0x49d1d8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x43e210(_0x57c635){const _0x596702=_0x2ad353();_0x518398[_0x596702]=_0x49d1d8([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])+_0x57c635,_0x57c635[_0x49d1d8([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x49d1d8([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x2ad353()]=_0x57d53c),_0x57c635!=_0x49d1d8([0x56,0x61,0x6c,0x69,0x64])&&_0x5a61b5();}function _0x2ad353(){const _0x462bff=window[_0x49d1d8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x49d1d8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x49d1d8([0x6e,0x6f,0x77])]())[_0x49d1d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x49d1d8([0x2e]),'');let _0x3eaffa=_0x49d1d8([0x76]);for(let _0x176ca5=0x0;_0x176ca5<_0x462bff[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x176ca5+=0x2){let _0x1b5fa1=window[_0x49d1d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x462bff[_0x49d1d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x176ca5,_0x176ca5+0x2));_0x1b5fa1>=_0x49aae5[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1b5fa1-=_0x49aae5[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3eaffa+=_0x49aae5[_0x1b5fa1];}return _0x3eaffa;}function _0x26df0e(){const _0x1cdcf7=_0x25ca7d[_0x49d1d8([0x73,0x70,0x6c,0x69,0x74])](_0x49d1d8([0x2e]));if(0x3!=_0x1cdcf7[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x148102(_0x1cdcf7[0x1]);function _0x148102(_0x350835){const _0x10ed92=_0x580525(_0x350835);return _0x10ed92&&_0xac12b9()?_0x10ed92:null;function _0xac12b9(){const _0x2d3685=_0x10ed92[_0x49d1d8([0x6a,0x74,0x69])],_0x5b3ea5=window[_0x49d1d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d3685[_0x49d1d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d3685[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2c3699={..._0x10ed92,[_0x49d1d8([0x6a,0x74,0x69])]:_0x2d3685[_0x49d1d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2d3685[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2c3699[_0x49d1d8([0x76,0x63])],_0x3283c4(_0x2c3699)==_0x5b3ea5;}}}async function _0x29c1ef(){let _0x3238a5=!0x0;try{const _0x4e77ac=_0x25ca7d[_0x49d1d8([0x73,0x70,0x6c,0x69,0x74])](_0x49d1d8([0x2e])),[_0x3fd71e,_0x27ae9e,_0xa24aa5]=_0x4e77ac;return _0x30dbd1(_0x3fd71e),await _0x3246dd(_0x3fd71e,_0x27ae9e,_0xa24aa5),_0x3238a5;}catch{return!0x1;}function _0x30dbd1(_0x5869f5){const _0x13f40e=_0x580525(_0x5869f5);_0x13f40e&&_0x13f40e[_0x49d1d8([0x61,0x6c,0x67])]==_0x49d1d8([0x45,0x53,0x32,0x35,0x36])||(_0x3238a5=!0x1);}async function _0x3246dd(_0x2d4641,_0x325564,_0x2ef0a8){const _0x47494e=window[_0x49d1d8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x49d1d8([0x66,0x72,0x6f,0x6d])](_0x4a9496(_0x2ef0a8),_0x3b5f38=>_0x3b5f38[_0x49d1d8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2bc9c9=new window[(_0x49d1d8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x49d1d8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2d4641+_0x49d1d8([0x2e])+_0x325564),_0x59e255=window[_0x49d1d8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x49d1d8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x59e255)return;const _0xf7a185=await _0x59e255[_0x49d1d8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x49d1d8([0x6a,0x77,0x6b]),_0x4d61a1,{[_0x49d1d8([0x6e,0x61,0x6d,0x65])]:_0x49d1d8([0x45,0x43,0x44,0x53,0x41]),[_0x49d1d8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x49d1d8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x49d1d8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x59e255[_0x49d1d8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x49d1d8([0x6e,0x61,0x6d,0x65])]:_0x49d1d8([0x45,0x43,0x44,0x53,0x41]),[_0x49d1d8([0x68,0x61,0x73,0x68])]:{[_0x49d1d8([0x6e,0x61,0x6d,0x65])]:_0x49d1d8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf7a185,_0x47494e,_0x2bc9c9)||(_0x3238a5=!0x1);}}function _0x580525(_0x5ed103){return _0x5ed103[_0x49d1d8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x49d1d8([0x65,0x79]))?JSON[_0x49d1d8([0x70,0x61,0x72,0x73,0x65])](_0x4a9496(_0x5ed103)):null;}function _0x4a9496(_0x1be87c){return window[_0x49d1d8([0x61,0x74,0x6f,0x62])](_0x1be87c[_0x49d1d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x49d1d8([0x2b]))[_0x49d1d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x49d1d8([0x2f])));}function _0x3283c4(_0x52c3f3){let _0xd62eb=0x1505;function _0x42b6bb(_0x282db3){for(let _0x5a30fa=0x0;_0x5a30fa<_0x282db3[_0x49d1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5a30fa++){const _0xacec15=_0x282db3[_0x49d1d8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5a30fa);_0xd62eb=(_0xd62eb<<0x5)+_0xd62eb+_0xacec15,_0xd62eb&=_0xd62eb;}}function _0x262cb7(_0x4057d1){Array[_0x49d1d8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4057d1)?_0x4057d1[_0x49d1d8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x262cb7):_0x4057d1&&typeof _0x4057d1==_0x49d1d8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x49d1d8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4057d1)[_0x49d1d8([0x73,0x6f,0x72,0x74])]()[_0x49d1d8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x11bee8,_0x27b97d])=>{_0x42b6bb(_0x11bee8),_0x262cb7(_0x27b97d);}):_0x42b6bb(window[_0x49d1d8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4057d1));}return _0x262cb7(_0x52c3f3),_0xd62eb>>>0x0;}function _0xcb0c98(_0x44d14a){return _0x44d14a[_0x49d1d8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x49d1d8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x49d1d8([0x30]));}function _0x277fa8(_0x2371c2){return _0x2371c2[_0x49d1d8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x49d1d8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x49d1d8([0x6a,0x6f,0x69,0x6e])]('');}function _0x2f817a(_0x2b2cd7){return _0x518398[_0x49d1d8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x49d1d8([0x68,0x61,0x73])](_0x2b2cd7);}function _0x53dece(_0x4d2df8){return _0x518398[_0x49d1d8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x49d1d8([0x67,0x65,0x74])](_0x4d2df8);}function _0x4b6da8(){}function _0x49d1d8(_0x29504e){return _0x29504e['map'](_0x363a6d=>String['fromCharCode'](_0x363a6d))['join']('');}_0x43e210(await _0x2d1ec2());}(this);}['createRevision'](_0x56feda){const _0x28cdb8=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x56feda['id'],'name':_0x56feda['name'],'creator':_0x56feda['creatorId']?_0x28cdb8['getUser'](_0x56feda['creatorId']):null,'diffData':_0x56feda['diffData']||_0x56feda['data'],'authors':_0x56feda['authorsIds']['map'](_0x195009=>_0x28cdb8['getUser'](_0x195009)),'createdAt':new Date(_0x56feda['createdAt']),'attributes':_0x56feda['attributes'],'fromVersion':_0x56feda['fromVersion'],'toVersion':_0x56feda['toVersion']});}['addRevision'](_0x59b376,_0x3e8fea=0x0){this['_revisions']['add'](_0x59b376,_0x3e8fea);}['getRevision'](_0xf14874){return this['_revisions']['get'](_0xf14874);}['getRevisions'](_0x1ed8c6={'toJSON':!0x1}){const _0x205ba4=Array['from'](this['_revisions']);return _0x205ba4['reverse'](),_0x1ed8c6['toJSON']?_0x205ba4['map'](_0x2070c3=>_0x2070c3['toJSON']()):_0x205ba4;}['getIndex'](_0x24743e){return this['_revisions']['getIndex'](_0x24743e);}['getEarlierVisibleRevision'](_0x48cf62){const [,_0x56fafd]=this['getRevisionsIterator'](_0x48cf62,{'direction':'earlier'});return _0x56fafd;}['getLaterVisibleRevision'](_0xc0f589){const [,_0x2c9baf]=this['getRevisionsIterator'](_0xc0f589,{'direction':'later'});return _0x2c9baf;}['getRevisionsInDiff'](_0x29bf8d){const _0xfd5f21=[];for(const _0x41e2c6 of this['getRevisionsIterator'](_0x29bf8d['newRevisionId']))if(_0xfd5f21['push'](_0x41e2c6),_0x41e2c6['id']===_0x29bf8d['oldRevisionId'])break;return _0xfd5f21;}*['getRevisionsIterator'](_0x48f8e3,{direction:_0x513bbd='earlier',filter:_0x15e969=()=>!0x0}={}){const _0xa695e6='earlier'===_0x513bbd?0x1:-0x1;let _0x4f6bff=this['_revisions']['get'](_0x48f8e3),_0x46105a=this['getIndex'](_0x4f6bff);for(yield _0x4f6bff;_0x4f6bff;){if(_0x46105a+=_0xa695e6,_0x4f6bff=this['getRevision'](_0x46105a),!_0x4f6bff)return;_0x15e969(_0x4f6bff)&&(yield _0x4f6bff);}}}class RevisionHistoryUtils extends _0x226832{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x374ac6,'c'],[_0x74307c,'a'],[_0x42ed82,'e'],[_0x1ab90c,'r'],[_0x24d64c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x374ac6],['a',_0x74307c],['e',_0x42ed82],['r',_0x1ab90c],['u',_0x24d64c]]);async['loadRevisionData'](_0x171314,_0xf505f){if(_0x171314['diffData']||!_0xf505f)return;const _0x2e3394=this['editor']['config']['get']('collaboration.channelId'),_0x367805=await _0xf505f['getRevision']({'channelId':_0x2e3394,'revisionId':_0x171314['id']});_0x171314['diffData']=_0x367805['diffData'];}['getRevisionDocumentData'](_0x4ac3e0){const _0x5de016={};for(const _0x8bcdac in _0x4ac3e0['diffData']){if(_0x4ac3e0['diffData'][_0x8bcdac]['attachChange']&&!_0x4ac3e0['diffData'][_0x8bcdac]['attachChange']['isAttached'])continue;const _0x461d51=this['_removeRevisionMarkers'](JSON['parse'](_0x4ac3e0['diffData'][_0x8bcdac]['insertions'])),_0x179b0f=this['editor']['editing']['view']['document'],_0x39c02b=new _0x5ce340(_0x179b0f,_0x461d51['map'](_0x431c67=>this['_getViewFromDiffObj'](_0x431c67,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5de016[_0x8bcdac]=this['editor']['data']['processor']['toData'](_0x39c02b),this['editor']['data']['processor']['useFillerType']('default');}return _0x5de016;}['getRevisionRootsAttributes'](_0x28cd37){const _0x3d9847={};for(const _0x52e5f4 in _0x28cd37['diffData'])_0x28cd37['diffData'][_0x52e5f4]['attachChange']&&!_0x28cd37['diffData'][_0x52e5f4]['attachChange']['isAttached']||(_0x3d9847[_0x52e5f4]=_0x28cd37['diffData'][_0x52e5f4]['attributesAfter']||{});return _0x3d9847;}['_getTypeCharForViewElement'](_0x1d69bf){return this['_viewClassToTypeChar']['get'](_0x1d69bf['constructor']);}['_getViewFromDiffObj'](_0x1f362c,_0x57a9b7){const _0x4a7df7=this['editor']['editing']['view']['document'];if('string'==typeof _0x1f362c)return new _0x14c125(_0x4a7df7,_0x1f362c);{let _0x523efe,_0x5ed599;_0x5ed599='u'==_0x1f362c['type']||'r'==_0x1f362c['type']?[]:_0x1f362c['children']['map'](_0xace5e0=>this['_getViewFromDiffObj'](_0xace5e0,_0x57a9b7));const _0x30642b=this['_typeCharToViewClass']['get'](_0x1f362c['type'])||_0x1f29f7,_0x4168fe=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x523efe=new _0x30642b(_0x4a7df7,_0x1f362c['name'],_0x1f362c['attributes'],_0x5ed599),'u'==_0x1f362c['type']&&_0x1f362c['children'][0x0]){const _0x475002=_0x1f362c['children'][0x0];if(_0x523efe['render']=function(_0x266acd){const _0x53b40d=_0x266acd['createElement']('div');return _0x53b40d['innerHTML']=_0x475002,_0x53b40d['childNodes'][0x0];},_0x57a9b7){const _0x40b58d=new _0x5ce340(_0x4a7df7);_0x40b58d['_appendChild'](_0x523efe);const _0x5cd378=Array['from'](_0x4168fe['viewChildrenToDom'](_0x40b58d,{'bind':!0x1})),_0x5c813a=_0x4168fe['domDocument']['createElement']('div');_0x5c813a['append'](..._0x5cd378),_0x523efe=Array['from'](_0x4168fe['domChildrenToView'](_0x5c813a))[0x0];}}else{if('r'==_0x1f362c['type']&&_0x1f362c['children'][0x0]){const _0xa6c8b=_0x1f362c['children'][0x0];if(_0x523efe['render']=function(_0x1afb97){_0x1afb97['innerHTML']=_0xa6c8b;},_0x57a9b7){const _0x2df64b=new _0x5ce340(_0x4a7df7);_0x2df64b['_appendChild'](_0x523efe);const _0x3ae6e2=Array['from'](_0x4168fe['viewChildrenToDom'](_0x2df64b,{'bind':!0x1})),_0x38deac=_0x4168fe['domDocument']['createElement']('div');_0x38deac['append'](..._0x3ae6e2);const _0x1ecaf7=Array['from'](_0x4168fe['domChildrenToView'](_0x38deac));_0x1ecaf7['length']>0x1?_0x523efe['_appendChild'](_0x1ecaf7):_0x523efe=_0x1ecaf7[0x0];}}}if(_0x1f362c['customProperties']){for(const [_0x2b6577,_0x53f932]of _0x1f362c['customProperties'])_0x523efe['_setCustomProperty'](_0x2b6577,_0x53f932);}const _0x8c636f=void 0x0===_0x1f362c['fillerOffset']?null:_0x1f362c['fillerOffset'];return null!==_0x8c636f&&(_0x523efe['getFillerOffset']=()=>_0x8c636f),_0x523efe;}}['_makeModelFromViewString'](_0x301d0e){const _0x17e8dd=JSON['parse'](_0x301d0e),_0xc2b3bf=this['editor']['editing']['view']['document'],_0x54362b=new _0x5ce340(_0xc2b3bf,_0x17e8dd['map'](_0x4644f8=>this['_getViewFromDiffObj'](_0x4644f8,!0x0)));return this['editor']['data']['toModel'](_0x54362b);}['_removeRevisionMarkers'](_0x13cc41){return(_0x13cc41=_0x13cc41['filter'](_0x531580=>!_0x531580['name']||'revision-start'!==_0x531580['name']&&'revision-end'!==_0x531580['name']))['forEach'](_0x239870=>{'string'!=typeof _0x239870&&(_0x239870['children']=this['_removeRevisionMarkers'](_0x239870['children']),_0x239870['attributes']=_0x239870['attributes']['filter'](_0x23e687=>!_0x23e687[0x0]['startsWith']('data-revision-')));}),_0x13cc41;}}function ft(_0x5b6496,_0x7c9d67,_0x357663){const t=_0x5b6496['t'];switch(_0x7c9d67){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'},_0x357663);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x357663);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 _0x226832{['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[_0x51f1bf,RevisionsRepository,RevisionHistoryUtils,_0x3e99ec];}constructor(_0x1f8594){super(_0x1f8594),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 _0x242c8f=_0x5758ef();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x242c8f},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 _0x2d4f5d=this['repository']['getRevision'](0x0),_0x383b7e=_0x2d4f5d&&null===_0x2d4f5d['creator']?_0x2d4f5d:null;if(this['_continueCurrentRevision']=!!_0x383b7e&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4e9726=this['_source']['getCurrentRevisionId'](),_0x14b8b7=this['repository']['getRevision'](_0x4e9726);if(_0x14b8b7)this['_startingVersion']=_0x14b8b7['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x127697=this['_source']['history']['_operations']['find'](_0x2f6b2e=>!_0x2f6b2e['_isInit']),_0xca557e=_0x127697?_0x127697['baseVersion']:this['_source']['history']['version'];_0x2d4f5d?(_0x2d4f5d['toVersion']<_0xca557e&&_0x2d4f5d['_update']({'toVersion':_0xca557e}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x383b7e['id'],this['_startingVersion']=_0x383b7e['fromVersion']):(this['_startingVersion']=_0x2d4f5d['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xca557e,this['_continueCurrentRevision']=!0x1);}}else _0x383b7e&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x383b7e['toVersion'],this['editor']['model']['document']['history']['version']),_0x383b7e['fromVersion']===_0x383b7e['toVersion']?(0x0!==_0x383b7e['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x383b7e['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x383b7e['id'],this['_startingVersion']=_0x383b7e['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',_0x89faf5=>!_0x89faf5),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x13033c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x54662e;for(const _0x423883 in _0x13033c){const _0x22ecdc=_0x423883,_0x3cb8dc=_0x13033c[_0x22ecdc];if('revisionHistoryLicenseKeyValid'==_0x3cb8dc||'revisionHistoryLicenseKeyInvalid'==_0x3cb8dc||'revisionHistoryLicenseKeyExpired'==_0x3cb8dc||'revisionHistoryLicenseKeyDomainLimit'==_0x3cb8dc||'revisionHistoryLicenseKeyNotAllowed'==_0x3cb8dc||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3cb8dc||'revisionHistoryLicenseKeyUsageLimit'==_0x3cb8dc){delete _0x13033c[_0x22ecdc],_0x54662e=_0x3cb8dc,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x54662e&&_0x13033c['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x54662e&&_0x13033c['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x54662e&&_0x13033c['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x54662e&&_0x13033c['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x54662e&&_0x13033c['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x54662e&&_0x13033c['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x15173e=this['repository']['getRevision'](0x0),_0x2e9178=await this['getRevisionDocumentData'](_0x15173e),_0x5756dd=await this['getRevisionRootsAttributes'](_0x15173e);this['_replaceEditorDataWithRevisionData'](_0x2e9178,_0x5756dd);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3acaff){this['_source']=_0x3acaff;}async['update'](){const _0x4ef10f=await this['_source']['getLatestVersion']();if(_0x4ef10f>this['currentRevision']['toVersion']){await this['_loadState']();const _0x4ce1a1=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4ef10f});_0x4ce1a1['authors']=_0x4ce1a1['authorsIds']['map'](_0x577c76=>this['editor']['plugins']['get']('Users')['getUser'](_0x577c76)),this['currentRevision']['_update'](_0x4ce1a1);}}async['saveRevision'](_0x384954={},_0x3af9b6=null){const _0x359592=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3af9b6>this['currentRevision']['toVersion']&&(_0x3af9b6=null),null===_0x3af9b6&&(_0x3af9b6=await this['_source']['getLatestVersion']());const _0x40624d=this['_getFromVersion'](_0x3af9b6),_0xf3cafd=this['buildRevisionData']({'from':_0x40624d,'to':_0x3af9b6});if(this['currentRevision']['toVersion']<_0x3af9b6){const _0x1a8a8f=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3af9b6,'to':_0x3af9b6});_0x1a8a8f['authors']=[],_0x1a8a8f['authorsIds']=[],_0x1a8a8f['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1a8a8f,!0x0),delete _0x1a8a8f['authors'],_0x359592['push'](_0x1a8a8f);}_0x384954['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x384954['name']=_0x384954['name']||null,_0x384954['id']=_0x384954['id']||_0x5758ef(),_0x384954={..._0x384954,..._0xf3cafd};const _0x34fec5=this['addRevisionData'](_0x384954);_0x359592['push'](_0x384954);const _0x19c52d=this['repository']['getIndex'](_0x34fec5);if(0x0!==_0x19c52d){const _0x501271=this['repository']['getRevision'](_0x19c52d-0x1);if(_0x501271['fromVersion']!==_0x3af9b6){const _0x35ca91=this['_revisionDataBuilder']['getData'](_0x3af9b6,_0x501271['toVersion']),_0x839cdf={'id':_0x501271['id'],'diffData':_0x35ca91['diffData'],'authorsIds':_0x35ca91['authorsIds'],'authors':_0x35ca91['authorsIds']['map'](_0x4736f6=>this['editor']['plugins']['get']('Users')['getUser'](_0x4736f6)),'fromVersion':_0x3af9b6};_0x501271===this['currentRevision']&&(_0x839cdf['createdAt']=new Date(_0x384954['createdAt']['getTime']()+0xa)),_0x501271['_update'](_0x839cdf,!0x0),delete _0x839cdf['authors'],_0x359592['push'](_0x839cdf);}}if(this['adapter']){for(const _0xa0d1ef of _0x359592)this['_bufferUpdate'](_0xa0d1ef['id'],_0xa0d1ef,!0x0);this['sendBufferedUpdates']();}return _0x34fec5;}['addRevisionData'](_0x441ded){const _0x342dd7=this['repository']['createRevision'](_0x441ded);return this['adapter']&&_0x342dd7['on']('_update',(_0x33257c,_0x5900c6,_0x1ebd37)=>{_0x1ebd37||(this['_bufferUpdate'](_0x5900c6['id'],_0x5900c6,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x342dd7,this['_findInsertionIndex'](_0x342dd7)),_0x342dd7;}async['getRevisionDocumentData'](_0x24ee81){return await this['_utils']['loadRevisionData'](_0x24ee81,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x24ee81);}async['getRevisionRootsAttributes'](_0x538dba){return await this['_utils']['loadRevisionData'](_0x538dba,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x538dba);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x377b52=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0xe15805=0x0;_0xe15805<_0x377b52['length'];_0xe15805++){const _0x18e32a=_0x377b52[_0xe15805];let _0x52143f=!0x1;for(const _0x2e50ab of Object['keys'](_0x18e32a))void 0x0===_0x18e32a[_0x2e50ab]?delete _0x18e32a[_0x2e50ab]:'id'!==_0x2e50ab&&(_0x52143f=!0x0);_0x52143f||(_0x377b52[_0xe15805]=null);}if(_0x377b52=_0x377b52['filter'](_0x27a826=>null!==_0x27a826),!_0x377b52['length'])return;for(let _0x2fb4af=0x0;_0x2fb4af<_0x377b52['length'];_0x2fb4af++){const _0x4c90c3=_0x377b52[_0x2fb4af];void 0x0!==_0x4c90c3['fromVersion']&&void 0x0===_0x4c90c3['toVersion']&&(_0x4c90c3['toVersion']=this['repository']['getRevision'](_0x4c90c3['id'])['toVersion']),void 0x0!==_0x4c90c3['toVersion']&&void 0x0===_0x4c90c3['fromVersion']&&(_0x4c90c3['fromVersion']=this['repository']['getRevision'](_0x4c90c3['id'])['fromVersion']);}const _0x54307a=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x377b52,_0x54307a)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x248cb7=>{if(_0x248cb7){for(const _0x4a940c of _0x248cb7)this['setRevisionData']({'id':_0x4a940c['id'],'createdAt':_0x4a940c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x461e03=null,from:_0x25260c=null,to:_0x460ef6=null}){_0x25260c=null!==_0x25260c?_0x25260c:_0x461e03['fromVersion'],_0x460ef6=null!==_0x460ef6?_0x460ef6:_0x461e03['toVersion'];const _0xcdfc10=this['_revisionDataBuilder']['getData'](_0x25260c,_0x460ef6),_0xd23c8={'diffData':_0xcdfc10['diffData'],'authorsIds':_0xcdfc10['authorsIds'],'fromVersion':_0x25260c,'toVersion':_0x460ef6};if(!_0x461e03||_0x460ef6!==_0x461e03['toVersion']){const _0x5edcd4=_0x460ef6-0x1,_0x3d0b6a=this['_source']['history']['getOperation'](_0x5edcd4);_0xd23c8['createdAt']=_0x3d0b6a&&_0x3d0b6a['createdAt']||new Date();}if(this['_loadedStateData']&&_0x25260c===this['_loadedStateData']['fromVersion']){for(const _0x14ea95 of this['_loadedStateData']['authors'])_0xd23c8['authorsIds']['includes'](_0x14ea95['id'])||_0xd23c8['authorsIds']['push'](_0x14ea95['id']);}return _0xd23c8;}['_bufferUpdate'](_0x5f4f79,_0x69d853,_0x519d29){if(this['_bufferedUpdates']['has'](_0x5f4f79)){const _0x1b4498=this['_bufferedUpdates']['get'](_0x5f4f79);_0x69d853=_0x519d29?{..._0x1b4498,..._0x69d853}:{..._0x69d853,..._0x1b4498};}this['_bufferedUpdates']['set'](_0x5f4f79,_0x69d853);}['setRevisionData'](_0x48afe5){const _0x23e243=this['repository']['getRevision'](_0x48afe5['id']);if(_0x48afe5['createdAt']&&(_0x48afe5['createdAt']=new Date(_0x48afe5['createdAt'])),_0x48afe5['authorsIds']){const _0x4c8ea6=this['editor']['plugins']['get']('Users');_0x48afe5['authors']=_0x48afe5['authorsIds']['map'](_0x52d3de=>_0x4c8ea6['getUser'](_0x52d3de));}_0x23e243['_update'](_0x48afe5,!0x0);}['_createInitialRevision'](_0x72199e){const _0x204e9d=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x204e9d)this['_initialRevisionId']=_0x204e9d['id'];else{const _0x140e29=!this['editor']['model']['document']['roots']['find'](_0x228601=>this['editor']['model']['hasContent'](_0x228601)),_0x54d5fc=this['editor']['plugins']['get']('Users')['me']['id'],_0x4c5dc7=ft(this['editor']['locale'],_0x140e29?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x72199e,'to':_0x72199e,'id':this['_initialRevisionId'],'name':_0x4c5dc7,'creatorId':_0x54d5fc});}}['_createCurrentRevision'](_0x536bad){const _0x51c80f=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x51c80f),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x536bad,'to':_0x536bad,'id':_0x51c80f,'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'](_0x11cdd9,_0x20c98b){const _0x5ed4eb={},_0x7fc381={},_0x557b72=this['editor']['config']['get']('roots')||{};for(const [_0x3e5144,_0x387406]of Object['entries'](_0x557b72))_0x387406['lazyLoad']||(_0x5ed4eb[_0x3e5144]=_0x387406['initialData']??'',_0x7fc381[_0x3e5144]=_0x387406['modelAttributes']||{});for(const _0x415112 of this['editor']['model']['document']['getRootNames']())_0x5ed4eb[_0x415112]??='',_0x7fc381[_0x415112]??={};let _0x3e0e60=!0x1;const _0x10f0f7=Object['keys'](_0x5ed4eb),_0x73bedd=Object['keys'](_0x11cdd9);for(const _0x4f0fdd of _0x10f0f7){if(_0x5ed4eb[_0x4f0fdd]!==_0x11cdd9[_0x4f0fdd]&&''!==_0x5ed4eb[_0x4f0fdd]['trim']()){_0x3e0e60=!0x0;break;}if(!_0xb22d47(_0x7fc381[_0x4f0fdd],_0x20c98b[_0x4f0fdd])&&Object['keys'](_0x7fc381[_0x4f0fdd])['length']>0x0){_0x3e0e60=!0x0;break;}}_0x3e0e60||(_0x3e0e60=_0x73bedd['some'](_0x41a302=>!this['editor']['model']['document']['getRoot'](_0x41a302))),_0x3e0e60&&_0x534c37('editor-initial-data-replaced-with-revision-data',{'editorData':_0x5ed4eb,'editorRootsAttributes':_0x7fc381,'revisionData':_0x11cdd9,'revisionRootsAttributes':_0x20c98b});for(const [_0x38c9df,_0x3dca9e]of Object['entries'](_0x11cdd9))this['editor']['config']['set']('roots.'+_0x38c9df+'.initialData',_0x3dca9e);for(const [_0x58c848,_0x42cc4f]of Object['entries'](_0x20c98b))this['editor']['config']['set']('roots.'+_0x58c848+'.modelAttributes',_0x42cc4f);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x303bfb=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x303bfb['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x555a15){const _0x351183=this['repository']['getRevisions']();_0x351183['reverse']();let _0x2f63f4=0x0;for(;_0x2f63f4<_0x351183['length'];){const _0x43df9d=_0x351183[_0x2f63f4];if(_0x43df9d===this['currentRevision']){_0x2f63f4++;continue;}if(_0x43df9d['id']===this['_initialRevisionId'])break;const _0x5d66cc=_0x555a15['toVersion']-_0x43df9d['toVersion']||_0x555a15['fromVersion']-_0x43df9d['fromVersion'];if(_0x5d66cc>0x0)break;if(_0x5d66cc<0x0)_0x2f63f4++;else{if(!_0x555a15['creator']&&_0x43df9d['creator'])break;if(_0x43df9d['creator']||!_0x555a15['creator']){if(_0x555a15['createdAt']>_0x43df9d['createdAt'])break;_0x2f63f4++;}else _0x2f63f4++;}}return _0x2f63f4;}['_getFromVersion'](_0x2b1d75){const _0x871337=this['repository']['getRevisions']();_0x871337['reverse'](),_0x871337['shift']();const _0x2eb157=_0x871337['find'](_0x2a6ad1=>_0x2a6ad1['toVersion']<=_0x2b1d75)['toVersion'];return _0x2eb157<this['_startingVersion']?this['_startingVersion']:_0x2eb157;}['_makeRevision']({name:_0x359605,from:_0x31d34c,to:_0x5a5e80,creatorId:_0xfaa182,id:_0x2ef4c8}){const _0x37ac5a=this['buildRevisionData']({'from':_0x31d34c,'to':_0x5a5e80});_0x37ac5a['name']=_0x359605,_0x37ac5a['creatorId']=_0xfaa182,_0x37ac5a['id']=_0x2ef4c8;const _0x23c71e=this['addRevisionData'](_0x37ac5a);return this['adapter']&&this['_bufferUpdate'](_0x37ac5a['id'],_0x37ac5a,!0x0),_0x23c71e;}['_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(_0x5f37b3){this['editor']=_0x5f37b3,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'](_0x864a74){this['source']=_0x864a74;const _0x47663e=new Map(),_0x82e547=new Map(),_0x4f4c6e=this['editor']['model']['document']['roots']['map'](_0xac631=>_0xac631['rootName']);for(const _0x356c2d of _0x4f4c6e){const _0xd1fa88=this['editor']['model']['document']['getRoot'](_0x356c2d),_0x5bc36d=gt(_0xd1fa88);_0x47663e['set'](_0x356c2d,_0x5bc36d),_0x82e547['set'](_0x356c2d,Object['fromEntries'](_0xd1fa88['getAttributes']()));}const _0x3e0ea6=Array['from'](this['editor']['model']['markers'])['map'](_0x2672ac=>[_0x2672ac['name'],_0x2672ac['getRange']()]),_0x4d268f=this['source']['version'];this['_saveMetaData'](_0x4d268f,_0x47663e,_0x3e0ea6,_0x82e547),this['_startingRevisionId']=this['_revisionId'];const _0x171936=new Map(),_0x462a69=new Map();for(const _0x5baa56 of _0x4f4c6e){const _0x37ec8b=wt(_0x5baa56);_0x171936['set'](_0x5baa56,_0x37ec8b),_0x462a69['set'](_0x5baa56,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x171936,[],_0x462a69);}['getData'](_0x27d2d9,_0x1d67f4){if(this['_lastFrom']===_0x27d2d9&&this['_lastTo']<=_0x1d67f4)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1d67f4,!0x0);else{if(!this['_savedMetaData']['has'](_0x27d2d9)){const _0x1c524a=this['_getPreviousFrom'](_0x27d2d9);this['_calculateMetaData'](_0x1c524a,_0x27d2d9,!0x1);}this['_calculateMetaData'](_0x27d2d9,_0x1d67f4,!0x0);}return this['_lastFrom']=_0x27d2d9,this['_lastTo']=_0x1d67f4,this['_getState']();}['loadState'](_0x3b85e3){if(!this['_savedMetaData']['has'](_0x3b85e3['fromVersion'])){const _0x102a92=this['_getPreviousFrom'](_0x3b85e3['fromVersion']);this['_calculateMetaData'](_0x102a92,_0x3b85e3['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3b85e3['fromVersion'],_0x3b85e3['toVersion'],!0x1);const _0x231809=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3b85e3['fromVersion'],this['_lastTo']=_0x3b85e3['toVersion'];for(const _0x2b2126 in _0x3b85e3['diffData']){const _0x43456f=_0x3b85e3['diffData'][_0x2b2126]['attachChange'],_0x155c88=_0x16ea52(_0x3b85e3['diffData'][_0x2b2126]['attributesBefore'])||{},_0x33f0cf=_0x231809['_makeModelFromViewString'](_0x3b85e3['diffData'][_0x2b2126]['deletions']);_0x33f0cf['rootName']=_0x2b2126,_0x33f0cf['_isAttached']=!_0x43456f||!_0x43456f['isAttached'],_0x33f0cf['isAttached']=()=>_0x33f0cf['_isAttached'],this['_baseRoots']['set'](_0x2b2126,_0x33f0cf),this['_baseRootsAttributes']['set'](_0x2b2126,_0x155c88),_0x43456f&&this['_touchedRoots']['set'](_0x2b2126,_0x43456f);const _0x57e0d3=this['_makeIdsRoot'](_0x33f0cf);this['_baseIdsRoots']['set'](_0x2b2126,_0x57e0d3);for(const [_0xf6389d,_0x3aac7f]of _0x33f0cf['markers']){if(!_0xf6389d['startsWith']('revision:'))continue;const _0x243c73=_0xf6389d['split'](':')[0x2];for(const _0x6c42a4 of _0x3aac7f['getWalker']({'singleCharacters':!0x0})){const _0x581de4=this['_getVidAttributeName'](_0x6c42a4),_0x15a3c0='elementEnd'==_0x6c42a4['type']?_0x6c42a4['previousPosition']['path']['slice'](0x0,-0x1):_0x6c42a4['previousPosition']['path'],_0x462878=_0x57e0d3['getNodeByPath'](_0x15a3c0)['getAttribute'](_0x581de4);this['_touched']['set'](_0x462878,{'userId':_0x243c73});}_0x33f0cf['markers']['delete'](_0xf6389d);}}this['_startingRevisionId']=this['_revisionId'];const _0x10b083=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x41bc1a=>!this['_touched']['has'](_0x41bc1a));let _0x114748=0x0;const _0x2fe92b=new Map();for(const _0x265914 in _0x3b85e3['diffData']){const _0x27816e=_0x3b85e3['diffData'][_0x265914]['attachChange'],_0x3d8b95=_0x16ea52(_0x3b85e3['diffData'][_0x265914]['attributesAfter'])||{},_0x3020d6=_0x231809['_makeModelFromViewString'](_0x3b85e3['diffData'][_0x265914]['insertions']);_0x3020d6['rootName']=_0x265914,_0x3020d6['_isAttached']=!_0x27816e||_0x27816e['isAttached'],_0x3020d6['isAttached']=()=>_0x3020d6['_isAttached'],this['_diffRoots']['set'](_0x265914,_0x3020d6),this['_diffRootsAttributes']['set'](_0x265914,_0x3d8b95);const _0x4a694e=this['_makeIdsRoot'](_0x3020d6,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x265914,_0x4a694e),_0x2fe92b['set'](_0x265914,_0x3020d6['isAttached']()?_0x3d8b95:{});for(const [_0x5dc7c5,_0x100282]of _0x3020d6['markers']){if(!_0x5dc7c5['startsWith']('revision:'))continue;const _0x1df4b0=_0x5dc7c5['split'](':')[0x2];for(const _0x5daa9e of _0x100282['getWalker']({'singleCharacters':!0x0})){const _0x1a348f=this['_getVidAttributeName'](_0x5daa9e),_0x246d45=this['_revisionId']++,_0x2bdfd3='elementEnd'==_0x5daa9e['type']?_0x5daa9e['previousPosition']['path']['slice'](0x0,-0x1):_0x5daa9e['previousPosition']['path'];_0x4a694e['getNodeByPath'](_0x2bdfd3)['_setAttribute'](_0x1a348f,_0x246d45),this['_touched']['set'](_0x246d45,{'userId':_0x1df4b0});}_0x3020d6['markers']['delete'](_0x5dc7c5);}for(const _0x96d488 of this['editor']['model']['createRangeIn'](_0x3020d6)['getWalker']({'singleCharacters':!0x0})){const _0x2740c0=this['_getVidAttributeName'](_0x96d488),_0x4d57bc='elementEnd'==_0x96d488['type']?_0x96d488['previousPosition']['path']['slice'](0x0,-0x1):_0x96d488['previousPosition']['path'],_0x48f40b=_0x4a694e['getNodeByPath'](_0x4d57bc);_0x48f40b['getAttribute'](_0x2740c0)>0x0||_0x48f40b['_setAttribute'](_0x2740c0,_0x10b083[_0x114748++]);}for(const [_0x1803c3,_0x195d3e]of _0x3020d6['markers'])_0x1803c3['startsWith']('revision:')||this['_markers']['set'](_0x1803c3,_0x195d3e);}const {roots:_0x10c29c}=this['_savedMetaData']['get'](_0x3b85e3['fromVersion']),{roots:_0x310d96}=this['_savedMetaData']['get'](_0x3b85e3['toVersion']),_0x487552=gt(_0x10c29c['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x487552),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x487552,Number['NEGATIVE_INFINITY']));const _0x20edd1=gt(_0x310d96['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x20edd1),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x20edd1));const _0x187dbd=Array['from'](this['_diffRoots'])['map'](([_0x41475b,_0x3c0fba])=>[_0x41475b,gt(_0x3c0fba)]);this['_saveMetaData'](this['_lastTo'],_0x187dbd,this['_markers'],_0x2fe92b);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x111d2f,_0x2c4e4a,_0x5e963f,_0xad28a1){const _0x324e96=new Map(_0x2c4e4a),_0x266391=new Map(_0x16ea52(_0xad28a1)),_0x2824b3=new Map();for(const [_0x19567b,_0x4547e5]of _0x5e963f)_0x2824b3['set'](_0x19567b,{'start':_0x4547e5['start']['clone'](),'end':_0x4547e5['end']['clone'](),'rootName':_0x4547e5['root']['rootName']});this['_savedMetaData']['set'](_0x111d2f,{'roots':_0x324e96,'markers':_0x2824b3,'rootsAttributes':_0x266391});}['_removeMetaData'](_0x32c701){this['_savedMetaData']['delete'](_0x32c701);}['_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'](_0x547f82,_0x150f05=null){let _0x152b0c=null;_0x547f82['is']('documentFragment')||(_0x152b0c=new _0xaddbbf(_0x547f82['name'],{'vid_start':null===_0x150f05?this['_revisionId']++:_0x150f05++}));const _0x134250=[];for(const _0x1b02f3 of _0x547f82['getChildren']())if(_0x1b02f3['is']('element')){_0x134250['push'](this['_makeIdsRoot'](_0x1b02f3,_0x150f05));const _0x502b0a=_0x134250[_0x134250['length']-0x1];null!==_0x150f05&&(_0x150f05=_0x502b0a['is']('element','$text')?_0x502b0a['getAttribute']('vid')+0x1:_0x502b0a['getAttribute']('vid_end')+0x1);}else{for(let _0x48fd8f=0x0;_0x48fd8f<_0x1b02f3['offsetSize'];_0x48fd8f++)_0x134250['push'](new _0xaddbbf('$text',{'vid':null===_0x150f05?this['_revisionId']++:_0x150f05++}));}if(_0x547f82['is']('documentFragment')){const _0x2771e4=wt(_0x547f82['rootName']);return _0x2771e4['_insertChild'](0x0,_0x134250),_0x2771e4;}return _0x152b0c['_setAttribute']('vid_end',null===_0x150f05?this['_revisionId']++:_0x150f05++),_0x152b0c['_insertChild'](0x0,_0x134250),_0x152b0c;}['_calculateMetaData'](_0x2745cb,_0xfdbc7d,_0x1f3372){this['_reset']();const {roots:_0x265d88,markers:_0x4bb034,rootsAttributes:_0x364701}=this['_savedMetaData']['get'](_0x2745cb);this['_baseRoots']=new Map(_0x265d88),this['_baseRootsAttributes']=new Map(_0x16ea52(_0x364701));for(const [_0x4531fa,_0x3e1d3c]of this['_baseRoots'])if('$graveyard'!==_0x4531fa&&(this['_diffRoots']['set'](_0x4531fa,gt(_0x3e1d3c)),this['_diffRootsAttributes']=new Map(_0x16ea52(_0x364701)),_0x1f3372)){const _0x486c42=this['_revisionId'];this['_idsRoots']['set'](_0x4531fa,this['_makeIdsRoot'](_0x3e1d3c)),this['_baseIdsRoots']['set'](_0x4531fa,this['_makeIdsRoot'](_0x3e1d3c,_0x486c42));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x1f3372&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1eaab9,_0x4cdd54]of _0x4bb034){const _0x343315=this['_baseRoots']['get'](_0x4cdd54['rootName']),_0x2b1e2f=this['_diffRoots']['get'](_0x4cdd54['rootName']),_0x347e10=new _0x124a01(this['_fixPosition'](_0x4cdd54['start'],_0x343315),this['_fixPosition'](_0x4cdd54['end'],_0x343315)),_0x28369c=this['_fixRange'](_0x347e10,_0x2b1e2f);_0x343315['markers']['set'](_0x1eaab9,_0x347e10),this['_markers']['set'](_0x1eaab9,_0x28369c);}this['_applyOperations'](_0x2745cb,_0xfdbc7d,_0x1f3372);}['_applyOperations'](_0x453cc4,_0x198cd0,_0x110702){for(const _0x35aa5c of this['source']['getOperations'](_0x453cc4,_0x198cd0))this['_handleOperation'](_0x35aa5c,_0x110702);for(const _0x1552dd of this['_diffRoots']['values']())_0x1552dd['markers']['clear']();for(const [_0x1afd02,_0x480fda]of this['_markers']){this['_diffRoots']['get'](_0x480fda['root']['rootName'])['markers']['set'](_0x1afd02,_0x480fda['clone']());}const _0x547112=new Map(),_0x998b87=new Map();for(const [_0x3165bc,_0x83bb41]of this['_diffRoots'])_0x547112['set'](_0x3165bc,gt(_0x83bb41)),_0x998b87['set'](_0x3165bc,this['_diffRootsAttributes']['get'](_0x3165bc));this['_saveMetaData'](_0x198cd0,_0x547112,this['_markers'],_0x998b87);}['_getPreviousFrom'](_0x7df73){const _0x4dd6a5=Array['from'](this['_savedMetaData']['keys']());_0x4dd6a5['sort']((_0x3b179a,_0x33a9a3)=>_0x3b179a-_0x33a9a3),_0x4dd6a5['reverse']();for(const _0x4ad820 of _0x4dd6a5)if(_0x4ad820<_0x7df73)return _0x4ad820;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xb52795,_0x3f1fe2){const _0x5d71b1=Array['from'](_0x3f1fe2['markers'])['map'](([_0x31be14,_0x224300])=>[_0x31be14,this['_fixRange'](_0x224300,_0xb52795)]);_0xb52795['markers']=new Map(_0x5d71b1);}['_transformMarkers'](_0x2153b8){for(const _0x2e7017 of this['_markers']['values']()){const _0x57582d=_0x2e7017['getTransformedByOperation'](_0x2153b8),_0x558d19=_0x124a01['_createFromRanges'](_0x57582d);_0x2e7017['start']=_0x558d19['start'],_0x2e7017['end']=_0x558d19['end'];}}['_handleOperation'](_0x2a6eba,_0x5e0f3a){if('addRoot'!=_0x2a6eba['type']&&'detachRoot'!=_0x2a6eba['type']){if('insert'==_0x2a6eba['type']){const _0x1f4599=_0x2a6eba['position']['root']['rootName'];this['_diffRoots']['has'](_0x1f4599)||(this['_diffRoots']['set'](_0x1f4599,wt(_0x1f4599,!0x0)),this['_diffRootsAttributes']['set'](_0x1f4599,{}),_0x5e0f3a&&this['_idsRoots']['set'](_0x1f4599,wt(_0x1f4599,!0x0)));}else{if('addRootAttribute'==_0x2a6eba['type']||'removeRootAttribute'==_0x2a6eba['type']||'changeRootAttribute'==_0x2a6eba['type'])return void this['_handleRootAttributeOperation'](_0x2a6eba);'marker'==_0x2a6eba['type']&&this['_handleMarkerOperation'](_0x2a6eba);}if('marker'!==_0x2a6eba['type']){const _0x5342da=this['_cloneOperation'](_0x2a6eba,this['_diffRoots']);_0x5342da['_execute'](),this['_transformMarkers'](_0x5342da);}if(_0x5e0f3a)switch(_0x2a6eba['type']){case'insert':this['_handleInsertOperation'](_0x2a6eba);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2a6eba);break;case'merge':this['_handleMergeOperation'](_0x2a6eba);break;case'split':this['_handleSplitOperation'](_0x2a6eba);}}else this['_handleRootOperation'](_0x2a6eba,_0x5e0f3a);}['_cloneOperation'](_0x75e98c,_0x9c4867){const _0x9fcafe=_0x75e98c['clone']();return _0x9fcafe['_authorId']=_0x75e98c['_authorId'],this['_fixOperation'](_0x9fcafe,_0x9c4867),_0x9fcafe;}['_getBaseVids'](_0x4b4644){return _0x4b4644['map'](_0x584d50=>{const _0x150729=this['_getVidAttributeName'](_0x584d50);return Number(_0x584d50['item']['getAttribute'](_0x150729));});}['_generateTape'](_0x142a0e,_0x584dc8){if(_0x142a0e['is']('element','$text'))_0x584dc8['push']({'item':_0x142a0e,'type':'text'});else{_0x142a0e['is']('element')&&_0x584dc8['push']({'item':_0x142a0e,'type':'elementStart'});for(const _0x4ef8c7 of _0x142a0e['getChildren']())this['_generateTape'](_0x4ef8c7,_0x584dc8);_0x142a0e['is']('element')&&_0x584dc8['push']({'item':_0x142a0e,'type':'elementEnd'});}return _0x584dc8;}['_getState'](){const _0x201123=new Map(this['_touched']),_0x2e1f36=new Map(_0x201123),_0x59f63b=new Map(),_0x5cd434={'insertions':{},'deletions':{}},_0x1564f6={'insertions':{},'deletions':{}},_0x5d224b=new Map(),_0x3db5bf=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3db5bf['delete']('$graveyard');for(const _0xbf793c of _0x3db5bf){const _0x358142=this['_diffRoots']['get'](_0xbf793c)||wt(_0xbf793c,!0x1),_0x36acfb=this['_baseRoots']['get'](_0xbf793c)||wt(_0xbf793c,!0x1);_0x358142['isAttached']()||_0x36acfb['isAttached']()?(_0x5cd434['insertions'][_0xbf793c]=gt(_0x358142),_0x5cd434['deletions'][_0xbf793c]=gt(_0x36acfb),this['_copyMarkers'](_0x5cd434['deletions'][_0xbf793c],_0x36acfb),this['_copyMarkers'](_0x5cd434['insertions'][_0xbf793c],_0x358142),_0x1564f6['insertions'][_0xbf793c]=this['_generateTape'](this['_idsRoots']['get'](_0xbf793c),[]),_0x1564f6['deletions'][_0xbf793c]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xbf793c)||wt(_0xbf793c,!0x1),[])):_0x3db5bf['delete'](_0xbf793c);}for(const _0x2ff104 of _0x3db5bf){const _0x56461a=_0x1564f6['insertions'][_0x2ff104];for(const _0x401ad0 of _0x56461a){const _0xfd0917=this['_getVidAttributeName'](_0x401ad0),_0x5c5980=_0x401ad0['item']['getAttribute'](_0xfd0917);_0x2e1f36['delete'](_0x5c5980),_0x5c5980>=this['_startingRevisionId']&&_0x59f63b['set'](_0x5c5980,_0x201123['get'](_0x5c5980));}}for(const _0x565ed0 of _0x3db5bf){const _0x29cbe0=_0x1564f6['insertions'][_0x565ed0],_0x134273=this['_getBaseVids'](_0x1564f6['deletions'][_0x565ed0]);let _0x336244=0x0;for(const _0x33910a of _0x29cbe0){const _0x571d60=this['_getVidAttributeName'](_0x33910a),_0x24b611=_0x33910a['item']['getAttribute'](_0x571d60);if(!_0x59f63b['has'](_0x24b611)&&!_0x5d224b['has'](_0x24b611)){if(_0x2e1f36['has'](_0x24b611))_0x336244++;else{if(_0x24b611!=_0x134273[_0x336244]){const _0x1a167e=_0x201123['get'](_0x24b611)||_0x201123['get'](_0x134273[_0x336244]);for(;_0x24b611!=_0x134273[_0x336244];)_0x2e1f36['has'](_0x134273[_0x336244])||(_0x5d224b['set'](_0x134273[_0x336244],_0x1a167e),_0x201123['set'](_0x134273[_0x336244],_0x1a167e)),_0x336244++;}_0x336244++;}}}}for(const _0x2a586e of _0x3db5bf){const _0x17a928=_0x1564f6['insertions'][_0x2a586e];for(const _0x3c9222 of _0x17a928){const _0x3f8b55=this['_getVidAttributeName'](_0x3c9222),_0x118537=_0x3c9222['item']['getAttribute'](_0x3f8b55);if(_0x5d224b['has'](_0x118537)){const _0x103f40=_0x5d224b['get'](_0x118537);_0x2e1f36['has'](_0x118537)||_0x2e1f36['set'](_0x118537,{..._0x103f40}),_0x59f63b['set'](_0x118537,{..._0x103f40});}}}for(const _0x2e8c54 of _0x2e1f36['keys']())_0x2e8c54>=this['_startingRevisionId']&&_0x2e1f36['delete'](_0x2e8c54);const _0x113dc1=new Map();for(const _0x29ae4a of _0x3db5bf){let _0x5b2d62=_0x1564f6['insertions'][_0x29ae4a];for(const _0x771418 of _0x5b2d62)if(_0x771418['item']['is']('element','tableCell')){const _0x407dc1=this['_getVidAttributeName'](_0x771418),_0x36483c=_0x771418['item']['getAttribute'](_0x407dc1);if(_0x59f63b['has'](_0x36483c)){const _0x1fd758=_0x771418['item']['parent']['parent']['getAttribute']('vid_start'),_0x2f80fe=_0x113dc1['get'](_0x1fd758)||new Set();_0x2f80fe['add'](_0x59f63b['get'](_0x36483c)['userId']),_0x113dc1['set'](_0x1fd758,_0x2f80fe);}}_0x5b2d62=_0x1564f6['deletions'][_0x29ae4a];for(const _0x4cf5e3 of _0x5b2d62)if(_0x4cf5e3['item']['is']('element','tableCell')){const _0x590220=this['_getVidAttributeName'](_0x4cf5e3),_0x357207=_0x4cf5e3['item']['getAttribute'](_0x590220);if(_0x2e1f36['has'](_0x357207)){const _0x3f4308=_0x4cf5e3['item']['parent']['parent']['getAttribute']('vid_start'),_0xe39131=_0x113dc1['get'](_0x3f4308)||new Set();_0xe39131['add'](_0x2e1f36['get'](_0x357207)['userId']),_0x113dc1['set'](_0x3f4308,_0xe39131);}}for(const _0x328abc of _0x113dc1['keys']())(_0x59f63b['has'](_0x328abc)||_0x2e1f36['has'](_0x328abc))&&_0x113dc1['delete'](_0x328abc);}for(const _0x101b27 of _0x3db5bf){const _0x4e5b73=_0x1564f6['insertions'][_0x101b27];let _0x39ab57=null,_0x331abc=null;for(const _0x48f873 of _0x4e5b73){const _0x319d9c=this['_getVidAttributeName'](_0x48f873),_0x2ee578=_0x48f873['item']['getAttribute'](_0x319d9c),_0x4f62c2=_0x113dc1['get'](_0x2ee578);_0x4f62c2&&'elementStart'==_0x48f873['type']&&(_0x39ab57=Array['from'](_0x4f62c2)[0x0],_0x331abc=_0x48f873['item']['getAttribute']('vid_end')),_0x39ab57&&(_0x2e1f36['set'](_0x2ee578,{'userId':_0x39ab57}),_0x59f63b['set'](_0x2ee578,{'userId':_0x39ab57})),_0x2ee578==_0x331abc&&(_0x39ab57=null,_0x331abc=null);}}const _0x5700e1={},_0x401335=new Set();for(const _0x4316fc of _0x3db5bf){const _0x3638b4=_0x5cd434['deletions'][_0x4316fc],_0x57f0c5=_0x5cd434['insertions'][_0x4316fc];for(const {userId:_0x4e3d7a}of this['_touchedMarkers']['values']())null!==_0x4e3d7a&&_0x401335['add'](_0x4e3d7a);for(const {userId:_0x375c70}of this['_touchedRoots']['values']())null!==_0x375c70&&_0x401335['add'](_0x375c70);this['_markChanges'](_0x57f0c5,_0x1564f6['insertions'][_0x4316fc],_0x59f63b,'insertion',_0x401335),this['_markChanges'](_0x3638b4,_0x1564f6['deletions'][_0x4316fc],_0x2e1f36,'deletion',_0x401335),_0x5700e1[_0x4316fc]={'insertions':this['_prepareViewToSave'](_0x57f0c5),'deletions':this['_prepareViewToSave'](_0x3638b4),'attachChange':this['_touchedRoots']['get'](_0x4316fc)||null,'attributesBefore':_0x16ea52(this['_baseRootsAttributes']['get'](_0x4316fc))||{},'attributesAfter':_0x16ea52(this['_diffRootsAttributes']['get'](_0x4316fc))};}return{'diffData':_0x5700e1,'authorsIds':Array['from'](_0x401335)};}['_processRootBeforeSave'](_0x181420){for(const [,_0x5c95dd]of _0x181420['markers']){const _0x5ef87f=_0x5c95dd['start']['getAncestors']()['filter'](_0x3cd88d=>'tableCell'==_0x3cd88d['name']);for(const _0x177145 of _0x5ef87f)0x1==_0x177145['childCount']&&_0x177145['getChild'](0x0)['is']('element','paragraph')&&_0x177145['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x498f54){this['_processRootBeforeSave'](_0x498f54);const _0x223738=this['editor']['data']['toView'](_0x498f54,{}),_0x354ce3=Array['from'](_0x223738['getChildren']())['map'](_0x2ed35d=>this['_getViewJson'](_0x2ed35d));return JSON['stringify'](_0x354ce3);}['_getViewJson'](_0x367a6e){if(_0x367a6e['is']('$text'))return _0x367a6e['data'];{const _0x29825e=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5bf9df=_0x367a6e,_0x436993=this['editor']['data']['htmlProcessor']['domConverter'],_0x2aab21={'type':_0x29825e['_getTypeCharForViewElement'](_0x5bf9df),'name':_0x5bf9df['name'],'attributes':Array['from'](_0x5bf9df['getAttributes']()),'children':Array['from'](_0x5bf9df['getChildren']())['map'](_0x2b5930=>this['_getViewJson'](_0x2b5930))};if(_0x367a6e['is']('uiElement')&&'$comment'!=_0x367a6e['name']){const _0x13e78b=_0x367a6e['render'](_0x436993['domDocument'],_0x436993);_0x2aab21['children']['push'](_0x13e78b['outerHTML']);}else{if(_0x367a6e['is']('rawElement')){const _0x7c9ce6=_0x436993['domDocument']['createElement'](_0x5bf9df['name']);_0x367a6e['render'](_0x7c9ce6,_0x436993),_0x2aab21['children']['push'](_0x7c9ce6['innerHTML']);}}const _0x52296c=Array['from'](_0x5bf9df['getCustomProperties']());_0x52296c['length']>0x0&&(_0x2aab21['customProperties']=_0x52296c);const _0x47f79f=_0x5bf9df['getFillerOffset']();return null!==_0x47f79f&&(_0x2aab21['fillerOffset']=_0x47f79f),_0x2aab21;}}['_markChanges'](_0x4d99d6,_0x53dc57,_0x211d72,_0x14ce65,_0x1d09fb){let _0x5eb899=null,_0x548a07=null,_0x727a2f=0x0;const _0x30d220=this['editor']['model'];for(let _0x4a35f5=0x0;_0x4a35f5<_0x53dc57['length'];_0x4a35f5++){const _0x5da2b0=this['_getVidAttributeName'](_0x53dc57[_0x4a35f5]),_0x3de1ce=_0x53dc57[_0x4a35f5]['item']['getAttribute'](_0x5da2b0),_0x3b2c49=_0x211d72['get'](_0x3de1ce),_0x531db3=_0x4a35f5==_0x53dc57['length']-0x1;(!_0x5eb899&&_0x3b2c49&&(_0x5eb899=_0x3b2c49,_0x548a07=_0x53dc57[_0x4a35f5]),_0x5eb899&&(!_0x3b2c49||_0x3b2c49['userId']!=_0x5eb899['userId']))&&(_0x15b228(_0x3b2c49,mt(_0x548a07,_0x4d99d6,_0x30d220),mt(_0x53dc57[_0x4a35f5],_0x4d99d6,_0x30d220)),_0x5eb899=_0x3b2c49||null,_0x548a07=_0x3b2c49?_0x53dc57[_0x4a35f5]:null),_0x5eb899&&_0x531db3&&_0x15b228(_0x3b2c49,mt(_0x548a07,_0x4d99d6,_0x30d220),pt(_0x53dc57[_0x4a35f5],_0x4d99d6,_0x30d220));}function _0x15b228(_0x201194,_0x1ef2e3,_0x437e1e){const _0x88a91c=_0x5eb899['userId'],_0x5eafb4='revision:'+_0x14ce65+':'+_0x88a91c+':'+_0x727a2f++,_0x381ab4=_0x30d220['createRange'](_0x1ef2e3,_0x437e1e);_0x4d99d6['markers']['set'](_0x5eafb4,_0x381ab4),null!==_0x88a91c&&_0x1d09fb['add'](_0x88a91c);}}['_getVidAttributeName'](_0x3458ae){switch(_0x3458ae['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x7a8d36,_0x48f7a4){_0x7a8d36['baseVersion']=null;for(const _0x25f82f in _0x7a8d36){const _0x203d0f=_0x7a8d36[_0x25f82f];if(_0x203d0f instanceof _0x42f956){const _0x403af3=_0x48f7a4['get'](_0x203d0f['root']['rootName']);_0x7a8d36[_0x25f82f]=this['_fixPosition'](_0x203d0f,_0x403af3);}if(_0x203d0f instanceof _0x124a01){const _0x17733e=_0x48f7a4['get'](_0x203d0f['root']['rootName']);_0x7a8d36[_0x25f82f]=this['_fixRange'](_0x203d0f,_0x17733e);}'root'===_0x25f82f&&(_0x7a8d36['root']=_0x48f7a4['get'](_0x7a8d36['root']['rootName']));}}['_fixRange'](_0x45364a,_0x33754a){return this['editor']['model']['createRange'](this['_fixPosition'](_0x45364a['start'],_0x33754a),this['_fixPosition'](_0x45364a['end'],_0x33754a));}['_fixPosition'](_0x6ab9d8,_0x2f1a20){return this['editor']['model']['createPositionFromPath'](_0x2f1a20,_0x6ab9d8['path'],_0x6ab9d8['stickiness']);}['_handleInsertOperation'](_0x112a16){const _0x2849a9=this['_idsRoots']['get'](_0x112a16['position']['root']['rootName']),_0x53daed=this['_fixPosition'](_0x112a16['position'],_0x2849a9),_0x5def91=null===_0x112a16['_authorId']?null:_0x112a16['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b9026=_0x53daed['parent'],_0x223c94=this['_revisionId'],_0x43ad63=[];for(const _0x58a427 of _0x112a16['nodes'])if(_0x58a427['is']('element'))_0x43ad63['push'](this['_makeIdsRoot'](_0x58a427));else{for(let _0xb5efe7=0x0;_0xb5efe7<_0x58a427['offsetSize'];_0xb5efe7++)_0x43ad63['push'](new _0xaddbbf('$text',{'vid':this['_revisionId']++}));}const _0x59997c=this['_revisionId'];for(let _0x428902=_0x223c94;_0x428902<_0x59997c;_0x428902++)this['_touched']['set'](_0x428902,{'userId':_0x5def91});_0x1b9026['_insertChild'](_0x53daed['offset'],_0x43ad63);}['_handleMoveOperation'](_0x37246a){(_0x37246a=this['_cloneOperation'](_0x37246a,this['_idsRoots']))['_execute']();const _0x2b442d=null===_0x37246a['_authorId']?null:_0x37246a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1458ed=_0x37246a['getMovedRangeStart'](),_0xfb95e8=_0x1458ed['parent'],_0x2b31c4=_0x1458ed['offset'];!function _0x1b0fff(_0x14f1d3,_0x23e314,_0x5387fb,_0x180f52){for(let _0x2c68ed=_0x5387fb;_0x2c68ed<_0x180f52;_0x2c68ed++){const _0x45544b=_0x23e314['getChild'](_0x2c68ed);_0x45544b['is']('element','$text')?_0x14f1d3['set'](_0x45544b['getAttribute']('vid'),{'userId':_0x2b442d}):(_0x14f1d3['set'](_0x45544b['getAttribute']('vid_start'),{'userId':_0x2b442d}),_0x1b0fff(_0x14f1d3,_0x45544b,0x0,_0x45544b['childCount']),_0x14f1d3['set'](_0x45544b['getAttribute']('vid_end'),{'userId':_0x2b442d}));}}(this['_touched'],_0xfb95e8,_0x2b31c4,_0x2b31c4+_0x37246a['howMany']);}['_handleMergeOperation'](_0xb23fc3){const _0x5481ee=null===(_0xb23fc3=this['_cloneOperation'](_0xb23fc3,this['_idsRoots']))['_authorId']?null:_0xb23fc3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xeb703e=_0xb23fc3['targetPosition']['parent'],_0x285c2a=_0xb23fc3['sourcePosition']['parent'],_0x44a2cf=_0xeb703e['getAttribute']('vid_end'),_0x45f111=_0x285c2a['getAttribute']('vid_start');_0xeb703e['_setAttribute']('vid_end',_0x285c2a['getAttribute']('vid_end')),_0x285c2a['_setAttribute']('vid_end',_0x44a2cf),this['_touched']['set'](_0x45f111,{'userId':_0x5481ee}),this['_touched']['set'](_0x44a2cf,{'userId':_0x5481ee}),_0xb23fc3['_execute']();}['_handleSplitOperation'](_0x326d41){const _0x2508cc=null===(_0x326d41=this['_cloneOperation'](_0x326d41,this['_idsRoots']))['_authorId']?null:_0x326d41['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x318037=_0x326d41['graveyardPosition'],_0x22cf69=_0x326d41['splitPosition']['parent'];_0x326d41['_execute']();const _0x3cc125=_0x22cf69['getAttribute']('vid_end'),_0x5247cf=_0x326d41['insertionPosition']['nodeAfter'];if(_0x318037){const _0x4a9ea2=_0x5247cf['getAttribute']('vid_end'),_0x2c0b72=_0x22cf69['getAttribute']('vid_end');_0x22cf69['_setAttribute']('vid_end',_0x4a9ea2),_0x5247cf['_setAttribute']('vid_end',_0x2c0b72),this['_touched']['set'](_0x22cf69['getAttribute']('vid_end'),{'userId':_0x2508cc}),this['_touched']['set'](_0x5247cf['getAttribute']('vid_start'),{'userId':_0x2508cc});}else{const _0x9fe184=this['_revisionId']++,_0x7e75d6=this['_revisionId']++;_0x22cf69['_setAttribute']('vid_end',_0x9fe184),_0x5247cf['_setAttribute']('vid_start',_0x7e75d6),_0x5247cf['_setAttribute']('vid_end',_0x3cc125),this['_touched']['set'](_0x9fe184,{'userId':_0x2508cc}),this['_touched']['set'](_0x7e75d6,{'userId':_0x2508cc});}}['_handleMarkerOperation'](_0x37efd9){if(!_0x37efd9['affectsData'])return;const _0x47f8db=(_0x37efd9=this['_cloneOperation'](_0x37efd9,this['_diffRoots']))['oldRange']?_0x37efd9['oldRange']['root']:null,_0x1c73af=_0x37efd9['newRange']?_0x37efd9['newRange']['root']:null;_0x47f8db&&this['_markers']['delete'](_0x37efd9['name']),_0x1c73af&&this['_markers']['set'](_0x37efd9['name'],_0x37efd9['newRange']['clone']());const _0x3f087c=null===_0x37efd9['_authorId']?null:_0x37efd9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b9527=_0x37efd9['name'];if(!this['_touchedMarkers']['has'](_0x1b9527))return void this['_touchedMarkers']['set'](_0x1b9527,{'range':_0x37efd9['oldRange'],'userId':_0x3f087c});const _0x810ea8=this['_touchedMarkers']['get'](_0x1b9527),_0x56573a=_0x810ea8['range'],_0x273954=_0x37efd9['newRange'];null==_0x56573a&&null==_0x273954||_0x56573a&&_0x273954&&_0x56573a['isEqual'](_0x273954)?this['_touchedMarkers']['delete'](_0x37efd9['name']):_0x810ea8['userId']=_0x3f087c;}['_handleRootOperation'](_0x50602a,_0x38548c){this['_diffRoots']['has'](_0x50602a['rootName'])?this['_diffRoots']['get'](_0x50602a['rootName'])['_isAttached']=_0x50602a['isAdd']:(this['_diffRoots']['set'](_0x50602a['rootName'],wt(_0x50602a['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x50602a['rootName'],{}),_0x38548c&&this['_idsRoots']['set'](_0x50602a['rootName'],wt(_0x50602a['rootName'],!0x0)));const _0x5a7473=null===_0x50602a['_authorId']?null:_0x50602a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1afbb3=this['_touchedRoots']['get'](_0x50602a['rootName']);_0x1afbb3&&_0x1afbb3['userId']===_0x5a7473?this['_touchedRoots']['delete'](_0x50602a['rootName']):this['_touchedRoots']['set'](_0x50602a['rootName'],{'userId':_0x5a7473,'isAttached':_0x50602a['isAdd']});}['_handleRootAttributeOperation'](_0x35013d){const _0x467c65=this['_diffRootsAttributes']['get'](_0x35013d['root']['rootName']);null===_0x35013d['newValue']?delete _0x467c65[_0x35013d['key']]:_0x467c65[_0x35013d['key']]=_0x35013d['newValue'];}}function gt(_0xe65c98){const _0x4f9c36=wt(_0xe65c98['rootName'],_0xe65c98['isAttached']());for(const _0x1e04e8 of _0xe65c98['getChildren']()){const _0x20cc11=_0x1e04e8['_clone'](!0x0);_0x4f9c36['_appendChild'](_0x20cc11);}return _0x4f9c36;}function wt(_0x274d71,_0x5b909e=!0x0){const _0x366667=new _0x33f300();return _0x366667['rootName']=_0x274d71,_0x366667['_isAttached']=_0x5b909e,_0x366667['isAttached']=()=>_0x366667['_isAttached'],_0x366667;}function mt(_0x1dd22b,_0x128893,_0x438978){const _0x152a76='elementEnd'==_0x1dd22b['type']?_0x438978['createPositionAt'](_0x1dd22b['item'],'end'):_0x438978['createPositionBefore'](_0x1dd22b['item']);return _0x438978['createPositionFromPath'](_0x128893,_0x152a76['path'],_0x152a76['stickiness']);}function pt(_0xaf0224,_0xf6a113,_0xe8e26e){const _0x1158f6='elementStart'==_0xaf0224['type']?_0xe8e26e['createPositionAt'](_0xaf0224['item'],0x0):_0xe8e26e['createPositionAfter'](_0xaf0224['item']);return _0xe8e26e['createPositionFromPath'](_0xf6a113,_0x1158f6['path'],_0x1158f6['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x73555(_0x155b5e){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0xd7bb55,_0x1b3947){super(_0xd7bb55),this['focusTracker']=new _0x2c6dd1(),this['keystrokes']=new _0x20e870(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1b3947),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'](),_0x2ad37b({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x124957=_0x4cb906=>_0x4cb906['stopPropagation']();this['keystrokes']['set']('arrowright',_0x124957),this['keystrokes']['set']('arrowleft',_0x124957),this['keystrokes']['set']('arrowup',_0x124957),this['keystrokes']['set']('arrowdown',_0x124957);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x29f0ec){this['revisionNameInputView']['fieldView']['element']['value']=_0x29f0ec['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xe3d37e){const _0x5c60b8=new _0x4aa119(this['locale'],_0x50c24b),_0x517f17=_0x5c60b8['fieldView'];_0x517f17['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x57ea5e=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0xe3d37e&&(_0x57ea5e+='\x20('+ft(this['locale'],'optional')+')'),(_0x5c60b8['label']=_0x57ea5e,_0x517f17['on']('input',()=>{this['revisionNameInputValue']=_0x517f17['element']['value']['trim']();}),_0x5c60b8);}}class RevisionHistoryUI extends _0x226832{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x5b1ea3=this['editor'],_0x225d6c=_0x5b1ea3['plugins']['get']('RevisionTracker');_0x5b1ea3['ui']['componentFactory']['add']('revisionHistory',_0x52abec=>{const _0x1038f5=_0x5b8929(_0x52abec),_0x353271=_0x1038f5['panelView']['children'],_0x23a202=new _0x1a859b(_0x52abec),_0x4ca1c9=new _0x15e6ab(_0x52abec),_0x2c719c=this['_createSaveRevisionButton'](_0x2ac8c4),_0xd097df=new _0x15e6ab(_0x52abec),_0x57e2af=this['_createOpenRevisionButton'](_0x2ac8c4);return _0x1038f5['bind']('isEnabled')['to'](_0x225d6c,'isReady',_0x225d6c,'isEnabled',_0x5b1ea3,'isReadOnly',(_0x26df81,_0x1963d0,_0x5024c4)=>_0x26df81&&_0x1963d0&&!_0x5024c4),_0x1038f5['buttonView']['set']({'icon':_0x4c4c60,'label':ft(_0x52abec,'Revision\x20history'),'tooltip':!0x0}),_0x2c719c['set']({'withText':!0x0,'role':'menuitem'}),_0x57e2af['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x57e2af,'execute',()=>{_0x1038f5['isOpen']=!0x1,_0x5b1ea3['editing']['view']['focus']();},{'priority':'low'}),_0x4ca1c9['children']['add'](_0x2c719c),_0xd097df['children']['add'](_0x57e2af),_0x23a202['role']='menu',_0x23a202['items']['addMany']([_0x4ca1c9,_0xd097df]),_0x353271['add'](_0x23a202),_0x1038f5;}),_0x5b1ea3['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x474b9d=this['editor'],_0x17b43b=_0x474b9d['locale'],_0x503e63=_0x474b9d['plugins']['get']('RevisionTracker'),_0x118cb6=new _0x5815bc(_0x17b43b),_0x2b7b7e=new _0x32fcf3(_0x17b43b);_0x118cb6['bind']('isEnabled')['to'](_0x503e63,'isReady',_0x503e63,'isEnabled',_0x474b9d,'isReadOnly',(_0xe55610,_0xaa4eaf,_0x2e6ece)=>_0xe55610&&_0xaa4eaf&&!_0x2e6ece),_0x118cb6['buttonView']['set']({'icon':_0x4c4c60,'label':ft(_0x17b43b,'Revision\x20history')});const _0x31dcba=new tt(_0x17b43b,_0x118cb6),_0x327cd5=this['_createSaveRevisionButton'](it);_0x327cd5['delegate']('execute')['to'](_0x118cb6),_0x31dcba['children']['add'](_0x327cd5),_0x2b7b7e['items']['add'](_0x31dcba);const _0x758b53=new tt(_0x17b43b,_0x118cb6),_0x23f9e9=this['_createOpenRevisionButton'](it);return _0x23f9e9['delegate']('execute')['to'](_0x118cb6),_0x758b53['children']['add'](_0x23f9e9),_0x2b7b7e['items']['add'](_0x758b53),_0x118cb6['panelView']['children']['add'](_0x2b7b7e),_0x118cb6;}['_createSaveRevisionButton'](_0x5b140c){const _0xaab615=this['editor'],_0x202bb6=_0xaab615['plugins']['get']('RevisionTracker'),_0x2ca7f6=new _0x5b140c(_0xaab615['locale']);return _0x2ca7f6['set']({'label':ft(_0xaab615['locale'],'Save\x20current\x20revision')}),_0x2ca7f6['bind']('isEnabled')['to'](_0x202bb6,'isReady',_0x202bb6,'isEnabled',_0xaab615,'isReadOnly',(_0x28035f,_0x3e5988,_0x20418f)=>_0x28035f&&_0x3e5988&&!_0x20418f),this['listenTo'](_0x2ca7f6,'execute',()=>{this['_showDialog']();}),_0x2ca7f6;}['_createOpenRevisionButton'](_0x38cb5a){const _0x4551e8=this['editor'],_0xece4f0=_0x4551e8['plugins']['get']('RevisionTracker'),_0x1c975d=new _0x38cb5a(_0x4551e8['locale']);return _0x1c975d['set']({'label':ft(_0x4551e8['locale'],'Open\x20revision\x20history')}),_0x1c975d['bind']('isEnabled')['to'](_0xece4f0,'isReady',_0x4551e8,'isReadOnly',(_0x5d133f,_0x4b369c)=>_0x5d133f&&!_0x4b369c),this['listenTo'](_0x1c975d,'execute',()=>{_0x4551e8['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1c975d;}['_showDialog'](){const _0x59fef8=this['editor'],_0x5a4600=_0x59fef8['locale'],_0x332fee=_0x59fef8['plugins']['get']('Dialog'),_0x1f5048=_0x59fef8['plugins']['get']('RevisionTracker');function _0x5e0569(_0x20ee1b){_0x59fef8['config']['get']('revisionHistory.requireRevisionName')&&''===_0x20ee1b['revisionName']?_0x20ee1b['revisionNameInputView']['errorText']=ft(_0x5a4600,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x59fef8['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x20ee1b['revisionName']}),_0x332fee['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5e0569(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x332fee['show']({'id':'revisionSave','title':ft(_0x5a4600,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x59fef8['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x332fee['hide']()},{'label':ft(_0x59fef8['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x46d1ec){_0x46d1ec['bind']('isEnabled')['to'](_0x1f5048,'isReady',_0x1f5048,'isEnabled',_0x59fef8,'isReadOnly',(_0x122228,_0x4ecbf1,_0x29062c)=>_0x122228&&_0x4ecbf1&&!_0x29062c);},'onExecute':()=>_0x5e0569(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x342eae=this['editor'],_0x2b2061=_0x342eae['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x2b2061,_0x342eae['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x155b5e{['changeId'];['_model'];constructor(_0x659ab,_0x403478){super(_0x659ab),this['_model']=_0x403478,this['changeId']=_0x403478['id'];const _0x43433c=this['bindTemplate'],_0x44ba25=ft(_0x659ab,_0x403478['data']['isSuggestion']?'Suggested\x20by':'add'==_0x403478['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x403478['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x43433c['to']('type',_0x19b609=>'ck-revision-change__'+_0x19b609)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x44ba25}]},{'text':'\x20'+_0x403478['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x5304ce(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x43cb7f){super(),this['id']=_0x43cb7f['id']||_0x5758ef(),this['author']=_0x43cb7f['author'],this['type']=_0x43cb7f['type'],this['data']=_0x43cb7f['data']||{},this['rootName']=_0x43cb7f['rootName'],this['set']('createdAt',_0x43cb7f['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(_0x17ec28,_0xf036c){this['newRevisionId']=_0x17ec28,this['oldRevisionId']=_0xf036c,this['changes']=new _0xdad0f8();}['_setChanges'](_0x25f752){for(const _0x53e701 of _0x25f752)this['changes']['add'](_0x53e701);}}class RevisionViewer extends _0x226832{['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[_0x51f1bf,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x21f949){super(_0x21f949),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',(_0x36950d,_0x583499,_0x22fe52)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5c30ef=>{for(const _0x7cd99d of this['editor']['editing']['view']['document']['roots'])_0x22fe52?_0x5c30ef['removeClass']('ck-editor__editable__overlay',_0x7cd99d):_0x5c30ef['addClass']('ck-editor__editable__overlay',_0x7cd99d);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x203d0c=>null!==_0x203d0c),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x37afa2,_0x565c62,_0x300413)=>_0x37afa2&&_0x300413?_0x565c62['changes']['getIndex'](_0x300413):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x127f28,_0x33cfc4)=>_0x127f28?_0x33cfc4['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x24a448=this['editor'],_0x283e1d=new ShowChangeCommand(_0x24a448,{'direction':'backward'}),_0x234649=new ShowChangeCommand(_0x24a448,{'direction':'forward'});(_0x24a448['commands']['add']('showPreviousChange',_0x283e1d),_0x24a448['commands']['add']('showNextChange',_0x234649),_0x24a448['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x24a448)),this['on']('change:numberOfChanges',()=>{_0x283e1d['refresh'](),_0x234649['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x24a448['enableReadOnlyMode']('revision-viewer'),_0x24a448['plugins']['has']('WidgetToolbarRepository'))&&_0x24a448['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x3d0354){return await this['_utils']['loadRevisionData'](_0x3d0354,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3d0354);}async['getRevisionRootsAttributes'](_0x44dcec){return await this['_utils']['loadRevisionData'](_0x44dcec,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x44dcec);}async['compare'](_0x138b47,_0x5ac0d2,_0x31fbef=!0x1){if(!this['isEnabled'])return;const _0x5cc369=this['diff'],_0x43e668=this['repository'],_0x14c6cb='string'==typeof _0x138b47?_0x43e668['getRevision'](_0x138b47):_0x138b47,_0x44b88a='string'==typeof _0x5ac0d2?_0x43e668['getRevision'](_0x5ac0d2):_0x5ac0d2,_0x2aea65=_0x14c6cb['id'],_0x3ef436=_0x44b88a?_0x44b88a['id']:null;if(!_0x31fbef&&this['diff']&&this['diff']['newRevisionId']===_0x2aea65&&this['diff']['oldRevisionId']===_0x3ef436)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x2aea65,_0x3ef436);const _0x559152=this['_getRevisionsRange'](_0x14c6cb,_0x44b88a,!0x0)['map'](_0x119c28=>this['_utils']['loadRevisionData'](_0x119c28,this['adapter']));return _0x559152['push'](new Promise(_0x31348a=>{setTimeout(_0x31348a,0x14);})),Promise['all'](_0x559152)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x332211=this['_getDiff'](_0x2aea65,_0x3ef436);for(const _0xeb60cb of _0x332211['changes'])this['_changeIdToChange']['set'](_0xeb60cb['id'],_0xeb60cb);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xe03f68=>{for(const _0x5f016e of this['editor']['model']['document']['getRootNames']())_0xe03f68['detachRoot'](_0x5f016e);for(const _0x10e857 of Object['keys'](_0x332211['model'])){const _0x4bbc4e=_0xe03f68['addRoot'](_0x10e857);for(const _0x4f1169 of Object['keys'](_0x332211['attributes'][_0x10e857]))_0xe03f68['setAttribute'](_0x4f1169,_0x332211['attributes'][_0x10e857][_0x4f1169],_0x4bbc4e);_0xe03f68['insert'](_0x332211['model'][_0x10e857],_0x4bbc4e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x332211['changes'])),this['isReady']=!0x0;})['catch'](_0x3bb25a=>{console['error'](_0x3bb25a),this['_cleanUp'](),_0x5cc369&&(this['diff']=_0x5cc369),this['isReady']=!0x0;});}['addRevisionData'](_0x5aa1eb,_0x5c5e17){const _0x46cd72=this['repository']['createRevision'](_0x5aa1eb);return _0x46cd72['on']('_update',(_0x1b8744,_0x1e0708,_0x51a130)=>_0x5c5e17(_0x1e0708,_0x51a130,_0x46cd72)),this['repository']['addRevision'](_0x46cd72),_0x46cd72;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x14a57f=>{for(const _0x34fc16 of this['editor']['model']['document']['getRootNames']())_0x14a57f['detachRoot'](_0x34fc16);});}['_sortAndFilterDiffChanges'](_0x599b1e){const _0x4803ee=[],_0x36fbf1=new Map();for(const _0x52e2cc of this['editor']['model']['document']['getRootNames']()){const _0x4f96eb=this['editor']['editing']['view']['getDomRoot'](_0x52e2cc);if(!_0x4f96eb)continue;const _0x1c53c9=_0x4f96eb['getClientRects']()['item'](0x0);_0x1c53c9&&(_0x4803ee['push'](_0x52e2cc),_0x36fbf1['set'](_0x52e2cc,_0x1c53c9));}return _0x4803ee['sort']((_0x5f27ee,_0x44d157)=>{const _0xa2f871=_0x36fbf1['get'](_0x5f27ee),_0xb3fd30=_0x36fbf1['get'](_0x44d157);return _0xa2f871['y']-_0xb3fd30['y']||_0xa2f871['x']-_0xb3fd30['x'];}),(_0x599b1e=_0x599b1e['filter'](_0x22d792=>_0x4803ee['includes'](_0x22d792['rootName'])))['sort']((_0x5123f0,_0x2d48e6)=>_0x4803ee['indexOf'](_0x5123f0['rootName'])-_0x4803ee['indexOf'](_0x2d48e6['rootName'])),_0x599b1e;}['_makeTape'](_0x344054){const _0x245a27=Array['from'](_0x344054['markers'])['filter'](([_0x1890ae,_0xe7ad8f])=>_0x1890ae['startsWith']('revision:')&&!_0xe7ad8f['isCollapsed']),_0x78b784=Array['from'](this['editor']['model']['createRangeIn'](_0x344054)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x245a27['length'])for(const _0x5a3126 of _0x78b784){const [_0x4d6901,_0x477cd8]=_0x245a27[0x0],[,_0x4e6657,_0x48db11]=_0x4d6901['split'](':');if(_0x477cd8['end']['isEqual'](_0x5a3126['nextPosition'])&&_0x245a27['shift'](),(_0x5a3126['previousPosition']['isEqual'](_0x477cd8['start'])||_0x5a3126['previousPosition']['isAfter'](_0x477cd8['start']))&&('insertion'==_0x4e6657?_0x5a3126['isAdded']={'userId':_0x48db11}:'deletion'==_0x4e6657&&(_0x5a3126['isRemoved']={'userId':_0x48db11})),0x0==_0x245a27['length'])break;}return _0x78b784;}['_refreshStartEndIndex'](_0x3e9aa2){const _0x485de0=new Map();for(let _0x15a6fd=0x0;_0x15a6fd<_0x3e9aa2['length'];_0x15a6fd++)'text'===_0x3e9aa2[_0x15a6fd]['type']?(_0x3e9aa2[_0x15a6fd]['item']['startIndex']=_0x15a6fd,_0x3e9aa2[_0x15a6fd]['item']['endIndex']=_0x15a6fd):('elementStart'===_0x3e9aa2[_0x15a6fd]['type']?_0x3e9aa2[_0x15a6fd]['item']['startIndex']=_0x15a6fd:'elementEnd'===_0x3e9aa2[_0x15a6fd]['type']&&(_0x3e9aa2[_0x15a6fd]['item']['endIndex']=_0x15a6fd),_0x485de0['set'](_0x3e9aa2[_0x15a6fd]['id'],_0x15a6fd));for(const _0xd3acf6 of _0x485de0['values']())'elementStart'===_0x3e9aa2[_0xd3acf6]['type']?_0x3e9aa2[_0xd3acf6]['item']['endIndex']=_0x485de0['get'](_0x3e9aa2[_0xd3acf6]['pairId']):'elementEnd'===_0x3e9aa2[_0xd3acf6]['type']&&(_0x3e9aa2[_0xd3acf6]['item']['startIndex']=_0x485de0['get'](_0x3e9aa2[_0xd3acf6]['pairId']));}['_processTape'](_0x3d260f){for(let _0x5646de=0x0;_0x5646de<_0x3d260f['length'];_0x5646de++){if('elementStart'===_0x3d260f[_0x5646de]['type'])_0x3d260f[_0x5646de]['item']['startIndex']=_0x5646de;else{if('elementEnd'===_0x3d260f[_0x5646de]['type']){_0x3d260f[_0x5646de]['item']['endIndex']=_0x5646de;const _0x483ae2=_0x3d260f[_0x5646de]['item']['startIndex'];_0x3d260f[_0x483ae2]['pairId']=_0x3d260f[_0x5646de]['id'],_0x3d260f[_0x5646de]['pairId']=_0x3d260f[_0x483ae2]['id'];}else _0x3d260f[_0x5646de]['item']['startIndex']=_0x5646de,_0x3d260f[_0x5646de]['item']['endIndex']=_0x5646de,_0x3d260f[_0x5646de]['pairId']=null;}_0x3d260f[_0x5646de]['markersStart']||(_0x3d260f[_0x5646de]['markersStart']=[],_0x3d260f[_0x5646de]['markersEnd']=[]);}}['_markInsertions'](_0x451f49,_0x2ea56f){const _0x1b16a4=_0x451f49['filter'](_0x246e6e=>!_0x246e6e['isAdded']);for(let _0x40da6b=0x0;_0x40da6b<_0x2ea56f['length'];_0x40da6b++)_0x2ea56f[_0x40da6b]['isAdded']&&(_0x1b16a4[_0x40da6b]['isAdded']=_0x2ea56f[_0x40da6b]['isAdded']);}['_getDiff'](_0x9bd373,_0x25cf6c=null){const _0x46c2fe=this['repository']['getRevision'](_0x9bd373),_0x3bfbc8=_0x25cf6c?this['repository']['getRevision'](_0x25cf6c):null,_0x16a862=this['_getRevisionsRange'](_0x46c2fe,_0x3bfbc8),_0x712c96=_0x16a862[_0x16a862['length']-0x1],_0x2fcccd=new Map(),_0x2ef29f={'model':{},'attributes':{},'changes':[]},_0x2df2c4=new Set(),_0x564d4b=new Map();for(let _0x54c297=_0x16a862['length']-0x1;_0x54c297>=0x0;_0x54c297--){const _0x32b886=_0x16a862[_0x54c297];for(const _0xb0fdbb of Object['keys'](_0x32b886['diffData']))if(_0x32b886['diffData'][_0xb0fdbb]['attachChange']){const _0x321a55=_0x32b886['diffData'][_0xb0fdbb]['attachChange'];_0x321a55['isAttached']?(_0x2df2c4['add'](_0xb0fdbb),_0x564d4b['has'](_0xb0fdbb)&&_0x564d4b['get'](_0xb0fdbb)['userId']==_0x321a55['userId']?_0x564d4b['delete'](_0xb0fdbb):_0x564d4b['set'](_0xb0fdbb,_0x321a55)):_0x564d4b['has'](_0xb0fdbb)?(_0x2df2c4['delete'](_0xb0fdbb),_0x564d4b['delete'](_0xb0fdbb)):(_0x2df2c4['add'](_0xb0fdbb),_0x564d4b['set'](_0xb0fdbb,_0x321a55));}else _0x2df2c4['add'](_0xb0fdbb);}for(const _0x54894b of _0x2df2c4){const _0x5ef42d=_0x564d4b['has'](_0x54894b)&&!_0x564d4b['get'](_0x54894b)['isAttached'];let _0x11055e=_0x5ef42d?_0x16a862['length']-0x1:0x0;const _0x2db910=_0x5ef42d?-0x1:0x1;for(;_0x16a862[_0x11055e];){const _0x54b7fe=_0x16a862[_0x11055e];if(_0x54b7fe['diffData'][_0x54894b]){const _0x393485=_0x5ef42d?_0x54b7fe['diffData'][_0x54894b]['attributesBefore']:_0x54b7fe['diffData'][_0x54894b]['attributesAfter'];_0x2ef29f['attributes'][_0x54894b]=_0x393485?_0x16ea52(_0x393485):{};break;}_0x11055e+=_0x2db910;}}for(const _0x3e512f of _0x16a862){_0x3e512f['model']={};for(const _0x3a18bf of _0x3e512f['authors'])_0x2fcccd['set'](_0x3a18bf['id'],_0x3a18bf);for(const _0x56c138 of _0x2df2c4){const _0x196519=_0x3e512f['diffData'][_0x56c138]?_0x3e512f['diffData'][_0x56c138]['insertions']:'[]',_0x2f0b40=_0x3e512f['diffData'][_0x56c138]?_0x3e512f['diffData'][_0x56c138]['deletions']:'[]';_0x3e512f['model'][_0x56c138]={'insertions':this['_utils']['_makeModelFromViewString'](_0x196519),'deletions':this['_utils']['_makeModelFromViewString'](_0x2f0b40)};}}for(const _0x243fce of _0x2df2c4){let _0x87ef48=null,_0x3e263d=0x0;const _0xaedba4=new Map(Array['from'](_0x46c2fe['model'][_0x243fce]['insertions']['markers'])['filter'](([_0x57d4fd])=>!_0x57d4fd['startsWith']('revision:')));let _0x48d4ca=0x0;for(const _0x10c44b of _0x16a862){const _0x1120df=this['_makeTape'](_0x10c44b['model'][_0x243fce]['insertions']);_0x10c44b==_0x46c2fe?(_0x87ef48=_0x1120df,_0x3e263d=_0x87ef48['length'],_0x87ef48['forEach'](_0x15fcf2=>{_0x15fcf2['id']=_0x48d4ca++;}),this['_processTape'](_0x87ef48)):this['_markInsertions'](_0x87ef48,_0x1120df);const _0x2e2133=_0x87ef48['filter'](_0x57473d=>!_0x57473d['isAdded'])['map'](_0x108685=>_0x108685['id']);let _0x10f188=0x0;const _0x1d755d=this['_makeTape'](_0x10c44b['model'][_0x243fce]['deletions']);_0x1d755d['forEach'](_0x31bde3=>{_0x31bde3['isRemoved']?_0x31bde3['id']=_0x3e263d++:_0x31bde3['id']=_0x2e2133[_0x10f188++];}),this['_processTape'](_0x1d755d),this['_setDistance'](_0x87ef48,'isAdded'),this['_setDistance'](_0x1d755d,'isRemoved'),_0x10c44b==_0x46c2fe&&this['_markMarkers'](_0x87ef48,_0xaedba4),_0x87ef48=this['_joinTapes'](_0x87ef48,_0x1d755d),this['_refreshStartEndIndex'](_0x87ef48),this['_setDistance'](_0x87ef48,'isRemoved');}_0x87ef48=_0x87ef48['filter'](_0x2e00d2=>!(_0x2e00d2['isAdded']&&_0x2e00d2['isRemoved']));const _0xfcf08a=new Map(_0x712c96['model'][_0x243fce]['deletions']['markers']),_0x587f8c=new Set(_0xaedba4['keys']());for(const _0x1fcdd5 of _0xfcf08a['keys']())_0x587f8c['delete'](_0x1fcdd5);this['_markSuggestions'](_0x87ef48,_0x587f8c),this['_fixObsoleteTags'](_0x87ef48),_0x87ef48=this['_removeMissingPairs'](_0x87ef48),_0x87ef48=this['_markMismatchedRemovedTags'](_0x87ef48),_0x87ef48=this['_removeUnsupportedChanges'](_0x87ef48);const {root:_0x502995,changes:_0xfa9063}=this['_makeModelFromTape'](_0x87ef48,_0x2fcccd,_0x243fce);_0x2ef29f['model'][_0x243fce]=_0x502995;const _0xff7d2a=_0x564d4b['get'](_0x243fce);if(_0xff7d2a){const _0x29c28f=_0x2fcccd['get'](_0xff7d2a['userId']),_0x2b14ac=new ChangeItem({'author':_0x29c28f,'type':_0xff7d2a['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x243fce});_0xfa9063['unshift'](_0x2b14ac),_0x2ef29f['attributes'][_0x243fce]['revisionHistoryAttachChange']=_0x2b14ac['id'];}_0x2ef29f['changes']=_0x2ef29f['changes']['concat'](_0xfa9063);}return _0x2ef29f;}['_markMarkers'](_0x3d60e5,_0x4298e1){for(let _0x10bd80=0x0;_0x10bd80<_0x3d60e5['length'];_0x10bd80++)for(const [_0x4cd576,_0x1e5de7]of _0x4298e1)!_0x1e5de7['isCollapsed']&&_0x1e5de7['start']['isEqual'](_0x3d60e5[_0x10bd80]['previousPosition'])&&_0x3d60e5[_0x10bd80]['markersStart']['push'](_0x4cd576),_0x1e5de7['end']['isEqual'](_0x3d60e5[_0x10bd80]['nextPosition'])&&_0x3d60e5[_0x10bd80]['markersEnd']['push'](_0x4cd576);}['_joinTapes'](_0x21c184,_0x4fdd88){let _0x1adf30=[],_0x221802=0x0,_0x1a419e=0x0;for(;_0x221802<_0x21c184['length']||_0x1a419e<_0x4fdd88['length'];){const _0x39428c=_0x21c184[_0x221802]||{},_0x5695ee=_0x4fdd88[_0x1a419e]||{};if(_0x39428c['id']==_0x5695ee['id'])_0x221802++,_0x1a419e++,_0x1adf30['push'](_0x39428c);else{if(_0x5695ee['isRemoved']&&_0x39428c['isAdded']){const {commonTape:_0x23a26d,iEnd:_0x35385d,jEnd:_0x538666}=this['_threeWayMerge'](_0x21c184,_0x221802,_0x4fdd88,_0x1a419e);_0x1adf30=_0x1adf30['concat'](_0x23a26d),_0x221802=_0x35385d,_0x1a419e=_0x538666;}else _0x5695ee['isRemoved']?(_0x1a419e++,_0x1adf30['push'](_0x5695ee)):(_0x221802++,_0x1adf30['push'](_0x39428c));}}return _0x1adf30;}['_markSuggestions'](_0x42313f,_0x387c76){const _0x1fff55=[];for(let _0x5599aa=0x0;_0x5599aa<_0x42313f['length'];_0x5599aa++){for(let _0x3b99de=0x0;_0x3b99de<_0x42313f[_0x5599aa]['markersStart']['length'];_0x3b99de++){const _0x2b84e2=_0x42313f[_0x5599aa]['markersStart'][_0x3b99de];if(!_0x387c76['has'](_0x2b84e2))continue;const {group:_0x3d99f3,type:_0x59cac4,authorId:_0x57ff26}=_0x3f2f9e(_0x2b84e2);'revision-suggestion'!=_0x3d99f3||'insertion'!=_0x59cac4&&'deletion'!=_0x59cac4||(_0x1fff55['unshift']({'type':_0x59cac4,'name':_0x2b84e2,'userId':_0x57ff26}),_0x42313f[_0x5599aa]['markersStart']['splice'](_0x3b99de,0x1),_0x3b99de--);}_0x417e66(_0x42313f[_0x5599aa]);for(let _0x18927c=0x0;_0x18927c<_0x42313f[_0x5599aa]['markersEnd']['length'];_0x18927c++){const _0x401898=_0x42313f[_0x5599aa]['markersEnd'][_0x18927c];if(!_0x387c76['has'](_0x401898))continue;const {group:_0x454f10,type:_0x3bb855}=_0x3f2f9e(_0x401898);if('revision-suggestion'!=_0x454f10||'insertion'!=_0x3bb855&&'deletion'!=_0x3bb855)continue;_0x42313f[_0x5599aa]['markersEnd']['splice'](_0x18927c,0x1),_0x18927c--;const _0x61c833=_0x1fff55['findIndex'](_0x150615=>_0x150615['name']==_0x401898);_0x61c833>-0x1&&_0x1fff55['splice'](_0x61c833,0x1);}}function _0x3f2f9e(_0x277455){const _0x3a16c5=_0x277455['split'](':');return{'group':_0x3a16c5[0x0],'type':_0x3a16c5[0x1],'subType':_0x3a16c5['length']>=0x5?_0x3a16c5[0x2]:null,'id':_0x3a16c5['length']<0x5?_0x3a16c5[0x2]:_0x3a16c5[0x3],'authorId':_0x3a16c5['length']<0x5?_0x3a16c5[0x3]:_0x3a16c5[0x4],'markerCount':0x6==_0x3a16c5['length']?_0x3a16c5[0x5]:null};}function _0x417e66(_0x14f698){for(let _0x23e3b8=0x0;_0x23e3b8<_0x1fff55['length'];_0x23e3b8++){if(_0x14f698['isAdded']&&'insertion'==_0x1fff55[_0x23e3b8]['type']&&_0x14f698['isAdded']['userId']==_0x1fff55[_0x23e3b8]['userId'])return _0x14f698['isAddSuggestion']=_0x1fff55[_0x23e3b8],void delete _0x14f698['isAdded'];if(!_0x14f698['isAdded']&&!_0x14f698['isRemoved']&&'deletion'==_0x1fff55[_0x23e3b8]['type'])return void(_0x14f698['isRemoveSuggestion']=_0x1fff55[_0x23e3b8]);}}}['_setDistance'](_0x4371d2,_0x1e4d0e){let _0x432e09=0x0,_0x5b199b=!0x1;const _0x14f3a5=new Map();for(const _0x195082 of _0x4371d2)_0x195082[_0x1e4d0e]?_0x5b199b&&(_0x432e09++,_0x5b199b=!0x1):(_0x432e09++,_0x5b199b=!0x0),_0x14f3a5['set'](_0x195082['id'],_0x432e09);for(let _0x140dab=0x0;_0x140dab<_0x4371d2['length'];_0x140dab++){if('isRemoved'==_0x1e4d0e&&_0x4371d2[_0x140dab]['isAdded']||'isAdded'==_0x1e4d0e&&_0x4371d2[_0x140dab]['isRemoved'])continue;if('text'==_0x4371d2[_0x140dab]['type']){_0x4371d2[_0x140dab]['distance']=0x0;continue;}const _0x469cd4=_0x14f3a5['get'](_0x4371d2[_0x140dab]['pairId']),_0x4524e6=_0x14f3a5['get'](_0x4371d2[_0x140dab]['id']);_0x4371d2[_0x140dab]['distance']=_0x469cd4-_0x4524e6;}}['_getRevisionsRange'](_0x44fa3d,_0x2bab10,_0x1d7edb=!0x1){const _0x32d19b=[];let _0xca32c4=this['repository']['getIndex'](_0x44fa3d),_0x424c3c=this['repository']['getIndex'](_0x2bab10);for(-0x1==_0x424c3c&&(_0x424c3c=this['repository']['_revisions']['length'],_0x1d7edb=!0x1);_0xca32c4<_0x424c3c;)_0x32d19b['push'](this['repository']['getRevision'](_0xca32c4)),_0xca32c4++;return _0x1d7edb&&_0x32d19b['push'](this['repository']['getRevision'](_0xca32c4)),_0x32d19b;}['_threeWayMerge'](_0x2182f2,_0x272470,_0xf0824b,_0x5ea665){const _0x56fc1d=this['editor']['model']['schema'];let _0x3207d8=_0x272470;for(;_0x2182f2[_0x3207d8]&&_0x2182f2[_0x3207d8]['isAdded'];)_0x3207d8++;let _0x2019d9=_0x5ea665;for(;_0xf0824b[_0x2019d9]&&_0xf0824b[_0x2019d9]['isRemoved'];)_0x2019d9++;_0x395beb(_0x2182f2,_0x272470,_0x3207d8),_0x395beb(_0xf0824b,_0x5ea665,_0x2019d9);const _0x440c91=_0xf0824b['slice'](_0x5ea665,_0x2019d9)['concat'](_0x2182f2['slice'](_0x272470,_0x3207d8));return _0x440c91['sort']((_0x217157,_0x2b2b9e)=>_0x217157['side']!=_0x2b2b9e['side']?_0x217157['side']-_0x2b2b9e['side']:_0x217157['level']!=_0x2b2b9e['level']?_0x217157['level']-_0x2b2b9e['level']:_0x217157['distance']!=_0x2b2b9e['distance']?_0x2b2b9e['distance']-_0x217157['distance']:!!_0x217157['isAdded']!=!!_0x2b2b9e['isAdded']?-0x1==_0x217157['side']||0x0==_0x217157['side']?_0x217157['isAdded']?-0x1:0x1:_0x217157['isAdded']?0x1:-0x1:_0x217157['index']-_0x2b2b9e['index']),{'commonTape':_0x440c91,'iEnd':_0x3207d8,'jEnd':_0x2019d9};function _0x395beb(_0x518d61,_0x4f430c,_0x24e584){let _0x1b8d00=-0x1,_0x4ba46d=Number['POSITIVE_INFINITY'],_0x167408=!0x0;for(let _0x4bfb6f=_0x4f430c;_0x4bfb6f<_0x24e584;_0x4bfb6f++)if(_0x56fc1d['isInline'](_0x518d61[_0x4bfb6f]['item'])||(_0x167408=!0x1),_0x518d61[_0x4bfb6f]['item']['startIndex']<_0x4f430c&&(_0x1b8d00=_0x4bfb6f),_0x518d61[_0x4bfb6f]['item']['endIndex']>=_0x24e584){_0x4ba46d=_0x4bfb6f;break;}_0x167408&&(_0x1b8d00=_0x24e584-0x1);for(let _0x201b7=_0x4f430c;_0x201b7<_0x24e584;_0x201b7++)_0x518d61[_0x201b7]['side']=_0x201b7<=_0x1b8d00?-0x1:_0x201b7<_0x4ba46d?0x0:0x1,_0x518d61[_0x201b7]['index']=_0x201b7;let _0x3b7178=0x0;for(let _0x361d19=_0x4f430c;_0x361d19<=_0x1b8d00;_0x361d19++)0x0==_0x518d61[_0x361d19]['distance']?_0x518d61[_0x361d19]['level']=_0x3b7178:(_0x3b7178++,_0x518d61[_0x361d19]['level']=_0x3b7178,_0x3b7178++);for(let _0x241a75=_0x4f430c;_0x241a75<_0x24e584;_0x241a75++)0x0==_0x518d61[_0x241a75]['side']&&(_0x518d61[_0x241a75]['level']=_0x3b7178);_0x3b7178=0x0;for(let _0x331119=_0x24e584-0x1;_0x331119>=_0x4ba46d;_0x331119--)0x0==_0x518d61[_0x331119]['distance']?_0x518d61[_0x331119]['level']=_0x3b7178:(_0x3b7178--,_0x518d61[_0x331119]['level']=_0x3b7178,_0x3b7178--);}}['_fixObsoleteTags'](_0x29a369){const _0x578735=new Map(),_0x5b3463=this['editor']['model']['schema'];for(let _0x21df53=0x1;_0x21df53<_0x29a369['length'];_0x21df53++){let _0x2fddf8,_0x319440,_0x54513e;const _0x4d705a=_0x29a369[_0x21df53],_0x163ce9=_0x29a369[_0x21df53-0x1];if('text'==_0x4d705a['type'])continue;if(_0x4d705a['type']!=_0x163ce9['type'])continue;if(!_0x5b3463['isBlock'](_0x163ce9['item'])||_0x5b3463['isLimit'](_0x163ce9['item']))continue;if(!_0x5b3463['isBlock'](_0x4d705a['item'])||_0x5b3463['isLimit'](_0x4d705a['item']))continue;if((_0x29a369[_0x21df53]['isAdded']||_0x29a369[_0x21df53]['isAddSuggestion'])&&_0x29a369[_0x21df53-0x1]['isRemoved'])_0x2fddf8=_0x29a369[_0x21df53],_0x319440=_0x29a369[_0x21df53-0x1],_0x54513e=_0x21df53-0x1;else{if(!_0x29a369[_0x21df53]['isRemoved']||!_0x29a369[_0x21df53-0x1]['isAdded']&&!_0x29a369[_0x21df53-0x1]['isAddSuggestion'])continue;_0x2fddf8=_0x29a369[_0x21df53-0x1],_0x319440=_0x29a369[_0x21df53],_0x54513e=_0x21df53;}const _0x206f9a=_0x2fddf8['level']==_0x319440['level'],_0x4faf68=Math['abs'](_0x2fddf8['level'])<Math['abs'](_0x319440['level'])&&0x0==_0x319440['distance'];(_0x206f9a||_0x4faf68)&&(_0x578735['set'](_0x319440['id'],_0x2fddf8['id']),_0x29a369['splice'](_0x54513e,0x1),_0x21df53--,_0x2fddf8['isAdded']=!0x1);}for(let _0x4727d1=0x0;_0x4727d1<_0x29a369['length'];_0x4727d1++)_0x578735['has'](_0x29a369[_0x4727d1]['pairId'])&&(_0x29a369[_0x4727d1]['pairId']=_0x578735['get'](_0x29a369[_0x4727d1]['pairId']));}['_removeMissingPairs'](_0x385d8a){const _0x3df74a=new Set(_0x385d8a['map'](_0x587310=>_0x587310['id']));for(let _0x3033e1=0x0;_0x3033e1<_0x385d8a['length'];_0x3033e1++)_0x3df74a['has'](_0x385d8a[_0x3033e1]['pairId'])||0x0==_0x385d8a[_0x3033e1]['distance']||(_0x385d8a[_0x3033e1]['isIncorrect']=!0x0);return _0x385d8a['filter'](_0x112e0d=>!_0x112e0d['isIncorrect']);}['_markMismatchedRemovedTags'](_0x439b5f){const _0x331c98=new Set();for(let _0x5d71e8=0x0;_0x5d71e8<_0x439b5f['length'];_0x5d71e8++){if(_0x331c98['has'](_0x439b5f[_0x5d71e8]['id'])&&_0x439b5f[_0x5d71e8]['isRemoved']&&(_0x439b5f[_0x5d71e8]['isIncorrect']=!0x0),_0x439b5f[_0x5d71e8]['isIncorrect'])continue;if(0x0==_0x439b5f[_0x5d71e8]['distance'])continue;if('elementStart'!=_0x439b5f[_0x5d71e8]['type'])continue;if(null==_0x439b5f[_0x5d71e8]['pairId'])continue;let _0x4e0c36=_0x5d71e8+0x1,_0x5d5702=0x0;for(;_0x439b5f[_0x4e0c36]['id']!=_0x439b5f[_0x5d71e8]['pairId'];)'elementStart'==_0x439b5f[_0x4e0c36]['type']?_0x5d5702++:'elementEnd'==_0x439b5f[_0x4e0c36]['type']&&_0x5d5702--,_0x4e0c36++;if(0x0!=_0x5d5702){if(_0x439b5f[_0x5d71e8]['isRemoved'])_0x439b5f[_0x5d71e8]['isIncorrect']=!0x0;else{for(;_0x4e0c36!=_0x5d71e8;)_0x439b5f[_0x4e0c36]['isRemoved']&&0x0!=_0x439b5f[_0x4e0c36]['distance']&&(_0x439b5f[_0x4e0c36]['isIncorrect']=!0x0,_0x331c98['add'](_0x439b5f[_0x4e0c36]['pairId'])),_0x4e0c36--;}}}return _0x439b5f['filter'](_0x58ef20=>!_0x58ef20['isIncorrect']);}['_removeUnsupportedChanges'](_0x2ee37a){const _0x1ea770=this['editor']['model']['schema'];for(let _0x2ba32c=0x0;_0x2ba32c<_0x2ee37a['length'];_0x2ba32c++){if(!(_0x2ee37a[_0x2ba32c]['isAdded']||_0x2ee37a[_0x2ba32c]['isAddSuggestion']||_0x2ee37a[_0x2ba32c]['isRemoved']||_0x2ee37a[_0x2ba32c]['isRemoveSuggestion']))continue;if(0x0==_0x2ee37a[_0x2ba32c]['distance'])continue;const _0x33d640=_0x2ee37a[_0x2ba32c]['item'];_0x1ea770['isBlock'](_0x33d640)||_0x1ea770['isLimit'](_0x33d640)||(_0x2ee37a[_0x2ba32c]['isAdded']&&delete _0x2ee37a[_0x2ba32c]['isAdded'],_0x2ee37a[_0x2ba32c]['isAddSuggestion']&&delete _0x2ee37a[_0x2ba32c]['isAddSuggestion'],_0x2ee37a[_0x2ba32c]['isRemoveSuggestion']&&delete _0x2ee37a[_0x2ba32c]['isRemoveSuggestion'],_0x2ee37a[_0x2ba32c]['isRemoved']&&(_0x2ee37a[_0x2ba32c]['isIncorrect']=!0x0));}return _0x2ee37a['filter'](_0x4726db=>!_0x4726db['isIncorrect']);}['_makeModelFromTape'](_0x168701,_0xac9989,_0x3b6a83){const _0x5b84c5=new _0x33f300(),_0x1c5d29=[],_0x51ba62=new Map(),_0x3acf7e=this['editor']['model'],_0x170cf6=_0x3acf7e['schema'],_0x3ed363=[_0x5b84c5],_0x32365c={},_0x43fe3e={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4cda48=null;const _0x44a1bd=[0x0];for(let _0x337da7=0x0;_0x337da7<_0x168701['length'];_0x337da7++)if('elementStart'===_0x168701[_0x337da7]['type']){_0x168701[_0x337da7]['previousPosition']=_0x3acf7e['createPositionFromPath'](_0x5b84c5,_0x44a1bd);const _0x51a7bb=new _0xaddbbf(_0x168701[_0x337da7]['item']['name'],_0x168701[_0x337da7]['item']['getAttributes']());_0x3ed363[0x0]['_appendChild'](_0x51a7bb),_0x44a1bd['push'](0x0),_0x3ed363['unshift'](_0x51a7bb),_0x168701[_0x337da7]['nextPosition']=_0x3acf7e['createPositionFromPath'](_0x5b84c5,_0x44a1bd);}else'elementEnd'===_0x168701[_0x337da7]['type']?(_0x3ed363['shift'](),_0x168701[_0x337da7]['previousPosition']=_0x3acf7e['createPositionFromPath'](_0x5b84c5,_0x44a1bd),_0x44a1bd['pop'](),_0x44a1bd[_0x44a1bd['length']-0x1]++,_0x168701[_0x337da7]['nextPosition']=_0x3acf7e['createPositionFromPath'](_0x5b84c5,_0x44a1bd)):(_0x168701[_0x337da7]['previousPosition']=_0x3acf7e['createPositionFromPath'](_0x5b84c5,_0x44a1bd),_0x4cda48?_0x4cda48['_data']+=_0x168701[_0x337da7]['item']['data']:_0x4cda48=new _0xfa93f5(_0x168701[_0x337da7]['item']['data'],_0x168701[_0x337da7]['item']['getAttributes']()),_0x168701[_0x337da7+0x1]&&'text'===_0x168701[_0x337da7+0x1]['type']&&_0x4e4087(_0x4cda48,_0x168701[_0x337da7+0x1]['item'])||(_0x3ed363[0x0]['_appendChild'](_0x4cda48),_0x4cda48=null),_0x44a1bd[_0x44a1bd['length']-0x1]+=_0x168701[_0x337da7]['item']['offsetSize'],_0x168701[_0x337da7]['nextPosition']=_0x3acf7e['createPositionFromPath'](_0x5b84c5,_0x44a1bd));for(let _0x52d13b=0x0;_0x52d13b<_0x168701['length'];_0x52d13b++){const _0x2c0f69=_0x168701[_0x52d13b]['previousPosition'],_0x47f413=_0x168701[_0x52d13b]['nextPosition'];for(const _0x1ec6eb of _0x168701[_0x52d13b]['markersStart'])_0x51ba62['set'](_0x1ec6eb,{'start':_0x2c0f69,'end':null});_0x2c2639('isRemoveSuggestion',_0x52d13b,_0x2c0f69,_0x47f413),_0x2c2639('isAddSuggestion',_0x52d13b,_0x2c0f69,_0x47f413),_0x2c2639('isRemoved',_0x52d13b,_0x2c0f69,_0x47f413),_0x2c2639('isAdded',_0x52d13b,_0x2c0f69,_0x47f413);for(const _0x19b987 of _0x168701[_0x52d13b]['markersEnd']){const _0x58e048=_0x51ba62['get'](_0x19b987);_0x58e048?_0x58e048['end']=_0x47f413:_0x51ba62['set'](_0x19b987,{'start':_0x47f413,'end':_0x47f413});}}for(const [_0x191145,_0x3ba593]of _0x51ba62){const _0x4c3527=this['editor']['model']['createRange'](_0x3ba593['start'],_0x3ba593['end']);_0x5b84c5['markers']['set'](_0x191145,_0x4c3527);}return _0x1c5d29['sort']((_0x1b2757,_0x459eec)=>{const _0x477a9c=_0x5b84c5['markers']['get']('revision:'+_0x1b2757['id']),_0x5d03d1=_0x5b84c5['markers']['get']('revision:'+_0x459eec['id']);return _0x477a9c['start']['isBefore'](_0x5d03d1['start'])?-0x1:_0x477a9c['start']['isAfter'](_0x5d03d1['start'])?0x1:_0x477a9c['end']['isBefore'](_0x5d03d1['end'])?-0x1:_0x477a9c['end']['isAfter'](_0x5d03d1['end'])?0x1:'add'===_0x1b2757['type']?-0x1:0x1;}),{'root':_0x5b84c5,'changes':_0x1c5d29};function _0x2c2639(_0x37d22d,_0x24f043,_0xf5c6ea,_0x2443fc){const _0x113550=!!_0x168701[_0x24f043][_0x37d22d],_0x51cc24=_0x113550?_0x168701[_0x24f043][_0x37d22d]['userId']:null,_0x308b3a=_0x24f043===_0x168701['length']-0x1,_0x478a99=_0x43fe3e[_0x37d22d][0x0],_0x43dbdc=_0x170cf6['isObject'](_0x168701[_0x24f043]['item']);!_0x32365c[_0x37d22d]&&_0x113550?_0x32365c[_0x37d22d]={'start':_0xf5c6ea,'tapeItem':_0x168701[_0x24f043],'userId':_0x51cc24,'type':_0x37d22d}:_0x32365c[_0x37d22d]&&!_0x113550?(_0x32365c[_0x37d22d]['end']=_0xf5c6ea,_0x2258cb(_0x32365c[_0x37d22d]),_0x32365c[_0x37d22d]=null):_0x32365c[_0x37d22d]&&_0x113550&&_0x32365c[_0x37d22d]['userId']!==_0x51cc24&&(_0x32365c[_0x37d22d]['end']=_0xf5c6ea,_0x478a99&&_0x478a99['userId']===_0x32365c[_0x37d22d]['userId']||_0x2258cb(_0x32365c[_0x37d22d]),_0x32365c[_0x37d22d]={'start':_0xf5c6ea,'tapeItem':_0x168701[_0x24f043],'userId':_0x51cc24,'type':_0x37d22d}),_0x32365c[_0x37d22d]&&_0x43dbdc&&('elementStart'!==_0x168701[_0x24f043]['type']||_0x478a99&&_0x478a99['userId']===_0x51cc24||_0x43fe3e[_0x37d22d]['unshift']({'userId':_0x51cc24,'object':_0x168701[_0x24f043]['item'],'change':_0x32365c[_0x37d22d]}),'elementEnd'===_0x168701[_0x24f043]['type']&&_0x478a99&&_0x478a99['object']===_0x168701[_0x24f043]['item']&&(_0x43fe3e[_0x37d22d]['shift'](),_0x32365c[_0x37d22d]=_0x478a99['change'])),_0x32365c[_0x37d22d]&&_0x308b3a&&(_0x32365c[_0x37d22d]['end']=_0x2443fc,_0x2258cb(_0x32365c[_0x37d22d]),_0x32365c[_0x37d22d]=null);}function _0x2258cb({start:_0x16a14b,end:_0x357e4f,tapeItem:_0x2e598d,userId:_0x337898,type:_0x1c3c56}){const _0x566090=_0x2e598d['item'],_0x383ef4=_0x3acf7e['schema']['isBlock'](_0x566090)&&!_0x3acf7e['schema']['isLimit'](_0x566090),_0x1c60d2=_0x16a14b['nodeAfter']==_0x357e4f['parent']&&_0x357e4f['isAtStart'];if(_0x383ef4&&_0x1c60d2)return;const _0x4304d1=_0x3acf7e['createRange'](_0x16a14b,_0x357e4f),_0x23a10c=_0xac9989['get'](_0x337898),_0xf69b3e=new ChangeItem({'author':_0x23a10c,'type':'isAdded'==_0x1c3c56||'isAddSuggestion'==_0x1c3c56?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1c3c56||'isRemoveSuggestion'==_0x1c3c56},'createdAt':new Date(),'rootName':_0x3b6a83});_0x1c5d29['push'](_0xf69b3e),_0x5b84c5['markers']['set']('revision:'+_0xf69b3e['id'],_0x4304d1);}function _0x4e4087(_0xe54a20,_0x5e9fd8){const _0x4530f8=_0xe54a20['getAttributes'](),_0x2796a8=_0x5e9fd8['getAttributes']();for(const _0x3b0e04 of _0x4530f8){if(_0x3b0e04[0x1]!==_0x5e9fd8['getAttribute'](_0x3b0e04[0x0]))return!0x1;_0x2796a8['next']();}return _0x2796a8['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x339ab1=>{const _0x16655b=_0x339ab1['markerName']['split'](':')[0x1],_0x2720a4=this['_getChangeFromId'](_0x16655b);if(!_0x2720a4)return null;const _0x417aa8='add'==_0x2720a4['type']?'insertion':'deletion',_0x442607=['ck-suggestion-marker','ck-suggestion-marker-'+_0x417aa8];return _0x2720a4['data']['isSuggestion']&&_0x442607['push']('ck-suggestion-marker-'+_0x417aa8+'-new'),this['activeChange']==_0x2720a4&&_0x442607['push']('ck-suggestion-marker--active'),{'classes':_0x442607,'attributes':{'data-change-id':_0x16655b}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4529f5=>{_0x4529f5['on']('element:pre',(_0x269e18,_0x280f81,_0x4eaed5)=>{const _0x4e6c0d=_0x280f81['viewItem']['getChild'](0x0);if(!_0x4e6c0d||!_0x4e6c0d['is']('element','code'))return;if(!_0x4eaed5['consumable']['consume'](_0x4e6c0d,{'attributes':['vid_start','vid_end']}))return;const _0x3d0708=_0x280f81['modelRange']['start']['nodeAfter'];_0x4eaed5['writer']['setAttribute']('vid_start',_0x4e6c0d['getAttribute']('vid_start'),_0x3d0708),_0x4eaed5['writer']['setAttribute']('vid_end',_0x4e6c0d['getAttribute']('vid_end'),_0x3d0708);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2fe61b=>{_0x2fe61b['on']('element',(_0x38eb9c,_0x32894a,_0x157b7c)=>{if(!_0x157b7c['consumable']['consume'](_0x32894a['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x32894a['modelRange']['isCollapsed'])return;const _0x121155=_0x32894a['modelRange']['start']['nodeAfter'];_0x121155['hasAttribute']('vid_start')||_0x121155['hasAttribute']('vid')||(_0x157b7c['writer']['setAttribute']('vid_start',_0x32894a['viewItem']['getAttribute']('vid_start'),_0x121155),_0x157b7c['writer']['setAttribute']('vid_end',_0x32894a['viewItem']['getAttribute']('vid_end'),_0x121155));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x588f62=>_0x588f62['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xc641a2,[,_0x72aeff])=>{['vid_start','vid_end','vid']['includes'](_0x72aeff)&&(_0xc641a2['return']=!0x0,_0xc641a2['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x51d62d=>{_0x51d62d['on']('attribute:vid',(_0x314f8b,_0x5226ae,_0x15a9aa)=>{if('\x20'!=_0x5226ae['item']['data']||_0x5226ae['item']['parent']['maxOffset']>0x1)return;if(!_0x15a9aa['consumable']['consume'](_0x5226ae['item'],_0x314f8b['name']))return;const _0x3c605d=_0x15a9aa['writer'],_0x437582=_0x15a9aa['mapper']['toViewRange'](_0x5226ae['range']);_0x3c605d['wrap'](_0x437582,_0x3c605d['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x92b9ce){const _0x2c28d8=_0x92b9ce['plugins']['get']('RevisionViewer');return(_0x20b3b6,_0x4f418f,_0x426fb6)=>{const _0x5bcb16=_0x4f418f['markerName']['split'](':')[0x1],_0x39e45f=_0x2c28d8['_getChangeFromId'](_0x5bcb16);if(!_0x39e45f)return null;const _0x410440='add'==_0x39e45f['type']?'split':'merge';if(!_0x426fb6['consumable']['test'](_0x4f418f['markerRange'],_0x20b3b6['name']))return;const _0x2003c9=_0x4f418f['markerRange']['getWalker'](),_0x278317=_0x4f418f['markerRange']['start'],_0x5bd8e3=_0x92b9ce['model']['schema'];let _0x180ebf=null,_0x10f16c=null,_0x5a3984=!0x1,_0x3f8a84=!0x1;for(const _0x3cafba of _0x2003c9){const _0x19fc57=_0x3cafba['item'];_0x5a3984=_0x5a3984||_0x5bd8e3['isContent'](_0x19fc57);const _0x216279=_0x426fb6['mapper']['toViewElement'](_0x19fc57);if(_0x216279&&_0x216279['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3cafba['type']&&(_0x5bd8e3['isBlock'](_0x19fc57)&&!_0x5bd8e3['isLimit'](_0x19fc57)&&(_0x19fc57['nextSibling']||_0x278317['isAtEnd']?_0x180ebf&&_0x180ebf['parent']==_0x19fc57||(_0x180ebf=_0x19fc57,_0x1ecb22(_0x3cafba['previousPosition']),_0x3f8a84=!0x0):_0x10f16c=_0x10f16c||_0x3cafba['previousPosition']));}function _0x1ecb22(_0x58b979){const _0x285817=_0x426fb6['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x410440}),_0x2fb7eb=_0x426fb6['mapper']['toViewPosition'](_0x58b979);_0x39e45f['data']['isSuggestion']&&_0x426fb6['writer']['addClass']('ck-suggestion-marker-'+_0x410440+'-new',_0x285817),_0x2c28d8['activeChange']==_0x39e45f&&_0x426fb6['writer']['addClass']('ck-suggestion-marker--active',_0x285817),_0x426fb6['writer']['insert'](_0x2fb7eb,_0x285817),_0x426fb6['mapper']['bindElementToMarker'](_0x285817,_0x4f418f['markerName']);}_0x5a3984||_0x3f8a84||!_0x10f16c||_0x1ecb22(_0x10f16c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xe84c1f,_0x58a7a7,_0x290b15)=>{const _0x4b6c39=_0x290b15['mapper']['markerNameToElements'](_0x58a7a7['markerName']);if(_0x4b6c39){for(const _0x3d1d21 of _0x4b6c39)(_0x3d1d21['hasClass']('ck-suggestion-marker-split')||_0x3d1d21['hasClass']('ck-suggestion-marker-merge'))&&(_0x290b15['mapper']['unbindElementFromMarkerName'](_0x3d1d21,_0x58a7a7['markerName']),_0x290b15['writer']['remove'](_0x3d1d21));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x5b973a,_0x293288,_0x1b2cb7)=>{const _0x462398=_0x293288['markerName']['split'](':')[0x1],_0x267183=this['_getChangeFromId'](_0x462398);if(!_0x267183)return null;const _0x4630ea='add'==_0x267183['type']?'split':'merge';if(_0x1b2cb7['consumable']['test'](_0x293288['markerRange'],_0x5b973a['name']))for(const _0x38a80b of _0x293288['markerRange']['getItems']()){if(!_0x38a80b['is']('element','softBreak'))continue;const _0x41fd0d=_0x1b2cb7['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4630ea}),_0x594b32=_0x1b2cb7['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x38a80b));_0x267183['data']['isSuggestion']&&_0x1b2cb7['writer']['addClass']('ck-suggestion-marker-'+_0x4630ea+'-new',_0x41fd0d),this['activeChange']==_0x267183&&_0x1b2cb7['writer']['addClass']('ck-suggestion-marker--active',_0x41fd0d),_0x1b2cb7['writer']['insert'](_0x594b32,_0x41fd0d),_0x1b2cb7['mapper']['bindElementToMarker'](_0x41fd0d,_0x293288['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x52e2e7=>{for(const _0x51a7e3 of this['editor']['model']['document']['getRootNames']()){const _0x5c945b=this['editor']['model']['document']['getRoot'](_0x51a7e3),_0x5c2ae4=this['editor']['editing']['view']['document']['getRoot'](_0x51a7e3);if(_0x5c2ae4){const _0x1dbb5=_0x5c945b['getAttribute']('revisionHistoryAttachChange');if(_0x52e2e7['removeAttribute']('data-change-id',_0x5c2ae4),_0x52e2e7['removeClass']('ck-revision-history-root-add',_0x5c2ae4),_0x52e2e7['removeClass']('ck-revision-history-root-remove',_0x5c2ae4),_0x52e2e7['removeClass']('ck-revision-history-root--active',_0x5c2ae4),_0x1dbb5){const _0xd51f23=this['_getChangeFromId'](_0x1dbb5);if(!_0xd51f23)return null;_0x52e2e7['setAttribute']('data-change-id',_0x1dbb5,_0x5c2ae4),_0x52e2e7['addClass']('ck-revision-history-root-'+_0xd51f23['type'],_0x5c2ae4),this['activeChange']==_0xd51f23&&_0x52e2e7['addClass']('ck-revision-history-root--active',_0x5c2ae4);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x482d35=>'revision-comment:'+_0x482d35,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3943ac=>'revision-suggestion:'+_0x3943ac,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x301d2b=>({'name':'suggestion:'+_0x301d2b,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4a6552=>{const _0x4d1f49=_0x4a6552['markerName']['split'](':')[0x1];return'insertion'!=_0x4d1f49&&'deletion'!=_0x4d1f49?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4d1f49]};}}),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',(_0x51cde8,_0xdee42b,_0x2284fa)=>{const _0xab4104=_0x2284fa['mapper']['markerNameToElements'](_0xdee42b['markerName']);if(_0xab4104){for(const _0x32f667 of _0xab4104)_0x32f667['is']('uiElement')&&(_0x2284fa['mapper']['unbindElementFromMarkerName'](_0x32f667,_0xdee42b['markerName']),_0x2284fa['writer']['remove'](_0x32f667));}},{'priority':'high'});}['_getChangeFromId'](_0x3c6741){return this['_changeIdToChange']['get'](_0x3c6741);}['_getViewForChange'](_0x314119){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x314119),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xcdf3b6,_0xc19cec,_0x1aeb33,_0x367a9d)=>{_0x367a9d&&this['_balloon']['remove'](_0x367a9d),_0x1aeb33&&(this['_balloon']['add']({'view':_0x1aeb33,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1a4e63=this['editor']['editing'],_0x7eec58=this['_getChangeFromId'](_0x1aeb33['changeId']);let _0x374a83;if(_0x7eec58['data']['isOnRoot']){const _0x1af57b=_0x1a4e63['view']['getDomRoot'](_0x7eec58['rootName']);_0x374a83=Array['from'](_0x1af57b['getClientRects']());}else{const _0x781645=this['editor']['model']['markers']['get']('revision:'+_0x1aeb33['changeId']);_0x374a83=Array['from'](_0x1a4e63['mapper']['markerNameToElements'](_0x781645['name']))['map'](_0x31197f=>_0x1a4e63['view']['domConverter']['mapViewToDom'](_0x31197f))['map'](_0xd45f96=>Array['from'](_0xd45f96['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x374a83[0x0];return _0x374a83['find'](_0x9779da=>_0x9779da['top']-0x3<=this['_activeViewTarget']['y']&&_0x9779da['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x9779da['left']-0x3<=this['_activeViewTarget']['x']&&_0x9779da['right']+0x3>=this['_activeViewTarget']['x'])||_0x374a83[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x490208,_0x577c2f,_0x46ef74,_0x29d751)=>{this['activeView']=_0x46ef74?this['_getViewForChange'](_0x46ef74):null,this['editor']['model']['change'](()=>{const _0x16dd10=this['editor']['editing'];_0x29d751&&(_0x29d751['data']['isOnRoot']?_0x16dd10['view']['change'](_0x5455f8=>{_0x5455f8['removeClass']('ck-revision-history-root--active',_0x16dd10['view']['document']['getRoot'](_0x29d751['rootName']));}):_0x16dd10['reconvertMarker']('revision:'+_0x29d751['id'])),_0x46ef74&&(_0x46ef74['data']['isOnRoot']?_0x16dd10['view']['change'](_0x412696=>{_0x412696['addClass']('ck-revision-history-root--active',_0x16dd10['view']['document']['getRoot'](_0x46ef74['rootName']));}):_0x16dd10['reconvertMarker']('revision:'+_0x46ef74['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x2d5bbb,_0x24d9d8)=>{if(this['activeChange'])return;const _0x63b28b=this['_findChangeIdFromDomTarget'](_0x24d9d8['target']),_0x42079d=this['_changeIdToChange']['get'](_0x63b28b);_0x42079d?(this['_activeViewTarget']={'x':_0x24d9d8['domEvent']['x'],'y':_0x24d9d8['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x42079d)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0xb361a3,_0x4fe81b)=>{const _0x88100f=this['_findChangeIdFromDomTarget'](_0x4fe81b['target']),_0x57b394=this['_changeIdToChange']['get'](_0x88100f);_0x57b394?(this['_activeViewTarget']={'x':_0x4fe81b['domEvent']['x'],'y':_0x4fe81b['domEvent']['y']},_0x57b394===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x57b394):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x248754){do{const _0x12a61c=_0x248754['getAttribute']('data-change-id');if(_0x12a61c)return _0x12a61c;_0x248754=_0x248754['parent'];}while(_0x248754);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xcf0776=>{for(const _0x52d057 of this['editor']['model']['markers'])_0xcf0776['removeMarker'](_0x52d057);});}}function _t(_0x31b9ce,_0x31e6fb){return(_0x44f088,_0x225582,_0x2eb274)=>{if(!_0x2eb274['consumable']['test'](_0x225582['markerRange'],_0x44f088['name']))return;const _0x699f25=_0x225582['markerRange']['getWalker'](),_0x83b94c=_0x225582['markerRange']['start'],_0x11ce16=_0x31b9ce['model']['schema'];let _0x127e41=null,_0x1e5026=null,_0x542d54=!0x1,_0x2e7531=!0x1;for(const _0x2341e1 of _0x699f25){const _0x3ae2eb=_0x2341e1['item'];_0x542d54=_0x542d54||_0x11ce16['isContent'](_0x3ae2eb);const _0x990430=_0x2eb274['mapper']['toViewElement'](_0x3ae2eb);if(_0x990430&&_0x990430['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2341e1['type']&&(_0x11ce16['isBlock'](_0x3ae2eb)&&!_0x11ce16['isLimit'](_0x3ae2eb)&&(_0x3ae2eb['nextSibling']||_0x83b94c['isAtEnd']?_0x127e41&&_0x127e41['parent']==_0x3ae2eb||(_0x127e41=_0x3ae2eb,_0x1132f0(_0x2341e1['previousPosition']),_0x2e7531=!0x0):_0x1e5026=_0x1e5026||_0x2341e1['previousPosition']));}function _0x1132f0(_0x5ddf29){const _0x22979f=_0x2eb274['mapper']['toViewPosition'](_0x5ddf29),_0x2e7144=_0x2eb274['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x31e6fb});_0x2eb274['writer']['insert'](_0x22979f,_0x2e7144),_0x2eb274['mapper']['bindElementToMarker'](_0x2e7144,_0x225582['markerName']);}_0x542d54||_0x2e7531||!_0x1e5026||_0x1132f0(_0x1e5026);};}class RestoreRevisionCommand extends _0x372988{constructor(_0x507543){super(_0x507543);const _0x1e2b45=_0x507543['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x1e2b45,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1e2b45,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x36b991=this['editor'],_0x522a07=_0x36b991['plugins']['get'](RevisionViewer),_0x46cf7d=_0x522a07['isReady']?_0x522a07['diff']['newRevisionId']:null;_0x36b991['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x46cf7d);}['refresh'](){const {isReady:_0x1754f8,isEnabled:_0x2160c8,repository:_0x43da61,diff:_0x232405}=this['editor']['plugins']['get'](RevisionViewer),_0x4af8ff=_0x232405&&_0x43da61['getLaterVisibleRevision'](_0x232405['newRevisionId']);this['isEnabled']=_0x1754f8&&_0x2160c8&&Boolean(_0x4af8ff);}}class ShowChangeCommand extends _0x372988{['_step'];constructor(_0x1e5f39,{direction:_0x5850e8}){super(_0x1e5f39);const _0x841698=_0x1e5f39['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x5850e8?0x1:-0x1,this['listenTo'](_0x841698,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x841698,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x841698,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1f1919=this['editor'],_0x9b56c6=_0x1f1919['plugins']['get'](RevisionViewer),{isNavigationMode:_0x4f7175,currentChangeNumber:_0xe57bb1}=_0x9b56c6;let _0x197f18;if(_0x9b56c6['activeChange']=_0x4f7175?_0x9b56c6['diff']['changes']['get'](_0xe57bb1+this['_step']):_0x9b56c6['diff']['changes']['first'],_0x9b56c6['activeChange']['data']['isOnRoot'])_0x197f18=_0x1f1919['editing']['view']['getDomRoot'](_0x9b56c6['activeChange']['rootName']);else{const _0x14b9a1=_0x1f1919['model']['markers']['get']('revision:'+_0x9b56c6['activeChange']['id']);_0x197f18=_0x4a57b1(_0x1f1919['editing'],_0x14b9a1);}_0x27dbeb({'target':_0x197f18,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5c7f71,currentChangeNumber:_0x1c3562,numberOfChanges:_0x3418d3,isReady:_0x32d06e,isEnabled:_0x5aa7a0}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x5aa7a0&&_0x32d06e&&_0x3418d3)&&(!_0x5c7f71||(0x1===this['_step']?_0x1c3562<_0x3418d3-0x1:_0x1c3562>0x0));}}class ChangesNavigationView extends _0x155b5e{constructor(_0x46cb52){super(_0x46cb52);const _0x5594d8=this['bindTemplate'],_0x164341=new _0x2ac8c4(_0x46cb52),_0x389c4e=new _0x2ac8c4(_0x46cb52);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',(_0x1b0715,_0x3b977a)=>_0x1b0715&&_0x3b977a>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1cf086,_0x4ad791,_0x246be1,_0x1177c8)=>{if(!_0x1cf086)return ft(_0x46cb52,'Loading...');if(!_0x246be1)return ft(_0x46cb52,'No\x20changes');const _0x1dd35f=ft(_0x46cb52,'NUMBER_OF_CHANGES',_0x246be1);return _0x1177c8?ft(_0x46cb52,'X_OF_Y_CHANGES',[_0x4ad791+0x1,_0x246be1]):_0x1dd35f;}),_0x164341['set']({'label':ft(_0x46cb52,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x77416f}),_0x389c4e['set']({'label':ft(_0x46cb52,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1b082e}),_0x164341['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x389c4e['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x164341['on']('execute',()=>this['fire']('execute','backward')),_0x389c4e['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',_0x5594d8['if']('_isStatusLabelVisible','ck-hidden',_0x1edc00=>!_0x1edc00)]},'children':[{'text':_0x5594d8['to']('isNavigationMode',_0x2b32a7=>_0x2b32a7?ft(_0x46cb52,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x46cb52,'Total')+':\x20')}]},{'text':_0x5594d8['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x164341,_0x389c4e]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x226832{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0xfc0ce2=this['editor']['editing']['view'];_0xfc0ce2['change'](_0x150503=>{for(const _0x521266 of _0xfc0ce2['document']['roots'])_0x150503['addClass'](yt,_0x521266);});}['hide'](){const _0x57b794=this['editor']['editing']['view'];_0x57b794['change'](_0x33634e=>{for(const _0x5a07cd of _0x57b794['document']['roots'])_0x33634e['removeClass'](yt,_0x5a07cd);});}}class RevisionViewerUI extends _0x226832{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0xcec9b4=this['editor'],_0x4b8416=_0xcec9b4['plugins']['get'](RevisionViewer),_0x41ca7b=_0xcec9b4['plugins']['get'](RevisionViewerLoadingOverlay);_0xcec9b4['ui']['componentFactory']['add']('exitToEditing',_0x103145=>{const _0x398940=new _0x2ac8c4(_0x103145);return _0x398940['set']({'label':ft(_0x103145,'Back\x20to\x20editing'),'icon':_0x5cb0fc,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x398940,'execute',()=>{_0xcec9b4['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x398940;}),_0xcec9b4['ui']['componentFactory']['add']('restoreRevision',_0x10a136=>{const _0x4b655f=new _0x2ac8c4(_0x10a136);return _0x4b655f['set']({'label':ft(_0x10a136,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4b655f['bind']('isEnabled')['to'](_0xcec9b4['commands']['get']('restoreRevision')),this['listenTo'](_0x4b655f,'execute',()=>_0xcec9b4['execute']('restoreRevision')),_0x4b655f;}),_0xcec9b4['ui']['componentFactory']['add']('changesNavigation',_0x15f3db=>{const _0x22bdbe=new ChangesNavigationView(_0x15f3db),_0x5de3f1=_0xcec9b4['commands']['get']('showPreviousChange'),_0x49ddc3=_0xcec9b4['commands']['get']('showNextChange');return _0x22bdbe['bind']('isBackwardNavigationEnabled')['to'](_0x5de3f1,'isEnabled'),_0x22bdbe['bind']('isForwardNavigationEnabled')['to'](_0x49ddc3,'isEnabled'),_0x22bdbe['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4b8416),this['listenTo'](_0x22bdbe,'execute',(_0x5aadcf,_0x33276a)=>{_0xcec9b4['execute']('forward'===_0x33276a?'showNextChange':'showPreviousChange');}),_0x22bdbe;}),_0x41ca7b['show'](),_0x4b8416['on']('change:isReady',(_0x3a42be,_0x140f46,_0x12e105)=>{_0x12e105?_0x41ca7b['hide']():_0x41ca7b['show']();});}}class RevisionNameView extends _0x4aa119{['_resizeObserver']=null;constructor(_0x335a5d,_0x3dd82e){super(_0x335a5d,_0x3dd82e);const _0xb65b91=this['bindTemplate'];this['set']({'label':ft(_0x335a5d,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x335a5d,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0xb65b91['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x8e13cb(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x3af70d=this['fieldView']['element'];this['_tooltipString']=_0x3af70d['scrollWidth']>_0x3af70d['clientWidth']&&_0x3af70d['value']||'';}}class RevisionAuthorView extends _0x155b5e{constructor(_0x10833d,_0x26e52c,_0x445467){super(_0x10833d);const _0x397f6a=new nt();_0x397f6a['set']({'content':_0x18cd72,'viewBox':'0\x200\x2011\x2010'});const _0x15c559=['ck','ck-revision-history-sidebar__revision-author'];_0x445467&&_0x15c559['push']('ck-revision-history-sidebar__revision-author_creator');const _0x40537a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x10833d,_0x445467?'Revision\x20creator':'Revision\x20author')},'children':[_0x397f6a,_0x26e52c['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x15c559},'children':_0x40537a});}}function Rt(_0x1125bc,_0xa54c5e){const _0x1258a1=_0x1125bc['bindTemplate'],_0x132f1b=_0x1125bc['locale'],_0x249c94=_0x5b8929(_0x132f1b);_0x249c94['panelPosition']='sw';const _0xf73bfa=function(_0x58a720,_0x1180e2){const _0x2053b7=function(_0x3a47d7,_0x34aa3f){const _0x776b86=_0x3a47d7['locale'],_0x1019ff={'Compare\x20against\x20selected':ft(_0x776b86,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x776b86,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x776b86,'Restore\x20this\x20revision')};return _0x34aa3f['map'](_0xa21237=>{const _0x15cd86=_0x1019ff[_0xa21237['name']];return _0x15cd86&&_0x15cd86!==_0xa21237['name']&&(_0xa21237['name']=_0x15cd86),_0xa21237;});}(_0x58a720,_0x1180e2),_0x2c0003=new _0xdad0f8();for(const _0x2e5c0a of _0x2053b7){const _0x29fbc={'type':'button','model':new rt({'label':_0x2e5c0a['name'],'class':_0x2e5c0a['class'],'withText':!0x0,'role':'menuitem','_action':_0x2e5c0a['action']})};_0x29fbc['model']['bind']('isEnabled')['to'](_0x58a720,'isActionsDropdownOpen',_0x5660a7=>'function'!=typeof _0x2e5c0a['isEnabled']||(!_0x5660a7||_0x2e5c0a['isEnabled'](_0x58a720))),_0x2c0003['add'](_0x29fbc);}return _0x2c0003;}(_0x1125bc,_0xa54c5e);return _0x1125bc['bind']('isActionsDropdownOpen')['to'](_0x249c94,'isOpen'),_0x249c94['buttonView']['set']({'label':ft(_0x132f1b,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x917af3}),_0x249c94['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1258a1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1258a1['to'](_0x3fa1c0=>_0x3fa1c0['stopPropagation']())}}),_0x249c94['on']('execute',_0x3e2a9d=>{_0x1125bc['isReady']&&'function'==typeof _0x3e2a9d['source']['_action']&&_0x3e2a9d['source']['_action'](_0x1125bc);}),ot(_0x249c94,_0xf73bfa,{'role':'menu'}),_0x249c94['listenTo'](_0x1125bc,'change:isActionsDropdownOpen',(_0x115d95,_0xe70844,_0x3fa253)=>{if(_0x3fa253)for(const _0x51738b of _0x249c94['listView']['items']){const _0x36c83a=_0x51738b['children']['first'],_0x5f2975=_0xa54c5e['find'](_0xc53aa0=>_0xc53aa0['action']===_0x36c83a['_action'])['isVisible'];_0x51738b['isVisible']=void 0x0===_0x5f2975||_0x5f2975(_0x1125bc);}}),_0x249c94;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x4d06b1(_0x155b5e){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0xd02da4,_0x471b8f,_0x2d0f21,_0x32e145){super(_0xd02da4);const _0x34efed=this['bindTemplate'],_0x23962d=function(_0x8d27ed,_0x1184be){const _0x2d91eb=Array['from'](_0x1184be['authors'])['filter'](_0x26c9e3=>_0x26c9e3!=_0x1184be['creator']);return _0x1184be['creator']&&_0x2d91eb['unshift'](_0x1184be['creator']),_0x2d91eb['map'](_0x11fa54=>new RevisionAuthorView(_0x8d27ed,_0x11fa54,_0x11fa54==_0x1184be['creator']));}(_0xd02da4,_0x471b8f);this['id']=_0x471b8f['id'],this['_revision']=_0x471b8f,this['_requireRevisionName']=_0x32e145,this['bind']('name','createdAt')['to'](_0x471b8f),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x313f30=>{return _0x4cc6e7=_0xd02da4['uiLanguage'],(_0x27bf72=_0x313f30)['toLocaleDateString'](_0x4cc6e7,{'month':'long','day':'numeric'})+',\x20'+_0x27bf72['toLocaleTimeString'](_0x4cc6e7,{'hour':'numeric','minute':'numeric'});var _0x4cc6e7,_0x27bf72;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0xd02da4,_0x50c24b),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x5712e4=>_0x5712e4||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x4b70fa,_0x132731)=>_0x4b70fa&&_0x132731),this['revisionActionsView']=_0x2d0f21&&_0x2d0f21['length']?Rt(this,_0x2d0f21):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x34efed['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x34efed['if']('isEnabled','ck-disabled',_0x1bdcc0=>!_0x1bdcc0),_0x34efed['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x34efed['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x34efed['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':_0x34efed['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':_0x23962d}]},this['revisionActionsView']],'on':{'click':_0x34efed['to'](_0x130033=>{_0x130033['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x54f32d=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x54f32d,'change',()=>{this['_requireRevisionName']&&!_0x54f32d['value']||this['fire']('setName',{'id':this['id'],'name':_0x54f32d['value']}),_0x54f32d['value']||(_0x54f32d['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(_0xbdb95,_0x2c3129){const _0x379dcb=vt['fromJSDate'](_0xbdb95)['setLocale'](_0x2c3129),_0x4eb497=vt['local'](),_0x1d1d8b=_0x4eb497['minus']({'days':0x1})['startOf']('day');let _0x365e8a,_0x1905ee;return _0x379dcb['hasSame'](_0x4eb497,'day')?(_0x365e8a=_0x379dcb['startOf']('day')['toJSDate'](),_0x1905ee=_0x379dcb['toRelativeCalendar']()):_0x379dcb['hasSame'](_0x1d1d8b,'day')?(_0x365e8a=_0x1d1d8b['toJSDate'](),_0x1905ee=_0x379dcb['toRelativeCalendar']()):_0x379dcb['hasSame'](_0x4eb497,'week')?(_0x365e8a=_0x379dcb['startOf']('week')['toJSDate'](),_0x1905ee=_0x379dcb['weekdayLong']||''):_0x379dcb['hasSame'](_0x4eb497,'year')?(_0x365e8a=_0x379dcb['startOf']('month')['toJSDate'](),_0x1905ee=_0x379dcb['monthLong']||''):(_0x365e8a=_0x379dcb['startOf']('year')['toJSDate'](),_0x1905ee=String(_0x379dcb['year'])),{'startDate':_0x365e8a,'localizedPeriodName':_0x1905ee};}class RevisionsSidebarTimePeriodView extends _0x155b5e{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x526e68,_0xc27275,_0x1a773d,_0x628413){super(_0x526e68);const _0x5c0cb8=bt(_0xc27275,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0xc27275,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1a773d,this['_requireRevisionName']=_0x628413,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':_0x5c0cb8}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x41d190){const _0x51d0df=new RevisionView(this['locale'],_0x41d190,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x51d0df);}['removeRevision'](_0x4bb058){const _0x4fa430=this['revisionViews']['find'](_0x2bd80a=>_0x2bd80a['id']===_0x4bb058['id']);this['revisionViews']['remove'](_0x4fa430);}}class RevisionsSidebarHeaderView extends _0x155b5e{constructor(_0x5e0700){super(_0x5e0700);const _0x3c6ef1=new nt();_0x3c6ef1['content']=_0x4c4c60,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x3c6ef1,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x5e0700,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x155b5e{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3cc18e,_0xfcde5c,_0x91c3,_0x5e7a83){super(_0x3cc18e);const _0x6ef818=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0xfcde5c,this['_revisionActions']=_0x91c3,this['_requireRevisionName']=_0x5e7a83,this['on']('select',(_0x56770f,_0x25966b)=>{this['fire']('revisionSelected',_0x25966b);}),this['on']('setName',(_0x397f01,_0x41ea6e)=>{this['fire']('revisionSetName',_0x41ea6e);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x3cc18e),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x6ef818['if']('isEnabled','ck-disabled',_0x5e2982=>!_0x5e2982)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x164b60 of this['_revisions'])this['_addRevision'](_0x164b60);this['_revisions']['on']('add',(_0x16e7c2,_0x1c6ee6)=>{this['_addRevision'](_0x1c6ee6);}),this['_revisions']['on']('remove',(_0x1f723b,_0x4cc503)=>{this['_removeRevision'](_0x4cc503);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x3af2fb=>_0x3af2fb['revisionViews']['map'](_0x203b51=>_0x203b51))['flat']();}['selectRevision'](_0xe4c624){for(const _0x5aefaa of this['revisionViews'])_0xe4c624&&_0xe4c624['id']===_0x5aefaa['id']?_0x5aefaa['select']():_0x5aefaa['deselect']();}['highlightRevisions'](_0x279500){for(const _0x52e16f of this['revisionViews'])_0x279500['some'](({id:_0x2bdac5})=>_0x2bdac5===_0x52e16f['id'])?_0x52e16f['highlight']():_0x52e16f['unhighlight']();}['_addRevision'](_0x124cb2){const _0x3f4e62=bt(_0x124cb2['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1e90d5=this['_getTimePeriodViewByStartDate'](_0x3f4e62);_0x1e90d5||(_0x1e90d5=new RevisionsSidebarTimePeriodView(this['locale'],_0x3f4e62,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x1e90d5)),_0x1e90d5['addRevision'](_0x124cb2);}['_removeRevision'](_0x14c8c0){const _0x3be15e=bt(_0x14c8c0['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x3be15e)['removeRevision'](_0x14c8c0);}['_getTimePeriodViewByStartDate'](_0xd1a8af){return this['timePeriodViews']['find'](_0x3b91f9=>_0x3b91f9['startDate']['getTime']()===_0xd1a8af['getTime']());}}class RevisionsSidebar extends _0x226832{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
|
|
30
|
-
_0x4eeeaf(_0x1b44a5){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x42e757,_0xa66a4d){super(_0xa66a4d),this['sourceElement']=_0x42e757,this['model']['document']['createRoot']();const _0x58f1c5=new Yt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Jt(this,_0x58f1c5);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x180d0e,_0x1c61e6){const _0x9c53c7=new this(_0x180d0e,_0x1c61e6);return await _0x9c53c7['initPlugins'](),await _0x9c53c7['ui']['init'](_0x180d0e),await _0x9c53c7['data']['init'](_0x9c53c7['config']['get']('initialData')||''),_0x9c53c7['fire']('ready'),_0x9c53c7;}}const Xt=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class zt extends _0x1f70da{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f9438){function _0x55eea4(_0x2ea3d4){return _0x2ea3d4['map'](_0x50f4ba=>String['fromCharCode'](_0x50f4ba))['join']('');}super(_0x3f9438),this['result']='end',_0x3f9438[_0x55eea4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x55eea4([0x76,0x69,0x65,0x77])][_0x55eea4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x55eea4([0x61,0x75,0x74,0x6f]),_0x3f9438[_0x55eea4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x55eea4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x55eea4([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x55eea4([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x55eea4([0x6f,0x6b])});}}class Qt extends _0x1f70da{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[pt,It];}constructor(_0xeee159){if(super(_0xeee159),!this['editor']['config']['get']('revisionHistory'))throw new _0xbbc80('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x17074e=>this['_showRevisionViewer']({..._0x17074e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x49166b=>this['_closeRevisionViewer'](_0x49166b)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3055df=>this['_restoreRevision'](_0x3055df)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x56dd5a){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x56dd5a;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4167ef){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4167ef);}['getRevision'](_0x13d43e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x13d43e);}['getRevisions'](_0x27f2a0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x27f2a0||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4e059b=this['editor'],_0x577c4a=_0x1dce1b(_0x4e059b,Xt),_0x4e3e17=_0x4e059b['plugins']['get']('RevisionTracker'),_0x2453f7=_0x4e059b['plugins']['get'](_0x19894b)['users'];return _0x577c4a['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x577c4a['lazyRoots'],(_0x577c4a['plugins']['push'](zt,St,Ht,class extends _0x1f70da{static get['requires'](){return[St,_0x19894b];}['init'](){const _0x340dd5=this['editor']['plugins']['get'](_0x19894b);for(const _0x55981f of _0x2453f7)_0x55981f['isAnonymous']||_0x340dd5['getUser'](_0x55981f['id'])||_0x340dd5['addUser'](_0x55981f);const _0x3cf0b7=_0x4e3e17['repository']['getRevisions']();let _0x2a0c6a=null;const _0x55c3fa=this['editor']['plugins']['get']('RevisionViewer');_0x55c3fa['adapter']=_0x4e3e17['adapter'],_0x55c3fa['bind']('isEnabled')['to'](_0x4e3e17),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4e059b,'isReadOnly',_0x3d1fe0=>!_0x3d1fe0);for(const _0x23f3b6 of _0x3cf0b7){const _0x1441d9=null===_0x23f3b6['creator'];if(_0x1441d9&&_0x23f3b6['toVersion']===_0x23f3b6['fromVersion'])continue;const _0x484bdc=_0x23f3b6['toJSON']();_0x55c3fa['addRevisionData'](_0x484bdc,(_0x262783,_0x5c6f95,_0xa171db)=>{if(_0x1441d9){if(_0x2a0c6a)_0x2a0c6a['_update'](_0x262783,_0x5c6f95);else{if(!_0x5c6f95){const _0x14a165=_0xa171db['toJSON']();_0x14a165['id']=_0x34aeba(),_0x4e3e17['saveRevision'](_0x14a165,_0xa171db['toVersion'])['then'](_0xeec48b=>{_0x2a0c6a=_0xeec48b;});}}}else _0x23f3b6['_update'](_0x262783,_0x5c6f95);});}}},qt),_0x577c4a);}['_enhanceShowRevisionViewerCallback'](){const _0x12112d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x16cc34=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x485ac8=this['editor']['plugins']['get']('Autosave');await _0x485ac8['save']();}else await _0x16cc34['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1295d8=this['editor']['plugins']['get']('Dialog');_0x1295d8['isOpen']&&_0x1295d8['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x391469=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x519171 of _0x391469)_0x519171['class']=_0x519171['class']?_0x519171['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x6a4bf8=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x6a4bf8&&_0x6a4bf8['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3f4a9b=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3f4a9b&&_0x3f4a9b['setAttribute']('tabindex','-1');}}const _0x3b6603=this['_getRevisionViewerEditorConfig']();return _0x12112d(_0x3b6603)['then'](_0x2970a7=>{return(this['_viewerEditor']=_0x2970a7,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'),_0x2970a7);})['catch'](_0x440f46=>(console['error'](_0x440f46),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4a7da5=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 _0xc049bb=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xc0b88 of _0xc049bb)_0xc0b88['class']='ck-tab-panel_disabled'===_0xc0b88['class']?'':_0xc0b88['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x406865=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x406865&&_0x406865['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xe75e85=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xe75e85&&_0xe75e85['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4a7da5(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3bf42c=this['editor']['plugins']['get']('Annotations');_0x3bf42c['refreshVisibility'](),_0x3bf42c['refreshPositioning']();}});});}['_showRevisionViewer'](_0x5a44a1){const _0x21a711=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2804fe=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x383ca3=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return Wt['create'](_0x383ca3,_0x5a44a1)['then'](_0x1373f5=>(_0x2804fe['style']['display']='block',_0x21a711['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1373f5));}['_closeRevisionViewer'](_0x297bc1){const _0x21bc3c=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x21bc3c['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x297bc1['destroy']();}async['_restoreRevision'](_0x3cd971){const _0x4a6182=this['editor'],_0x3b1079=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3066d6=_0x4a6182['plugins']['get']('RevisionTracker'),_0x534d19=_0x4a6182['plugins']['get']('RevisionHistoryUtils'),_0x39fa22=_0x3b1079['repository']['getRevision'](_0x3cd971);let _0x48d593,_0x2d8def,_0x3ea122;try{await _0x534d19['loadRevisionData'](_0x39fa22,this['adapter']),_0x48d593=_0x534d19['getRevisionDocumentData'](_0x39fa22),_0x2d8def=_0x534d19['getRevisionRootsAttributes'](_0x39fa22);}catch(_0x103e39){return void console['error'](_0x103e39);}_0x4a6182['model']['change'](_0x1701d8=>{for(const _0x3c9d5e of Array['from'](_0x4a6182['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1701d8['removeMarker'](_0x3c9d5e);}),_0x3b1079['isReady']=!0x1,_0x4a6182['model']['enqueueChange'](_0x2c30ea=>{_0x2c30ea['setSelection'](null),_0x2c30ea['removeSelectionAttribute'](_0x4a6182['model']['document']['selection']['getAttributeKeys']());const _0x3be8c6=Object['keys'](_0x48d593);for(const _0x16707a of _0x4a6182['model']['document']['roots'])'$graveyard'!=_0x16707a['rootName']&&_0x16707a['isAttached']()&&!_0x3be8c6['includes'](_0x16707a['rootName'])&&_0x2c30ea['detachRoot'](_0x16707a);for(const _0x4b9d3b of _0x3be8c6){let _0x3379af=_0x4a6182['model']['document']['getRoot'](_0x4b9d3b);_0x3379af&&_0x3379af['isAttached']()||(_0x3379af=_0x2c30ea['addRoot'](_0x4b9d3b));const _0xc47669=_0x2d8def[_0x4b9d3b],_0x53f782=Object['keys'](_0xc47669),_0x4ba5f5=_0x48d593[_0x4b9d3b];for(const _0x26e4f5 of _0x3379af['getAttributeKeys']())_0x53f782['includes'](_0x26e4f5)||_0x2c30ea['removeAttribute'](_0x26e4f5,_0x3379af);for(const _0xd472fe of _0x53f782)_0x2c30ea['setAttribute'](_0xd472fe,_0x2d8def[_0x4b9d3b][_0xd472fe],_0x3379af);_0x2c30ea['remove'](_0x2c30ea['createRangeIn'](_0x3379af)),_0x2c30ea['insert'](_0x4a6182['data']['parse'](_0x4ba5f5,_0x3379af),_0x3379af,0x0);}});const _0x312f84=wt(_0x4a6182['locale'],'Restored');if(_0x39fa22['name'])_0x3ea122=-0x1==_0x39fa22['name']['indexOf'](_0x312f84)?_0x312f84+':\x20'+_0x39fa22['name']:_0x39fa22['name'];else _0x3ea122=_0x312f84+':\x20'+(_0x39fa22['createdAt']['toLocaleDateString'](_0x4a6182['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x39fa22['createdAt']['toLocaleTimeString'](_0x4a6182['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3066d6['saveRevision']({'name':_0x3ea122}),_0x3b1079['isReady']=!0x0,_0x4a6182['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{Ct as RestoreRevisionCommand,vt as Revision,Qt as RevisionHistory,It as RevisionHistoryUI,mt as RevisionHistoryUtils,pt as RevisionTracker,St as RevisionViewer,Wt as RevisionViewerEditor,zt as RevisionViewerIntegration,Vt as RevisionViewerLoadingOverlay,Ht as RevisionViewerUI,gt as RevisionsRepository,qt as RevisionsSidebar,Mt as ShowChangeCommand};
|
|
29
|
+
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x3357a2){super(_0x3357a2),this['_revisionViewer']=_0x3357a2['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x80c23a=this['_revisionsRepository']['_revisions'],_0x57caf9=this['_createRevisionActions'](),_0x3792e0=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x80c23a,_0x57caf9,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',(_0x551229,_0x7d83c3)=>{_0x7d83c3['revisionViews']['on']('add',(_0x1138fa,_0x31d421)=>{_0x31d421['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)),_0x3792e0['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x5bf753=this['_revisionsRepository']['getRevision'](0x0);if(_0x5bf753){const _0xe4a409=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5bf753['id']);this['_revisionViewer']['compare'](_0x5bf753,_0xe4a409);}}['_handleRevisionSelected'](_0x5d3ded,_0x353947){const _0x3788f1=this['_revisionsRepository']['getRevision'](_0x353947['id']),_0xe8540d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3788f1['id']);this['_revisionViewer']['compare'](_0x3788f1,_0xe8540d);}['_handleRevisionSetName'](_0x231229,_0x170ba6){this['_revisionsRepository']['getRevision'](_0x170ba6['id'])['setName'](_0x170ba6['name']);}['_handleDiffChange'](_0x420526,_0x5bcf30,_0x4bce69){const _0x1aa46a=this['_revisionsRepository']['getRevisionsInDiff'](_0x4bce69);_0x1aa46a['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x1aa46a),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x1aa46a[0x0]));}['_createRevisionActions'](){const _0x3ec1a8=this['editor'],_0xc35938=RevisionsSidebar['availableRevisionActions'],_0x291e0b=_0x3ec1a8['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x291e0b['length'])return _0x291e0b['map'](_0x3bcc64=>{const _0x4b6271='string'==typeof _0x3bcc64?Object['assign']({},_0xc35938[_0x3bcc64]):_0x3bcc64;return _0x4b6271['action']=_0x4b6271['action']['bind'](this,_0x3ec1a8),_0x4b6271['isVisible']&&(_0x4b6271['isVisible']=_0x4b6271['isVisible']['bind'](this,_0x3ec1a8)),_0x4b6271;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x3c9388},_0xbbc378)=>{const _0x3a0baf=_0x3c9388['get'](RevisionViewer),_0x142b83=_0x3a0baf['repository'];let _0x3c5a9a=_0x3a0baf['diff']['newRevisionId'],_0x1e0f7f=_0xbbc378['id'];_0x142b83['getIndex'](_0x3c5a9a)>_0x142b83['getIndex'](_0x1e0f7f)&&([_0x3c5a9a,_0x1e0f7f]=[_0x1e0f7f,_0x3c5a9a]),_0x3a0baf['compare'](_0x3c5a9a,_0x1e0f7f);},'isVisible':({plugins:_0x3d8edf},_0x580d4d)=>{const _0x1f2eef=_0x3d8edf['get'](RevisionViewer);return!(_0x1f2eef['repository']['getRevisionsInDiff'](_0x1f2eef['diff'])['length']>0x2)&&!_0x580d4d['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4032a7,{id:_0x507c6a})=>{_0x4032a7['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x507c6a);},'isVisible':({plugins:_0x107cc3},_0x283cbe)=>!!_0x107cc3['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x283cbe['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x13bc14},{id:_0x509600,revisionNameView:_0x4ee823})=>{const _0x4cedb1=_0x13bc14['get'](RevisionViewer),_0x419c35=_0x4cedb1['repository']['getEarlierVisibleRevision'](_0x509600);_0x4cedb1['compare'](_0x509600,_0x419c35),_0x4ee823['focus'](),_0x4ee823['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x17a115,_0x2537c1){super(_0x17a115),this['_view']=_0x2537c1,this['_toolbarConfig']=ht(_0x17a115['config']['get']('toolbar')),this['_elementReplacer']=new _0x4b5f5a();}get['element'](){return this['view']['element'];}['init'](_0x1ef2c9){const _0x462d57=this['editor'],_0x8f3838=this['view'],_0x4d6a2f=_0x462d57['editing']['view'],_0x22f038=_0x8f3838['editable'],_0x1f9168=_0x4d6a2f['document']['getRoot']();_0x22f038['name']=_0x1f9168['rootName'],_0x8f3838['render']();const _0x1f07d5=_0x22f038['element'];this['setEditableElement'](_0x22f038['name'],_0x1f07d5),_0x8f3838['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4d6a2f['attachDomRoot'](_0x1f07d5),this['_elementReplacer']['replace'](_0x1ef2c9,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x4b8cd8=this['view'],_0x2353f9=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x2353f9['detachDomRoot'](_0x4b8cd8['editable']['name']),_0x4b8cd8['destroy']();}['_initToolbar'](){const _0x225f25=this['view'];_0x225f25['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x225f25['stickyPanel']['limiterElement']=_0x225f25['element'],_0x225f25['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x52a4ac})=>_0x52a4ac),_0x225f25['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x225f25['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x590477,_0x57b4f8,_0x3ecda7={}){super(_0x590477),this['stickyPanel']=new ut(_0x590477),this['toolbar']=new lt(_0x590477,{'shouldGroupWhenFull':_0x3ecda7['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x590477,_0x57b4f8);}['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
|
+
_0x197c7d(_0x94765f){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1b477c,_0x5e6e4c){super(_0x5e6e4c),this['sourceElement']=_0x1b477c,this['model']['document']['createRoot']();const _0x4cb225=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x4cb225);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5b0c0d,_0x26b49d){const _0x2db6e0=new this(_0x5b0c0d,_0x26b49d);return await _0x2db6e0['initPlugins'](),await _0x2db6e0['ui']['init'](_0x5b0c0d),await _0x2db6e0['data']['init'](_0x2db6e0['config']['get']('initialData')||''),_0x2db6e0['fire']('ready'),_0x2db6e0;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x226832{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3336c7){function _0x51d30b(_0x5abd3f){return _0x5abd3f['map'](_0x40724d=>String['fromCharCode'](_0x40724d))['join']('');}super(_0x3336c7),this['result']='end',_0x3336c7[_0x51d30b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x51d30b([0x76,0x69,0x65,0x77])][_0x51d30b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x51d30b([0x61,0x75,0x74,0x6f]),_0x3336c7[_0x51d30b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x51d30b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x51d30b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x51d30b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x51d30b([0x6f,0x6b])});}}class RevisionHistory extends _0x226832{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x209124){if(super(_0x209124),!this['editor']['config']['get']('revisionHistory'))throw new _0x33164c('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x5df4f6=>this['_showRevisionViewer']({..._0x5df4f6,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x5d53ce=>this['_closeRevisionViewer'](_0x5d53ce)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x27e7c3=>this['_restoreRevision'](_0x27e7c3)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x595463){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x595463;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x6bc7bd){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x6bc7bd);}['getRevision'](_0xfdf2fe){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xfdf2fe);}['getRevisions'](_0x1f3e8a){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1f3e8a||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x2d4adf=this['editor'],_0x472fdc=_0x30d046(_0x2d4adf,It),_0x153d4d=_0x2d4adf['plugins']['get']('RevisionTracker'),_0x1c5e89=_0x2d4adf['plugins']['get'](_0x51f1bf)['users'];return _0x472fdc['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x472fdc['lazyRoots'],(_0x472fdc['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x226832{static get['requires'](){return[RevisionViewer,_0x51f1bf];}['init'](){const _0x22c8cf=this['editor']['plugins']['get'](_0x51f1bf);for(const _0x535e05 of _0x1c5e89)_0x535e05['isAnonymous']||_0x22c8cf['getUser'](_0x535e05['id'])||_0x22c8cf['addUser'](_0x535e05);const _0x4417a9=_0x153d4d['repository']['getRevisions']();let _0xcc11f=null;const _0xa64421=this['editor']['plugins']['get']('RevisionViewer');_0xa64421['adapter']=_0x153d4d['adapter'],_0xa64421['bind']('isEnabled')['to'](_0x153d4d),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2d4adf,'isReadOnly',_0x17016a=>!_0x17016a);for(const _0x12db14 of _0x4417a9){const _0x4a6c43=null===_0x12db14['creator'];if(_0x4a6c43&&_0x12db14['toVersion']===_0x12db14['fromVersion'])continue;const _0x253cb1=_0x12db14['toJSON']();_0xa64421['addRevisionData'](_0x253cb1,(_0x37096e,_0x3e4d09,_0x41f6ef)=>{if(_0x4a6c43){if(_0xcc11f)_0xcc11f['_update'](_0x37096e,_0x3e4d09);else{if(!_0x3e4d09){const _0x16cb37=_0x41f6ef['toJSON']();_0x16cb37['id']=_0x5758ef(),_0x153d4d['saveRevision'](_0x16cb37,_0x41f6ef['toVersion'])['then'](_0x18e333=>{_0xcc11f=_0x18e333;});}}}else _0x12db14['_update'](_0x37096e,_0x3e4d09);});}}},RevisionsSidebar),_0x472fdc);}['_enhanceShowRevisionViewerCallback'](){const _0xf4c04c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1b1c0e=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x13066a=this['editor']['plugins']['get']('Autosave');await _0x13066a['save']();}else await _0x1b1c0e['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x198c9c=this['editor']['plugins']['get']('Dialog');_0x198c9c['isOpen']&&_0x198c9c['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5c8ce2=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3e2933 of _0x5c8ce2)_0x3e2933['class']=_0x3e2933['class']?_0x3e2933['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x22cf37=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x22cf37&&_0x22cf37['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4a0ea0=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4a0ea0&&_0x4a0ea0['setAttribute']('tabindex','-1');}}const _0x793cd5=this['_getRevisionViewerEditorConfig']();return _0xf4c04c(_0x793cd5)['then'](_0x2a92e8=>{return(this['_viewerEditor']=_0x2a92e8,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'),_0x2a92e8);})['catch'](_0x28c941=>(console['error'](_0x28c941),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2912ba=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 _0x37aa6b=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x267974 of _0x37aa6b)_0x267974['class']='ck-tab-panel_disabled'===_0x267974['class']?'':_0x267974['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x58a810=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x58a810&&_0x58a810['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x91ade2=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x91ade2&&_0x91ade2['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2912ba(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xa47fd4=this['editor']['plugins']['get']('Annotations');_0xa47fd4['refreshVisibility'](),_0xa47fd4['refreshPositioning']();}});});}['_showRevisionViewer'](_0x411fbf){const _0x238818=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1181eb=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2341f1=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x2341f1,_0x411fbf)['then'](_0x3e30ef=>(_0x1181eb['style']['display']='block',_0x238818['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3e30ef));}['_closeRevisionViewer'](_0x3b05f6){const _0x162969=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x162969['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3b05f6['destroy']();}async['_restoreRevision'](_0x54ac29){const _0x1a4787=this['editor'],_0x49828c=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x423239=_0x1a4787['plugins']['get']('RevisionTracker'),_0x206ea8=_0x1a4787['plugins']['get']('RevisionHistoryUtils'),_0x4979d2=_0x49828c['repository']['getRevision'](_0x54ac29);let _0x51babc,_0x395a2f,_0x41ef60;try{await _0x206ea8['loadRevisionData'](_0x4979d2,this['adapter']),_0x51babc=_0x206ea8['getRevisionDocumentData'](_0x4979d2),_0x395a2f=_0x206ea8['getRevisionRootsAttributes'](_0x4979d2);}catch(_0x20f4e1){return void console['error'](_0x20f4e1);}_0x1a4787['model']['change'](_0xd469e4=>{for(const _0x2d8b41 of Array['from'](_0x1a4787['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xd469e4['removeMarker'](_0x2d8b41);}),_0x49828c['isReady']=!0x1,_0x1a4787['model']['enqueueChange'](_0x562717=>{_0x562717['setSelection'](null),_0x562717['removeSelectionAttribute'](_0x1a4787['model']['document']['selection']['getAttributeKeys']());const _0x412a06=Object['keys'](_0x51babc);for(const _0x2a8637 of _0x1a4787['model']['document']['roots'])'$graveyard'!=_0x2a8637['rootName']&&_0x2a8637['isAttached']()&&!_0x412a06['includes'](_0x2a8637['rootName'])&&_0x562717['detachRoot'](_0x2a8637);for(const _0x45436c of _0x412a06){let _0x217748=_0x1a4787['model']['document']['getRoot'](_0x45436c);_0x217748&&_0x217748['isAttached']()||(_0x217748=_0x562717['addRoot'](_0x45436c));const _0x14a7d4=_0x395a2f[_0x45436c],_0x371dfb=Object['keys'](_0x14a7d4),_0xd5ef7c=_0x51babc[_0x45436c];for(const _0x135654 of _0x217748['getAttributeKeys']())_0x371dfb['includes'](_0x135654)||_0x562717['removeAttribute'](_0x135654,_0x217748);for(const _0x2c3b41 of _0x371dfb)_0x562717['setAttribute'](_0x2c3b41,_0x395a2f[_0x45436c][_0x2c3b41],_0x217748);_0x562717['remove'](_0x562717['createRangeIn'](_0x217748)),_0x562717['insert'](_0x1a4787['data']['parse'](_0xd5ef7c,_0x217748),_0x217748,0x0);}});const _0x4f380a=ft(_0x1a4787['locale'],'Restored');if(_0x4979d2['name'])_0x41ef60=-0x1==_0x4979d2['name']['indexOf'](_0x4f380a)?_0x4f380a+':\x20'+_0x4979d2['name']:_0x4979d2['name'];else _0x41ef60=_0x4f380a+':\x20'+(_0x4979d2['createdAt']['toLocaleDateString'](_0x1a4787['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4979d2['createdAt']['toLocaleTimeString'](_0x1a4787['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x423239['saveRevision']({'name':_0x41ef60}),_0x49828c['isReady']=!0x0,_0x1a4787['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|