@ckeditor/ckeditor5-revision-history 44.0.0-alpha.5 → 44.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +6 -6
- 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/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 +8 -8
- package/src/changeitem.js +2 -2
- package/src/editor/revisionviewereditor.js +2 -2
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.js +1 -1
- package/src/revision.js +2 -2
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.js +1 -1
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x1212e4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x3e292d){super(),this['id']=_0x3e292d['id']||_0x1ced54(),this['creator']=_0x3e292d['creator']||null,this['authors']=_0x3e292d['authors']||[],this['diffData']=_0x3e292d['diffData']||null,this['toVersion']=_0x3e292d['toVersion']||0x0,this['fromVersion']=_0x3e292d['fromVersion']||0x0,this['set']('name',_0x3e292d['name']||''),this['set']('createdAt',_0x3e292d['createdAt']||new Date()),this['set']('attributes',_0x3e292d['attributes']||{});}['setName'](_0x59bcb1){this['_update']({'name':_0x59bcb1});}['setAttribute'](_0xdfa05d,_0x49e506){const _0x208a58=_0xd15063(this['attributes']);_0xe216fa(_0x208a58,_0xdfa05d,_0x49e506),this['_update']({'attributes':_0x208a58});}['removeAttribute'](_0x2eb7a7){const _0x5aea12=_0xd15063(this['attributes']);_0x20a92e(_0x5aea12,_0x2eb7a7),this['_update']({'attributes':_0x5aea12});}['_update'](_0x257183,_0x6a8b4=!0x1){let _0x52f5a9=!0x1;const _0x502de6={'id':this['id']},_0x3d74d9=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x270e45 of _0x3d74d9){const _0x2900d9=_0x257183[_0x270e45];void 0x0!==_0x2900d9&&_0x2900d9!==this[_0x270e45]&&(this[_0x270e45]=_0x2900d9,_0x502de6[_0x270e45]=_0x2900d9,_0x52f5a9=!0x0);}_0x52f5a9&&(_0x502de6['authors']&&(_0x502de6['authorsIds']=_0x502de6['authors']['map'](_0x38030e=>_0x38030e['id']),delete _0x502de6['authors']),this['fire']('_update',_0x502de6,_0x6a8b4));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0xe1d03e=>_0xe1d03e['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x9a5545{['_revisions'];static get['requires'](){return[_0x5241b4];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x20eb18){super(_0x20eb18),this['_revisions']=new _0x2f121a();}['afterInit'](){!async function(_0x36e148){const _0x564740=_0x4f50b1([0x62,0x30,0x73,0x4f,0x68,0x74,0x53,0x6f,0x37,0x49,0x55,0x34,0x70,0x4c,0x32,0x6a,0x64,0x76,0x31,0x75,0x63,0x61,0x6c,0x56,0x4b,0x65,0x5a,0x69,0x6e,0x4e,0x44,0x33,0x6b,0x43,0x78,0x39,0x4d,0x72,0x58,0x77,0x54,0x66,0x7a,0x4a,0x59,0x47,0x51,0x50,0x6d,0x67,0x35,0x46,0x71,0x79,0x36,0x38,0x42,0x57,0x48,0x45,0x52,0x41]),_0x3cae14=0xeb829,_0x3ecc3c=0x29160cc0,_0x4d65e2=0x29115b20^_0x3ecc3c,_0x2d8397=window[_0x4f50b1([0x44,0x61,0x74,0x65])][_0x4f50b1([0x6e,0x6f,0x77])](),_0x2efc27=_0x36e148[_0x4f50b1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5c618a=new window[(_0x4f50b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5bae80=>{_0x2efc27[_0x4f50b1([0x6f,0x6e,0x63,0x65])](_0x4f50b1([0x72,0x65,0x61,0x64,0x79]),_0x5bae80);}),_0x443165={[_0x4f50b1([0x6b,0x74,0x79])]:_0x4f50b1([0x45,0x43]),[_0x4f50b1([0x75,0x73,0x65])]:_0x4f50b1([0x73,0x69,0x67]),[_0x4f50b1([0x63,0x72,0x76])]:_0x4f50b1([0x50,0x2d,0x32,0x35,0x36]),[_0x4f50b1([0x78])]:_0x4f50b1([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]),[_0x4f50b1([0x79])]:_0x4f50b1([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]),[_0x4f50b1([0x61,0x6c,0x67])]:_0x4f50b1([0x45,0x53,0x32,0x35,0x36])},_0x2d1332=_0x2efc27[_0x4f50b1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f50b1([0x67,0x65,0x74])](_0x4f50b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe7b31e(){let _0x308f5d,_0x33c268=null,_0x276938=null;try{if(_0x2d1332==_0x4f50b1([0x47,0x50,0x4c]))return _0x4f50b1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x308f5d=_0x2c0ce4(),!_0x308f5d)return _0x4f50b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x308f5d[_0x4f50b1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x276938=_0x1cc86d(_0x308f5d[_0x4f50b1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x308f5d[_0x4f50b1([0x6a,0x74,0x69])])),await _0x3b4b59()?_0x27058f()?_0x3aa300()?_0x4f50b1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4f2bbf()?(_0x308f5d[_0x4f50b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f50b1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x33c268=_0x4bff2c(_0x4f50b1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x308f5d[_0x4f50b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f50b1([0x74,0x72,0x69,0x61,0x6c])&&(_0x33c268=_0x4bff2c(_0x4f50b1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x308f5d[_0x4f50b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f50b1([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x33c268=_0x4bff2c(_0x4f50b1([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x12a683()):_0x4f50b1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f50b1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f50b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x21a99d){return _0x4f50b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3aa300(){const _0x2af4a7=[_0x4f50b1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f50b1([0x74,0x72,0x69,0x61,0x6c])][_0x4f50b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x308f5d[_0x4f50b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2d8397/0x3e8:0xe10*_0x4d65e2;return _0x308f5d[_0x4f50b1([0x65,0x78,0x70])]<_0x2af4a7;}function _0x27058f(){const _0x11f6bf=_0x308f5d[_0x4f50b1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x11f6bf&&(!!_0x11f6bf[_0x4f50b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f50b1([0x2a]))||(!!_0x11f6bf[_0x4f50b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f50b1([0x52,0x48]))||!(!_0x11f6bf[_0x4f50b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f50b1([0x52,0x52,0x48]))||!_0x4ea81b())));}function _0x4f2bbf(){const _0x119b9d=_0x308f5d[_0x4f50b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x119b9d||0x0==_0x119b9d[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x529d99}=new URL(window[_0x4f50b1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x119b9d[_0x4f50b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x529d99))return!0x0;const _0x36df3e=_0x529d99[_0x4f50b1([0x73,0x70,0x6c,0x69,0x74])](_0x4f50b1([0x2e]));return _0x119b9d[_0x4f50b1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x198c07=>_0x198c07[_0x4f50b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f50b1([0x2a])))[_0x4f50b1([0x6d,0x61,0x70])](_0x9f920=>_0x9f920[_0x4f50b1([0x73,0x70,0x6c,0x69,0x74])](_0x4f50b1([0x2e])))[_0x4f50b1([0x73,0x6f,0x6d,0x65])](_0x5ceccd=>_0x36df3e[_0x4f50b1([0x65,0x76,0x65,0x72,0x79])]((_0x17ead8,_0x43ae7d)=>_0x5ceccd[_0x43ae7d]===_0x17ead8||_0x5ceccd[_0x43ae7d]===_0x4f50b1([0x2a])));}function _0x12a683(){return _0x33c268&&_0x276938?new window[(_0x4f50b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x533776,_0x2e47d8)=>{_0x33c268[_0x4f50b1([0x74,0x68,0x65,0x6e])](_0x533776,_0x2e47d8),_0x276938[_0x4f50b1([0x74,0x68,0x65,0x6e])](_0x269128=>{_0x269128!=_0x4f50b1([0x56,0x61,0x6c,0x69,0x64])&&_0x533776(_0x269128);},_0x2e47d8);}):_0x33c268||_0x276938||_0x4f50b1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1cc86d(_0x2c8aab,_0x141903){return new window[(_0x4f50b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f865d=>{if(_0x55f01b())return _0x1f865d(_0x4f50b1([0x56,0x61,0x6c,0x69,0x64]));_0x54669c(),_0x2efc27[_0x4f50b1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f50b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4780ed=!0x1;const _0x2f2edf=_0x1ced54();function _0x236631(_0x30b89b){return!!_0x30b89b&&(typeof _0x30b89b===_0x4f50b1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x30b89b===_0x4f50b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x30b89b[_0x4f50b1([0x74,0x68,0x65,0x6e])]===_0x4f50b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x30b89b[_0x4f50b1([0x63,0x61,0x74,0x63,0x68])]===_0x4f50b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4e2612(_0x499309){_0x27c590(_0x499309)[_0x4f50b1([0x74,0x68,0x65,0x6e])](_0x5a52b3=>{if(!_0x5a52b3||_0x5a52b3[_0x4f50b1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f50b1([0x6f,0x6b]))return _0x4f50b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4b5d11(_0x5c6119(_0x2f2edf+_0x141903))!=_0x5a52b3[_0x4f50b1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f50b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f50b1([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f50b1([0x74,0x68,0x65,0x6e])](_0x3658c6=>(_0x396ddb(),_0x3658c6),()=>{const _0x9b0e40=_0x35724d();return null==_0x9b0e40?(_0x396ddb(),_0x4f50b1([0x56,0x61,0x6c,0x69,0x64])):_0x4f50b1(_0x2d8397-_0x9b0e40>(0xd1a88c0^_0x3ecc3c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f50b1([0x74,0x68,0x65,0x6e])](_0x1f865d)[_0x4f50b1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1f865d(_0x4f50b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x429bc2=0x2920e240^_0x3ecc3c;function _0x396ddb(){const _0x267576=_0x4f50b1([0x6c,0x6c,0x63,0x74,0x2d])+_0x4b5d11(_0x5c6119(_0x2c8aab)),_0x1251fd=_0x5102d9(_0x4b5d11(window[_0x4f50b1([0x4d,0x61,0x74,0x68])][_0x4f50b1([0x63,0x65,0x69,0x6c])](_0x2d8397/_0x429bc2)));window[_0x4f50b1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f50b1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x267576,_0x1251fd);}function _0x35724d(){const _0x375c32=_0x4f50b1([0x6c,0x6c,0x63,0x74,0x2d])+_0x4b5d11(_0x5c6119(_0x2c8aab)),_0xa575ff=window[_0x4f50b1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f50b1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x375c32);return _0xa575ff?window[_0x4f50b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5102d9(_0xa575ff),0x10)*_0x429bc2:null;}function _0x27c590(_0x207a8b){return new window[(_0x4f50b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x34bc25,_0x55da7c)=>{_0x207a8b[_0x4f50b1([0x74,0x68,0x65,0x6e])](_0x34bc25,_0x55da7c),window[_0x4f50b1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x55da7c,0x2917d800^_0x3ecc3c);});}}_0x2efc27[_0x4f50b1([0x6f,0x6e])](_0x4f50b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2d127f,_0x75c61c)=>{if(_0x75c61c[0x0]!=_0x2c8aab)return _0x1f865d(_0x4f50b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x75c61c[0x1]={..._0x75c61c[0x1],[_0x4f50b1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2f2edf};},{[_0x4f50b1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f50b1([0x68,0x69,0x67,0x68])}),_0x2efc27[_0x4f50b1([0x6f,0x6e])](_0x4f50b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4f428a=>{_0x236631(_0x4f428a[_0x4f50b1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4780ed=!0x0,_0x4e2612(_0x4f428a[_0x4f50b1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f50b1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f50b1([0x6c,0x6f,0x77])}),_0x5c618a[_0x4f50b1([0x74,0x68,0x65,0x6e])](()=>{_0x4780ed||_0x1f865d(_0x4f50b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x55f01b(){return _0x2efc27[_0x4f50b1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f50b1([0x76,0x69,0x65,0x77])][_0x4f50b1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f50b1([0x61,0x75,0x74,0x6f]);}function _0x54669c(){_0x2efc27[_0x4f50b1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f50b1([0x76,0x69,0x65,0x77])][_0x4f50b1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f50b1([0x61,0x75,0x74,0x6f]);}}function _0x4bff2c(_0x7cb3e){const _0x3c906e=[new window[(_0x4f50b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3780c4=>setTimeout(_0x3780c4,0x291f320c^_0x3ecc3c)),_0x5c618a[_0x4f50b1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f50b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a4cc7=>{const _0x3eb300=0x29160cc7^_0x3ecc3c,_0x53e1e0=_0x36e148[_0x4f50b1([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x125f5e(){_0x53e1e0[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x3eb300&&_0x5a4cc7();}_0x125f5e(),_0x53e1e0[_0x4f50b1([0x6f,0x6e])](_0x4f50b1([0x61,0x64,0x64]),_0x125f5e);})),new window[(_0x4f50b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xcafe2f=>{function _0x4e6f9b(){for(const _0x4a72e3 in window)if(window[_0x4f50b1([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4f50b1([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4a72e3))&&window[_0x4a72e3]==_0x3cae14)return _0xcafe2f();_0x2efc27[_0x4f50b1([0x73,0x74,0x61,0x74,0x65])]!=_0x4f50b1([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4f50b1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4e6f9b,0x29161f48^_0x3ecc3c);}_0x20b07d(_0x4f50b1([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x4e6f9b();})];return window[_0x4f50b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f50b1([0x72,0x61,0x63,0x65])](_0x3c906e)[_0x4f50b1([0x74,0x68,0x65,0x6e])](()=>_0x7cb3e);}async function _0x4542d4(){if(await _0x5c618a,_0x20b07d(_0x4f50b1([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x5a9905=_0x36e148[_0x4f50b1([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x749ee=_0x36e148[_0x4f50b1([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])](_0x5a9905[_0x4f50b1([0x69,0x64])]),_0x26f0fb=_0x183142(_0x4f50b1([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x26f0fb[_0x4f50b1([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x5a9905['id'],_0x749ee?_0x749ee['id']:null,!0x0),_0x26f0fb[_0x4f50b1([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4f50b1([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x26f0fb[_0x4f50b1([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x26f0fb[_0x4f50b1([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x508bb8,void(_0x26f0fb[_0x4f50b1([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x508bb8);}if(_0x20b07d(_0x4f50b1([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x5d6d87=_0x183142(_0x4f50b1([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x5d6d87[_0x4f50b1([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4f50b1([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5d6d87[_0x4f50b1([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5d6d87[_0x4f50b1([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x508bb8,_0x5d6d87[_0x4f50b1([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x508bb8;}_0x2efc27[_0x4f50b1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f50b1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x508bb8,_0x2efc27[_0x4f50b1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f50b1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x508bb8,_0x2efc27[_0x4f50b1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f50b1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4ea81b(){return _0x20b07d(_0x4f50b1([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x183142(_0x4f50b1([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4f50b1([0x73,0x74,0x61,0x74,0x65])]==_0x4f50b1([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x287a9c(_0x3739ef){const _0x524a84=_0x31fb17();_0x2efc27[_0x524a84]=_0x4f50b1([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])+_0x3739ef,_0x3739ef[_0x4f50b1([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4f50b1([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x31fb17()]=_0x3cae14),_0x3739ef!=_0x4f50b1([0x56,0x61,0x6c,0x69,0x64])&&_0x4542d4();}function _0x31fb17(){const _0x56d6a0=window[_0x4f50b1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f50b1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f50b1([0x6e,0x6f,0x77])]())[_0x4f50b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f50b1([0x2e]),'');let _0x408500=_0x4f50b1([0x62]);for(let _0x3f6fc4=0x0;_0x3f6fc4<_0x56d6a0[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3f6fc4+=0x2){let _0x5a2d1e=window[_0x4f50b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56d6a0[_0x4f50b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3f6fc4,_0x3f6fc4+0x2));_0x5a2d1e>=_0x564740[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5a2d1e-=_0x564740[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x408500+=_0x564740[_0x5a2d1e];}return _0x408500;}function _0x2c0ce4(){const _0x16acfa=_0x2d1332[_0x4f50b1([0x73,0x70,0x6c,0x69,0x74])](_0x4f50b1([0x2e]));if(0x3!=_0x16acfa[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1ce748(_0x16acfa[0x1]);function _0x1ce748(_0x338e46){const _0x1e8954=_0x389842(_0x338e46);return _0x1e8954&&_0x1d5be2()?_0x1e8954:null;function _0x1d5be2(){const _0x510844=_0x1e8954[_0x4f50b1([0x6a,0x74,0x69])],_0x30a62a=window[_0x4f50b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x510844[_0x4f50b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x510844[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x48d158={..._0x1e8954,[_0x4f50b1([0x6a,0x74,0x69])]:_0x510844[_0x4f50b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x510844[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x48d158[_0x4f50b1([0x76,0x63])],_0x5c6119(_0x48d158)==_0x30a62a;}}}async function _0x3b4b59(){let _0x29cf83=!0x0;try{const _0x55782d=_0x2d1332[_0x4f50b1([0x73,0x70,0x6c,0x69,0x74])](_0x4f50b1([0x2e])),[_0x541a01,_0x46327b,_0x944afc]=_0x55782d;return _0x55dfeb(_0x541a01),await _0x27c3d9(_0x541a01,_0x46327b,_0x944afc),_0x29cf83;}catch(_0x4971fc){return!0x1;}function _0x55dfeb(_0x21328a){const _0xf846f2=_0x389842(_0x21328a);_0xf846f2&&_0xf846f2[_0x4f50b1([0x61,0x6c,0x67])]==_0x4f50b1([0x45,0x53,0x32,0x35,0x36])||(_0x29cf83=!0x1);}async function _0x27c3d9(_0x793f22,_0x529985,_0x391d05){const _0x50e4bc=window[_0x4f50b1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f50b1([0x66,0x72,0x6f,0x6d])](_0x3c377b(_0x391d05),_0x82d19c=>_0x82d19c[_0x4f50b1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2181da=new window[(_0x4f50b1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f50b1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x793f22+_0x4f50b1([0x2e])+_0x529985),_0xa4c199=window[_0x4f50b1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f50b1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xa4c199)return;const _0x4632f9=await _0xa4c199[_0x4f50b1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f50b1([0x6a,0x77,0x6b]),_0x443165,{[_0x4f50b1([0x6e,0x61,0x6d,0x65])]:_0x4f50b1([0x45,0x43,0x44,0x53,0x41]),[_0x4f50b1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f50b1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f50b1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xa4c199[_0x4f50b1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f50b1([0x6e,0x61,0x6d,0x65])]:_0x4f50b1([0x45,0x43,0x44,0x53,0x41]),[_0x4f50b1([0x68,0x61,0x73,0x68])]:{[_0x4f50b1([0x6e,0x61,0x6d,0x65])]:_0x4f50b1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4632f9,_0x50e4bc,_0x2181da)||(_0x29cf83=!0x1);}}function _0x389842(_0x55bac2){return _0x55bac2[_0x4f50b1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f50b1([0x65,0x79]))?JSON[_0x4f50b1([0x70,0x61,0x72,0x73,0x65])](_0x3c377b(_0x55bac2)):null;}function _0x3c377b(_0x45c12f){return window[_0x4f50b1([0x61,0x74,0x6f,0x62])](_0x45c12f[_0x4f50b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f50b1([0x2b]))[_0x4f50b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f50b1([0x2f])));}function _0x5c6119(_0x1c8675){let _0x69b08b=0x1505;function _0x536316(_0x5ba64d){for(let _0x294200=0x0;_0x294200<_0x5ba64d[_0x4f50b1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x294200++){const _0x16c861=_0x5ba64d[_0x4f50b1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x294200);_0x69b08b=(_0x69b08b<<0x5)+_0x69b08b+_0x16c861,_0x69b08b&=_0x69b08b;}}function _0x4c3b8f(_0x47d968){Array[_0x4f50b1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x47d968)?_0x47d968[_0x4f50b1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4c3b8f):_0x47d968&&typeof _0x47d968==_0x4f50b1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f50b1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x47d968)[_0x4f50b1([0x73,0x6f,0x72,0x74])]()[_0x4f50b1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x7582e5,_0x556d2c])=>{_0x536316(_0x7582e5),_0x4c3b8f(_0x556d2c);}):_0x536316(window[_0x4f50b1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x47d968));}return _0x4c3b8f(_0x1c8675),_0x69b08b>>>0x0;}function _0x4b5d11(_0x3bc980){return _0x3bc980[_0x4f50b1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f50b1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f50b1([0x30]));}function _0x5102d9(_0x2ff206){return _0x2ff206[_0x4f50b1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f50b1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f50b1([0x6a,0x6f,0x69,0x6e])]('');}function _0x20b07d(_0x1a163e){return _0x2efc27[_0x4f50b1([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f50b1([0x68,0x61,0x73])](_0x1a163e);}function _0x183142(_0x1fdfdb){return _0x2efc27[_0x4f50b1([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f50b1([0x67,0x65,0x74])](_0x1fdfdb);}function _0x508bb8(){}function _0x4f50b1(_0x311dab){return _0x311dab['map'](_0x1087ab=>String['fromCharCode'](_0x1087ab))['join']('');}_0x287a9c(await _0xe7b31e());}(this);}['createRevision'](_0x5d57a5){const _0x1ee771=this['editor']['plugins']['get']('Users');return new a({'id':_0x5d57a5['id'],'name':_0x5d57a5['name'],'creator':_0x5d57a5['creatorId']?_0x1ee771['getUser'](_0x5d57a5['creatorId']):null,'diffData':_0x5d57a5['diffData']||_0x5d57a5['data'],'authors':_0x5d57a5['authorsIds']['map'](_0xe8a8ca=>_0x1ee771['getUser'](_0xe8a8ca)),'createdAt':new Date(_0x5d57a5['createdAt']),'attributes':_0x5d57a5['attributes'],'fromVersion':_0x5d57a5['fromVersion'],'toVersion':_0x5d57a5['toVersion']});}['addRevision'](_0x33f324,_0x5300d8=0x0){this['_revisions']['add'](_0x33f324,_0x5300d8);}['getRevision'](_0x1184e5){return this['_revisions']['get'](_0x1184e5);}['getRevisions'](_0x11c25a={'toJSON':!0x1}){const _0xfcc66=Array['from'](this['_revisions']);return _0xfcc66['reverse'](),_0x11c25a['toJSON']?_0xfcc66['map'](_0x460776=>_0x460776['toJSON']()):_0xfcc66;}['getIndex'](_0x4eccd4){return this['_revisions']['getIndex'](_0x4eccd4);}['getEarlierVisibleRevision'](_0x3ebe5f){const [,_0x45e6ea]=this['getRevisionsIterator'](_0x3ebe5f,{'direction':'earlier'});return _0x45e6ea;}['getLaterVisibleRevision'](_0xb9c4ef){const [,_0x59e670]=this['getRevisionsIterator'](_0xb9c4ef,{'direction':'later'});return _0x59e670;}['getRevisionsInDiff'](_0x21a5d4){const _0x1b703b=[];for(const _0x10d506 of this['getRevisionsIterator'](_0x21a5d4['newRevisionId']))if(_0x1b703b['push'](_0x10d506),_0x10d506['id']===_0x21a5d4['oldRevisionId'])break;return _0x1b703b;}*['getRevisionsIterator'](_0x3f67de,{direction:_0x1e46ca='earlier',filter:_0x31650f=()=>!0x0}={}){const _0x357040='earlier'===_0x1e46ca?0x1:-0x1;let _0x38f41a=this['_revisions']['get'](_0x3f67de),_0x45e251=this['getIndex'](_0x38f41a);for(yield _0x38f41a;_0x38f41a;){if(_0x45e251+=_0x357040,_0x38f41a=this['getRevision'](_0x45e251),!_0x38f41a)return;_0x31650f(_0x38f41a)&&(yield _0x38f41a);}}}function R(_0x4451aa,_0xf04b54,_0xb35b1d){const t=_0x4451aa['t'];switch(_0xf04b54){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'},_0xb35b1d);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xb35b1d);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const C={'c':_0x4221dd,'a':_0x414029,'e':_0x452337,'r':_0x3497f3,'u':_0xa39994};class l extends _0x9a5545{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5241b4,j,_0xf8d3ba];}constructor(_0x4b6197){super(_0x4b6197),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new T(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2e2abc=_0x1ced54();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2e2abc},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x17a5c9=this['repository']['getRevision'](0x0),_0x11e90c=_0x17a5c9&&null===_0x17a5c9['creator']?_0x17a5c9:null;if(this['_continueCurrentRevision']=!!_0x11e90c&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x54e0a5=this['_source']['getCurrentRevisionId'](),_0x452314=this['repository']['getRevision'](_0x54e0a5);if(_0x452314)this['_startingVersion']=_0x452314['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x35e2ba=this['_source']['history']['_operations']['find'](_0xd59e77=>!_0xd59e77['_isInit']),_0x4f157b=_0x35e2ba?_0x35e2ba['baseVersion']:this['_source']['history']['version'];_0x17a5c9?(_0x17a5c9['toVersion']<_0x4f157b&&_0x17a5c9['_update']({'toVersion':_0x4f157b}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x11e90c['id'],this['_startingVersion']=_0x11e90c['fromVersion']):(this['_startingVersion']=_0x17a5c9['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4f157b,this['_continueCurrentRevision']=!0x1);}}else _0x11e90c&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x11e90c['toVersion'],this['editor']['model']['document']['history']['version']),_0x11e90c['fromVersion']===_0x11e90c['toVersion']?(0x0!==_0x11e90c['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x11e90c['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x11e90c['id'],this['_startingVersion']=_0x11e90c['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',_0x572a12=>!_0x572a12),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x369a29=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x514078;for(const _0x51ad47 in _0x369a29){const _0x19817a=_0x51ad47,_0x2fd0aa=_0x369a29[_0x19817a];if('revisionHistoryLicenseKeyValid'==_0x2fd0aa||'revisionHistoryLicenseKeyInvalid'==_0x2fd0aa||'revisionHistoryLicenseKeyExpired'==_0x2fd0aa||'revisionHistoryLicenseKeyDomainLimit'==_0x2fd0aa||'revisionHistoryLicenseKeyNotAllowed'==_0x2fd0aa||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2fd0aa||'revisionHistoryLicenseKeyTrialLimit'==_0x2fd0aa||'revisionHistoryLicenseKeyDevelopmentLimit'==_0x2fd0aa||'revisionHistoryLicenseKeyUsageLimit'==_0x2fd0aa){delete _0x369a29[_0x19817a],_0x514078=_0x2fd0aa,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x514078&&_0x369a29['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x514078&&_0x369a29['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x514078&&_0x369a29['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x514078&&_0x369a29['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x514078&&_0x369a29['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x514078&&_0x369a29['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyDevelopmentLimit'==_0x514078&&_0x369a29['_showLicenseError']('developmentLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x514078&&_0x369a29['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x257a1f=this['repository']['getRevision'](0x0),_0xcc3649=await this['getRevisionDocumentData'](_0x257a1f),_0xc68c1=await this['getRevisionRootsAttributes'](_0x257a1f);this['_replaceEditorDataWithRevisionData'](_0xcc3649,_0xc68c1);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x23bc83){this['_source']=_0x23bc83;}async['update'](){const _0x320a4c=await this['_source']['getLatestVersion']();if(_0x320a4c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3116a7=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x320a4c});_0x3116a7['authors']=_0x3116a7['authorsIds']['map'](_0x1cc378=>this['editor']['plugins']['get']('Users')['getUser'](_0x1cc378)),this['currentRevision']['_update'](_0x3116a7);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x1e2f02={},_0x2588ed=null){const _0x293239=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2588ed>this['currentRevision']['toVersion']&&(_0x2588ed=null),null===_0x2588ed&&(_0x2588ed=await this['_source']['getLatestVersion']());const _0x45defb=this['_getFromVersion'](_0x2588ed),_0x4b3002=this['buildRevisionData']({'from':_0x45defb,'to':_0x2588ed});if(this['currentRevision']['toVersion']<_0x2588ed){const _0x2a7d9c=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2588ed,'to':_0x2588ed});_0x2a7d9c['authors']=[],_0x2a7d9c['authorsIds']=[],_0x2a7d9c['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2a7d9c,!0x0),delete _0x2a7d9c['authors'],_0x293239['push'](_0x2a7d9c);}_0x1e2f02['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1e2f02['name']=_0x1e2f02['name']||null,_0x1e2f02['id']=_0x1e2f02['id']||_0x1ced54(),_0x1e2f02={..._0x1e2f02,..._0x4b3002};const _0x262452=this['addRevisionData'](_0x1e2f02);_0x293239['push'](_0x1e2f02);const _0x49b7c3=this['repository']['getIndex'](_0x262452);if(0x0!==_0x49b7c3){const _0x640c4a=this['repository']['getRevision'](_0x49b7c3-0x1);if(_0x640c4a['fromVersion']!==_0x2588ed){const _0x103f4b=this['_revisionDataBuilder']['getData'](_0x2588ed,_0x640c4a['toVersion']),_0x54d7a8={'id':_0x640c4a['id'],'diffData':_0x103f4b['diffData'],'authorsIds':_0x103f4b['authorsIds'],'authors':_0x103f4b['authorsIds']['map'](_0x589b84=>this['editor']['plugins']['get']('Users')['getUser'](_0x589b84)),'fromVersion':_0x2588ed};_0x640c4a===this['currentRevision']&&(_0x54d7a8['createdAt']=new Date(_0x1e2f02['createdAt']['getTime']()+0xa)),_0x640c4a['_update'](_0x54d7a8,!0x0),delete _0x54d7a8['authors'],_0x293239['push'](_0x54d7a8);}}if(this['adapter']){for(const _0x3aee3c of _0x293239)this['_bufferUpdate'](_0x3aee3c['id'],_0x3aee3c,!0x0);this['sendBufferedUpdates']();}return _0x262452;}['addRevisionData'](_0x31039c){const _0x3c9f9b=this['repository']['createRevision'](_0x31039c);return this['adapter']&&_0x3c9f9b['on']('_update',(_0x5f26d7,_0x38595f,_0x19c246)=>{_0x19c246||(this['_bufferUpdate'](_0x38595f['id'],_0x38595f,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3c9f9b,this['_findInsertionIndex'](_0x3c9f9b)),_0x3c9f9b;}async['getRevisionDocumentData'](_0x59fd42){await this['_loadRevisionData'](_0x59fd42);const _0x152637={};for(const _0x157879 in _0x59fd42['diffData']){if(_0x59fd42['diffData'][_0x157879]['attachChange']&&!_0x59fd42['diffData'][_0x157879]['attachChange']['isAttached'])continue;const _0x4b6dea=this['_removeRevisionMarkers'](JSON['parse'](_0x59fd42['diffData'][_0x157879]['insertions'])),_0x1ef48f=this['editor']['editing']['view']['document'],_0x2090a6=new _0x30434f(_0x1ef48f,_0x4b6dea['map'](_0x4b61e3=>V(_0x4b61e3,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x152637[_0x157879]=this['editor']['data']['processor']['toData'](_0x2090a6),this['editor']['data']['processor']['useFillerType']('default');}return _0x152637;}async['getRevisionRootsAttributes'](_0x5263f3){await this['_loadRevisionData'](_0x5263f3);const _0x434aa5={};for(const _0x4782f8 in _0x5263f3['diffData'])_0x5263f3['diffData'][_0x4782f8]['attachChange']&&!_0x5263f3['diffData'][_0x4782f8]['attachChange']['isAttached']||(_0x434aa5[_0x4782f8]=_0x5263f3['diffData'][_0x4782f8]['attributesAfter']||{});return _0x434aa5;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1d7e76=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x806576=0x0;_0x806576<_0x1d7e76['length'];_0x806576++){const _0x19bd9f=_0x1d7e76[_0x806576];let _0x38c1d2=!0x1;for(const _0x2165c9 of Object['keys'](_0x19bd9f))void 0x0===_0x19bd9f[_0x2165c9]?delete _0x19bd9f[_0x2165c9]:'id'!==_0x2165c9&&(_0x38c1d2=!0x0);_0x38c1d2||(_0x1d7e76[_0x806576]=null);}if(_0x1d7e76=_0x1d7e76['filter'](_0x1ca83a=>null!==_0x1ca83a),!_0x1d7e76['length'])return;for(let _0x199cc4=0x0;_0x199cc4<_0x1d7e76['length'];_0x199cc4++){const _0x122b9e=_0x1d7e76[_0x199cc4];void 0x0!==_0x122b9e['fromVersion']&&void 0x0===_0x122b9e['toVersion']&&(_0x122b9e['toVersion']=this['repository']['getRevision'](_0x122b9e['id'])['toVersion']),void 0x0!==_0x122b9e['toVersion']&&void 0x0===_0x122b9e['fromVersion']&&(_0x122b9e['fromVersion']=this['repository']['getRevision'](_0x122b9e['id'])['fromVersion']);}const _0x2deaca=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1d7e76,_0x2deaca)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1fe2b4=>{if(_0x1fe2b4){for(const _0xc20de4 of _0x1fe2b4)this['setRevisionData']({'id':_0xc20de4['id'],'createdAt':_0xc20de4['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0xe4a59d,_0x353fe9){let _0x33f652=this['editor']['config']['get']('initialData'),_0x3c833=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x33f652){_0x33f652={};for(const _0x4f2881 of this['editor']['model']['document']['getRootNames']())_0x33f652[_0x4f2881]='';}if('string'==typeof _0x33f652&&(_0x33f652={'main':_0x33f652}),void 0x0===_0x3c833){_0x3c833={};for(const _0x42bd50 of this['editor']['model']['document']['getRootNames']())_0x3c833[_0x42bd50]={};}let _0x4f1b0a=!0x1;const _0x4ae45d=Object['keys'](_0x33f652),_0x590ea4=Object['keys'](_0xe4a59d);for(const _0x5a8a9f of _0x4ae45d){if(_0x33f652[_0x5a8a9f]!==_0xe4a59d[_0x5a8a9f]&&''!==_0x33f652[_0x5a8a9f]['trim']()){_0x4f1b0a=!0x0;break;}if(!_0xf460ad(_0x3c833[_0x5a8a9f],_0x353fe9[_0x5a8a9f])&&Object['keys'](_0x3c833[_0x5a8a9f])['length']>0x0){_0x4f1b0a=!0x0;break;}}_0x4f1b0a||(_0x4f1b0a=_0x590ea4['some'](_0x4118d1=>!this['editor']['model']['document']['getRoot'](_0x4118d1))),_0x4f1b0a&&_0x320a3b('editor-initial-data-replaced-with-revision-data',{'editorData':_0x33f652,'editorRootsAttributes':_0x3c833,'revisionData':_0xe4a59d,'revisionRootsAttributes':_0x353fe9}),this['editor']['config']['set']('initialData',_0xe4a59d),this['editor']['config']['set']('rootsAttributes',_0x353fe9);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x560353=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x560353['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x28f796){const _0x583c29=this['repository']['getRevisions']();_0x583c29['reverse']();let _0x557590=0x0;for(;_0x557590<_0x583c29['length'];){const _0x14b778=_0x583c29[_0x557590];if(_0x14b778===this['currentRevision']){_0x557590++;continue;}if(_0x14b778['id']===this['_initialRevisionId'])break;const _0xb738e0=_0x28f796['toVersion']-_0x14b778['toVersion']||_0x28f796['fromVersion']-_0x14b778['fromVersion'];if(_0xb738e0>0x0)break;if(_0xb738e0<0x0)_0x557590++;else{if(!_0x28f796['creator']&&_0x14b778['creator'])break;if(_0x14b778['creator']||!_0x28f796['creator']){if(_0x28f796['createdAt']>_0x14b778['createdAt'])break;_0x557590++;}else _0x557590++;}}return _0x557590;}['setRevisionData'](_0x5e442a){const _0x31fde8=this['repository']['getRevision'](_0x5e442a['id']);if(_0x5e442a['createdAt']&&(_0x5e442a['createdAt']=new Date(_0x5e442a['createdAt'])),_0x5e442a['authorsIds']){const _0x3066d2=this['editor']['plugins']['get']('Users');_0x5e442a['authors']=_0x5e442a['authorsIds']['map'](_0x313160=>_0x3066d2['getUser'](_0x313160));}_0x31fde8['_update'](_0x5e442a,!0x0);}['buildRevisionData']({revision:_0x20db19=null,from:_0x4e5a95=null,to:_0x2462b9=null}){_0x4e5a95=null!==_0x4e5a95?_0x4e5a95:_0x20db19['fromVersion'],_0x2462b9=null!==_0x2462b9?_0x2462b9:_0x20db19['toVersion'];const _0x314554=this['_revisionDataBuilder']['getData'](_0x4e5a95,_0x2462b9),_0x1c7f36={'diffData':_0x314554['diffData'],'authorsIds':_0x314554['authorsIds'],'fromVersion':_0x4e5a95,'toVersion':_0x2462b9};if(!_0x20db19||_0x2462b9!==_0x20db19['toVersion']){const _0x50e886=_0x2462b9-0x1,_0x175ed7=this['_source']['history']['getOperation'](_0x50e886);_0x1c7f36['createdAt']=_0x175ed7&&_0x175ed7['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4e5a95===this['_loadedStateData']['fromVersion']){for(const _0x2d1d8 of this['_loadedStateData']['authors'])_0x1c7f36['authorsIds']['includes'](_0x2d1d8['id'])||_0x1c7f36['authorsIds']['push'](_0x2d1d8['id']);}return _0x1c7f36;}['_loadRevisionData'](_0x49c4bf){if(!_0x49c4bf||_0x49c4bf['diffData'])return Promise['resolve']();{const _0x5e1561=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x5e1561,'revisionId':_0x49c4bf['id']})['then'](_0x158054=>{_0x49c4bf['diffData']=_0x158054['diffData'];});}}['_bufferUpdate'](_0x47617c,_0x30a90b,_0x267c0b){if(this['_bufferedUpdates']['has'](_0x47617c)){const _0x3ec4a8=this['_bufferedUpdates']['get'](_0x47617c);_0x30a90b=_0x267c0b?{..._0x3ec4a8,..._0x30a90b}:{..._0x30a90b,..._0x3ec4a8};}this['_bufferedUpdates']['set'](_0x47617c,_0x30a90b);}['_getFromVersion'](_0x4c23ac){const _0x37c4a7=this['repository']['getRevisions']();_0x37c4a7['reverse'](),_0x37c4a7['shift']();const _0x48a91b=_0x37c4a7['find'](_0x168bb6=>_0x168bb6['toVersion']<=_0x4c23ac)['toVersion'];return _0x48a91b<this['_startingVersion']?this['_startingVersion']:_0x48a91b;}['_createInitialRevision'](_0x5ce619){const _0x32e0aa=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x32e0aa)this['_initialRevisionId']=_0x32e0aa['id'];else{const _0x5d93d4=!this['editor']['model']['document']['roots']['find'](_0x399d37=>this['editor']['model']['hasContent'](_0x399d37)),_0xfa8534=this['editor']['plugins']['get']('Users')['me']['id'],_0x501c53=R(this['editor']['locale'],_0x5d93d4?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5ce619,'to':_0x5ce619,'id':this['_initialRevisionId'],'name':_0x501c53,'creatorId':_0xfa8534});}}['_createCurrentRevision'](_0x5eb640){const _0x1466fb=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1466fb),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5eb640,'to':_0x5eb640,'id':_0x1466fb,'name':'','creatorId':null}));}['_makeRevision']({name:_0x4a8d3c,from:_0xae28c6,to:_0x3c3c62,creatorId:_0x4669ee,id:_0x15bb9f}){const _0x2ab37c=this['buildRevisionData']({'from':_0xae28c6,'to':_0x3c3c62});_0x2ab37c['name']=_0x4a8d3c,_0x2ab37c['creatorId']=_0x4669ee,_0x2ab37c['id']=_0x15bb9f;const _0x16ce4a=this['addRevisionData'](_0x2ab37c);return this['adapter']&&this['_bufferUpdate'](_0x2ab37c['id'],_0x2ab37c,!0x0),_0x16ce4a;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x4f760a){return(_0x4f760a=_0x4f760a['filter'](_0x585e26=>!_0x585e26['name']||'revision-start'!==_0x585e26['name']&&'revision-end'!==_0x585e26['name']))['forEach'](_0x222b0e=>{'string'!=typeof _0x222b0e&&(_0x222b0e['children']=this['_removeRevisionMarkers'](_0x222b0e['children']),_0x222b0e['attributes']=_0x222b0e['attributes']['filter'](_0x4b57ce=>!_0x4b57ce[0x0]['startsWith']('data-revision-')));}),_0x4f760a;}}function V(_0x563f52,_0x5f5c22){const _0x472d7a=_0x5f5c22['editing']['view']['document'];if('string'==typeof _0x563f52)return new _0x5b9193(_0x472d7a,_0x563f52);{const _0x3e1c1a=_0x563f52['children']['map'](_0x42053b=>V(_0x42053b,_0x5f5c22));return new(C[_0x563f52['type']]||_0x3ff468)(_0x472d7a,_0x563f52['name'],_0x563f52['attributes'],_0x3e1c1a);}}class T{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x24541f){this['editor']=_0x24541f,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'](_0x28002b){this['source']=_0x28002b;const _0x38ac9c=new Map(),_0x5c8e57=new Map(),_0x5a3c3f=this['editor']['model']['document']['roots']['map'](_0x3d2590=>_0x3d2590['rootName']);for(const _0x4cb64a of _0x5a3c3f){const _0x445a69=this['editor']['model']['document']['getRoot'](_0x4cb64a),_0x4a30c5=F(_0x445a69);_0x38ac9c['set'](_0x4cb64a,_0x4a30c5),_0x5c8e57['set'](_0x4cb64a,Object['fromEntries'](_0x445a69['getAttributes']()));}const _0x38af73=Array['from'](this['editor']['model']['markers'])['map'](_0x5a1ed6=>[_0x5a1ed6['name'],_0x5a1ed6['getRange']()]),_0x388808=this['source']['version'];this['_saveMetaData'](_0x388808,_0x38ac9c,_0x38af73,_0x5c8e57),this['_startingRevisionId']=this['_revisionId'];const _0x198437=new Map(),_0x56a9e2=new Map();for(const _0x5d18a0 of _0x5a3c3f){const _0x595040=B(_0x5d18a0);_0x198437['set'](_0x5d18a0,_0x595040),_0x56a9e2['set'](_0x5d18a0,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x198437,[],_0x56a9e2);}['getData'](_0x36dfcf,_0xb0c92c){if(this['_lastFrom']===_0x36dfcf&&this['_lastTo']<=_0xb0c92c)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xb0c92c,!0x0);else{if(!this['_savedMetaData']['has'](_0x36dfcf)){const _0x560a81=this['_getPreviousFrom'](_0x36dfcf);this['_calculateMetaData'](_0x560a81,_0x36dfcf,!0x1);}this['_calculateMetaData'](_0x36dfcf,_0xb0c92c,!0x0);}return this['_lastFrom']=_0x36dfcf,this['_lastTo']=_0xb0c92c,this['_getState']();}['loadState'](_0x53d8fe){this['_reset'](),this['_lastFrom']=_0x53d8fe['fromVersion'],this['_lastTo']=_0x53d8fe['toVersion'];for(const _0xd98a42 in _0x53d8fe['diffData']){const _0x251172=_0x53d8fe['diffData'][_0xd98a42]['attachChange'],_0x238f86=_0xd15063(_0x53d8fe['diffData'][_0xd98a42]['attributesBefore'])||{},_0xf436e7=this['_makeModelFromViewString'](_0x53d8fe['diffData'][_0xd98a42]['deletions']);_0xf436e7['rootName']=_0xd98a42,_0xf436e7['_isAttached']=!_0x251172||!_0x251172['isAttached'],_0xf436e7['isAttached']=()=>_0xf436e7['_isAttached'],this['_baseRoots']['set'](_0xd98a42,_0xf436e7),this['_baseRootsAttributes']['set'](_0xd98a42,_0x238f86),_0x251172&&this['_touchedRoots']['set'](_0xd98a42,_0x251172);const _0xa55aed=this['_makeIdsRoot'](_0xf436e7);this['_baseIdsRoots']['set'](_0xd98a42,_0xa55aed);for(const [_0x33a898,_0x5732f8]of _0xf436e7['markers']){if(!_0x33a898['startsWith']('revision:'))continue;const _0x297b4f=_0x33a898['split'](':')[0x2];for(const _0x1b6e0f of _0x5732f8['getWalker']({'singleCharacters':!0x0})){const _0x17fd5f=this['_getVidAttributeName'](_0x1b6e0f),_0x59d79a='elementEnd'==_0x1b6e0f['type']?_0x1b6e0f['previousPosition']['path']['slice'](0x0,-0x1):_0x1b6e0f['previousPosition']['path'],_0x2328c1=_0xa55aed['getNodeByPath'](_0x59d79a)['getAttribute'](_0x17fd5f);this['_touched']['set'](_0x2328c1,{'userId':_0x297b4f});}}}this['_startingRevisionId']=this['_revisionId'];const _0x162757=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4eef4c=>!this['_touched']['has'](_0x4eef4c));let _0x27e0bf=0x0;const _0xb57577=new Map();for(const _0x529e45 in _0x53d8fe['diffData']){const _0x570621=_0x53d8fe['diffData'][_0x529e45]['attachChange'],_0xd5021c=_0xd15063(_0x53d8fe['diffData'][_0x529e45]['attributesAfter'])||{},_0x5b2118=this['_makeModelFromViewString'](_0x53d8fe['diffData'][_0x529e45]['insertions']);_0x5b2118['rootName']=_0x529e45,_0x5b2118['_isAttached']=!_0x570621||_0x570621['isAttached'],_0x5b2118['isAttached']=()=>_0x5b2118['_isAttached'],this['_diffRoots']['set'](_0x529e45,_0x5b2118),this['_diffRootsAttributes']['set'](_0x529e45,_0xd5021c);const _0x582a92=this['_makeIdsRoot'](_0x5b2118,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x529e45,_0x582a92),_0xb57577['set'](_0x529e45,_0x5b2118['isAttached']()?_0xd5021c:{});for(const [_0x28983e,_0xe375d9]of _0x5b2118['markers']){if(!_0x28983e['startsWith']('revision:'))continue;const _0x256872=_0x28983e['split'](':')[0x2];for(const _0x346b7f of _0xe375d9['getWalker']({'singleCharacters':!0x0})){const _0x29bef0=this['_getVidAttributeName'](_0x346b7f),_0x5a13be=this['_revisionId']++,_0x14d471='elementEnd'==_0x346b7f['type']?_0x346b7f['previousPosition']['path']['slice'](0x0,-0x1):_0x346b7f['previousPosition']['path'];_0x582a92['getNodeByPath'](_0x14d471)['_setAttribute'](_0x29bef0,_0x5a13be),this['_touched']['set'](_0x5a13be,{'userId':_0x256872});}}for(const _0x17e592 of this['editor']['model']['createRangeIn'](_0x5b2118)['getWalker']({'singleCharacters':!0x0})){const _0xe502fd=this['_getVidAttributeName'](_0x17e592),_0x228be5='elementEnd'==_0x17e592['type']?_0x17e592['previousPosition']['path']['slice'](0x0,-0x1):_0x17e592['previousPosition']['path'],_0x201243=_0x582a92['getNodeByPath'](_0x228be5);_0x201243['getAttribute'](_0xe502fd)>0x0||_0x201243['_setAttribute'](_0xe502fd,_0x162757[_0x27e0bf++]);}for(const [_0x10f6d7,_0xe53e22]of _0x5b2118['markers'])_0x10f6d7['startsWith']('revision:')||this['_markers']['set'](_0x10f6d7,_0xe53e22);}const _0x17ddbe=B('$graveyard');this['_baseRoots']['set']('$graveyard',_0x17ddbe),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x17ddbe,0x1));const _0x40f33c=B('$graveyard');this['_diffRoots']['set']('$graveyard',_0x40f33c),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x40f33c,0x1));const _0x105fa6=Array['from'](this['_diffRoots'])['map'](([_0x102baf,_0x377fa6])=>[_0x102baf,F(_0x377fa6)]);this['_saveMetaData'](this['_lastTo'],_0x105fa6,this['_markers'],_0xb57577);}['_makeModelFromViewString'](_0xdc683a){const _0x66104e=JSON['parse'](_0xdc683a),_0x353f86=this['editor']['editing']['view']['document'],_0x56d0a8=new _0x30434f(_0x353f86,_0x66104e['map'](_0x1aa266=>V(_0x1aa266,this['editor'])));return this['editor']['data']['toModel'](_0x56d0a8);}['_saveMetaData'](_0x206b41,_0x5b1cd4,_0x4e5dd7,_0xf43cc1){const _0x22eb59=new Map(_0x5b1cd4),_0x2cc01c=new Map(_0xd15063(_0xf43cc1)),_0x1e3cc5=new Map();for(const [_0x515dbc,_0x234db3]of _0x4e5dd7)_0x1e3cc5['set'](_0x515dbc,{'start':_0x234db3['start']['clone'](),'end':_0x234db3['end']['clone'](),'rootName':_0x234db3['root']['rootName']});this['_savedMetaData']['set'](_0x206b41,{'roots':_0x22eb59,'markers':_0x1e3cc5,'rootsAttributes':_0x2cc01c});}['_removeMetaData'](_0x4c035a){this['_savedMetaData']['delete'](_0x4c035a);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x3677e2,_0x49fb74=null){let _0x20f99c=null;_0x3677e2['is']('documentFragment')||(_0x20f99c=new ft(_0x3677e2['name'],{'vid_start':null===_0x49fb74?this['_revisionId']++:_0x49fb74++}));const _0x38eb22=[];for(const _0x4cbb54 of _0x3677e2['getChildren']())if(_0x4cbb54['is']('element')){_0x38eb22['push'](this['_makeIdsRoot'](_0x4cbb54,_0x49fb74));const _0x493f12=_0x38eb22[_0x38eb22['length']-0x1];null!==_0x49fb74&&(_0x49fb74=_0x493f12['is']('element','$text')?_0x493f12['getAttribute']('vid')+0x1:_0x493f12['getAttribute']('vid_end')+0x1);}else{for(let _0x5f3f49=0x0;_0x5f3f49<_0x4cbb54['offsetSize'];_0x5f3f49++)_0x38eb22['push'](new ft('$text',{'vid':null===_0x49fb74?this['_revisionId']++:_0x49fb74++}));}if(_0x3677e2['is']('documentFragment')){const _0x16fe45=B(_0x3677e2['rootName']);return _0x16fe45['_insertChild'](0x0,_0x38eb22),_0x16fe45;}return _0x20f99c['_setAttribute']('vid_end',null===_0x49fb74?this['_revisionId']++:_0x49fb74++),_0x20f99c['_insertChild'](0x0,_0x38eb22),_0x20f99c;}['_calculateMetaData'](_0x43cc2a,_0x3a260d,_0x3d3442){this['_reset']();const {roots:_0x17a079,markers:_0x416817,rootsAttributes:_0x42596f}=this['_savedMetaData']['get'](_0x43cc2a);this['_baseRoots']=new Map(_0x17a079),this['_baseRootsAttributes']=new Map(_0xd15063(_0x42596f));for(const [_0xd81ae0,_0x27d165]of this['_baseRoots'])if('$graveyard'!==_0xd81ae0&&(this['_diffRoots']['set'](_0xd81ae0,F(_0x27d165)),this['_diffRootsAttributes']=new Map(_0xd15063(_0x42596f)),_0x3d3442)){const _0x1f2d77=this['_revisionId'];this['_idsRoots']['set'](_0xd81ae0,this['_makeIdsRoot'](_0x27d165)),this['_baseIdsRoots']['set'](_0xd81ae0,this['_makeIdsRoot'](_0x27d165,_0x1f2d77));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',F(this['_baseRoots']['get']('$graveyard'))),_0x3d3442&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1f0dc8,_0x41884f]of _0x416817){const _0x74f1a5=this['_baseRoots']['get'](_0x41884f['rootName']),_0x35d859=this['_diffRoots']['get'](_0x41884f['rootName']),_0x2931a3=new vt(this['_fixPosition'](_0x41884f['start'],_0x74f1a5),this['_fixPosition'](_0x41884f['end'],_0x74f1a5)),_0x49efc3=this['_fixRange'](_0x2931a3,_0x35d859);_0x74f1a5['markers']['set'](_0x1f0dc8,_0x2931a3),this['_markers']['set'](_0x1f0dc8,_0x49efc3);}this['_applyOperations'](_0x43cc2a,_0x3a260d,_0x3d3442);}['_applyOperations'](_0x4f7133,_0x1554b1,_0x1d065a){for(const _0x5884e5 of this['source']['getOperations'](_0x4f7133,_0x1554b1))this['_handleOperation'](_0x5884e5,_0x1d065a);for(const _0x13245d of this['_diffRoots']['values']())_0x13245d['markers']['clear']();for(const [_0x2878eb,_0x28fc50]of this['_markers']){this['_diffRoots']['get'](_0x28fc50['root']['rootName'])['markers']['set'](_0x2878eb,_0x28fc50['clone']());}const _0x48b161=new Map(),_0x2c4f01=new Map();for(const [_0x1cd86d,_0x2c072a]of this['_diffRoots'])_0x48b161['set'](_0x1cd86d,F(_0x2c072a)),_0x2c4f01['set'](_0x1cd86d,this['_diffRootsAttributes']['get'](_0x1cd86d));this['_saveMetaData'](_0x1554b1,_0x48b161,this['_markers'],_0x2c4f01);}['_getPreviousFrom'](_0x3de369){const _0x1d087c=Array['from'](this['_savedMetaData']['keys']());_0x1d087c['sort']((_0x50de8c,_0x860ca9)=>_0x50de8c-_0x860ca9),_0x1d087c['reverse']();for(const _0x1b25be of _0x1d087c)if(_0x1b25be<_0x3de369)return _0x1b25be;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x229e18,_0x1bfbbe){const _0x35c6e6=Array['from'](_0x1bfbbe['markers'])['map'](([_0x301e36,_0x83f688])=>[_0x301e36,this['_fixRange'](_0x83f688,_0x229e18)]);_0x229e18['markers']=new Map(_0x35c6e6);}['_transformMarkers'](_0x430535){for(const _0x3ccbd5 of this['_markers']['values']()){const _0x435368=_0x3ccbd5['getTransformedByOperation'](_0x430535),_0x457937=vt['_createFromRanges'](_0x435368);_0x3ccbd5['start']=_0x457937['start'],_0x3ccbd5['end']=_0x457937['end'];}}['_handleOperation'](_0xbc77ff,_0x251fb7){if('addRoot'!=_0xbc77ff['type']&&'detachRoot'!=_0xbc77ff['type']){if('insert'==_0xbc77ff['type']){const _0x181047=_0xbc77ff['position']['root']['rootName'];this['_diffRoots']['has'](_0x181047)||(this['_diffRoots']['set'](_0x181047,B(_0x181047,!0x0)),this['_diffRootsAttributes']['set'](_0x181047,{}),_0x251fb7&&this['_idsRoots']['set'](_0x181047,B(_0x181047,!0x0)));}else{if('addRootAttribute'==_0xbc77ff['type']||'removeRootAttribute'==_0xbc77ff['type']||'changeRootAttribute'==_0xbc77ff['type'])return void this['_handleRootAttributeOperation'](_0xbc77ff);'marker'==_0xbc77ff['type']&&this['_handleMarkerOperation'](_0xbc77ff);}if('marker'!==_0xbc77ff['type']){const _0xdefa37=this['_cloneOperation'](_0xbc77ff,this['_diffRoots']);_0xdefa37['_execute'](),this['_transformMarkers'](_0xdefa37);}if(_0x251fb7)switch(_0xbc77ff['type']){case'insert':this['_handleInsertOperation'](_0xbc77ff);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xbc77ff);break;case'merge':this['_handleMergeOperation'](_0xbc77ff);break;case'split':this['_handleSplitOperation'](_0xbc77ff);}}else this['_handleRootOperation'](_0xbc77ff,_0x251fb7);}['_cloneOperation'](_0x42f707,_0x12c45e){const _0x2ac3d3=_0x42f707['clone']();return _0x2ac3d3['_authorId']=_0x42f707['_authorId'],this['_fixOperation'](_0x2ac3d3,_0x12c45e),_0x2ac3d3;}['_getBaseVids'](_0x7018a3){return _0x7018a3['map'](_0x529f95=>{const _0x28a456=this['_getVidAttributeName'](_0x529f95);return Number(_0x529f95['item']['getAttribute'](_0x28a456));});}['_generateTape'](_0x1bd8e7,_0x5e9c40){if(_0x1bd8e7['is']('element','$text'))_0x5e9c40['push']({'item':_0x1bd8e7,'type':'text'});else{_0x1bd8e7['is']('element')&&_0x5e9c40['push']({'item':_0x1bd8e7,'type':'elementStart'});for(const _0x1477c7 of _0x1bd8e7['getChildren']())this['_generateTape'](_0x1477c7,_0x5e9c40);_0x1bd8e7['is']('element')&&_0x5e9c40['push']({'item':_0x1bd8e7,'type':'elementEnd'});}return _0x5e9c40;}['_getState'](){const _0x5a1db7=new Map(this['_touched']),_0x169da6=new Map(_0x5a1db7),_0x2b4b65=new Map(),_0x203df6={'insertions':{},'deletions':{}},_0x21bfc4={'insertions':{},'deletions':{}},_0x199bec=new Map(),_0x164801=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x164801['delete']('$graveyard');for(const _0x35157b of _0x164801){const _0x417bf6=this['_diffRoots']['get'](_0x35157b)||B(_0x35157b,!0x1),_0x5e09ed=this['_baseRoots']['get'](_0x35157b)||B(_0x35157b,!0x1);_0x417bf6['isAttached']()||_0x5e09ed['isAttached']()?(_0x203df6['insertions'][_0x35157b]=F(_0x417bf6),_0x203df6['deletions'][_0x35157b]=F(_0x5e09ed),this['_copyMarkers'](_0x203df6['deletions'][_0x35157b],_0x5e09ed),this['_copyMarkers'](_0x203df6['insertions'][_0x35157b],_0x417bf6),_0x21bfc4['insertions'][_0x35157b]=this['_generateTape'](this['_idsRoots']['get'](_0x35157b),[]),_0x21bfc4['deletions'][_0x35157b]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x35157b)||B(_0x35157b,!0x1),[])):_0x164801['delete'](_0x35157b);}for(const _0x3c115d of _0x164801){const _0x3d56a4=_0x21bfc4['insertions'][_0x3c115d];for(const _0x5739d7 of _0x3d56a4){const _0x39265a=this['_getVidAttributeName'](_0x5739d7),_0x150980=_0x5739d7['item']['getAttribute'](_0x39265a);_0x169da6['delete'](_0x150980),_0x150980>=this['_startingRevisionId']&&_0x2b4b65['set'](_0x150980,_0x5a1db7['get'](_0x150980));}}for(const _0x51595f of _0x164801){const _0x74368e=_0x21bfc4['insertions'][_0x51595f],_0x32d194=this['_getBaseVids'](_0x21bfc4['deletions'][_0x51595f]);let _0x11577c=0x0;for(const _0x871ce0 of _0x74368e){const _0x95a981=this['_getVidAttributeName'](_0x871ce0),_0x145f43=_0x871ce0['item']['getAttribute'](_0x95a981);if(!_0x2b4b65['has'](_0x145f43)&&!_0x199bec['has'](_0x145f43)){if(_0x169da6['has'](_0x145f43))_0x11577c++;else{if(_0x145f43!=_0x32d194[_0x11577c]){const _0x1b62e6=_0x5a1db7['get'](_0x145f43)||_0x5a1db7['get'](_0x32d194[_0x11577c]);for(;_0x145f43!=_0x32d194[_0x11577c];)_0x169da6['has'](_0x32d194[_0x11577c])||(_0x199bec['set'](_0x32d194[_0x11577c],_0x1b62e6),_0x5a1db7['set'](_0x32d194[_0x11577c],_0x1b62e6)),_0x11577c++;}_0x11577c++;}}}}for(const _0x11f9b0 of _0x164801){const _0x35f8e6=_0x21bfc4['insertions'][_0x11f9b0];for(const _0x364158 of _0x35f8e6){const _0x3c105b=this['_getVidAttributeName'](_0x364158),_0x2e1cd6=_0x364158['item']['getAttribute'](_0x3c105b);if(_0x199bec['has'](_0x2e1cd6)){const _0xde6226=_0x199bec['get'](_0x2e1cd6);_0x169da6['has'](_0x2e1cd6)||_0x169da6['set'](_0x2e1cd6,{..._0xde6226}),_0x2b4b65['set'](_0x2e1cd6,{..._0xde6226});}}}for(const _0xcec316 of _0x169da6['keys']())_0xcec316>=this['_startingRevisionId']&&_0x169da6['delete'](_0xcec316);const _0x9d684b=new Map();for(const _0x22a4bc of _0x164801){let _0x145755=_0x21bfc4['insertions'][_0x22a4bc];for(const _0x41e486 of _0x145755)if(_0x41e486['item']['is']('element','tableCell')){const _0x1d9d1b=this['_getVidAttributeName'](_0x41e486),_0x2afb78=_0x41e486['item']['getAttribute'](_0x1d9d1b);if(_0x2b4b65['has'](_0x2afb78)){const _0x4ac1f3=_0x41e486['item']['parent']['parent']['getAttribute']('vid_start'),_0x50241c=_0x9d684b['get'](_0x4ac1f3)||new Set();_0x50241c['add'](_0x2b4b65['get'](_0x2afb78)['userId']),_0x9d684b['set'](_0x4ac1f3,_0x50241c);}}_0x145755=_0x21bfc4['deletions'][_0x22a4bc];for(const _0xa5407f of _0x145755)if(_0xa5407f['item']['is']('element','tableCell')){const _0x5b1377=this['_getVidAttributeName'](_0xa5407f),_0x5f3ee7=_0xa5407f['item']['getAttribute'](_0x5b1377);if(_0x169da6['has'](_0x5f3ee7)){const _0xcea671=_0xa5407f['item']['parent']['parent']['getAttribute']('vid_start'),_0x4ce4d=_0x9d684b['get'](_0xcea671)||new Set();_0x4ce4d['add'](_0x169da6['get'](_0x5f3ee7)['userId']),_0x9d684b['set'](_0xcea671,_0x4ce4d);}}for(const _0x2be9c1 of _0x9d684b['keys']())(_0x2b4b65['has'](_0x2be9c1)||_0x169da6['has'](_0x2be9c1))&&_0x9d684b['delete'](_0x2be9c1);}for(const _0x2d50ab of _0x164801){const _0xc9520e=_0x21bfc4['insertions'][_0x2d50ab];let _0x184e98=null,_0x27c93f=null;for(const _0x148679 of _0xc9520e){const _0xf4a7ef=this['_getVidAttributeName'](_0x148679),_0x12f8ee=_0x148679['item']['getAttribute'](_0xf4a7ef),_0x3d3c5f=_0x9d684b['get'](_0x12f8ee);_0x3d3c5f&&'elementStart'==_0x148679['type']&&(_0x184e98=Array['from'](_0x3d3c5f)[0x0],_0x27c93f=_0x148679['item']['getAttribute']('vid_end')),_0x184e98&&(_0x169da6['set'](_0x12f8ee,{'userId':_0x184e98}),_0x2b4b65['set'](_0x12f8ee,{'userId':_0x184e98})),_0x12f8ee==_0x27c93f&&(_0x184e98=null,_0x27c93f=null);}}const _0x4c991a={},_0x39f86f=new Set();for(const _0x30fd48 of _0x164801){const _0x2050b3=_0x203df6['deletions'][_0x30fd48],_0x3619cf=_0x203df6['insertions'][_0x30fd48];for(const {userId:_0x469cc6}of this['_touchedMarkers']['values']())null!==_0x469cc6&&_0x39f86f['add'](_0x469cc6);for(const {userId:_0x506483}of this['_touchedRoots']['values']())null!==_0x506483&&_0x39f86f['add'](_0x506483);this['_markChanges'](_0x3619cf,_0x21bfc4['insertions'][_0x30fd48],_0x2b4b65,'insertion',_0x39f86f),this['_markChanges'](_0x2050b3,_0x21bfc4['deletions'][_0x30fd48],_0x169da6,'deletion',_0x39f86f),_0x4c991a[_0x30fd48]={'insertions':this['_prepareViewToSave'](_0x3619cf),'deletions':this['_prepareViewToSave'](_0x2050b3),'attachChange':this['_touchedRoots']['get'](_0x30fd48)||null,'attributesBefore':_0xd15063(this['_baseRootsAttributes']['get'](_0x30fd48))||{},'attributesAfter':_0xd15063(this['_diffRootsAttributes']['get'](_0x30fd48))};}return{'diffData':_0x4c991a,'authorsIds':Array['from'](_0x39f86f)};}['_processRootBeforeSave'](_0x272068){for(const [,_0x2ccaf9]of _0x272068['markers']){const _0x402f59=_0x2ccaf9['start']['getAncestors']()['filter'](_0x256785=>'tableCell'==_0x256785['name']);for(const _0x5aa23d of _0x402f59)0x1==_0x5aa23d['childCount']&&_0x5aa23d['getChild'](0x0)['is']('element','paragraph')&&_0x5aa23d['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4c4e2d){this['_processRootBeforeSave'](_0x4c4e2d);const _0xbdf34f=this['editor']['data']['toView'](_0x4c4e2d,{}),_0x1910ac=Array['from'](_0xbdf34f['getChildren']())['map'](_0x51d4a8=>this['_getViewJson'](_0x51d4a8));return JSON['stringify'](_0x1910ac);}['_getViewJson'](_0x231782){if(_0x231782['is']('$text'))return _0x231782['data'];{const _0x180c44=_0x231782;return{'type':Object['keys'](C)['find'](_0x24512a=>_0x231782 instanceof C[_0x24512a]),'name':_0x180c44['name'],'attributes':Array['from'](_0x180c44['getAttributes']()),'children':Array['from'](_0x180c44['getChildren']())['map'](_0x417945=>this['_getViewJson'](_0x417945))};}}['_markChanges'](_0x503de1,_0x27c5b4,_0x29ec93,_0x2d4fab,_0x5508e4){let _0x3c317a=null,_0x1b056e=null,_0x576476=0x0;const _0x20540e=this['editor']['model'];for(let _0x2bace4=0x0;_0x2bace4<_0x27c5b4['length'];_0x2bace4++){const _0x51ab31=this['_getVidAttributeName'](_0x27c5b4[_0x2bace4]),_0x5acfe1=_0x27c5b4[_0x2bace4]['item']['getAttribute'](_0x51ab31),_0x2c1408=_0x29ec93['get'](_0x5acfe1),_0x54032f=_0x2bace4==_0x27c5b4['length']-0x1;(!_0x3c317a&&_0x2c1408&&(_0x3c317a=_0x2c1408,_0x1b056e=_0x27c5b4[_0x2bace4]),_0x3c317a&&(!_0x2c1408||_0x2c1408['userId']!=_0x3c317a['userId']))&&(_0x2a9af0(_0x2c1408,J(_0x1b056e,_0x503de1,_0x20540e),J(_0x27c5b4[_0x2bace4],_0x503de1,_0x20540e)),_0x3c317a=_0x2c1408||null,_0x1b056e=_0x2c1408?_0x27c5b4[_0x2bace4]:null),_0x3c317a&&_0x54032f&&_0x2a9af0(_0x2c1408,J(_0x1b056e,_0x503de1,_0x20540e),q(_0x27c5b4[_0x2bace4],_0x503de1,_0x20540e));}function _0x2a9af0(_0x53a7c9,_0x53bd90,_0x1e2183){const _0x503e44=_0x3c317a['userId'],_0x53eff9='revision:'+_0x2d4fab+':'+_0x503e44+':'+_0x576476++,_0x1346ca=_0x20540e['createRange'](_0x53bd90,_0x1e2183);_0x503de1['markers']['set'](_0x53eff9,_0x1346ca),null!==_0x503e44&&_0x5508e4['add'](_0x503e44);}}['_getVidAttributeName'](_0x38d1ae){switch(_0x38d1ae['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x344811,_0x49641d){_0x344811['baseVersion']=null;for(const _0x27c5e0 in _0x344811){const _0x48cd8a=_0x344811[_0x27c5e0];if(_0x48cd8a instanceof gt){const _0x3afd5d=_0x49641d['get'](_0x48cd8a['root']['rootName']);_0x344811[_0x27c5e0]=this['_fixPosition'](_0x48cd8a,_0x3afd5d);}if(_0x48cd8a instanceof vt){const _0x497537=_0x49641d['get'](_0x48cd8a['root']['rootName']);_0x344811[_0x27c5e0]=this['_fixRange'](_0x48cd8a,_0x497537);}'root'===_0x27c5e0&&(_0x344811['root']=_0x49641d['get'](_0x344811['root']['rootName']));}}['_fixRange'](_0x18f54f,_0x4a0ac2){return this['editor']['model']['createRange'](this['_fixPosition'](_0x18f54f['start'],_0x4a0ac2),this['_fixPosition'](_0x18f54f['end'],_0x4a0ac2));}['_fixPosition'](_0x45165d,_0x4afbce){return this['editor']['model']['createPositionFromPath'](_0x4afbce,_0x45165d['path'],_0x45165d['stickiness']);}['_handleInsertOperation'](_0x57b34e){const _0x14b899=this['_idsRoots']['get'](_0x57b34e['position']['root']['rootName']),_0x3351a5=this['_fixPosition'](_0x57b34e['position'],_0x14b899),_0x54735c=null===_0x57b34e['_authorId']?null:_0x57b34e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x51e79a=_0x3351a5['parent'],_0x42735c=this['_revisionId'],_0x447c0f=[];for(const _0x308bab of _0x57b34e['nodes'])if(_0x308bab['is']('element'))_0x447c0f['push'](this['_makeIdsRoot'](_0x308bab));else{for(let _0x2f6c1d=0x0;_0x2f6c1d<_0x308bab['offsetSize'];_0x2f6c1d++)_0x447c0f['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x5a93e4=this['_revisionId'];for(let _0x41e7a5=_0x42735c;_0x41e7a5<_0x5a93e4;_0x41e7a5++)this['_touched']['set'](_0x41e7a5,{'userId':_0x54735c});_0x51e79a['_insertChild'](_0x3351a5['offset'],_0x447c0f);}['_handleMoveOperation'](_0x19926b){(_0x19926b=this['_cloneOperation'](_0x19926b,this['_idsRoots']))['_execute']();const _0xb9d175=null===_0x19926b['_authorId']?null:_0x19926b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5abcc2=_0x19926b['getMovedRangeStart'](),_0xfad0d7=_0x5abcc2['parent'],_0x1caa36=_0x5abcc2['offset'];!function _0x5d5529(_0x5bf133,_0x59f6c6,_0x1f592e,_0x4875fd){for(let _0xf995da=_0x1f592e;_0xf995da<_0x4875fd;_0xf995da++){const _0x36d164=_0x59f6c6['getChild'](_0xf995da);_0x36d164['is']('element','$text')?_0x5bf133['set'](_0x36d164['getAttribute']('vid'),{'userId':_0xb9d175}):(_0x5bf133['set'](_0x36d164['getAttribute']('vid_start'),{'userId':_0xb9d175}),_0x5d5529(_0x5bf133,_0x36d164,0x0,_0x36d164['childCount']),_0x5bf133['set'](_0x36d164['getAttribute']('vid_end'),{'userId':_0xb9d175}));}}(this['_touched'],_0xfad0d7,_0x1caa36,_0x1caa36+_0x19926b['howMany']);}['_handleMergeOperation'](_0x2e77ee){const _0x32c25a=null===(_0x2e77ee=this['_cloneOperation'](_0x2e77ee,this['_idsRoots']))['_authorId']?null:_0x2e77ee['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c3fe1=_0x2e77ee['targetPosition']['parent'],_0x438dcf=_0x2e77ee['sourcePosition']['parent'],_0x40cb44=_0x4c3fe1['getAttribute']('vid_end'),_0x35b874=_0x438dcf['getAttribute']('vid_start');_0x4c3fe1['_setAttribute']('vid_end',_0x438dcf['getAttribute']('vid_end')),_0x438dcf['_setAttribute']('vid_end',_0x40cb44),this['_touched']['set'](_0x35b874,{'userId':_0x32c25a}),this['_touched']['set'](_0x40cb44,{'userId':_0x32c25a}),_0x2e77ee['_execute']();}['_handleSplitOperation'](_0x5923c1){const _0x5499a3=null===(_0x5923c1=this['_cloneOperation'](_0x5923c1,this['_idsRoots']))['_authorId']?null:_0x5923c1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x725209=_0x5923c1['graveyardPosition'],_0x47b78e=_0x5923c1['splitPosition']['parent'];_0x5923c1['_execute']();const _0x53d347=_0x47b78e['getAttribute']('vid_end'),_0x1b6acd=_0x5923c1['insertionPosition']['nodeAfter'];if(_0x725209){const _0x2118b2=_0x1b6acd['getAttribute']('vid_end'),_0x5401ad=_0x47b78e['getAttribute']('vid_end');_0x47b78e['_setAttribute']('vid_end',_0x2118b2),_0x1b6acd['_setAttribute']('vid_end',_0x5401ad),this['_touched']['set'](_0x47b78e['getAttribute']('vid_end'),{'userId':_0x5499a3}),this['_touched']['set'](_0x1b6acd['getAttribute']('vid_start'),{'userId':_0x5499a3});}else{const _0x4bae47=this['_revisionId']++,_0x2572ef=this['_revisionId']++;_0x47b78e['_setAttribute']('vid_end',_0x4bae47),_0x1b6acd['_setAttribute']('vid_start',_0x2572ef),_0x1b6acd['_setAttribute']('vid_end',_0x53d347),this['_touched']['set'](_0x4bae47,{'userId':_0x5499a3}),this['_touched']['set'](_0x2572ef,{'userId':_0x5499a3});}}['_handleMarkerOperation'](_0x243f6e){if(!_0x243f6e['affectsData'])return;const _0x27ae72=(_0x243f6e=this['_cloneOperation'](_0x243f6e,this['_diffRoots']))['oldRange']?_0x243f6e['oldRange']['root']:null,_0x152afa=_0x243f6e['newRange']?_0x243f6e['newRange']['root']:null;_0x27ae72&&this['_markers']['delete'](_0x243f6e['name']),_0x152afa&&this['_markers']['set'](_0x243f6e['name'],_0x243f6e['newRange']['clone']());const _0x44bfe6=null===_0x243f6e['_authorId']?null:_0x243f6e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1d8d80=_0x243f6e['name'];if(!this['_touchedMarkers']['has'](_0x1d8d80))return void this['_touchedMarkers']['set'](_0x1d8d80,{'range':_0x243f6e['oldRange'],'userId':_0x44bfe6});const _0x15d06c=this['_touchedMarkers']['get'](_0x1d8d80),_0x4ba06e=_0x15d06c['range'],_0x3e8211=_0x243f6e['newRange'];null==_0x4ba06e&&null==_0x3e8211||_0x4ba06e&&_0x3e8211&&_0x4ba06e['isEqual'](_0x3e8211)?this['_touchedMarkers']['delete'](_0x243f6e['name']):_0x15d06c['userId']=_0x44bfe6;}['_handleRootOperation'](_0x56bbca,_0x1af674){this['_diffRoots']['has'](_0x56bbca['rootName'])?this['_diffRoots']['get'](_0x56bbca['rootName'])['_isAttached']=_0x56bbca['isAdd']:(this['_diffRoots']['set'](_0x56bbca['rootName'],B(_0x56bbca['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x56bbca['rootName'],{}),_0x1af674&&this['_idsRoots']['set'](_0x56bbca['rootName'],B(_0x56bbca['rootName'],!0x0)));const _0x3c65dd=null===_0x56bbca['_authorId']?null:_0x56bbca['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x10f74f=this['_touchedRoots']['get'](_0x56bbca['rootName']);_0x10f74f&&_0x10f74f['userId']===_0x3c65dd?this['_touchedRoots']['delete'](_0x56bbca['rootName']):this['_touchedRoots']['set'](_0x56bbca['rootName'],{'userId':_0x3c65dd,'isAttached':_0x56bbca['isAdd']});}['_handleRootAttributeOperation'](_0x3cf4f4){const _0xbea939=this['_diffRootsAttributes']['get'](_0x3cf4f4['root']['rootName']);null===_0x3cf4f4['newValue']?delete _0xbea939[_0x3cf4f4['key']]:_0xbea939[_0x3cf4f4['key']]=_0x3cf4f4['newValue'];}}function F(_0x3944d1){const _0x3ff8c0=B(_0x3944d1['rootName'],_0x3944d1['isAttached']());for(const _0x3c5f1f of _0x3944d1['getChildren']()){const _0x40c57b=_0x3c5f1f['_clone'](!0x0);_0x3ff8c0['_appendChild'](_0x40c57b);}return _0x3ff8c0;}function B(_0x1abf3c,_0x2116a2=!0x0){const _0x54abfb=new wt();return _0x54abfb['rootName']=_0x1abf3c,_0x54abfb['_isAttached']=_0x2116a2,_0x54abfb['isAttached']=()=>_0x54abfb['_isAttached'],_0x54abfb;}function J(_0x2ead10,_0x11a15b,_0x32c54e){const _0x55e92e='elementEnd'==_0x2ead10['type']?_0x32c54e['createPositionAt'](_0x2ead10['item'],'end'):_0x32c54e['createPositionBefore'](_0x2ead10['item']);return _0x32c54e['createPositionFromPath'](_0x11a15b,_0x55e92e['path'],_0x55e92e['stickiness']);}function q(_0x483a0c,_0x14c205,_0x537390){const _0x2a5fbe='elementStart'==_0x483a0c['type']?_0x537390['createPositionAt'](_0x483a0c['item'],0x0):_0x537390['createPositionAfter'](_0x483a0c['item']);return _0x537390['createPositionFromPath'](_0x14c205,_0x2a5fbe['path'],_0x2a5fbe['stickiness']);}class ns extends _0x4f4dcf{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x38c630,_0x3b0c64){super(_0x38c630),this['focusTracker']=new _0x20319a(),this['keystrokes']=new _0x3c6629(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3b0c64),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x258bed({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x40832a=_0xc53dc7=>_0xc53dc7['stopPropagation']();this['keystrokes']['set']('arrowright',_0x40832a),this['keystrokes']['set']('arrowleft',_0x40832a),this['keystrokes']['set']('arrowup',_0x40832a),this['keystrokes']['set']('arrowdown',_0x40832a);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x3df83f){this['revisionNameInputView']['fieldView']['element']['value']=_0x3df83f['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x267ff1){const _0x2198c9=new at(this['locale'],_0x5e8fe9),_0x318b21=_0x2198c9['fieldView'];_0x318b21['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3c50bf=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x267ff1&&(_0x3c50bf+='\x20('+R(this['locale'],'optional')+')'),(_0x2198c9['label']=_0x3c50bf,_0x318b21['on']('input',()=>{this['revisionNameInputValue']=_0x318b21['element']['value']['trim']();}),_0x2198c9);}}class u extends _0x9a5545{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x38a021=this['editor'],_0x446b5b=_0x38a021['plugins']['get']('RevisionTracker');_0x38a021['ui']['componentFactory']['add']('revisionHistory',_0x2a6813=>{const _0x56f1b9=_0x5c06d4(_0x2a6813),_0x475eae=_0x56f1b9['panelView']['children'],_0x315652=new te(_0x2a6813),_0x4126c5=new _0xeca532(_0x2a6813),_0x77fd2f=new _0x18590d(_0x2a6813),_0x2df7f5=new _0xeca532(_0x2a6813),_0x31220b=new _0x18590d(_0x2a6813);return _0x56f1b9['bind']('isEnabled')['to'](_0x446b5b,'isReady',_0x446b5b,'isEnabled',_0x38a021,'isReadOnly',(_0x57e9c2,_0x11d88d,_0x28ab9f)=>_0x57e9c2&&_0x11d88d&&!_0x28ab9f),_0x56f1b9['buttonView']['set']({'icon':_0x25fa55['history'],'label':R(_0x2a6813,'Revision\x20history'),'tooltip':!0x0}),_0x77fd2f['set']({'label':R(_0x2a6813,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x77fd2f['bind']('isEnabled')['to'](_0x446b5b,'isReady',_0x446b5b,'isEnabled',_0x38a021,'isReadOnly',(_0x3abce1,_0x4e0496,_0x2a7d12)=>_0x3abce1&&_0x4e0496&&!_0x2a7d12),_0x77fd2f['on']('execute',()=>this['_showDialog']()),_0x31220b['set']({'label':R(_0x2a6813,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x31220b['bind']('isEnabled')['to'](_0x446b5b,'isReady',_0x38a021,'isReadOnly',(_0x723d4d,_0x5defbe)=>_0x723d4d&&!_0x5defbe),_0x31220b['on']('execute',()=>{_0x38a021['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x56f1b9['isOpen']=!0x1,_0x38a021['editing']['view']['focus']();}),_0x4126c5['children']['add'](_0x77fd2f),_0x2df7f5['children']['add'](_0x31220b),_0x315652['role']='menu',_0x315652['items']['addMany']([_0x4126c5,_0x2df7f5]),_0x475eae['add'](_0x315652),_0x56f1b9;}),_0x38a021['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x5b3e9e=this['editor'],_0x33fc12=_0x5b3e9e['locale'],_0x3bba36=new _0x5afccc(_0x33fc12),_0x4a5c05=new _0x1e0c87(_0x33fc12);_0x3bba36['buttonView']['set']({'icon':_0x25fa55['history'],'label':R(_0x33fc12,'Revision\x20history')});const _0x42cce8=new _0x51e979(_0x33fc12,_0x3bba36),_0x32d6d9=new _0x39a7a7(_0x33fc12);_0x32d6d9['set']({'label':R(_0x33fc12,'Save\x20current\x20revision')}),_0x32d6d9['delegate']('execute')['to'](_0x3bba36),_0x32d6d9['on']('execute',()=>{this['_showDialog']();}),_0x42cce8['children']['add'](_0x32d6d9),_0x4a5c05['items']['add'](_0x42cce8);const _0x5d919b=new _0x51e979(_0x33fc12,_0x3bba36),_0x1a9045=new _0x39a7a7(_0x33fc12);return _0x1a9045['set']({'label':R(_0x33fc12,'Open\x20revision\x20history')}),_0x1a9045['delegate']('execute')['to'](_0x3bba36),_0x1a9045['on']('execute',()=>{_0x5b3e9e['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x5d919b['children']['add'](_0x1a9045),_0x4a5c05['items']['add'](_0x5d919b),_0x3bba36['panelView']['children']['add'](_0x4a5c05),_0x3bba36;}['_showDialog'](){const _0x9bea38=this['editor'],_0x448209=_0x9bea38['locale'],_0x5b0dc9=_0x9bea38['plugins']['get']('Dialog'),_0x49c6ab=_0x9bea38['plugins']['get']('RevisionTracker');function _0x4cdaec(_0x346f10){_0x9bea38['config']['get']('revisionHistory.requireRevisionName')&&''===_0x346f10['revisionName']?_0x346f10['revisionNameInputView']['errorText']=R(_0x448209,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x9bea38['plugins']['get'](l)['saveRevision']({'name':_0x346f10['revisionName']}),_0x5b0dc9['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4cdaec(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x5b0dc9['show']({'id':'revisionSave','title':R(_0x448209,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x9bea38['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x5b0dc9['hide']()},{'label':R(_0x9bea38['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4e0a62){_0x4e0a62['bind']('isEnabled')['to'](_0x49c6ab,'isReady',_0x49c6ab,'isEnabled',_0x9bea38,'isReadOnly',(_0x1dfe4d,_0x109787,_0x14b67f)=>_0x1dfe4d&&_0x109787&&!_0x14b67f);},'onExecute':()=>_0x4cdaec(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x55bb89=this['editor'],_0x430080=_0x55bb89['locale'];this['_saveRevisionFormView']=new ns(_0x430080,_0x55bb89['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Y extends _0x4f4dcf{['changeId'];['_model'];constructor(_0x14bcea,_0x1d6ff5){super(_0x14bcea),this['_model']=_0x1d6ff5,this['changeId']=_0x1d6ff5['id'];const _0x46ce0c=this['bindTemplate'],_0x14cc00=R(_0x14bcea,_0x1d6ff5['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1d6ff5['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1d6ff5['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x46ce0c['to']('type',_0x387b59=>'ck-revision-change__'+_0x387b59)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x14cc00}]},{'text':'\x20'+_0x1d6ff5['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x1212e4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x34ae7a){super(),this['id']=_0x34ae7a['id']||_0x1ced54(),this['author']=_0x34ae7a['author'],this['type']=_0x34ae7a['type'],this['data']=_0x34ae7a['data']||{},this['rootName']=_0x34ae7a['rootName'],this['set']('createdAt',_0x34ae7a['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1a6426,_0x5c5079){this['newRevisionId']=_0x1a6426,this['oldRevisionId']=_0x5c5079,this['changes']=new _0x2f121a();}['_setChanges'](_0x2e3124){for(const _0x463904 of _0x2e3124)this['changes']['add'](_0x463904);}}const Z={'c':_0x4221dd,'a':_0x414029,'e':_0x452337,'r':_0x3497f3,'u':_0xa39994};class d extends _0x9a5545{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5241b4,_0x613301,j];}constructor(_0x5a8d84){super(_0x5a8d84),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x11459b,_0x51d503,_0x744414)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x567ea1=>{for(const _0x4239cc of this['editor']['editing']['view']['document']['roots'])_0x744414?_0x567ea1['removeClass']('ck-editor__editable__overlay',_0x4239cc):_0x567ea1['addClass']('ck-editor__editable__overlay',_0x4239cc);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x354764=>null!==_0x354764),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xc13487,_0x1c4974,_0x1efadc)=>_0xc13487&&_0x1efadc?_0x1c4974['changes']['getIndex'](_0x1efadc):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2570a5,_0x1208f6)=>_0x2570a5?_0x1208f6['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x613301);}['init'](){const _0x55ddd2=this['editor'],_0x47df75=new bt(_0x55ddd2,{'direction':'backward'}),_0x25e73a=new bt(_0x55ddd2,{'direction':'forward'});(_0x55ddd2['commands']['add']('showPreviousChange',_0x47df75),_0x55ddd2['commands']['add']('showNextChange',_0x25e73a),_0x55ddd2['commands']['add']('restoreRevision',new yt(_0x55ddd2)),this['on']('change:numberOfChanges',()=>{_0x47df75['refresh'](),_0x25e73a['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x55ddd2['enableReadOnlyMode']('revision-viewer'),_0x55ddd2['plugins']['has']('WidgetToolbarRepository'))&&_0x55ddd2['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x5f575c){await this['loadRevisionData'](_0x5f575c);const _0x160f72={};for(const _0x4abe9f in _0x5f575c['diffData']){if(_0x5f575c['diffData'][_0x4abe9f]['attachChange']&&!_0x5f575c['diffData'][_0x4abe9f]['attachChange']['isAttached'])continue;const _0x44639f=this['_removeRevisionMarkers'](JSON['parse'](_0x5f575c['diffData'][_0x4abe9f]['insertions'])),_0x2f465a=this['editor']['editing']['view']['document'],_0x196dda=new _0x30434f(_0x2f465a,_0x44639f['map'](_0x5c0ad9=>this['_getViewObj'](_0x5c0ad9)));this['editor']['data']['processor']['useFillerType']('marked'),_0x160f72[_0x4abe9f]=this['editor']['data']['processor']['toData'](_0x196dda),this['editor']['data']['processor']['useFillerType']('default');}return _0x160f72;}async['getRevisionRootsAttributes'](_0x13ca62){await this['loadRevisionData'](_0x13ca62);const _0x377ef7={};for(const _0x213603 in _0x13ca62['diffData'])_0x13ca62['diffData'][_0x213603]['attachChange']&&!_0x13ca62['diffData'][_0x213603]['attachChange']['isAttached']||(_0x377ef7[_0x213603]=_0x13ca62['diffData'][_0x213603]['attributesAfter']||{});return _0x377ef7;}['_removeRevisionMarkers'](_0x1e0c46){return(_0x1e0c46=_0x1e0c46['filter'](_0x535ded=>!_0x535ded['name']||'revision-start'!==_0x535ded['name']&&'revision-end'!==_0x535ded['name']))['forEach'](_0x222cf5=>{'string'!=typeof _0x222cf5&&(_0x222cf5['children']=this['_removeRevisionMarkers'](_0x222cf5['children']),_0x222cf5['attributes']=_0x222cf5['attributes']['filter'](_0x3e9aa8=>!_0x3e9aa8[0x0]['startsWith']('data-revision-')));}),_0x1e0c46;}async['compare'](_0x5d59d4,_0x101049,_0x1f04f5=!0x1){if(!this['isEnabled'])return;const _0x5b64d7=this['diff'],_0x405ae4=this['repository'],_0x33870b='string'==typeof _0x5d59d4?_0x405ae4['getRevision'](_0x5d59d4):_0x5d59d4,_0x470141='string'==typeof _0x101049?_0x405ae4['getRevision'](_0x101049):_0x101049,_0x3a1ac1=_0x33870b['id'],_0x5bc1d5=_0x470141?_0x470141['id']:null;if(!_0x1f04f5&&this['diff']&&this['diff']['newRevisionId']===_0x3a1ac1&&this['diff']['oldRevisionId']===_0x5bc1d5)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x3a1ac1,_0x5bc1d5);const _0x5ef374=this['_getRevisionsRange'](_0x33870b,_0x470141,!0x0)['map'](_0x330052=>this['loadRevisionData'](_0x330052));return _0x5ef374['push'](new Promise(_0x5cfee3=>{setTimeout(_0x5cfee3,0x14);})),Promise['all'](_0x5ef374)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4e9e21=this['_getDiff'](_0x3a1ac1,_0x5bc1d5);for(const _0x23a8a0 of _0x4e9e21['changes'])this['_changeIdToChange']['set'](_0x23a8a0['id'],_0x23a8a0);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4ed0d6=>{for(const _0xca3d9a of this['editor']['model']['document']['getRootNames']())_0x4ed0d6['detachRoot'](_0xca3d9a);for(const _0x1433dc of Object['keys'](_0x4e9e21['model'])){const _0x293463=_0x4ed0d6['addRoot'](_0x1433dc);for(const _0x435483 of Object['keys'](_0x4e9e21['attributes'][_0x1433dc]))_0x4ed0d6['setAttribute'](_0x435483,_0x4e9e21['attributes'][_0x1433dc][_0x435483],_0x293463);_0x4ed0d6['insert'](_0x4e9e21['model'][_0x1433dc],_0x293463,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4e9e21['changes'])),this['isReady']=!0x0;})['catch'](_0x598481=>{console['error'](_0x598481),this['_cleanUp'](),_0x5b64d7&&(this['diff']=_0x5b64d7),this['isReady']=!0x0;});}['addRevisionData'](_0x43b846,_0x57db55){const _0x5a3ffb=this['repository']['createRevision'](_0x43b846);return _0x5a3ffb['on']('_update',(_0x1be6a8,_0x3693ef,_0x1ab509)=>_0x57db55(_0x3693ef,_0x1ab509,_0x5a3ffb)),this['repository']['addRevision'](_0x5a3ffb),_0x5a3ffb;}['loadRevisionData'](_0x6b3834){if(!_0x6b3834||_0x6b3834['diffData'])return Promise['resolve']();{const _0x3aa90e=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x3aa90e,'revisionId':_0x6b3834['id']})['then'](_0x2b5e70=>{_0x6b3834['_update']({'diffData':_0x2b5e70['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x576aa5=>{for(const _0x52e0eb of this['editor']['model']['document']['getRootNames']())_0x576aa5['detachRoot'](_0x52e0eb);});}['_sortAndFilterDiffChanges'](_0xc7b9a6){const _0xa739eb=[],_0x2dd155=new Map();for(const _0x49c34c of this['editor']['model']['document']['getRootNames']()){const _0x47c88f=this['editor']['editing']['view']['getDomRoot'](_0x49c34c);if(!_0x47c88f)continue;const _0x4dfacb=_0x47c88f['getClientRects']()['item'](0x0);_0x4dfacb&&(_0xa739eb['push'](_0x49c34c),_0x2dd155['set'](_0x49c34c,_0x4dfacb));}return _0xa739eb['sort']((_0x1ad2fb,_0x1dca5e)=>{const _0x242ce4=_0x2dd155['get'](_0x1ad2fb),_0x30ee77=_0x2dd155['get'](_0x1dca5e);return _0x242ce4['y']-_0x30ee77['y']||_0x242ce4['x']-_0x30ee77['x'];}),(_0xc7b9a6=_0xc7b9a6['filter'](_0x5536f6=>_0xa739eb['includes'](_0x5536f6['rootName'])))['sort']((_0x1ef54c,_0x4fe01b)=>_0xa739eb['indexOf'](_0x1ef54c['rootName'])-_0xa739eb['indexOf'](_0x4fe01b['rootName'])),_0xc7b9a6;}['_makeTape'](_0x560f1f){const _0x3a96c3=Array['from'](_0x560f1f['markers'])['filter'](([_0x2bac06,_0x47032e])=>_0x2bac06['startsWith']('revision:')&&!_0x47032e['isCollapsed']),_0x1ec013=Array['from'](this['editor']['model']['createRangeIn'](_0x560f1f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3a96c3['length'])for(const _0x397f9d of _0x1ec013){const [_0x393a69,_0x567d9b]=_0x3a96c3[0x0],[,_0x191ad7,_0x5017f0]=_0x393a69['split'](':');if(_0x567d9b['end']['isEqual'](_0x397f9d['nextPosition'])&&_0x3a96c3['shift'](),(_0x397f9d['previousPosition']['isEqual'](_0x567d9b['start'])||_0x397f9d['previousPosition']['isAfter'](_0x567d9b['start']))&&('insertion'==_0x191ad7?_0x397f9d['isAdded']={'userId':_0x5017f0}:'deletion'==_0x191ad7&&(_0x397f9d['isRemoved']={'userId':_0x5017f0})),0x0==_0x3a96c3['length'])break;}return _0x1ec013;}['_refreshStartEndIndex'](_0x336642){const _0x2ed4de=new Map();for(let _0x45b39c=0x0;_0x45b39c<_0x336642['length'];_0x45b39c++)'text'===_0x336642[_0x45b39c]['type']?(_0x336642[_0x45b39c]['item']['startIndex']=_0x45b39c,_0x336642[_0x45b39c]['item']['endIndex']=_0x45b39c):('elementStart'===_0x336642[_0x45b39c]['type']?_0x336642[_0x45b39c]['item']['startIndex']=_0x45b39c:'elementEnd'===_0x336642[_0x45b39c]['type']&&(_0x336642[_0x45b39c]['item']['endIndex']=_0x45b39c),_0x2ed4de['set'](_0x336642[_0x45b39c]['id'],_0x45b39c));for(const _0x24e052 of _0x2ed4de['values']())'elementStart'===_0x336642[_0x24e052]['type']?_0x336642[_0x24e052]['item']['endIndex']=_0x2ed4de['get'](_0x336642[_0x24e052]['pairId']):'elementEnd'===_0x336642[_0x24e052]['type']&&(_0x336642[_0x24e052]['item']['startIndex']=_0x2ed4de['get'](_0x336642[_0x24e052]['pairId']));}['_processTape'](_0x36941c){for(let _0x272dee=0x0;_0x272dee<_0x36941c['length'];_0x272dee++){if('elementStart'===_0x36941c[_0x272dee]['type'])_0x36941c[_0x272dee]['item']['startIndex']=_0x272dee;else{if('elementEnd'===_0x36941c[_0x272dee]['type']){_0x36941c[_0x272dee]['item']['endIndex']=_0x272dee;const _0x97f2d5=_0x36941c[_0x272dee]['item']['startIndex'];_0x36941c[_0x97f2d5]['pairId']=_0x36941c[_0x272dee]['id'],_0x36941c[_0x272dee]['pairId']=_0x36941c[_0x97f2d5]['id'];}else _0x36941c[_0x272dee]['item']['startIndex']=_0x272dee,_0x36941c[_0x272dee]['item']['endIndex']=_0x272dee,_0x36941c[_0x272dee]['pairId']=null;}_0x36941c[_0x272dee]['markersStart']||(_0x36941c[_0x272dee]['markersStart']=[],_0x36941c[_0x272dee]['markersEnd']=[]);}}['_markInsertions'](_0x1086b7,_0x56f97a){const _0xd0a074=_0x1086b7['filter'](_0x1bdca8=>!_0x1bdca8['isAdded']);for(let _0x54bd17=0x0;_0x54bd17<_0x56f97a['length'];_0x54bd17++)_0x56f97a[_0x54bd17]['isAdded']&&(_0xd0a074[_0x54bd17]['isAdded']=_0x56f97a[_0x54bd17]['isAdded']);}['_makeModelFromViewString'](_0x1cab2e){const _0x40dca9=JSON['parse'](_0x1cab2e),_0x34fbcb=this['editor']['editing']['view']['document'],_0x872766=new _0x30434f(_0x34fbcb,_0x40dca9['map'](_0x3ef8b6=>this['_getViewObj'](_0x3ef8b6)));return this['editor']['data']['toModel'](_0x872766);}['_getViewObj'](_0x562b26){const _0x2ab79b=this['editor']['editing']['view']['document'];if('string'==typeof _0x562b26)return new _0x5b9193(_0x2ab79b,_0x562b26);{const _0x2f49cc=_0x562b26['children']['map'](_0x7923e9=>this['_getViewObj'](_0x7923e9));return new(Z[_0x562b26['type']]||_0x3ff468)(_0x2ab79b,_0x562b26['name'],_0x562b26['attributes'],_0x2f49cc);}}['_getDiff'](_0x2510c4,_0x1e881b=null){const _0x34b88a=this['repository']['getRevision'](_0x2510c4),_0x538d98=_0x1e881b?this['repository']['getRevision'](_0x1e881b):null,_0x354309=this['_getRevisionsRange'](_0x34b88a,_0x538d98),_0x4e3d32=_0x354309[_0x354309['length']-0x1],_0x58d264=new Map(),_0x385d6c={'model':{},'attributes':{},'changes':[]},_0x18abe4=new Set(),_0x303db5=new Map();for(let _0x2b82c4=_0x354309['length']-0x1;_0x2b82c4>=0x0;_0x2b82c4--){const _0x5ea5ea=_0x354309[_0x2b82c4];for(const _0x3b75d3 of Object['keys'](_0x5ea5ea['diffData']))if(_0x5ea5ea['diffData'][_0x3b75d3]['attachChange']){const _0x2fdad6=_0x5ea5ea['diffData'][_0x3b75d3]['attachChange'];_0x2fdad6['isAttached']?(_0x18abe4['add'](_0x3b75d3),_0x303db5['has'](_0x3b75d3)&&_0x303db5['get'](_0x3b75d3)['userId']==_0x2fdad6['userId']?_0x303db5['delete'](_0x3b75d3):_0x303db5['set'](_0x3b75d3,_0x2fdad6)):_0x303db5['has'](_0x3b75d3)?(_0x18abe4['delete'](_0x3b75d3),_0x303db5['delete'](_0x3b75d3)):(_0x18abe4['add'](_0x3b75d3),_0x303db5['set'](_0x3b75d3,_0x2fdad6));}else _0x18abe4['add'](_0x3b75d3);}for(const _0x1afe61 of _0x18abe4){const _0x473dca=_0x303db5['has'](_0x1afe61)&&!_0x303db5['get'](_0x1afe61)['isAttached'];let _0x163ac9=_0x473dca?_0x354309['length']-0x1:0x0;const _0x5ed6d1=_0x473dca?-0x1:0x1;for(;_0x354309[_0x163ac9];){const _0x48d9b0=_0x354309[_0x163ac9];if(_0x48d9b0['diffData'][_0x1afe61]){const _0x28aba0=_0x473dca?_0x48d9b0['diffData'][_0x1afe61]['attributesBefore']:_0x48d9b0['diffData'][_0x1afe61]['attributesAfter'];_0x385d6c['attributes'][_0x1afe61]=_0x28aba0?_0xd15063(_0x28aba0):{};break;}_0x163ac9+=_0x5ed6d1;}}for(const _0x41c74f of _0x354309){_0x41c74f['model']={};for(const _0x3bf481 of _0x41c74f['authors'])_0x58d264['set'](_0x3bf481['id'],_0x3bf481);for(const _0x2d360a of _0x18abe4){const _0xe3d2b6=_0x41c74f['diffData'][_0x2d360a]?_0x41c74f['diffData'][_0x2d360a]['insertions']:'[]',_0x47923d=_0x41c74f['diffData'][_0x2d360a]?_0x41c74f['diffData'][_0x2d360a]['deletions']:'[]';_0x41c74f['model'][_0x2d360a]={'insertions':this['_makeModelFromViewString'](_0xe3d2b6),'deletions':this['_makeModelFromViewString'](_0x47923d)};}}for(const _0x4c315b of _0x18abe4){let _0x4995e4=null,_0x73cf6a=0x0;const _0x689606=new Map(Array['from'](_0x34b88a['model'][_0x4c315b]['insertions']['markers'])['filter'](([_0x507616])=>!_0x507616['startsWith']('revision:')));let _0x211e6a=0x0;for(const _0x8f95c4 of _0x354309){const _0x5b868d=this['_makeTape'](_0x8f95c4['model'][_0x4c315b]['insertions']);_0x8f95c4==_0x34b88a?(_0x4995e4=_0x5b868d,_0x73cf6a=_0x4995e4['length'],_0x4995e4['forEach'](_0x27ebe9=>{_0x27ebe9['id']=_0x211e6a++;}),this['_processTape'](_0x4995e4)):this['_markInsertions'](_0x4995e4,_0x5b868d);const _0x3039b0=_0x4995e4['filter'](_0x3c54b5=>!_0x3c54b5['isAdded'])['map'](_0xea6d6d=>_0xea6d6d['id']);let _0x2bc5e0=0x0;const _0x40c89e=this['_makeTape'](_0x8f95c4['model'][_0x4c315b]['deletions']);_0x40c89e['forEach'](_0x3c6618=>{_0x3c6618['isRemoved']?_0x3c6618['id']=_0x73cf6a++:_0x3c6618['id']=_0x3039b0[_0x2bc5e0++];}),this['_processTape'](_0x40c89e),this['_setDistance'](_0x4995e4,'isAdded'),this['_setDistance'](_0x40c89e,'isRemoved'),_0x8f95c4==_0x34b88a&&this['_markMarkers'](_0x4995e4,_0x689606),_0x4995e4=this['_joinTapes'](_0x4995e4,_0x40c89e),this['_refreshStartEndIndex'](_0x4995e4),this['_setDistance'](_0x4995e4,'isRemoved');}_0x4995e4=_0x4995e4['filter'](_0x5bff4b=>!(_0x5bff4b['isAdded']&&_0x5bff4b['isRemoved']));const _0x3f8d13=new Map(_0x4e3d32['model'][_0x4c315b]['deletions']['markers']),_0x106532=new Set(_0x689606['keys']());for(const _0x448e31 of _0x3f8d13['keys']())_0x106532['delete'](_0x448e31);this['_markSuggestions'](_0x4995e4,_0x106532),this['_fixObsoleteTags'](_0x4995e4),_0x4995e4=this['_removeMissingPairs'](_0x4995e4),_0x4995e4=this['_markMismatchedRemovedTags'](_0x4995e4),_0x4995e4=this['_removeUnsupportedChanges'](_0x4995e4);const {root:_0x1b0539,changes:_0x1483c3}=this['_makeModelFromTape'](_0x4995e4,_0x58d264,_0x4c315b);_0x385d6c['model'][_0x4c315b]=_0x1b0539;const _0x202848=_0x303db5['get'](_0x4c315b);if(_0x202848){const _0x565287=_0x58d264['get'](_0x202848['userId']),_0x467b07=new r({'author':_0x565287,'type':_0x202848['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4c315b});_0x1483c3['unshift'](_0x467b07),_0x385d6c['attributes'][_0x4c315b]['revisionHistoryAttachChange']=_0x467b07['id'];}_0x385d6c['changes']=_0x385d6c['changes']['concat'](_0x1483c3);}return _0x385d6c;}['_markMarkers'](_0x5e3225,_0x51ef48){for(let _0x500f1b=0x0;_0x500f1b<_0x5e3225['length'];_0x500f1b++)for(const [_0x3612d4,_0x57d34b]of _0x51ef48)_0x57d34b['start']['isEqual'](_0x5e3225[_0x500f1b]['previousPosition'])&&_0x5e3225[_0x500f1b]['markersStart']['push'](_0x3612d4),_0x57d34b['end']['isEqual'](_0x5e3225[_0x500f1b]['nextPosition'])&&_0x5e3225[_0x500f1b]['markersEnd']['push'](_0x3612d4);}['_joinTapes'](_0xe73a08,_0x5d96ff){let _0x1c8e6b=[],_0x1daf80=0x0,_0x114c97=0x0;for(;_0x1daf80<_0xe73a08['length']||_0x114c97<_0x5d96ff['length'];){const _0x2fd481=_0xe73a08[_0x1daf80]||{},_0x15dd11=_0x5d96ff[_0x114c97]||{};if(_0x2fd481['id']==_0x15dd11['id'])_0x1daf80++,_0x114c97++,_0x1c8e6b['push'](_0x2fd481);else{if(_0x15dd11['isRemoved']&&_0x2fd481['isAdded']){const {commonTape:_0x23ee69,iEnd:_0x106106,jEnd:_0x5d5b47}=this['_threeWayMerge'](_0xe73a08,_0x1daf80,_0x5d96ff,_0x114c97);_0x1c8e6b=_0x1c8e6b['concat'](_0x23ee69),_0x1daf80=_0x106106,_0x114c97=_0x5d5b47;}else _0x15dd11['isRemoved']?(_0x114c97++,_0x1c8e6b['push'](_0x15dd11)):(_0x1daf80++,_0x1c8e6b['push'](_0x2fd481));}}return _0x1c8e6b;}['_markSuggestions'](_0x3dd7ae,_0x3e5cba){const _0x155368=[];for(let _0x36f468=0x0;_0x36f468<_0x3dd7ae['length'];_0x36f468++){for(let _0x12e251=0x0;_0x12e251<_0x3dd7ae[_0x36f468]['markersStart']['length'];_0x12e251++){const _0x1219aa=_0x3dd7ae[_0x36f468]['markersStart'][_0x12e251];if(!_0x3e5cba['has'](_0x1219aa))continue;const {group:_0x2ef843,type:_0x3db1a8,authorId:_0x5d51bc}=_0x3cfb68(_0x1219aa);'revision-suggestion'!=_0x2ef843||'insertion'!=_0x3db1a8&&'deletion'!=_0x3db1a8||(_0x155368['unshift']({'type':_0x3db1a8,'name':_0x1219aa,'userId':_0x5d51bc}),_0x3dd7ae[_0x36f468]['markersStart']['splice'](_0x12e251,0x1),_0x12e251--);}_0x588cb2(_0x3dd7ae[_0x36f468]);for(let _0x578f06=0x0;_0x578f06<_0x3dd7ae[_0x36f468]['markersEnd']['length'];_0x578f06++){const _0x49d078=_0x3dd7ae[_0x36f468]['markersEnd'][_0x578f06];if(!_0x3e5cba['has'](_0x49d078))continue;const {group:_0x1509bb,type:_0x5090e3}=_0x3cfb68(_0x49d078);if('revision-suggestion'!=_0x1509bb||'insertion'!=_0x5090e3&&'deletion'!=_0x5090e3)continue;_0x3dd7ae[_0x36f468]['markersEnd']['splice'](_0x578f06,0x1),_0x578f06--;const _0x2d63fe=_0x155368['findIndex'](_0x503f5e=>_0x503f5e['name']==_0x49d078);_0x2d63fe>-0x1&&_0x155368['splice'](_0x2d63fe,0x1);}}function _0x3cfb68(_0x48637b){const _0x419bd1=_0x48637b['split'](':');return{'group':_0x419bd1[0x0],'type':_0x419bd1[0x1],'subType':_0x419bd1['length']>=0x5?_0x419bd1[0x2]:null,'id':_0x419bd1['length']<0x5?_0x419bd1[0x2]:_0x419bd1[0x3],'authorId':_0x419bd1['length']<0x5?_0x419bd1[0x3]:_0x419bd1[0x4],'markerCount':0x6==_0x419bd1['length']?_0x419bd1[0x5]:null};}function _0x588cb2(_0x15239a){for(let _0x581d82=0x0;_0x581d82<_0x155368['length'];_0x581d82++){if(_0x15239a['isAdded']&&'insertion'==_0x155368[_0x581d82]['type'])return _0x15239a['isAddSuggestion']=_0x155368[_0x581d82],void delete _0x15239a['isAdded'];if(!_0x15239a['isAdded']&&!_0x15239a['isRemoved']&&'deletion'==_0x155368[_0x581d82]['type'])return void(_0x15239a['isRemoveSuggestion']=_0x155368[_0x581d82]);}}}['_setDistance'](_0x274b60,_0x49b6cb){let _0x34a0c9=0x0,_0x3c83a2=!0x1;const _0x2b2992=new Map();for(const _0x286033 of _0x274b60)_0x286033[_0x49b6cb]?_0x3c83a2&&(_0x34a0c9++,_0x3c83a2=!0x1):(_0x34a0c9++,_0x3c83a2=!0x0),_0x2b2992['set'](_0x286033['id'],_0x34a0c9);for(let _0x353a62=0x0;_0x353a62<_0x274b60['length'];_0x353a62++){if('isRemoved'==_0x49b6cb&&_0x274b60[_0x353a62]['isAdded']||'isAdded'==_0x49b6cb&&_0x274b60[_0x353a62]['isRemoved'])continue;if('text'==_0x274b60[_0x353a62]['type']){_0x274b60[_0x353a62]['distance']=0x0;continue;}const _0x590c21=_0x2b2992['get'](_0x274b60[_0x353a62]['pairId']),_0x18a2a6=_0x2b2992['get'](_0x274b60[_0x353a62]['id']);_0x274b60[_0x353a62]['distance']=_0x590c21-_0x18a2a6;}}['_getRevisionsRange'](_0x3f898b,_0x323660,_0xe6e5eb=!0x1){const _0x5c90af=[];let _0x1946fd=this['repository']['getIndex'](_0x3f898b),_0x5495d6=this['repository']['getIndex'](_0x323660);for(-0x1==_0x5495d6&&(_0x5495d6=this['repository']['_revisions']['length'],_0xe6e5eb=!0x1);_0x1946fd<_0x5495d6;)_0x5c90af['push'](this['repository']['getRevision'](_0x1946fd)),_0x1946fd++;return _0xe6e5eb&&_0x5c90af['push'](this['repository']['getRevision'](_0x1946fd)),_0x5c90af;}['_threeWayMerge'](_0x33a5ba,_0x5578b2,_0x17920f,_0xe37068){const _0x48a88a=this['editor']['model']['schema'];let _0x3ab8ec=_0x5578b2;for(;_0x33a5ba[_0x3ab8ec]&&_0x33a5ba[_0x3ab8ec]['isAdded'];)_0x3ab8ec++;let _0x3c3e4f=_0xe37068;for(;_0x17920f[_0x3c3e4f]&&_0x17920f[_0x3c3e4f]['isRemoved'];)_0x3c3e4f++;_0x452bb4(_0x33a5ba,_0x5578b2,_0x3ab8ec),_0x452bb4(_0x17920f,_0xe37068,_0x3c3e4f);const _0x2f9a15=_0x17920f['slice'](_0xe37068,_0x3c3e4f)['concat'](_0x33a5ba['slice'](_0x5578b2,_0x3ab8ec));return _0x2f9a15['sort']((_0x485120,_0x2d63ea)=>_0x485120['side']!=_0x2d63ea['side']?_0x485120['side']-_0x2d63ea['side']:_0x485120['level']!=_0x2d63ea['level']?_0x485120['level']-_0x2d63ea['level']:_0x485120['distance']!=_0x2d63ea['distance']?_0x2d63ea['distance']-_0x485120['distance']:!!_0x485120['isAdded']!=!!_0x2d63ea['isAdded']?-0x1==_0x485120['side']||0x0==_0x485120['side']?_0x485120['isAdded']?-0x1:0x1:_0x485120['isAdded']?0x1:-0x1:_0x485120['index']-_0x2d63ea['index']),{'commonTape':_0x2f9a15,'iEnd':_0x3ab8ec,'jEnd':_0x3c3e4f};function _0x452bb4(_0x39730b,_0x108f91,_0x4b99cd){let _0x59c750=-0x1,_0x462914=Number['POSITIVE_INFINITY'],_0x109749=!0x0;for(let _0x656749=_0x108f91;_0x656749<_0x4b99cd;_0x656749++)if(_0x48a88a['isInline'](_0x39730b[_0x656749]['item'])||(_0x109749=!0x1),_0x39730b[_0x656749]['item']['startIndex']<_0x108f91&&(_0x59c750=_0x656749),_0x39730b[_0x656749]['item']['endIndex']>=_0x4b99cd){_0x462914=_0x656749;break;}_0x109749&&(_0x59c750=_0x4b99cd-0x1);for(let _0x9d23f6=_0x108f91;_0x9d23f6<_0x4b99cd;_0x9d23f6++)_0x39730b[_0x9d23f6]['side']=_0x9d23f6<=_0x59c750?-0x1:_0x9d23f6<_0x462914?0x0:0x1,_0x39730b[_0x9d23f6]['index']=_0x9d23f6;let _0xc0e2ad=0x0;for(let _0x419764=_0x108f91;_0x419764<=_0x59c750;_0x419764++)0x0==_0x39730b[_0x419764]['distance']?_0x39730b[_0x419764]['level']=_0xc0e2ad:(_0xc0e2ad++,_0x39730b[_0x419764]['level']=_0xc0e2ad,_0xc0e2ad++);for(let _0x20c5bb=_0x108f91;_0x20c5bb<_0x4b99cd;_0x20c5bb++)0x0==_0x39730b[_0x20c5bb]['side']&&(_0x39730b[_0x20c5bb]['level']=_0xc0e2ad);_0xc0e2ad=0x0;for(let _0x3a314a=_0x4b99cd-0x1;_0x3a314a>=_0x462914;_0x3a314a--)0x0==_0x39730b[_0x3a314a]['distance']?_0x39730b[_0x3a314a]['level']=_0xc0e2ad:(_0xc0e2ad--,_0x39730b[_0x3a314a]['level']=_0xc0e2ad,_0xc0e2ad--);}}['_fixObsoleteTags'](_0x5c36cd){const _0x91369e=new Map(),_0x365d96=this['editor']['model']['schema'];for(let _0xb99a90=0x1;_0xb99a90<_0x5c36cd['length'];_0xb99a90++){let _0x412476,_0x32949b,_0x277196;const _0x3c45ea=_0x5c36cd[_0xb99a90],_0x55af84=_0x5c36cd[_0xb99a90-0x1];if('text'==_0x3c45ea['type'])continue;if(_0x3c45ea['type']!=_0x55af84['type'])continue;if(!_0x365d96['isBlock'](_0x55af84['item'])||_0x365d96['isLimit'](_0x55af84['item']))continue;if(!_0x365d96['isBlock'](_0x3c45ea['item'])||_0x365d96['isLimit'](_0x3c45ea['item']))continue;if((_0x5c36cd[_0xb99a90]['isAdded']||_0x5c36cd[_0xb99a90]['isAddSuggestion'])&&_0x5c36cd[_0xb99a90-0x1]['isRemoved'])_0x412476=_0x5c36cd[_0xb99a90],_0x32949b=_0x5c36cd[_0xb99a90-0x1],_0x277196=_0xb99a90-0x1;else{if(!_0x5c36cd[_0xb99a90]['isRemoved']||!_0x5c36cd[_0xb99a90-0x1]['isAdded']&&!_0x5c36cd[_0xb99a90-0x1]['isAddSuggestion'])continue;_0x412476=_0x5c36cd[_0xb99a90-0x1],_0x32949b=_0x5c36cd[_0xb99a90],_0x277196=_0xb99a90;}const _0x2d9393=_0x412476['level']==_0x32949b['level'],_0x19da3b=Math['abs'](_0x412476['level'])<Math['abs'](_0x32949b['level'])&&0x0==_0x32949b['distance'];(_0x2d9393||_0x19da3b)&&(_0x91369e['set'](_0x32949b['id'],_0x412476['id']),_0x5c36cd['splice'](_0x277196,0x1),_0xb99a90--,_0x412476['isAdded']=!0x1);}for(let _0x37a60f=0x0;_0x37a60f<_0x5c36cd['length'];_0x37a60f++)_0x91369e['has'](_0x5c36cd[_0x37a60f]['pairId'])&&(_0x5c36cd[_0x37a60f]['pairId']=_0x91369e['get'](_0x5c36cd[_0x37a60f]['pairId']));}['_removeMissingPairs'](_0x58ccc2){const _0x396544=new Set(_0x58ccc2['map'](_0x2907a2=>_0x2907a2['id']));for(let _0x2b9d86=0x0;_0x2b9d86<_0x58ccc2['length'];_0x2b9d86++)_0x396544['has'](_0x58ccc2[_0x2b9d86]['pairId'])||0x0==_0x58ccc2[_0x2b9d86]['distance']||(_0x58ccc2[_0x2b9d86]['isIncorrect']=!0x0);return _0x58ccc2['filter'](_0x10cf9c=>!_0x10cf9c['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3a17ca){const _0x516187=new Set();for(let _0x1a48e2=0x0;_0x1a48e2<_0x3a17ca['length'];_0x1a48e2++){if(_0x516187['has'](_0x3a17ca[_0x1a48e2]['id'])&&_0x3a17ca[_0x1a48e2]['isRemoved']&&(_0x3a17ca[_0x1a48e2]['isIncorrect']=!0x0),_0x3a17ca[_0x1a48e2]['isIncorrect'])continue;if(0x0==_0x3a17ca[_0x1a48e2]['distance'])continue;if('elementStart'!=_0x3a17ca[_0x1a48e2]['type'])continue;if(null==_0x3a17ca[_0x1a48e2]['pairId'])continue;let _0xa2a73a=_0x1a48e2+0x1,_0x5523d5=0x0;for(;_0x3a17ca[_0xa2a73a]['id']!=_0x3a17ca[_0x1a48e2]['pairId'];)'elementStart'==_0x3a17ca[_0xa2a73a]['type']?_0x5523d5++:'elementEnd'==_0x3a17ca[_0xa2a73a]['type']&&_0x5523d5--,_0xa2a73a++;if(0x0!=_0x5523d5){if(_0x3a17ca[_0x1a48e2]['isRemoved'])_0x3a17ca[_0x1a48e2]['isIncorrect']=!0x0;else{for(;_0xa2a73a!=_0x1a48e2;)_0x3a17ca[_0xa2a73a]['isRemoved']&&0x0!=_0x3a17ca[_0xa2a73a]['distance']&&(_0x3a17ca[_0xa2a73a]['isIncorrect']=!0x0,_0x516187['add'](_0x3a17ca[_0xa2a73a]['pairId'])),_0xa2a73a--;}}}return _0x3a17ca['filter'](_0x1f200f=>!_0x1f200f['isIncorrect']);}['_removeUnsupportedChanges'](_0x47c4a0){const _0x47b287=this['editor']['model']['schema'];for(let _0x48dd77=0x0;_0x48dd77<_0x47c4a0['length'];_0x48dd77++){if(!(_0x47c4a0[_0x48dd77]['isAdded']||_0x47c4a0[_0x48dd77]['isAddSuggestion']||_0x47c4a0[_0x48dd77]['isRemoved']||_0x47c4a0[_0x48dd77]['isRemoveSuggestion']))continue;if(0x0==_0x47c4a0[_0x48dd77]['distance'])continue;const _0x12590a=_0x47c4a0[_0x48dd77]['item'];_0x47b287['isBlock'](_0x12590a)||_0x47b287['isLimit'](_0x12590a)||(_0x47c4a0[_0x48dd77]['isAdded']&&delete _0x47c4a0[_0x48dd77]['isAdded'],_0x47c4a0[_0x48dd77]['isAddSuggestion']&&delete _0x47c4a0[_0x48dd77]['isAddSuggestion'],_0x47c4a0[_0x48dd77]['isRemoveSuggestion']&&delete _0x47c4a0[_0x48dd77]['isRemoveSuggestion'],_0x47c4a0[_0x48dd77]['isRemoved']&&(_0x47c4a0[_0x48dd77]['isIncorrect']=!0x0));}return _0x47c4a0['filter'](_0x279406=>!_0x279406['isIncorrect']);}['_makeModelFromTape'](_0x3f2afa,_0x9162b9,_0xfaa90c){const _0x4b88ad=new wt(),_0x4d4790=[],_0x8a2e84=new Map(),_0x42c364=this['editor']['model'],_0x299ff1=_0x42c364['schema'],_0xb9e352=[_0x4b88ad],_0x1a5bf9={},_0x4efe17={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x3068cf=null;const _0x141561=[0x0];for(let _0x2b9d32=0x0;_0x2b9d32<_0x3f2afa['length'];_0x2b9d32++)if('elementStart'===_0x3f2afa[_0x2b9d32]['type']){_0x3f2afa[_0x2b9d32]['previousPosition']=_0x42c364['createPositionFromPath'](_0x4b88ad,_0x141561);const _0x56eca9=new ft(_0x3f2afa[_0x2b9d32]['item']['name'],_0x3f2afa[_0x2b9d32]['item']['getAttributes']());_0xb9e352[0x0]['_appendChild'](_0x56eca9),_0x141561['push'](0x0),_0xb9e352['unshift'](_0x56eca9),_0x3f2afa[_0x2b9d32]['nextPosition']=_0x42c364['createPositionFromPath'](_0x4b88ad,_0x141561);}else'elementEnd'===_0x3f2afa[_0x2b9d32]['type']?(_0xb9e352['shift'](),_0x3f2afa[_0x2b9d32]['previousPosition']=_0x42c364['createPositionFromPath'](_0x4b88ad,_0x141561),_0x141561['pop'](),_0x141561[_0x141561['length']-0x1]++,_0x3f2afa[_0x2b9d32]['nextPosition']=_0x42c364['createPositionFromPath'](_0x4b88ad,_0x141561)):(_0x3f2afa[_0x2b9d32]['previousPosition']=_0x42c364['createPositionFromPath'](_0x4b88ad,_0x141561),_0x3068cf?_0x3068cf['_data']+=_0x3f2afa[_0x2b9d32]['item']['data']:_0x3068cf=new _t(_0x3f2afa[_0x2b9d32]['item']['data'],_0x3f2afa[_0x2b9d32]['item']['getAttributes']()),_0x3f2afa[_0x2b9d32+0x1]&&'text'===_0x3f2afa[_0x2b9d32+0x1]['type']&&_0x45ac5c(_0x3068cf,_0x3f2afa[_0x2b9d32+0x1]['item'])||(_0xb9e352[0x0]['_appendChild'](_0x3068cf),_0x3068cf=null),_0x141561[_0x141561['length']-0x1]+=_0x3f2afa[_0x2b9d32]['item']['offsetSize'],_0x3f2afa[_0x2b9d32]['nextPosition']=_0x42c364['createPositionFromPath'](_0x4b88ad,_0x141561));for(let _0x27996d=0x0;_0x27996d<_0x3f2afa['length'];_0x27996d++){const _0x66007d=_0x3f2afa[_0x27996d]['previousPosition'],_0x3810f4=_0x3f2afa[_0x27996d]['nextPosition'];for(const _0x469dc9 of _0x3f2afa[_0x27996d]['markersStart'])_0x8a2e84['set'](_0x469dc9,{'start':_0x66007d,'end':null});_0x443076('isRemoveSuggestion',_0x27996d,_0x66007d,_0x3810f4),_0x443076('isAddSuggestion',_0x27996d,_0x66007d,_0x3810f4),_0x443076('isRemoved',_0x27996d,_0x66007d,_0x3810f4),_0x443076('isAdded',_0x27996d,_0x66007d,_0x3810f4);for(const _0x256564 of _0x3f2afa[_0x27996d]['markersEnd']){_0x8a2e84['get'](_0x256564)['end']=_0x3810f4;}}for(const [_0x246a4d,_0x1c2a00]of _0x8a2e84){const _0x65f7b=this['editor']['model']['createRange'](_0x1c2a00['start'],_0x1c2a00['end']);_0x4b88ad['markers']['set'](_0x246a4d,_0x65f7b);}return _0x4d4790['sort']((_0x2558e1,_0x33e897)=>{const _0x2b4312=_0x4b88ad['markers']['get']('revision:'+_0x2558e1['id']),_0x36e7eb=_0x4b88ad['markers']['get']('revision:'+_0x33e897['id']);return _0x2b4312['start']['isBefore'](_0x36e7eb['start'])?-0x1:_0x2b4312['start']['isAfter'](_0x36e7eb['start'])?0x1:_0x2b4312['end']['isBefore'](_0x36e7eb['end'])?-0x1:_0x2b4312['end']['isAfter'](_0x36e7eb['end'])?0x1:'add'===_0x2558e1['type']?-0x1:0x1;}),{'root':_0x4b88ad,'changes':_0x4d4790};function _0x443076(_0x5b3369,_0x4a1f5a,_0x118d89,_0x3dba3f){const _0x5102b8=!!_0x3f2afa[_0x4a1f5a][_0x5b3369],_0x432849=_0x5102b8?_0x3f2afa[_0x4a1f5a][_0x5b3369]['userId']:null,_0x26e526=_0x4a1f5a===_0x3f2afa['length']-0x1,_0x4257fe=_0x4efe17[_0x5b3369][0x0],_0x1b2258=_0x299ff1['isObject'](_0x3f2afa[_0x4a1f5a]['item']);!_0x1a5bf9[_0x5b3369]&&_0x5102b8?_0x1a5bf9[_0x5b3369]={'start':_0x118d89,'tapeItem':_0x3f2afa[_0x4a1f5a],'userId':_0x432849,'type':_0x5b3369}:_0x1a5bf9[_0x5b3369]&&!_0x5102b8?(_0x1a5bf9[_0x5b3369]['end']=_0x118d89,_0x1d8364(_0x1a5bf9[_0x5b3369]),_0x1a5bf9[_0x5b3369]=null):_0x1a5bf9[_0x5b3369]&&_0x5102b8&&_0x1a5bf9[_0x5b3369]['userId']!==_0x432849&&(_0x1a5bf9[_0x5b3369]['end']=_0x118d89,_0x4257fe&&_0x4257fe['userId']===_0x1a5bf9[_0x5b3369]['userId']||_0x1d8364(_0x1a5bf9[_0x5b3369]),_0x1a5bf9[_0x5b3369]={'start':_0x118d89,'tapeItem':_0x3f2afa[_0x4a1f5a],'userId':_0x432849,'type':_0x5b3369}),_0x1a5bf9[_0x5b3369]&&_0x1b2258&&('elementStart'!==_0x3f2afa[_0x4a1f5a]['type']||_0x4257fe&&_0x4257fe['userId']===_0x432849||_0x4efe17[_0x5b3369]['unshift']({'userId':_0x432849,'object':_0x3f2afa[_0x4a1f5a]['item'],'change':_0x1a5bf9[_0x5b3369]}),'elementEnd'===_0x3f2afa[_0x4a1f5a]['type']&&_0x4257fe&&_0x4257fe['object']===_0x3f2afa[_0x4a1f5a]['item']&&(_0x4efe17[_0x5b3369]['shift'](),_0x1a5bf9[_0x5b3369]=_0x4257fe['change'])),_0x1a5bf9[_0x5b3369]&&_0x26e526&&(_0x1a5bf9[_0x5b3369]['end']=_0x3dba3f,_0x1d8364(_0x1a5bf9[_0x5b3369]),_0x1a5bf9[_0x5b3369]=null);}function _0x1d8364({start:_0x245733,end:_0x50ea8f,tapeItem:_0x31ccc3,userId:_0x3ec4a9,type:_0x597c58}){const _0x1ef9c6=_0x31ccc3['item'],_0x170835=_0x42c364['schema']['isBlock'](_0x1ef9c6)&&!_0x42c364['schema']['isLimit'](_0x1ef9c6),_0x59910a=_0x245733['nodeAfter']==_0x50ea8f['parent']&&_0x50ea8f['isAtStart'];if(_0x170835&&_0x59910a)return;const _0x41de29=_0x42c364['createRange'](_0x245733,_0x50ea8f),_0xb9ffba=_0x9162b9['get'](_0x3ec4a9),_0x58c438=new r({'author':_0xb9ffba,'type':'isAdded'==_0x597c58||'isAddSuggestion'==_0x597c58?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x597c58||'isRemoveSuggestion'==_0x597c58},'createdAt':new Date(),'rootName':_0xfaa90c});_0x4d4790['push'](_0x58c438),_0x4b88ad['markers']['set']('revision:'+_0x58c438['id'],_0x41de29);}function _0x45ac5c(_0x242032,_0x5cc6fb){const _0x1c0799=_0x242032['getAttributes'](),_0x1a513c=_0x5cc6fb['getAttributes']();for(const _0x6571f0 of _0x1c0799){if(_0x6571f0[0x1]!==_0x5cc6fb['getAttribute'](_0x6571f0[0x0]))return!0x1;_0x1a513c['next']();}return _0x1a513c['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x156c98=>{const _0x1e99d3=_0x156c98['markerName']['split'](':')[0x1],_0x1a2fc6=this['_getChangeFromId'](_0x1e99d3);if(!_0x1a2fc6)return null;const _0x5b6532='add'==_0x1a2fc6['type']?'insertion':'deletion',_0x203cac=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5b6532];return _0x1a2fc6['data']['isSuggestion']&&_0x203cac['push']('ck-suggestion-marker-'+_0x5b6532+'-new'),this['activeChange']==_0x1a2fc6&&_0x203cac['push']('ck-suggestion-marker--active'),{'classes':_0x203cac,'attributes':{'data-change-id':_0x1e99d3}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5e2153=>{_0x5e2153['on']('element:pre',(_0x4a5b98,_0x50ae90,_0x2aab8a)=>{const _0x74e635=_0x50ae90['viewItem']['getChild'](0x0);if(!_0x74e635||!_0x74e635['is']('element','code'))return;if(!_0x2aab8a['consumable']['consume'](_0x74e635,{'attributes':['vid_start','vid_end']}))return;const _0x55056a=_0x50ae90['modelRange']['start']['nodeAfter'];_0x2aab8a['writer']['setAttribute']('vid_start',_0x74e635['getAttribute']('vid_start'),_0x55056a),_0x2aab8a['writer']['setAttribute']('vid_end',_0x74e635['getAttribute']('vid_end'),_0x55056a);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x268c04=>{_0x268c04['on']('element',(_0x286bff,_0x3419ad,_0x41b322)=>{if(!_0x41b322['consumable']['consume'](_0x3419ad['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3419ad['modelRange']['isCollapsed'])return;const _0x144ce3=_0x3419ad['modelRange']['start']['nodeAfter'];_0x144ce3['hasAttribute']('vid_start')||_0x144ce3['hasAttribute']('vid')||(_0x41b322['writer']['setAttribute']('vid_start',_0x3419ad['viewItem']['getAttribute']('vid_start'),_0x144ce3),_0x41b322['writer']['setAttribute']('vid_end',_0x3419ad['viewItem']['getAttribute']('vid_end'),_0x144ce3));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xbde84f=>_0xbde84f['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3b19a0,[,_0x38b397])=>{['vid_start','vid_end','vid']['includes'](_0x38b397)&&(_0x3b19a0['return']=!0x0,_0x3b19a0['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x57de3a=>{_0x57de3a['on']('attribute:vid',(_0x5bb448,_0x3172de,_0x13beec)=>{if('\x20'!=_0x3172de['item']['data']||_0x3172de['item']['parent']['maxOffset']>0x1)return;if(!_0x13beec['consumable']['consume'](_0x3172de['item'],_0x5bb448['name']))return;const _0x577d47=_0x13beec['writer'],_0xa852ea=_0x13beec['mapper']['toViewRange'](_0x3172de['range']);_0x577d47['wrap'](_0xa852ea,_0x577d47['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x27ac6f){const _0x48efad=_0x27ac6f['plugins']['get']('RevisionViewer');return(_0x5f08f8,_0x1801ad,_0x5a4d1c)=>{const _0x29cebf=_0x1801ad['markerName']['split'](':')[0x1],_0x526ba1=_0x48efad['_getChangeFromId'](_0x29cebf);if(!_0x526ba1)return null;const _0x393bdb='add'==_0x526ba1['type']?'split':'merge';if(!_0x5a4d1c['consumable']['test'](_0x1801ad['markerRange'],_0x5f08f8['name']))return;const _0x48771b=_0x1801ad['markerRange']['getWalker'](),_0x455671=_0x1801ad['markerRange']['start'],_0x405f92=_0x27ac6f['model']['schema'];let _0x3f28e3=null,_0x418ac4=null,_0xfec8de=!0x1,_0x5c9638=!0x1;for(const _0x49c91a of _0x48771b){const _0xb04513=_0x49c91a['item'];_0xfec8de=_0xfec8de||_0x405f92['isContent'](_0xb04513);const _0x1d07a4=_0x5a4d1c['mapper']['toViewElement'](_0xb04513);if(_0x1d07a4&&_0x1d07a4['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x49c91a['type']&&(_0x405f92['isBlock'](_0xb04513)&&!_0x405f92['isLimit'](_0xb04513)&&(_0xb04513['nextSibling']||_0x455671['isAtEnd']?_0x3f28e3&&_0x3f28e3['parent']==_0xb04513||(_0x3f28e3=_0xb04513,_0x2e7ea4(_0x49c91a['previousPosition']),_0x5c9638=!0x0):_0x418ac4=_0x418ac4||_0x49c91a['previousPosition']));}function _0x2e7ea4(_0x24aa67){const _0x1ffe32=_0x5a4d1c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x393bdb}),_0x3addfe=_0x5a4d1c['mapper']['toViewPosition'](_0x24aa67);_0x526ba1['data']['isSuggestion']&&_0x5a4d1c['writer']['addClass']('ck-suggestion-marker-'+_0x393bdb+'-new',_0x1ffe32),_0x48efad['activeChange']==_0x526ba1&&_0x5a4d1c['writer']['addClass']('ck-suggestion-marker--active',_0x1ffe32),_0x5a4d1c['writer']['insert'](_0x3addfe,_0x1ffe32),_0x5a4d1c['mapper']['bindElementToMarker'](_0x1ffe32,_0x1801ad['markerName']);}_0xfec8de||_0x5c9638||!_0x418ac4||_0x2e7ea4(_0x418ac4);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2be13a,_0x305797,_0x52fd14)=>{const _0x118f0a=_0x52fd14['mapper']['markerNameToElements'](_0x305797['markerName']);if(_0x118f0a){for(const _0x299887 of _0x118f0a)(_0x299887['hasClass']('ck-suggestion-marker-split')||_0x299887['hasClass']('ck-suggestion-marker-merge'))&&(_0x52fd14['mapper']['unbindElementFromMarkerName'](_0x299887,_0x305797['markerName']),_0x52fd14['writer']['remove'](_0x299887));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x17c8be,_0x5b055c,_0x69cc58)=>{const _0x27877f=_0x5b055c['markerName']['split'](':')[0x1],_0x150195=this['_getChangeFromId'](_0x27877f);if(!_0x150195)return null;const _0x35b0c0='add'==_0x150195['type']?'split':'merge';if(_0x69cc58['consumable']['test'](_0x5b055c['markerRange'],_0x17c8be['name']))for(const _0x200c6f of _0x5b055c['markerRange']['getItems']()){if(!_0x200c6f['is']('element','softBreak'))continue;const _0x3c903f=_0x69cc58['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x35b0c0}),_0x51c7c3=_0x69cc58['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x200c6f));_0x150195['data']['isSuggestion']&&_0x69cc58['writer']['addClass']('ck-suggestion-marker-'+_0x35b0c0+'-new',_0x3c903f),this['activeChange']==_0x150195&&_0x69cc58['writer']['addClass']('ck-suggestion-marker--active',_0x3c903f),_0x69cc58['writer']['insert'](_0x51c7c3,_0x3c903f),_0x69cc58['mapper']['bindElementToMarker'](_0x3c903f,_0x5b055c['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x583821=>{for(const _0xdf6ac8 of this['editor']['model']['document']['getRootNames']()){const _0x5f30f6=this['editor']['model']['document']['getRoot'](_0xdf6ac8),_0x3b1941=this['editor']['editing']['view']['document']['getRoot'](_0xdf6ac8);if(_0x3b1941){const _0x57248c=_0x5f30f6['getAttribute']('revisionHistoryAttachChange');if(_0x583821['removeAttribute']('data-change-id',_0x3b1941),_0x583821['removeClass']('ck-revision-history-root-add',_0x3b1941),_0x583821['removeClass']('ck-revision-history-root-remove',_0x3b1941),_0x583821['removeClass']('ck-revision-history-root--active',_0x3b1941),_0x57248c){const _0x25d32a=this['_getChangeFromId'](_0x57248c);if(!_0x25d32a)return null;_0x583821['setAttribute']('data-change-id',_0x57248c,_0x3b1941),_0x583821['addClass']('ck-revision-history-root-'+_0x25d32a['type'],_0x3b1941),this['activeChange']==_0x25d32a&&_0x583821['addClass']('ck-revision-history-root--active',_0x3b1941);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x18de01=>'revision-comment:'+_0x18de01,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xa54a02=>'revision-suggestion:'+_0xa54a02,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x22b0f2=>({'name':'suggestion:'+_0x22b0f2,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x51efd3=>{const _0x56cbf0=_0x51efd3['markerName']['split'](':')[0x1];return'insertion'!=_0x56cbf0&&'deletion'!=_0x56cbf0?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x56cbf0]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',tt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',tt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x575894,_0x546158,_0x435ef8)=>{const _0x4b6714=_0x435ef8['mapper']['markerNameToElements'](_0x546158['markerName']);if(_0x4b6714){for(const _0x43d126 of _0x4b6714)_0x43d126['is']('uiElement')&&(_0x435ef8['mapper']['unbindElementFromMarkerName'](_0x43d126,_0x546158['markerName']),_0x435ef8['writer']['remove'](_0x43d126));}},{'priority':'high'});}['_getChangeFromId'](_0x12e7a7){return this['_changeIdToChange']['get'](_0x12e7a7);}['_getViewForChange'](_0x5b4c85){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Y(this['editor']['locale'],_0x5b4c85),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xba4acd,_0x5dd626,_0x3c5857,_0x58bfa4)=>{_0x58bfa4&&this['_balloon']['remove'](_0x58bfa4),_0x3c5857&&(this['_balloon']['add']({'view':_0x3c5857,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2ff0cb=this['editor']['editing'],_0x3bedf2=this['_getChangeFromId'](_0x3c5857['changeId']);let _0x1dcf02;if(_0x3bedf2['data']['isOnRoot']){const _0x3cfe6d=_0x2ff0cb['view']['getDomRoot'](_0x3bedf2['rootName']);_0x1dcf02=Array['from'](_0x3cfe6d['getClientRects']());}else{const _0x5d6aef=this['editor']['model']['markers']['get']('revision:'+_0x3c5857['changeId']);_0x1dcf02=Array['from'](_0x2ff0cb['mapper']['markerNameToElements'](_0x5d6aef['name']))['map'](_0x3b9cb5=>_0x2ff0cb['view']['domConverter']['mapViewToDom'](_0x3b9cb5))['map'](_0x52d462=>Array['from'](_0x52d462['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1dcf02[0x0];return _0x1dcf02['find'](_0x2bd09d=>_0x2bd09d['top']-0x3<=this['_activeViewTarget']['y']&&_0x2bd09d['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2bd09d['left']-0x3<=this['_activeViewTarget']['x']&&_0x2bd09d['right']+0x3>=this['_activeViewTarget']['x'])||_0x1dcf02[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2c91a3,_0x5727aa,_0x5f4f00,_0x3180ca)=>{this['activeView']=_0x5f4f00?this['_getViewForChange'](_0x5f4f00):null,this['editor']['model']['change'](()=>{const _0x590a8f=this['editor']['editing'];_0x3180ca&&(_0x3180ca['data']['isOnRoot']?_0x590a8f['view']['change'](_0x1f77ed=>{_0x1f77ed['removeClass']('ck-revision-history-root--active',_0x590a8f['view']['document']['getRoot'](_0x3180ca['rootName']));}):_0x590a8f['reconvertMarker']('revision:'+_0x3180ca['id'])),_0x5f4f00&&(_0x5f4f00['data']['isOnRoot']?_0x590a8f['view']['change'](_0x5ecb55=>{_0x5ecb55['addClass']('ck-revision-history-root--active',_0x590a8f['view']['document']['getRoot'](_0x5f4f00['rootName']));}):_0x590a8f['reconvertMarker']('revision:'+_0x5f4f00['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x59a574,_0x50e861)=>{if(this['activeChange'])return;const _0x34b1a2=this['_findChangeIdFromDomTarget'](_0x50e861['target']),_0x5dc35d=this['_changeIdToChange']['get'](_0x34b1a2);_0x5dc35d?(this['_activeViewTarget']={'x':_0x50e861['domEvent']['x'],'y':_0x50e861['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5dc35d)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x31fcc5,_0x4af0df)=>{const _0x38f491=this['_findChangeIdFromDomTarget'](_0x4af0df['target']),_0x25793c=this['_changeIdToChange']['get'](_0x38f491);_0x25793c?(this['_activeViewTarget']={'x':_0x4af0df['domEvent']['x'],'y':_0x4af0df['domEvent']['y']},_0x25793c===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x25793c):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x22fe6b){do{const _0x21a965=_0x22fe6b['getAttribute']('data-change-id');if(_0x21a965)return _0x21a965;_0x22fe6b=_0x22fe6b['parent'];}while(_0x22fe6b);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x4d5849=>{for(const _0x15fd1b of this['editor']['model']['markers'])_0x4d5849['removeMarker'](_0x15fd1b);});}}function tt(_0x5f019c,_0x453ed9){return(_0x51e891,_0x44c247,_0x1836a5)=>{if(!_0x1836a5['consumable']['test'](_0x44c247['markerRange'],_0x51e891['name']))return;const _0x2b6804=_0x44c247['markerRange']['getWalker'](),_0x11f572=_0x44c247['markerRange']['start'],_0x2197a1=_0x5f019c['model']['schema'];let _0x2cb332=null,_0x199063=null,_0x505531=!0x1,_0x20af7d=!0x1;for(const _0x239049 of _0x2b6804){const _0x483f85=_0x239049['item'];_0x505531=_0x505531||_0x2197a1['isContent'](_0x483f85);const _0x11a92b=_0x1836a5['mapper']['toViewElement'](_0x483f85);if(_0x11a92b&&_0x11a92b['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x239049['type']&&(_0x2197a1['isBlock'](_0x483f85)&&!_0x2197a1['isLimit'](_0x483f85)&&(_0x483f85['nextSibling']||_0x11f572['isAtEnd']?_0x2cb332&&_0x2cb332['parent']==_0x483f85||(_0x2cb332=_0x483f85,_0x1b6bdc(_0x239049['previousPosition']),_0x20af7d=!0x0):_0x199063=_0x199063||_0x239049['previousPosition']));}function _0x1b6bdc(_0x1b763f){const _0x477fd3=_0x1836a5['mapper']['toViewPosition'](_0x1b763f),_0x2e713d=_0x1836a5['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x453ed9});_0x1836a5['writer']['insert'](_0x477fd3,_0x2e713d),_0x1836a5['mapper']['bindElementToMarker'](_0x2e713d,_0x44c247['markerName']);}_0x505531||_0x20af7d||!_0x199063||_0x1b6bdc(_0x199063);};}class yt extends _0x16bd35{constructor(_0x1d91ca){super(_0x1d91ca);const _0xef3b6d=_0x1d91ca['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0xef3b6d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xef3b6d,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x504ca0=this['editor'],_0x23ff04=_0x504ca0['plugins']['get'](d),_0x1b4d19=_0x23ff04['isReady']?_0x23ff04['diff']['newRevisionId']:null;_0x504ca0['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1b4d19);}['refresh'](){const {isReady:_0x2c1d08,isEnabled:_0x2fab54}=this['editor']['plugins']['get'](d);this['isEnabled']=_0x2c1d08&&_0x2fab54;}}class bt extends _0x16bd35{['_step'];constructor(_0xf80c81,{direction:_0x30d909}){super(_0xf80c81);const _0x2137c9=_0xf80c81['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x30d909?0x1:-0x1,this['listenTo'](_0x2137c9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2137c9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2137c9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2ce991=this['editor'],_0x492b09=_0x2ce991['plugins']['get'](d),{isNavigationMode:_0x3654b1,currentChangeNumber:_0xf6f6bc}=_0x492b09;let _0x3425d2;if(_0x492b09['activeChange']=_0x3654b1?_0x492b09['diff']['changes']['get'](_0xf6f6bc+this['_step']):_0x492b09['diff']['changes']['first'],_0x492b09['activeChange']['data']['isOnRoot'])_0x3425d2=_0x2ce991['editing']['view']['getDomRoot'](_0x492b09['activeChange']['rootName']);else{const _0x5cac28=_0x2ce991['model']['markers']['get']('revision:'+_0x492b09['activeChange']['id']);_0x3425d2=_0x1e3d9d(_0x2ce991['editing'],_0x5cac28);}_0xdc13e8({'target':_0x3425d2,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x35aea9,currentChangeNumber:_0x39240b,numberOfChanges:_0x4198c4,isReady:_0x2b8057,isEnabled:_0xdf8550}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0xdf8550&&_0x2b8057&&_0x4198c4)&&(!_0x35aea9||(0x1===this['_step']?_0x39240b<_0x4198c4-0x1:_0x39240b>0x0));}}class di extends _0x4f4dcf{constructor(_0x315ea2){super(_0x315ea2);const _0x1b5dde=this['bindTemplate'],_0x3f7bdf=new _0x18590d(_0x315ea2),_0x92cd7c=new _0x18590d(_0x315ea2);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',(_0xc36be0,_0x5bcf0e)=>_0xc36be0&&_0x5bcf0e>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x144d8b,_0x16e4c8,_0x23a613,_0x19f4f5)=>{if(!_0x144d8b)return R(_0x315ea2,'Loading...');if(!_0x23a613)return R(_0x315ea2,'No\x20changes');const _0x33042b=R(_0x315ea2,'NUMBER_OF_CHANGES',_0x23a613);return _0x19f4f5?R(_0x315ea2,'X_OF_Y_CHANGES',[_0x16e4c8+0x1,_0x23a613]):_0x33042b;}),_0x3f7bdf['set']({'label':R(_0x315ea2,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x92cd7c['set']({'label':R(_0x315ea2,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x3f7bdf['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x92cd7c['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x3f7bdf['on']('execute',()=>this['fire']('execute','backward')),_0x92cd7c['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',_0x1b5dde['if']('_isStatusLabelVisible','ck-hidden',_0x5e9126=>!_0x5e9126)]},'children':[{'text':_0x1b5dde['to']('isNavigationMode',_0xb5db1f=>_0xb5db1f?R(_0x315ea2,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x315ea2,'Total')+':\x20')}]},{'text':_0x1b5dde['to']('_statusText')}]},new _0x3b7cad(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x3f7bdf,_0x92cd7c]}]});}}const ce='ck-editor__editable__loading-overlay';class ae extends _0x9a5545{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0xbed15a=this['editor']['editing']['view'];_0xbed15a['change'](_0x5b0291=>{for(const _0x363d68 of _0xbed15a['document']['roots'])_0x5b0291['addClass'](ce,_0x363d68);});}['hide'](){const _0x4d35ca=this['editor']['editing']['view'];_0x4d35ca['change'](_0x451487=>{for(const _0x278be8 of _0x4d35ca['document']['roots'])_0x451487['removeClass'](ce,_0x278be8);});}}class m extends _0x9a5545{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ae];}['init'](){const _0x29bedc=this['editor'],_0x4e1132=_0x29bedc['plugins']['get'](d),_0xec447f=_0x29bedc['plugins']['get'](ae);_0x29bedc['ui']['componentFactory']['add']('exitToEditing',_0x2be7a7=>{const _0x25e763=new _0x18590d(_0x2be7a7);return _0x25e763['set']({'label':R(_0x2be7a7,'Back\x20to\x20editing'),'icon':_0x25fa55['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x25e763,'execute',()=>{_0x29bedc['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x25e763;}),_0x29bedc['ui']['componentFactory']['add']('restoreRevision',_0x183354=>{const _0x3b4e41=new _0x18590d(_0x183354);return _0x3b4e41['set']({'label':R(_0x183354,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3b4e41['bind']('isEnabled')['to'](_0x29bedc['commands']['get']('restoreRevision')),this['listenTo'](_0x3b4e41,'execute',()=>_0x29bedc['execute']('restoreRevision')),_0x3b4e41;}),_0x29bedc['ui']['componentFactory']['add']('changesNavigation',_0x2c8d33=>{const _0x2c1633=new di(_0x2c8d33),_0x59715b=_0x29bedc['commands']['get']('showPreviousChange'),_0x12ef38=_0x29bedc['commands']['get']('showNextChange');return _0x2c1633['bind']('isBackwardNavigationEnabled')['to'](_0x59715b,'isEnabled'),_0x2c1633['bind']('isForwardNavigationEnabled')['to'](_0x12ef38,'isEnabled'),_0x2c1633['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4e1132),this['listenTo'](_0x2c1633,'execute',(_0x13ebdb,_0x18e0a4)=>{_0x29bedc['execute']('forward'===_0x18e0a4?'showNextChange':'showPreviousChange');}),_0x2c1633;}),_0xec447f['show'](),_0x4e1132['on']('change:isReady',(_0x1e8d5b,_0x28d650,_0x21e609)=>{_0x21e609?_0xec447f['hide']():_0xec447f['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x407381,_0x9c6319){super(_0x407381,_0x9c6319);const _0x7f271c=this['bindTemplate'];this['set']({'label':R(_0x407381,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x407381,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x7f271c['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5d5db1=this['fieldView']['element'];this['_tooltipString']=_0x5d5db1['scrollWidth']>_0x5d5db1['clientWidth']&&_0x5d5db1['value']||'';}}class ti extends _0x4f4dcf{constructor(_0x2f6ccd,_0x265d92,_0x1c190b){super(_0x2f6ccd);const _0x59c38a=new _0x58df23();_0x59c38a['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x4731e0=['ck','ck-revision-history-sidebar__revision-author'];_0x1c190b&&_0x4731e0['push']('ck-revision-history-sidebar__revision-author_creator');const _0xa19858=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x2f6ccd,_0x1c190b?'Revision\x20creator':'Revision\x20author')},'children':[_0x59c38a,_0x265d92['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4731e0},'children':_0xa19858});}}function ni(_0x225c61,_0x5d269b){const _0x2b0080=_0x225c61['bindTemplate'],_0x41a643=_0x225c61['locale'],_0x504e9a=_0x5c06d4(_0x41a643);_0x504e9a['panelPosition']='sw';const _0x50b68d=function(_0x3090de,_0x47512b){const _0x53d1f4=function(_0x20e461,_0x193b93){const _0x57b863=_0x20e461['locale'],_0x143e68={'Compare\x20against\x20selected':R(_0x57b863,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x57b863,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x57b863,'Restore\x20this\x20revision')};return _0x193b93['map'](_0xbf7a77=>{const _0x5ef09b=_0x143e68[_0xbf7a77['name']];return _0x5ef09b&&_0x5ef09b!==_0xbf7a77['name']&&(_0xbf7a77['name']=_0x5ef09b),_0xbf7a77;});}(_0x3090de,_0x47512b),_0x527d94=new _0x2f121a();for(const _0x341765 of _0x53d1f4){const _0x3310ad={'type':'button','model':new to({'label':_0x341765['name'],'class':_0x341765['class'],'withText':!0x0,'role':'menuitem','_action':_0x341765['action']})};_0x3310ad['model']['bind']('isEnabled')['to'](_0x3090de,'isActionsDropdownOpen',_0x3cc4ef=>'function'!=typeof _0x341765['isEnabled']||(!_0x3cc4ef||_0x341765['isEnabled'](_0x3090de))),_0x527d94['add'](_0x3310ad);}return _0x527d94;}(_0x225c61,_0x5d269b);return _0x225c61['bind']('isActionsDropdownOpen')['to'](_0x504e9a,'isOpen'),_0x504e9a['buttonView']['set']({'label':R(_0x41a643,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x25fa55['threeVerticalDots']}),_0x504e9a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2b0080['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2b0080['to'](_0x2870b2=>_0x2870b2['stopPropagation']())}}),_0x504e9a['on']('execute',_0x10b435=>{_0x225c61['isReady']&&'function'==typeof _0x10b435['source']['_action']&&_0x10b435['source']['_action'](_0x225c61);}),_0x584b38(_0x504e9a,_0x50b68d,{'role':'menu'}),_0x504e9a['listenTo'](_0x225c61,'change:isActionsDropdownOpen',(_0x3ab9d3,_0x3e89f2,_0x11d9a0)=>{if(_0x11d9a0)for(const _0x2954e2 of _0x504e9a['listView']['items']){const _0x1cf105=_0x2954e2['children']['first'],_0x13f8bf=_0x5d269b['find'](_0x35a40d=>_0x35a40d['action']===_0x1cf105['_action'])['isVisible'];_0x2954e2['isVisible']=void 0x0===_0x13f8bf||_0x13f8bf(_0x225c61);}}),_0x504e9a;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x35ab5a,uid as _0x164885,Collection as _0x22f9c7,logWarning as _0x452764,FocusTracker as _0x222fa5,KeystrokeHandler as _0x1bd166,scrollViewportToShowTarget as _0x49616c,ResizeObserver as pt,ElementReplacer as ct,CKEditorError as _0x93f9cb}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3a4227,set as _0x3e1bc8,unset as _0x35c309,isEqual as _0x42c3bd}from'lodash-es';import{Plugin as _0x52ad62,PendingActions as _0x271c6a,icons as _0x598ba3,Command as _0x5c5c03,ElementApiMixin as rt,Editor as it}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x3253b4,getMarkerDomElement as _0x556edb,ConfirmMixin as _0x23c90d,sanitizeEditorConfig as _0x3f13e4}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x2e98fa,ViewText as _0x40d627,ViewElement as _0x6f249f,Element as ft,Range as vt,Position as gt,DocumentFragment as wt,ViewContainerElement as _0x268df4,ViewAttributeElement as _0x3d4e27,ViewEmptyElement as _0x4b27ee,ViewRawElement as _0x29b634,ViewUIElement as _0x24fb36,Text as _t}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as _0x229008,injectCssTransitionDisabler as ts,submitHandler as _0x8bdb45,LabeledFieldView as at,createLabeledInputText as _0x204f0c,createDropdown as _0xc86235,ListView as te,ListItemView as _0x389bc6,ButtonView as _0x51179d,MenuBarMenuView as _0x673cc,MenuBarMenuListView as _0xea0e98,MenuBarMenuListItemView as _0x50d7c3,MenuBarMenuListItemButtonView as _0x3abf6d,ContextualBalloon as _0x5a3b48,ToolbarSeparatorView as _0x86f0e9,IconView as _0x3df9f2,addListToDropdown as _0xcaaeaa,ViewModel as to,EditorUI as ot,normalizeToolbarConfig as ht,BoxedEditorUIView as dt,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as ut}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x16e050}from'luxon';class a extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x35ab5a(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x221ed8){super(),this['id']=_0x221ed8['id']||_0x164885(),this['creator']=_0x221ed8['creator']||null,this['authors']=_0x221ed8['authors']||[],this['diffData']=_0x221ed8['diffData']||null,this['toVersion']=_0x221ed8['toVersion']||0x0,this['fromVersion']=_0x221ed8['fromVersion']||0x0,this['set']('name',_0x221ed8['name']||''),this['set']('createdAt',_0x221ed8['createdAt']||new Date()),this['set']('attributes',_0x221ed8['attributes']||{});}['setName'](_0x343eba){this['_update']({'name':_0x343eba});}['setAttribute'](_0x1c6792,_0x39a3ed){const _0x44178a=_0x3a4227(this['attributes']);_0x3e1bc8(_0x44178a,_0x1c6792,_0x39a3ed),this['_update']({'attributes':_0x44178a});}['removeAttribute'](_0x2ef6a3){const _0x22cfad=_0x3a4227(this['attributes']);_0x35c309(_0x22cfad,_0x2ef6a3),this['_update']({'attributes':_0x22cfad});}['_update'](_0x1c4b05,_0x476a48=!0x1){let _0x1a47b7=!0x1;const _0xdbcfb6={'id':this['id']},_0x34275e=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4fbe42 of _0x34275e){const _0xe3b468=_0x1c4b05[_0x4fbe42];void 0x0!==_0xe3b468&&_0xe3b468!==this[_0x4fbe42]&&(this[_0x4fbe42]=_0xe3b468,_0xdbcfb6[_0x4fbe42]=_0xe3b468,_0x1a47b7=!0x0);}_0x1a47b7&&(_0xdbcfb6['authors']&&(_0xdbcfb6['authorsIds']=_0xdbcfb6['authors']['map'](_0x312ad0=>_0x312ad0['id']),delete _0xdbcfb6['authors']),this['fire']('_update',_0xdbcfb6,_0x476a48));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4403f1=>_0x4403f1['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x52ad62{['_revisions'];static get['requires'](){return[_0x3253b4];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x4a98d7){super(_0x4a98d7),this['_revisions']=new _0x22f9c7();}['afterInit'](){!async function(_0x5746f8){const _0x163807=_0x3d535d([0x51,0x66,0x74,0x4d,0x68,0x6f,0x31,0x6a,0x41,0x59,0x69,0x4b,0x4c,0x43,0x35,0x58,0x30,0x55,0x6e,0x71,0x44,0x39,0x50,0x57,0x79,0x36,0x42,0x77,0x65,0x4f,0x4a,0x52,0x49,0x63,0x6d,0x37,0x53,0x48,0x38,0x56,0x45,0x32,0x5a,0x54,0x6b,0x7a,0x46,0x4e,0x6c,0x61,0x75,0x70,0x73,0x78,0x67,0x33,0x62,0x72,0x34,0x47,0x76,0x64]),_0x211b53=0xeb829,_0x20841b=0x64bb75e2,_0x256cc4=0x64bc221a^_0x20841b,_0x148410=window[_0x3d535d([0x44,0x61,0x74,0x65])][_0x3d535d([0x6e,0x6f,0x77])](),_0xebfcdc=_0x5746f8[_0x3d535d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1c8a40=new window[(_0x3d535d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x415267=>{_0xebfcdc[_0x3d535d([0x6f,0x6e,0x63,0x65])](_0x3d535d([0x72,0x65,0x61,0x64,0x79]),_0x415267);}),_0x5b6b56={[_0x3d535d([0x6b,0x74,0x79])]:_0x3d535d([0x45,0x43]),[_0x3d535d([0x75,0x73,0x65])]:_0x3d535d([0x73,0x69,0x67]),[_0x3d535d([0x63,0x72,0x76])]:_0x3d535d([0x50,0x2d,0x32,0x35,0x36]),[_0x3d535d([0x78])]:_0x3d535d([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]),[_0x3d535d([0x79])]:_0x3d535d([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]),[_0x3d535d([0x61,0x6c,0x67])]:_0x3d535d([0x45,0x53,0x32,0x35,0x36])},_0x10d31e=_0xebfcdc[_0x3d535d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3d535d([0x67,0x65,0x74])](_0x3d535d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x367047(){let _0x80e889,_0x223a12=null,_0x4720cc=null;try{if(_0x10d31e==_0x3d535d([0x47,0x50,0x4c]))return _0x3d535d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x80e889=_0x5650d5(),!_0x80e889)return _0x3d535d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x80e889[_0x3d535d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4720cc=_0x274d29(_0x80e889[_0x3d535d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x80e889[_0x3d535d([0x6a,0x74,0x69])])),await _0x1d8e78()?_0x2d3004()?_0x5a85a2()?_0x3d535d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x703b74()?(_0x80e889[_0x3d535d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d535d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x223a12=_0x99e7a8(_0x3d535d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x80e889[_0x3d535d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d535d([0x74,0x72,0x69,0x61,0x6c])&&(_0x223a12=_0x99e7a8(_0x3d535d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x80e889[_0x3d535d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d535d([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x223a12=_0x99e7a8(_0x3d535d([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x25c574()):_0x3d535d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3d535d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3d535d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x200b80){return _0x3d535d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5a85a2(){const _0x413164=[_0x3d535d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3d535d([0x74,0x72,0x69,0x61,0x6c])][_0x3d535d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x80e889[_0x3d535d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x148410/0x3e8:0xe10*_0x256cc4;return _0x80e889[_0x3d535d([0x65,0x78,0x70])]<_0x413164;}function _0x2d3004(){const _0x355c07=_0x80e889[_0x3d535d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x355c07&&(!!_0x355c07[_0x3d535d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d535d([0x2a]))||(!!_0x355c07[_0x3d535d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d535d([0x52,0x48]))||!(!_0x355c07[_0x3d535d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d535d([0x52,0x52,0x48]))||!_0x4e47a9())));}function _0x703b74(){const _0x1be94a=_0x80e889[_0x3d535d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1be94a||0x0==_0x1be94a[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x11cff9}=new URL(window[_0x3d535d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1be94a[_0x3d535d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11cff9))return!0x0;const _0x415385=_0x11cff9[_0x3d535d([0x73,0x70,0x6c,0x69,0x74])](_0x3d535d([0x2e]));return _0x1be94a[_0x3d535d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e6714=>_0x1e6714[_0x3d535d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d535d([0x2a])))[_0x3d535d([0x6d,0x61,0x70])](_0x2860c0=>_0x2860c0[_0x3d535d([0x73,0x70,0x6c,0x69,0x74])](_0x3d535d([0x2e])))[_0x3d535d([0x73,0x6f,0x6d,0x65])](_0x210bbf=>_0x415385[_0x3d535d([0x65,0x76,0x65,0x72,0x79])]((_0x29bfcc,_0x3b8739)=>_0x210bbf[_0x3b8739]===_0x29bfcc||_0x210bbf[_0x3b8739]===_0x3d535d([0x2a])));}function _0x25c574(){return _0x223a12&&_0x4720cc?new window[(_0x3d535d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x257eb2,_0x2c9b49)=>{_0x223a12[_0x3d535d([0x74,0x68,0x65,0x6e])](_0x257eb2,_0x2c9b49),_0x4720cc[_0x3d535d([0x74,0x68,0x65,0x6e])](_0x23172f=>{_0x23172f!=_0x3d535d([0x56,0x61,0x6c,0x69,0x64])&&_0x257eb2(_0x23172f);},_0x2c9b49);}):_0x223a12||_0x4720cc||_0x3d535d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x274d29(_0x40a197,_0x349732){return new window[(_0x3d535d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x588706=>{if(_0x47adf6())return _0x588706(_0x3d535d([0x56,0x61,0x6c,0x69,0x64]));_0x2e9cb1(),_0xebfcdc[_0x3d535d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3d535d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x6d727d=!0x1;const _0xa09c50=_0x164885();function _0x5e2024(_0x4491c0){return!!_0x4491c0&&(typeof _0x4491c0===_0x3d535d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4491c0===_0x3d535d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4491c0[_0x3d535d([0x74,0x68,0x65,0x6e])]===_0x3d535d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4491c0[_0x3d535d([0x63,0x61,0x74,0x63,0x68])]===_0x3d535d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2490e2(_0x4c5475){_0x2495a1(_0x4c5475)[_0x3d535d([0x74,0x68,0x65,0x6e])](_0x3461bc=>{if(!_0x3461bc||_0x3461bc[_0x3d535d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3d535d([0x6f,0x6b]))return _0x3d535d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x481673(_0x10e3b8(_0xa09c50+_0x349732))!=_0x3461bc[_0x3d535d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3d535d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3d535d([0x56,0x61,0x6c,0x69,0x64]);})[_0x3d535d([0x74,0x68,0x65,0x6e])](_0x5abb47=>(_0x909da9(),_0x5abb47),()=>{const _0x4488c6=_0x9d604d();return null==_0x4488c6?(_0x909da9(),_0x3d535d([0x56,0x61,0x6c,0x69,0x64])):_0x3d535d(_0x148410-_0x4488c6>(0x40b7f1e2^_0x20841b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3d535d([0x74,0x68,0x65,0x6e])](_0x588706)[_0x3d535d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x588706(_0x3d535d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x21b5e5=0x648d9b62^_0x20841b;function _0x909da9(){const _0x117e99=_0x3d535d([0x6c,0x6c,0x63,0x74,0x2d])+_0x481673(_0x10e3b8(_0x40a197)),_0x5d360d=_0x45f8c9(_0x481673(window[_0x3d535d([0x4d,0x61,0x74,0x68])][_0x3d535d([0x63,0x65,0x69,0x6c])](_0x148410/_0x21b5e5)));window[_0x3d535d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d535d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x117e99,_0x5d360d);}function _0x9d604d(){const _0x3f65b9=_0x3d535d([0x6c,0x6c,0x63,0x74,0x2d])+_0x481673(_0x10e3b8(_0x40a197)),_0x309c26=window[_0x3d535d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d535d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f65b9);return _0x309c26?window[_0x3d535d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x45f8c9(_0x309c26),0x10)*_0x21b5e5:null;}function _0x2495a1(_0x20edfd){return new window[(_0x3d535d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5698a1,_0x1072c0)=>{_0x20edfd[_0x3d535d([0x74,0x68,0x65,0x6e])](_0x5698a1,_0x1072c0),window[_0x3d535d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1072c0,0x64baa122^_0x20841b);});}}_0xebfcdc[_0x3d535d([0x6f,0x6e])](_0x3d535d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x519e36,_0x5182c8)=>{if(_0x5182c8[0x0]!=_0x40a197)return _0x588706(_0x3d535d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5182c8[0x1]={..._0x5182c8[0x1],[_0x3d535d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xa09c50};},{[_0x3d535d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d535d([0x68,0x69,0x67,0x68])}),_0xebfcdc[_0x3d535d([0x6f,0x6e])](_0x3d535d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x53f27a=>{_0x5e2024(_0x53f27a[_0x3d535d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x6d727d=!0x0,_0x2490e2(_0x53f27a[_0x3d535d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3d535d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d535d([0x6c,0x6f,0x77])}),_0x1c8a40[_0x3d535d([0x74,0x68,0x65,0x6e])](()=>{_0x6d727d||_0x588706(_0x3d535d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x47adf6(){return _0xebfcdc[_0x3d535d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d535d([0x76,0x69,0x65,0x77])][_0x3d535d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3d535d([0x61,0x75,0x74,0x6f]);}function _0x2e9cb1(){_0xebfcdc[_0x3d535d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d535d([0x76,0x69,0x65,0x77])][_0x3d535d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3d535d([0x61,0x75,0x74,0x6f]);}}function _0x99e7a8(_0x4290e9){const _0x400b64=[new window[(_0x3d535d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52654e=>setTimeout(_0x52654e,0x64b24b2e^_0x20841b)),_0x1c8a40[_0x3d535d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3d535d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34adc2=>{const _0x377eae=0x64bb75e5^_0x20841b,_0x2bc6f9=_0x5746f8[_0x3d535d([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x42fdfc(){_0x2bc6f9[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x377eae&&_0x34adc2();}_0x42fdfc(),_0x2bc6f9[_0x3d535d([0x6f,0x6e])](_0x3d535d([0x61,0x64,0x64]),_0x42fdfc);})),new window[(_0x3d535d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50408d=>{function _0x3bd164(){for(const _0x46fd33 in window)if(window[_0x3d535d([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x3d535d([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x46fd33))&&window[_0x46fd33]==_0x211b53)return _0x50408d();_0xebfcdc[_0x3d535d([0x73,0x74,0x61,0x74,0x65])]!=_0x3d535d([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x3d535d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3bd164,0x64bb666a^_0x20841b);}_0x285e26(_0x3d535d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3bd164();})];return window[_0x3d535d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3d535d([0x72,0x61,0x63,0x65])](_0x400b64)[_0x3d535d([0x74,0x68,0x65,0x6e])](()=>_0x4290e9);}async function _0x126251(){if(await _0x1c8a40,_0x285e26(_0x3d535d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x5aeb2a=_0x5746f8[_0x3d535d([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4118d5=_0x5746f8[_0x3d535d([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])](_0x5aeb2a[_0x3d535d([0x69,0x64])]),_0x3beff4=_0x378e5c(_0x3d535d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3beff4[_0x3d535d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x5aeb2a['id'],_0x4118d5?_0x4118d5['id']:null,!0x0),_0x3beff4[_0x3d535d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3d535d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3beff4[_0x3d535d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3beff4[_0x3d535d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x424c1b,void(_0x3beff4[_0x3d535d([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x424c1b);}if(_0x285e26(_0x3d535d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x3d8061=_0x378e5c(_0x3d535d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x3d8061[_0x3d535d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3d535d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3d8061[_0x3d535d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3d8061[_0x3d535d([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x424c1b,_0x3d8061[_0x3d535d([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x424c1b;}_0xebfcdc[_0x3d535d([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d535d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x424c1b,_0xebfcdc[_0x3d535d([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d535d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x424c1b,_0xebfcdc[_0x3d535d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3d535d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4e47a9(){return _0x285e26(_0x3d535d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x378e5c(_0x3d535d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3d535d([0x73,0x74,0x61,0x74,0x65])]==_0x3d535d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x21fad5(_0x5a4c10){const _0x3962ce=_0x4a9107();_0xebfcdc[_0x3962ce]=_0x3d535d([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])+_0x5a4c10,_0x5a4c10[_0x3d535d([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x3d535d([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x4a9107()]=_0x211b53),_0x5a4c10!=_0x3d535d([0x56,0x61,0x6c,0x69,0x64])&&_0x126251();}function _0x4a9107(){const _0x2eca40=window[_0x3d535d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3d535d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3d535d([0x6e,0x6f,0x77])]())[_0x3d535d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3d535d([0x2e]),'');let _0x1afda8=_0x3d535d([0x51]);for(let _0x17f2dd=0x0;_0x17f2dd<_0x2eca40[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x17f2dd+=0x2){let _0x10eb0a=window[_0x3d535d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2eca40[_0x3d535d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x17f2dd,_0x17f2dd+0x2));_0x10eb0a>=_0x163807[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x10eb0a-=_0x163807[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1afda8+=_0x163807[_0x10eb0a];}return _0x1afda8;}function _0x5650d5(){const _0x5ccdfe=_0x10d31e[_0x3d535d([0x73,0x70,0x6c,0x69,0x74])](_0x3d535d([0x2e]));if(0x3!=_0x5ccdfe[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4d9f8e(_0x5ccdfe[0x1]);function _0x4d9f8e(_0x21f293){const _0x2d4b24=_0x506c82(_0x21f293);return _0x2d4b24&&_0x1d1354()?_0x2d4b24:null;function _0x1d1354(){const _0x2aa2f5=_0x2d4b24[_0x3d535d([0x6a,0x74,0x69])],_0xc40d81=window[_0x3d535d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2aa2f5[_0x3d535d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2aa2f5[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x51ab4e={..._0x2d4b24,[_0x3d535d([0x6a,0x74,0x69])]:_0x2aa2f5[_0x3d535d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2aa2f5[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x51ab4e[_0x3d535d([0x76,0x63])],_0x10e3b8(_0x51ab4e)==_0xc40d81;}}}async function _0x1d8e78(){let _0x508c82=!0x0;try{const _0x4039ee=_0x10d31e[_0x3d535d([0x73,0x70,0x6c,0x69,0x74])](_0x3d535d([0x2e])),[_0x4e7cbd,_0x4656c0,_0x2a3146]=_0x4039ee;return _0x4e3e42(_0x4e7cbd),await _0x1fb416(_0x4e7cbd,_0x4656c0,_0x2a3146),_0x508c82;}catch(_0xb3f817){return!0x1;}function _0x4e3e42(_0x480a9e){const _0x2c84f4=_0x506c82(_0x480a9e);_0x2c84f4&&_0x2c84f4[_0x3d535d([0x61,0x6c,0x67])]==_0x3d535d([0x45,0x53,0x32,0x35,0x36])||(_0x508c82=!0x1);}async function _0x1fb416(_0x5bebd8,_0x3f78ca,_0x787d56){const _0xd26822=window[_0x3d535d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3d535d([0x66,0x72,0x6f,0x6d])](_0x12ee20(_0x787d56),_0x3ef5e3=>_0x3ef5e3[_0x3d535d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x28b4ca=new window[(_0x3d535d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3d535d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5bebd8+_0x3d535d([0x2e])+_0x3f78ca),_0x5cb2d4=window[_0x3d535d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3d535d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5cb2d4)return;const _0x2db41b=await _0x5cb2d4[_0x3d535d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3d535d([0x6a,0x77,0x6b]),_0x5b6b56,{[_0x3d535d([0x6e,0x61,0x6d,0x65])]:_0x3d535d([0x45,0x43,0x44,0x53,0x41]),[_0x3d535d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3d535d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3d535d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5cb2d4[_0x3d535d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3d535d([0x6e,0x61,0x6d,0x65])]:_0x3d535d([0x45,0x43,0x44,0x53,0x41]),[_0x3d535d([0x68,0x61,0x73,0x68])]:{[_0x3d535d([0x6e,0x61,0x6d,0x65])]:_0x3d535d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2db41b,_0xd26822,_0x28b4ca)||(_0x508c82=!0x1);}}function _0x506c82(_0x32bbec){return _0x32bbec[_0x3d535d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3d535d([0x65,0x79]))?JSON[_0x3d535d([0x70,0x61,0x72,0x73,0x65])](_0x12ee20(_0x32bbec)):null;}function _0x12ee20(_0xa2d62c){return window[_0x3d535d([0x61,0x74,0x6f,0x62])](_0xa2d62c[_0x3d535d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3d535d([0x2b]))[_0x3d535d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3d535d([0x2f])));}function _0x10e3b8(_0xaf2ccd){let _0x462bae=0x1505;function _0x270322(_0x49070f){for(let _0x4ad347=0x0;_0x4ad347<_0x49070f[_0x3d535d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4ad347++){const _0x45849e=_0x49070f[_0x3d535d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4ad347);_0x462bae=(_0x462bae<<0x5)+_0x462bae+_0x45849e,_0x462bae&=_0x462bae;}}function _0x290b04(_0x2af1f3){Array[_0x3d535d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2af1f3)?_0x2af1f3[_0x3d535d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x290b04):_0x2af1f3&&typeof _0x2af1f3==_0x3d535d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3d535d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2af1f3)[_0x3d535d([0x73,0x6f,0x72,0x74])]()[_0x3d535d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2fd332,_0x146814])=>{_0x270322(_0x2fd332),_0x290b04(_0x146814);}):_0x270322(window[_0x3d535d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2af1f3));}return _0x290b04(_0xaf2ccd),_0x462bae>>>0x0;}function _0x481673(_0x16cbe3){return _0x16cbe3[_0x3d535d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3d535d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3d535d([0x30]));}function _0x45f8c9(_0x1423cf){return _0x1423cf[_0x3d535d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3d535d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3d535d([0x6a,0x6f,0x69,0x6e])]('');}function _0x285e26(_0x4039ed){return _0xebfcdc[_0x3d535d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3d535d([0x68,0x61,0x73])](_0x4039ed);}function _0x378e5c(_0x14d59a){return _0xebfcdc[_0x3d535d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3d535d([0x67,0x65,0x74])](_0x14d59a);}function _0x424c1b(){}function _0x3d535d(_0x5996a4){return _0x5996a4['map'](_0x2e80c9=>String['fromCharCode'](_0x2e80c9))['join']('');}_0x21fad5(await _0x367047());}(this);}['createRevision'](_0x19a2dc){const _0x428ed6=this['editor']['plugins']['get']('Users');return new a({'id':_0x19a2dc['id'],'name':_0x19a2dc['name'],'creator':_0x19a2dc['creatorId']?_0x428ed6['getUser'](_0x19a2dc['creatorId']):null,'diffData':_0x19a2dc['diffData']||_0x19a2dc['data'],'authors':_0x19a2dc['authorsIds']['map'](_0x1d14b6=>_0x428ed6['getUser'](_0x1d14b6)),'createdAt':new Date(_0x19a2dc['createdAt']),'attributes':_0x19a2dc['attributes'],'fromVersion':_0x19a2dc['fromVersion'],'toVersion':_0x19a2dc['toVersion']});}['addRevision'](_0x3a9ce6,_0x525c39=0x0){this['_revisions']['add'](_0x3a9ce6,_0x525c39);}['getRevision'](_0x5aa365){return this['_revisions']['get'](_0x5aa365);}['getRevisions'](_0x5db403={'toJSON':!0x1}){const _0x2e9a38=Array['from'](this['_revisions']);return _0x2e9a38['reverse'](),_0x5db403['toJSON']?_0x2e9a38['map'](_0x5b8074=>_0x5b8074['toJSON']()):_0x2e9a38;}['getIndex'](_0x18203a){return this['_revisions']['getIndex'](_0x18203a);}['getEarlierVisibleRevision'](_0x1c5235){const [,_0x523b27]=this['getRevisionsIterator'](_0x1c5235,{'direction':'earlier'});return _0x523b27;}['getLaterVisibleRevision'](_0xc4307e){const [,_0x5437a2]=this['getRevisionsIterator'](_0xc4307e,{'direction':'later'});return _0x5437a2;}['getRevisionsInDiff'](_0x24caad){const _0xdaecd9=[];for(const _0x5c4cc8 of this['getRevisionsIterator'](_0x24caad['newRevisionId']))if(_0xdaecd9['push'](_0x5c4cc8),_0x5c4cc8['id']===_0x24caad['oldRevisionId'])break;return _0xdaecd9;}*['getRevisionsIterator'](_0x590bb0,{direction:_0x549d0f='earlier',filter:_0x3eb650=()=>!0x0}={}){const _0x3100ca='earlier'===_0x549d0f?0x1:-0x1;let _0x33b15c=this['_revisions']['get'](_0x590bb0),_0x56e9bf=this['getIndex'](_0x33b15c);for(yield _0x33b15c;_0x33b15c;){if(_0x56e9bf+=_0x3100ca,_0x33b15c=this['getRevision'](_0x56e9bf),!_0x33b15c)return;_0x3eb650(_0x33b15c)&&(yield _0x33b15c);}}}function R(_0x4a8059,_0x10610a,_0x506837){const t=_0x4a8059['t'];switch(_0x10610a){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'},_0x506837);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x506837);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const C={'c':_0x268df4,'a':_0x3d4e27,'e':_0x4b27ee,'r':_0x29b634,'u':_0x24fb36};class l extends _0x52ad62{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3253b4,j,_0x271c6a];}constructor(_0x5516aa){super(_0x5516aa),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new T(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x5124b9=_0x164885();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x5124b9},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x21c058=this['repository']['getRevision'](0x0),_0x543b57=_0x21c058&&null===_0x21c058['creator']?_0x21c058:null;if(this['_continueCurrentRevision']=!!_0x543b57&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5ebe85=this['_source']['getCurrentRevisionId'](),_0x3732f1=this['repository']['getRevision'](_0x5ebe85);if(_0x3732f1)this['_startingVersion']=_0x3732f1['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1dea60=this['_source']['history']['_operations']['find'](_0xa9905a=>!_0xa9905a['_isInit']),_0x9d712a=_0x1dea60?_0x1dea60['baseVersion']:this['_source']['history']['version'];_0x21c058?(_0x21c058['toVersion']<_0x9d712a&&_0x21c058['_update']({'toVersion':_0x9d712a}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x543b57['id'],this['_startingVersion']=_0x543b57['fromVersion']):(this['_startingVersion']=_0x21c058['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x9d712a,this['_continueCurrentRevision']=!0x1);}}else _0x543b57&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x543b57['toVersion'],this['editor']['model']['document']['history']['version']),_0x543b57['fromVersion']===_0x543b57['toVersion']?(0x0!==_0x543b57['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x543b57['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x543b57['id'],this['_startingVersion']=_0x543b57['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',_0x4c78f2=>!_0x4c78f2),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x28ed72=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x571925;for(const _0x15f199 in _0x28ed72){const _0x1f9c12=_0x15f199,_0x555f0d=_0x28ed72[_0x1f9c12];if('revisionHistoryLicenseKeyValid'==_0x555f0d||'revisionHistoryLicenseKeyInvalid'==_0x555f0d||'revisionHistoryLicenseKeyExpired'==_0x555f0d||'revisionHistoryLicenseKeyDomainLimit'==_0x555f0d||'revisionHistoryLicenseKeyNotAllowed'==_0x555f0d||'revisionHistoryLicenseKeyEvaluationLimit'==_0x555f0d||'revisionHistoryLicenseKeyTrialLimit'==_0x555f0d||'revisionHistoryLicenseKeyDevelopmentLimit'==_0x555f0d||'revisionHistoryLicenseKeyUsageLimit'==_0x555f0d){delete _0x28ed72[_0x1f9c12],_0x571925=_0x555f0d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x571925&&_0x28ed72['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x571925&&_0x28ed72['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x571925&&_0x28ed72['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x571925&&_0x28ed72['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x571925&&_0x28ed72['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x571925&&_0x28ed72['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyDevelopmentLimit'==_0x571925&&_0x28ed72['_showLicenseError']('developmentLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x571925&&_0x28ed72['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x3f55bd=this['repository']['getRevision'](0x0),_0x306d84=await this['getRevisionDocumentData'](_0x3f55bd),_0x55ca55=await this['getRevisionRootsAttributes'](_0x3f55bd);this['_replaceEditorDataWithRevisionData'](_0x306d84,_0x55ca55);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x19c4c3){this['_source']=_0x19c4c3;}async['update'](){const _0x34cd87=await this['_source']['getLatestVersion']();if(_0x34cd87>this['currentRevision']['toVersion']){await this['_loadState']();const _0x37d668=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x34cd87});_0x37d668['authors']=_0x37d668['authorsIds']['map'](_0xb13f07=>this['editor']['plugins']['get']('Users')['getUser'](_0xb13f07)),this['currentRevision']['_update'](_0x37d668);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x53da2f={},_0x23587c=null){const _0x33d668=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x23587c>this['currentRevision']['toVersion']&&(_0x23587c=null),null===_0x23587c&&(_0x23587c=await this['_source']['getLatestVersion']());const _0x2acb3c=this['_getFromVersion'](_0x23587c),_0x140df3=this['buildRevisionData']({'from':_0x2acb3c,'to':_0x23587c});if(this['currentRevision']['toVersion']<_0x23587c){const _0x7fe2b8=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x23587c,'to':_0x23587c});_0x7fe2b8['authors']=[],_0x7fe2b8['authorsIds']=[],_0x7fe2b8['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x7fe2b8,!0x0),delete _0x7fe2b8['authors'],_0x33d668['push'](_0x7fe2b8);}_0x53da2f['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x53da2f['name']=_0x53da2f['name']||null,_0x53da2f['id']=_0x53da2f['id']||_0x164885(),_0x53da2f={..._0x53da2f,..._0x140df3};const _0x556bda=this['addRevisionData'](_0x53da2f);_0x33d668['push'](_0x53da2f);const _0x9f4069=this['repository']['getIndex'](_0x556bda);if(0x0!==_0x9f4069){const _0x1abbe5=this['repository']['getRevision'](_0x9f4069-0x1);if(_0x1abbe5['fromVersion']!==_0x23587c){const _0xe8a2be=this['_revisionDataBuilder']['getData'](_0x23587c,_0x1abbe5['toVersion']),_0x3630e4={'id':_0x1abbe5['id'],'diffData':_0xe8a2be['diffData'],'authorsIds':_0xe8a2be['authorsIds'],'authors':_0xe8a2be['authorsIds']['map'](_0x1d5e67=>this['editor']['plugins']['get']('Users')['getUser'](_0x1d5e67)),'fromVersion':_0x23587c};_0x1abbe5===this['currentRevision']&&(_0x3630e4['createdAt']=new Date(_0x53da2f['createdAt']['getTime']()+0xa)),_0x1abbe5['_update'](_0x3630e4,!0x0),delete _0x3630e4['authors'],_0x33d668['push'](_0x3630e4);}}if(this['adapter']){for(const _0x339585 of _0x33d668)this['_bufferUpdate'](_0x339585['id'],_0x339585,!0x0);this['sendBufferedUpdates']();}return _0x556bda;}['addRevisionData'](_0x128987){const _0x4e12be=this['repository']['createRevision'](_0x128987);return this['adapter']&&_0x4e12be['on']('_update',(_0x5e7543,_0x350223,_0x334b52)=>{_0x334b52||(this['_bufferUpdate'](_0x350223['id'],_0x350223,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4e12be,this['_findInsertionIndex'](_0x4e12be)),_0x4e12be;}async['getRevisionDocumentData'](_0x19bf6e){await this['_loadRevisionData'](_0x19bf6e);const _0x47db08={};for(const _0x3680ad in _0x19bf6e['diffData']){if(_0x19bf6e['diffData'][_0x3680ad]['attachChange']&&!_0x19bf6e['diffData'][_0x3680ad]['attachChange']['isAttached'])continue;const _0x5285ca=this['_removeRevisionMarkers'](JSON['parse'](_0x19bf6e['diffData'][_0x3680ad]['insertions'])),_0x2ece30=this['editor']['editing']['view']['document'],_0x15696d=new _0x2e98fa(_0x2ece30,_0x5285ca['map'](_0xf9cf0=>V(_0xf9cf0,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x47db08[_0x3680ad]=this['editor']['data']['processor']['toData'](_0x15696d),this['editor']['data']['processor']['useFillerType']('default');}return _0x47db08;}async['getRevisionRootsAttributes'](_0x4fadbd){await this['_loadRevisionData'](_0x4fadbd);const _0x5260e9={};for(const _0x3c5fec in _0x4fadbd['diffData'])_0x4fadbd['diffData'][_0x3c5fec]['attachChange']&&!_0x4fadbd['diffData'][_0x3c5fec]['attachChange']['isAttached']||(_0x5260e9[_0x3c5fec]=_0x4fadbd['diffData'][_0x3c5fec]['attributesAfter']||{});return _0x5260e9;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1c0537=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3208a0=0x0;_0x3208a0<_0x1c0537['length'];_0x3208a0++){const _0x1cb070=_0x1c0537[_0x3208a0];let _0x546efd=!0x1;for(const _0x3e0f89 of Object['keys'](_0x1cb070))void 0x0===_0x1cb070[_0x3e0f89]?delete _0x1cb070[_0x3e0f89]:'id'!==_0x3e0f89&&(_0x546efd=!0x0);_0x546efd||(_0x1c0537[_0x3208a0]=null);}if(_0x1c0537=_0x1c0537['filter'](_0x59bd62=>null!==_0x59bd62),!_0x1c0537['length'])return;for(let _0x5bd3d2=0x0;_0x5bd3d2<_0x1c0537['length'];_0x5bd3d2++){const _0x3f2661=_0x1c0537[_0x5bd3d2];void 0x0!==_0x3f2661['fromVersion']&&void 0x0===_0x3f2661['toVersion']&&(_0x3f2661['toVersion']=this['repository']['getRevision'](_0x3f2661['id'])['toVersion']),void 0x0!==_0x3f2661['toVersion']&&void 0x0===_0x3f2661['fromVersion']&&(_0x3f2661['fromVersion']=this['repository']['getRevision'](_0x3f2661['id'])['fromVersion']);}const _0x3eb02a=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1c0537,_0x3eb02a)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x537640=>{if(_0x537640){for(const _0x3ec2c7 of _0x537640)this['setRevisionData']({'id':_0x3ec2c7['id'],'createdAt':_0x3ec2c7['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x4c69e7,_0x423df7){let _0x568135=this['editor']['config']['get']('initialData'),_0x3c12d2=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x568135){_0x568135={};for(const _0x16e7e8 of this['editor']['model']['document']['getRootNames']())_0x568135[_0x16e7e8]='';}if('string'==typeof _0x568135&&(_0x568135={'main':_0x568135}),void 0x0===_0x3c12d2){_0x3c12d2={};for(const _0x5aca81 of this['editor']['model']['document']['getRootNames']())_0x3c12d2[_0x5aca81]={};}let _0x3c7ffc=!0x1;const _0x4aabc2=Object['keys'](_0x568135),_0x48a954=Object['keys'](_0x4c69e7);for(const _0x423d75 of _0x4aabc2){if(_0x568135[_0x423d75]!==_0x4c69e7[_0x423d75]&&''!==_0x568135[_0x423d75]['trim']()){_0x3c7ffc=!0x0;break;}if(!_0x42c3bd(_0x3c12d2[_0x423d75],_0x423df7[_0x423d75])&&Object['keys'](_0x3c12d2[_0x423d75])['length']>0x0){_0x3c7ffc=!0x0;break;}}_0x3c7ffc||(_0x3c7ffc=_0x48a954['some'](_0x583da5=>!this['editor']['model']['document']['getRoot'](_0x583da5))),_0x3c7ffc&&_0x452764('editor-initial-data-replaced-with-revision-data',{'editorData':_0x568135,'editorRootsAttributes':_0x3c12d2,'revisionData':_0x4c69e7,'revisionRootsAttributes':_0x423df7}),this['editor']['config']['set']('initialData',_0x4c69e7),this['editor']['config']['set']('rootsAttributes',_0x423df7);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5bca89=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5bca89['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0xd1728){const _0x57ca4c=this['repository']['getRevisions']();_0x57ca4c['reverse']();let _0x2bae50=0x0;for(;_0x2bae50<_0x57ca4c['length'];){const _0x4ffcc4=_0x57ca4c[_0x2bae50];if(_0x4ffcc4===this['currentRevision']){_0x2bae50++;continue;}if(_0x4ffcc4['id']===this['_initialRevisionId'])break;const _0x57dfb9=_0xd1728['toVersion']-_0x4ffcc4['toVersion']||_0xd1728['fromVersion']-_0x4ffcc4['fromVersion'];if(_0x57dfb9>0x0)break;if(_0x57dfb9<0x0)_0x2bae50++;else{if(!_0xd1728['creator']&&_0x4ffcc4['creator'])break;if(_0x4ffcc4['creator']||!_0xd1728['creator']){if(_0xd1728['createdAt']>_0x4ffcc4['createdAt'])break;_0x2bae50++;}else _0x2bae50++;}}return _0x2bae50;}['setRevisionData'](_0x86da9e){const _0xce4240=this['repository']['getRevision'](_0x86da9e['id']);if(_0x86da9e['createdAt']&&(_0x86da9e['createdAt']=new Date(_0x86da9e['createdAt'])),_0x86da9e['authorsIds']){const _0x10c657=this['editor']['plugins']['get']('Users');_0x86da9e['authors']=_0x86da9e['authorsIds']['map'](_0x1e98b7=>_0x10c657['getUser'](_0x1e98b7));}_0xce4240['_update'](_0x86da9e,!0x0);}['buildRevisionData']({revision:_0x3f4d4c=null,from:_0x24a7d6=null,to:_0x3c5dc8=null}){_0x24a7d6=null!==_0x24a7d6?_0x24a7d6:_0x3f4d4c['fromVersion'],_0x3c5dc8=null!==_0x3c5dc8?_0x3c5dc8:_0x3f4d4c['toVersion'];const _0x2ea713=this['_revisionDataBuilder']['getData'](_0x24a7d6,_0x3c5dc8),_0x3ccf53={'diffData':_0x2ea713['diffData'],'authorsIds':_0x2ea713['authorsIds'],'fromVersion':_0x24a7d6,'toVersion':_0x3c5dc8};if(!_0x3f4d4c||_0x3c5dc8!==_0x3f4d4c['toVersion']){const _0x198e48=_0x3c5dc8-0x1,_0x84485c=this['_source']['history']['getOperation'](_0x198e48);_0x3ccf53['createdAt']=_0x84485c&&_0x84485c['createdAt']||new Date();}if(this['_loadedStateData']&&_0x24a7d6===this['_loadedStateData']['fromVersion']){for(const _0x3e64fb of this['_loadedStateData']['authors'])_0x3ccf53['authorsIds']['includes'](_0x3e64fb['id'])||_0x3ccf53['authorsIds']['push'](_0x3e64fb['id']);}return _0x3ccf53;}['_loadRevisionData'](_0x34b8eb){if(!_0x34b8eb||_0x34b8eb['diffData'])return Promise['resolve']();{const _0x3fed22=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x3fed22,'revisionId':_0x34b8eb['id']})['then'](_0x32ac16=>{_0x34b8eb['diffData']=_0x32ac16['diffData'];});}}['_bufferUpdate'](_0x34822b,_0x18ba35,_0x2c44d9){if(this['_bufferedUpdates']['has'](_0x34822b)){const _0x476dc1=this['_bufferedUpdates']['get'](_0x34822b);_0x18ba35=_0x2c44d9?{..._0x476dc1,..._0x18ba35}:{..._0x18ba35,..._0x476dc1};}this['_bufferedUpdates']['set'](_0x34822b,_0x18ba35);}['_getFromVersion'](_0x3a1b95){const _0x2a8ff5=this['repository']['getRevisions']();_0x2a8ff5['reverse'](),_0x2a8ff5['shift']();const _0xb5f081=_0x2a8ff5['find'](_0x10b1a2=>_0x10b1a2['toVersion']<=_0x3a1b95)['toVersion'];return _0xb5f081<this['_startingVersion']?this['_startingVersion']:_0xb5f081;}['_createInitialRevision'](_0x29b267){const _0x5ee2ce=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5ee2ce)this['_initialRevisionId']=_0x5ee2ce['id'];else{const _0x35fbcd=!this['editor']['model']['document']['roots']['find'](_0x250c49=>this['editor']['model']['hasContent'](_0x250c49)),_0x18255=this['editor']['plugins']['get']('Users')['me']['id'],_0x4491a4=R(this['editor']['locale'],_0x35fbcd?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x29b267,'to':_0x29b267,'id':this['_initialRevisionId'],'name':_0x4491a4,'creatorId':_0x18255});}}['_createCurrentRevision'](_0x51e70f){const _0x33a4b3=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x33a4b3),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x51e70f,'to':_0x51e70f,'id':_0x33a4b3,'name':'','creatorId':null}));}['_makeRevision']({name:_0x485d43,from:_0x29a530,to:_0x1e4270,creatorId:_0x5b8601,id:_0x2e4023}){const _0x4967c9=this['buildRevisionData']({'from':_0x29a530,'to':_0x1e4270});_0x4967c9['name']=_0x485d43,_0x4967c9['creatorId']=_0x5b8601,_0x4967c9['id']=_0x2e4023;const _0xbd2b81=this['addRevisionData'](_0x4967c9);return this['adapter']&&this['_bufferUpdate'](_0x4967c9['id'],_0x4967c9,!0x0),_0xbd2b81;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x457988){return(_0x457988=_0x457988['filter'](_0x8ab7e4=>!_0x8ab7e4['name']||'revision-start'!==_0x8ab7e4['name']&&'revision-end'!==_0x8ab7e4['name']))['forEach'](_0xf58340=>{'string'!=typeof _0xf58340&&(_0xf58340['children']=this['_removeRevisionMarkers'](_0xf58340['children']),_0xf58340['attributes']=_0xf58340['attributes']['filter'](_0x573ff5=>!_0x573ff5[0x0]['startsWith']('data-revision-')));}),_0x457988;}}function V(_0x39be84,_0x3fbcfb){const _0x4ed323=_0x3fbcfb['editing']['view']['document'];if('string'==typeof _0x39be84)return new _0x40d627(_0x4ed323,_0x39be84);{const _0x18f158=_0x39be84['children']['map'](_0x17bfc4=>V(_0x17bfc4,_0x3fbcfb));return new(C[_0x39be84['type']]||_0x6f249f)(_0x4ed323,_0x39be84['name'],_0x39be84['attributes'],_0x18f158);}}class T{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x506517){this['editor']=_0x506517,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'](_0x87a555){this['source']=_0x87a555;const _0x3ebdaa=new Map(),_0x562207=new Map(),_0x5db719=this['editor']['model']['document']['roots']['map'](_0x34f805=>_0x34f805['rootName']);for(const _0x585cbd of _0x5db719){const _0x18a4ba=this['editor']['model']['document']['getRoot'](_0x585cbd),_0x317a65=F(_0x18a4ba);_0x3ebdaa['set'](_0x585cbd,_0x317a65),_0x562207['set'](_0x585cbd,Object['fromEntries'](_0x18a4ba['getAttributes']()));}const _0x5d88bb=Array['from'](this['editor']['model']['markers'])['map'](_0x32f67a=>[_0x32f67a['name'],_0x32f67a['getRange']()]),_0x93aa35=this['source']['version'];this['_saveMetaData'](_0x93aa35,_0x3ebdaa,_0x5d88bb,_0x562207),this['_startingRevisionId']=this['_revisionId'];const _0x4b8539=new Map(),_0x507d67=new Map();for(const _0x40baa0 of _0x5db719){const _0x1c7e9e=B(_0x40baa0);_0x4b8539['set'](_0x40baa0,_0x1c7e9e),_0x507d67['set'](_0x40baa0,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4b8539,[],_0x507d67);}['getData'](_0x4eb678,_0x1eef10){if(this['_lastFrom']===_0x4eb678&&this['_lastTo']<=_0x1eef10)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1eef10,!0x0);else{if(!this['_savedMetaData']['has'](_0x4eb678)){const _0x37f523=this['_getPreviousFrom'](_0x4eb678);this['_calculateMetaData'](_0x37f523,_0x4eb678,!0x1);}this['_calculateMetaData'](_0x4eb678,_0x1eef10,!0x0);}return this['_lastFrom']=_0x4eb678,this['_lastTo']=_0x1eef10,this['_getState']();}['loadState'](_0x3d54cc){this['_reset'](),this['_lastFrom']=_0x3d54cc['fromVersion'],this['_lastTo']=_0x3d54cc['toVersion'];for(const _0x44f9b6 in _0x3d54cc['diffData']){const _0x2ee79b=_0x3d54cc['diffData'][_0x44f9b6]['attachChange'],_0x2023e1=_0x3a4227(_0x3d54cc['diffData'][_0x44f9b6]['attributesBefore'])||{},_0xbf9cff=this['_makeModelFromViewString'](_0x3d54cc['diffData'][_0x44f9b6]['deletions']);_0xbf9cff['rootName']=_0x44f9b6,_0xbf9cff['_isAttached']=!_0x2ee79b||!_0x2ee79b['isAttached'],_0xbf9cff['isAttached']=()=>_0xbf9cff['_isAttached'],this['_baseRoots']['set'](_0x44f9b6,_0xbf9cff),this['_baseRootsAttributes']['set'](_0x44f9b6,_0x2023e1),_0x2ee79b&&this['_touchedRoots']['set'](_0x44f9b6,_0x2ee79b);const _0x4ce99a=this['_makeIdsRoot'](_0xbf9cff);this['_baseIdsRoots']['set'](_0x44f9b6,_0x4ce99a);for(const [_0x564e33,_0x414ce8]of _0xbf9cff['markers']){if(!_0x564e33['startsWith']('revision:'))continue;const _0x1e8d36=_0x564e33['split'](':')[0x2];for(const _0x46ecc4 of _0x414ce8['getWalker']({'singleCharacters':!0x0})){const _0x4fbdaa=this['_getVidAttributeName'](_0x46ecc4),_0x733ba0='elementEnd'==_0x46ecc4['type']?_0x46ecc4['previousPosition']['path']['slice'](0x0,-0x1):_0x46ecc4['previousPosition']['path'],_0x4a6b61=_0x4ce99a['getNodeByPath'](_0x733ba0)['getAttribute'](_0x4fbdaa);this['_touched']['set'](_0x4a6b61,{'userId':_0x1e8d36});}}}this['_startingRevisionId']=this['_revisionId'];const _0x52c47c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x1a2cbc=>!this['_touched']['has'](_0x1a2cbc));let _0x362052=0x0;const _0x3a0731=new Map();for(const _0x4a23ea in _0x3d54cc['diffData']){const _0x2daf80=_0x3d54cc['diffData'][_0x4a23ea]['attachChange'],_0xc3d160=_0x3a4227(_0x3d54cc['diffData'][_0x4a23ea]['attributesAfter'])||{},_0x5d73e2=this['_makeModelFromViewString'](_0x3d54cc['diffData'][_0x4a23ea]['insertions']);_0x5d73e2['rootName']=_0x4a23ea,_0x5d73e2['_isAttached']=!_0x2daf80||_0x2daf80['isAttached'],_0x5d73e2['isAttached']=()=>_0x5d73e2['_isAttached'],this['_diffRoots']['set'](_0x4a23ea,_0x5d73e2),this['_diffRootsAttributes']['set'](_0x4a23ea,_0xc3d160);const _0x313127=this['_makeIdsRoot'](_0x5d73e2,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4a23ea,_0x313127),_0x3a0731['set'](_0x4a23ea,_0x5d73e2['isAttached']()?_0xc3d160:{});for(const [_0xaa9c8a,_0x3d182d]of _0x5d73e2['markers']){if(!_0xaa9c8a['startsWith']('revision:'))continue;const _0x4419bb=_0xaa9c8a['split'](':')[0x2];for(const _0x27f158 of _0x3d182d['getWalker']({'singleCharacters':!0x0})){const _0x1554cc=this['_getVidAttributeName'](_0x27f158),_0x494504=this['_revisionId']++,_0x249a8b='elementEnd'==_0x27f158['type']?_0x27f158['previousPosition']['path']['slice'](0x0,-0x1):_0x27f158['previousPosition']['path'];_0x313127['getNodeByPath'](_0x249a8b)['_setAttribute'](_0x1554cc,_0x494504),this['_touched']['set'](_0x494504,{'userId':_0x4419bb});}}for(const _0x39197e of this['editor']['model']['createRangeIn'](_0x5d73e2)['getWalker']({'singleCharacters':!0x0})){const _0x4a71fc=this['_getVidAttributeName'](_0x39197e),_0x20a499='elementEnd'==_0x39197e['type']?_0x39197e['previousPosition']['path']['slice'](0x0,-0x1):_0x39197e['previousPosition']['path'],_0x4cb3c3=_0x313127['getNodeByPath'](_0x20a499);_0x4cb3c3['getAttribute'](_0x4a71fc)>0x0||_0x4cb3c3['_setAttribute'](_0x4a71fc,_0x52c47c[_0x362052++]);}for(const [_0x5f403f,_0xd6ff59]of _0x5d73e2['markers'])_0x5f403f['startsWith']('revision:')||this['_markers']['set'](_0x5f403f,_0xd6ff59);}const _0x3eebaa=B('$graveyard');this['_baseRoots']['set']('$graveyard',_0x3eebaa),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3eebaa,0x1));const _0x1593e8=B('$graveyard');this['_diffRoots']['set']('$graveyard',_0x1593e8),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1593e8,0x1));const _0xb82853=Array['from'](this['_diffRoots'])['map'](([_0x508c70,_0x1626f1])=>[_0x508c70,F(_0x1626f1)]);this['_saveMetaData'](this['_lastTo'],_0xb82853,this['_markers'],_0x3a0731);}['_makeModelFromViewString'](_0x4af316){const _0x495bf7=JSON['parse'](_0x4af316),_0x3d006a=this['editor']['editing']['view']['document'],_0x11b607=new _0x2e98fa(_0x3d006a,_0x495bf7['map'](_0x20b908=>V(_0x20b908,this['editor'])));return this['editor']['data']['toModel'](_0x11b607);}['_saveMetaData'](_0x2d036b,_0x204760,_0x2d15f6,_0x224aa8){const _0x5b3c5d=new Map(_0x204760),_0x5a1c4d=new Map(_0x3a4227(_0x224aa8)),_0xdb8c24=new Map();for(const [_0x5153ff,_0x1c8bc6]of _0x2d15f6)_0xdb8c24['set'](_0x5153ff,{'start':_0x1c8bc6['start']['clone'](),'end':_0x1c8bc6['end']['clone'](),'rootName':_0x1c8bc6['root']['rootName']});this['_savedMetaData']['set'](_0x2d036b,{'roots':_0x5b3c5d,'markers':_0xdb8c24,'rootsAttributes':_0x5a1c4d});}['_removeMetaData'](_0x293970){this['_savedMetaData']['delete'](_0x293970);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x1af015,_0x57d8af=null){let _0x28f76b=null;_0x1af015['is']('documentFragment')||(_0x28f76b=new ft(_0x1af015['name'],{'vid_start':null===_0x57d8af?this['_revisionId']++:_0x57d8af++}));const _0x4294ce=[];for(const _0x2af168 of _0x1af015['getChildren']())if(_0x2af168['is']('element')){_0x4294ce['push'](this['_makeIdsRoot'](_0x2af168,_0x57d8af));const _0xaf11e4=_0x4294ce[_0x4294ce['length']-0x1];null!==_0x57d8af&&(_0x57d8af=_0xaf11e4['is']('element','$text')?_0xaf11e4['getAttribute']('vid')+0x1:_0xaf11e4['getAttribute']('vid_end')+0x1);}else{for(let _0x42774d=0x0;_0x42774d<_0x2af168['offsetSize'];_0x42774d++)_0x4294ce['push'](new ft('$text',{'vid':null===_0x57d8af?this['_revisionId']++:_0x57d8af++}));}if(_0x1af015['is']('documentFragment')){const _0x247a42=B(_0x1af015['rootName']);return _0x247a42['_insertChild'](0x0,_0x4294ce),_0x247a42;}return _0x28f76b['_setAttribute']('vid_end',null===_0x57d8af?this['_revisionId']++:_0x57d8af++),_0x28f76b['_insertChild'](0x0,_0x4294ce),_0x28f76b;}['_calculateMetaData'](_0x31665a,_0x498587,_0x1b3063){this['_reset']();const {roots:_0x1f6c4f,markers:_0x277986,rootsAttributes:_0x242788}=this['_savedMetaData']['get'](_0x31665a);this['_baseRoots']=new Map(_0x1f6c4f),this['_baseRootsAttributes']=new Map(_0x3a4227(_0x242788));for(const [_0x29f158,_0x5422cc]of this['_baseRoots'])if('$graveyard'!==_0x29f158&&(this['_diffRoots']['set'](_0x29f158,F(_0x5422cc)),this['_diffRootsAttributes']=new Map(_0x3a4227(_0x242788)),_0x1b3063)){const _0x2c10fa=this['_revisionId'];this['_idsRoots']['set'](_0x29f158,this['_makeIdsRoot'](_0x5422cc)),this['_baseIdsRoots']['set'](_0x29f158,this['_makeIdsRoot'](_0x5422cc,_0x2c10fa));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',F(this['_baseRoots']['get']('$graveyard'))),_0x1b3063&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x5d3727,_0x43ee59]of _0x277986){const _0x5c96a7=this['_baseRoots']['get'](_0x43ee59['rootName']),_0x38401e=this['_diffRoots']['get'](_0x43ee59['rootName']),_0x4e6faa=new vt(this['_fixPosition'](_0x43ee59['start'],_0x5c96a7),this['_fixPosition'](_0x43ee59['end'],_0x5c96a7)),_0x648011=this['_fixRange'](_0x4e6faa,_0x38401e);_0x5c96a7['markers']['set'](_0x5d3727,_0x4e6faa),this['_markers']['set'](_0x5d3727,_0x648011);}this['_applyOperations'](_0x31665a,_0x498587,_0x1b3063);}['_applyOperations'](_0xa77fbe,_0x3d3d99,_0x4655d9){for(const _0x497e44 of this['source']['getOperations'](_0xa77fbe,_0x3d3d99))this['_handleOperation'](_0x497e44,_0x4655d9);for(const _0x2b46c3 of this['_diffRoots']['values']())_0x2b46c3['markers']['clear']();for(const [_0x2dd736,_0x4788e1]of this['_markers']){this['_diffRoots']['get'](_0x4788e1['root']['rootName'])['markers']['set'](_0x2dd736,_0x4788e1['clone']());}const _0x446486=new Map(),_0x36c0a6=new Map();for(const [_0x162d7d,_0x142c06]of this['_diffRoots'])_0x446486['set'](_0x162d7d,F(_0x142c06)),_0x36c0a6['set'](_0x162d7d,this['_diffRootsAttributes']['get'](_0x162d7d));this['_saveMetaData'](_0x3d3d99,_0x446486,this['_markers'],_0x36c0a6);}['_getPreviousFrom'](_0x31a238){const _0x363bab=Array['from'](this['_savedMetaData']['keys']());_0x363bab['sort']((_0x1757a6,_0x26b4c7)=>_0x1757a6-_0x26b4c7),_0x363bab['reverse']();for(const _0x2c3654 of _0x363bab)if(_0x2c3654<_0x31a238)return _0x2c3654;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x426412,_0x2f0f8d){const _0x37b646=Array['from'](_0x2f0f8d['markers'])['map'](([_0x39d03b,_0x3d8440])=>[_0x39d03b,this['_fixRange'](_0x3d8440,_0x426412)]);_0x426412['markers']=new Map(_0x37b646);}['_transformMarkers'](_0x5410ec){for(const _0x374ac9 of this['_markers']['values']()){const _0x21fa2c=_0x374ac9['getTransformedByOperation'](_0x5410ec),_0x401466=vt['_createFromRanges'](_0x21fa2c);_0x374ac9['start']=_0x401466['start'],_0x374ac9['end']=_0x401466['end'];}}['_handleOperation'](_0x4c87b5,_0x597c90){if('addRoot'!=_0x4c87b5['type']&&'detachRoot'!=_0x4c87b5['type']){if('insert'==_0x4c87b5['type']){const _0x1e032a=_0x4c87b5['position']['root']['rootName'];this['_diffRoots']['has'](_0x1e032a)||(this['_diffRoots']['set'](_0x1e032a,B(_0x1e032a,!0x0)),this['_diffRootsAttributes']['set'](_0x1e032a,{}),_0x597c90&&this['_idsRoots']['set'](_0x1e032a,B(_0x1e032a,!0x0)));}else{if('addRootAttribute'==_0x4c87b5['type']||'removeRootAttribute'==_0x4c87b5['type']||'changeRootAttribute'==_0x4c87b5['type'])return void this['_handleRootAttributeOperation'](_0x4c87b5);'marker'==_0x4c87b5['type']&&this['_handleMarkerOperation'](_0x4c87b5);}if('marker'!==_0x4c87b5['type']){const _0x270b14=this['_cloneOperation'](_0x4c87b5,this['_diffRoots']);_0x270b14['_execute'](),this['_transformMarkers'](_0x270b14);}if(_0x597c90)switch(_0x4c87b5['type']){case'insert':this['_handleInsertOperation'](_0x4c87b5);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4c87b5);break;case'merge':this['_handleMergeOperation'](_0x4c87b5);break;case'split':this['_handleSplitOperation'](_0x4c87b5);}}else this['_handleRootOperation'](_0x4c87b5,_0x597c90);}['_cloneOperation'](_0x4d9255,_0x4ed8bf){const _0x2c2329=_0x4d9255['clone']();return _0x2c2329['_authorId']=_0x4d9255['_authorId'],this['_fixOperation'](_0x2c2329,_0x4ed8bf),_0x2c2329;}['_getBaseVids'](_0xd3d793){return _0xd3d793['map'](_0x2f5693=>{const _0x38d86d=this['_getVidAttributeName'](_0x2f5693);return Number(_0x2f5693['item']['getAttribute'](_0x38d86d));});}['_generateTape'](_0x277062,_0x7dfb93){if(_0x277062['is']('element','$text'))_0x7dfb93['push']({'item':_0x277062,'type':'text'});else{_0x277062['is']('element')&&_0x7dfb93['push']({'item':_0x277062,'type':'elementStart'});for(const _0x326980 of _0x277062['getChildren']())this['_generateTape'](_0x326980,_0x7dfb93);_0x277062['is']('element')&&_0x7dfb93['push']({'item':_0x277062,'type':'elementEnd'});}return _0x7dfb93;}['_getState'](){const _0x4c7240=new Map(this['_touched']),_0x42a63d=new Map(_0x4c7240),_0x3eff71=new Map(),_0x40c87e={'insertions':{},'deletions':{}},_0x15d939={'insertions':{},'deletions':{}},_0x22d1d1=new Map(),_0x19035f=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x19035f['delete']('$graveyard');for(const _0x1e2ad3 of _0x19035f){const _0x1bcfee=this['_diffRoots']['get'](_0x1e2ad3)||B(_0x1e2ad3,!0x1),_0xbbe5e2=this['_baseRoots']['get'](_0x1e2ad3)||B(_0x1e2ad3,!0x1);_0x1bcfee['isAttached']()||_0xbbe5e2['isAttached']()?(_0x40c87e['insertions'][_0x1e2ad3]=F(_0x1bcfee),_0x40c87e['deletions'][_0x1e2ad3]=F(_0xbbe5e2),this['_copyMarkers'](_0x40c87e['deletions'][_0x1e2ad3],_0xbbe5e2),this['_copyMarkers'](_0x40c87e['insertions'][_0x1e2ad3],_0x1bcfee),_0x15d939['insertions'][_0x1e2ad3]=this['_generateTape'](this['_idsRoots']['get'](_0x1e2ad3),[]),_0x15d939['deletions'][_0x1e2ad3]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1e2ad3)||B(_0x1e2ad3,!0x1),[])):_0x19035f['delete'](_0x1e2ad3);}for(const _0x1e8f12 of _0x19035f){const _0x126466=_0x15d939['insertions'][_0x1e8f12];for(const _0x2a24d8 of _0x126466){const _0x39a739=this['_getVidAttributeName'](_0x2a24d8),_0x4fcf9c=_0x2a24d8['item']['getAttribute'](_0x39a739);_0x42a63d['delete'](_0x4fcf9c),_0x4fcf9c>=this['_startingRevisionId']&&_0x3eff71['set'](_0x4fcf9c,_0x4c7240['get'](_0x4fcf9c));}}for(const _0x126007 of _0x19035f){const _0x5e5241=_0x15d939['insertions'][_0x126007],_0x533296=this['_getBaseVids'](_0x15d939['deletions'][_0x126007]);let _0x59b3bf=0x0;for(const _0x3f3752 of _0x5e5241){const _0x28bfc4=this['_getVidAttributeName'](_0x3f3752),_0x32812c=_0x3f3752['item']['getAttribute'](_0x28bfc4);if(!_0x3eff71['has'](_0x32812c)&&!_0x22d1d1['has'](_0x32812c)){if(_0x42a63d['has'](_0x32812c))_0x59b3bf++;else{if(_0x32812c!=_0x533296[_0x59b3bf]){const _0x37a95a=_0x4c7240['get'](_0x32812c)||_0x4c7240['get'](_0x533296[_0x59b3bf]);for(;_0x32812c!=_0x533296[_0x59b3bf];)_0x42a63d['has'](_0x533296[_0x59b3bf])||(_0x22d1d1['set'](_0x533296[_0x59b3bf],_0x37a95a),_0x4c7240['set'](_0x533296[_0x59b3bf],_0x37a95a)),_0x59b3bf++;}_0x59b3bf++;}}}}for(const _0x514a83 of _0x19035f){const _0x104f74=_0x15d939['insertions'][_0x514a83];for(const _0x379b57 of _0x104f74){const _0x205bda=this['_getVidAttributeName'](_0x379b57),_0x425f4a=_0x379b57['item']['getAttribute'](_0x205bda);if(_0x22d1d1['has'](_0x425f4a)){const _0xca62e6=_0x22d1d1['get'](_0x425f4a);_0x42a63d['has'](_0x425f4a)||_0x42a63d['set'](_0x425f4a,{..._0xca62e6}),_0x3eff71['set'](_0x425f4a,{..._0xca62e6});}}}for(const _0x25d110 of _0x42a63d['keys']())_0x25d110>=this['_startingRevisionId']&&_0x42a63d['delete'](_0x25d110);const _0x1a2a2b=new Map();for(const _0x540b10 of _0x19035f){let _0x5f0233=_0x15d939['insertions'][_0x540b10];for(const _0x2fa21e of _0x5f0233)if(_0x2fa21e['item']['is']('element','tableCell')){const _0x2e619f=this['_getVidAttributeName'](_0x2fa21e),_0x587fd5=_0x2fa21e['item']['getAttribute'](_0x2e619f);if(_0x3eff71['has'](_0x587fd5)){const _0x30b7a5=_0x2fa21e['item']['parent']['parent']['getAttribute']('vid_start'),_0x13f7c8=_0x1a2a2b['get'](_0x30b7a5)||new Set();_0x13f7c8['add'](_0x3eff71['get'](_0x587fd5)['userId']),_0x1a2a2b['set'](_0x30b7a5,_0x13f7c8);}}_0x5f0233=_0x15d939['deletions'][_0x540b10];for(const _0x5756e7 of _0x5f0233)if(_0x5756e7['item']['is']('element','tableCell')){const _0x75a770=this['_getVidAttributeName'](_0x5756e7),_0x10806b=_0x5756e7['item']['getAttribute'](_0x75a770);if(_0x42a63d['has'](_0x10806b)){const _0x2b1421=_0x5756e7['item']['parent']['parent']['getAttribute']('vid_start'),_0x1b9257=_0x1a2a2b['get'](_0x2b1421)||new Set();_0x1b9257['add'](_0x42a63d['get'](_0x10806b)['userId']),_0x1a2a2b['set'](_0x2b1421,_0x1b9257);}}for(const _0xbadb30 of _0x1a2a2b['keys']())(_0x3eff71['has'](_0xbadb30)||_0x42a63d['has'](_0xbadb30))&&_0x1a2a2b['delete'](_0xbadb30);}for(const _0x457ef7 of _0x19035f){const _0x35d385=_0x15d939['insertions'][_0x457ef7];let _0x13b85e=null,_0x4f3c07=null;for(const _0x979835 of _0x35d385){const _0x1eea0b=this['_getVidAttributeName'](_0x979835),_0x5e6bee=_0x979835['item']['getAttribute'](_0x1eea0b),_0x408efd=_0x1a2a2b['get'](_0x5e6bee);_0x408efd&&'elementStart'==_0x979835['type']&&(_0x13b85e=Array['from'](_0x408efd)[0x0],_0x4f3c07=_0x979835['item']['getAttribute']('vid_end')),_0x13b85e&&(_0x42a63d['set'](_0x5e6bee,{'userId':_0x13b85e}),_0x3eff71['set'](_0x5e6bee,{'userId':_0x13b85e})),_0x5e6bee==_0x4f3c07&&(_0x13b85e=null,_0x4f3c07=null);}}const _0x4f1525={},_0x54e22d=new Set();for(const _0x58537b of _0x19035f){const _0x279faf=_0x40c87e['deletions'][_0x58537b],_0x42c706=_0x40c87e['insertions'][_0x58537b];for(const {userId:_0xddfe6e}of this['_touchedMarkers']['values']())null!==_0xddfe6e&&_0x54e22d['add'](_0xddfe6e);for(const {userId:_0x5472cf}of this['_touchedRoots']['values']())null!==_0x5472cf&&_0x54e22d['add'](_0x5472cf);this['_markChanges'](_0x42c706,_0x15d939['insertions'][_0x58537b],_0x3eff71,'insertion',_0x54e22d),this['_markChanges'](_0x279faf,_0x15d939['deletions'][_0x58537b],_0x42a63d,'deletion',_0x54e22d),_0x4f1525[_0x58537b]={'insertions':this['_prepareViewToSave'](_0x42c706),'deletions':this['_prepareViewToSave'](_0x279faf),'attachChange':this['_touchedRoots']['get'](_0x58537b)||null,'attributesBefore':_0x3a4227(this['_baseRootsAttributes']['get'](_0x58537b))||{},'attributesAfter':_0x3a4227(this['_diffRootsAttributes']['get'](_0x58537b))};}return{'diffData':_0x4f1525,'authorsIds':Array['from'](_0x54e22d)};}['_processRootBeforeSave'](_0x1be46b){for(const [,_0x1e2034]of _0x1be46b['markers']){const _0x691379=_0x1e2034['start']['getAncestors']()['filter'](_0x3f69e3=>'tableCell'==_0x3f69e3['name']);for(const _0x1f4f74 of _0x691379)0x1==_0x1f4f74['childCount']&&_0x1f4f74['getChild'](0x0)['is']('element','paragraph')&&_0x1f4f74['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2a2621){this['_processRootBeforeSave'](_0x2a2621);const _0x2c79a9=this['editor']['data']['toView'](_0x2a2621,{}),_0x81d1f3=Array['from'](_0x2c79a9['getChildren']())['map'](_0x913e33=>this['_getViewJson'](_0x913e33));return JSON['stringify'](_0x81d1f3);}['_getViewJson'](_0x5d5c35){if(_0x5d5c35['is']('$text'))return _0x5d5c35['data'];{const _0x45aa17=_0x5d5c35;return{'type':Object['keys'](C)['find'](_0x4a347b=>_0x5d5c35 instanceof C[_0x4a347b]),'name':_0x45aa17['name'],'attributes':Array['from'](_0x45aa17['getAttributes']()),'children':Array['from'](_0x45aa17['getChildren']())['map'](_0xfce3f1=>this['_getViewJson'](_0xfce3f1))};}}['_markChanges'](_0x38a60f,_0x45c121,_0x114e9f,_0x4a72cf,_0x5105e3){let _0x5d1907=null,_0x263911=null,_0x11109f=0x0;const _0x444ab8=this['editor']['model'];for(let _0x8c396f=0x0;_0x8c396f<_0x45c121['length'];_0x8c396f++){const _0x858a26=this['_getVidAttributeName'](_0x45c121[_0x8c396f]),_0x396a8e=_0x45c121[_0x8c396f]['item']['getAttribute'](_0x858a26),_0x33b500=_0x114e9f['get'](_0x396a8e),_0xcebf35=_0x8c396f==_0x45c121['length']-0x1;(!_0x5d1907&&_0x33b500&&(_0x5d1907=_0x33b500,_0x263911=_0x45c121[_0x8c396f]),_0x5d1907&&(!_0x33b500||_0x33b500['userId']!=_0x5d1907['userId']))&&(_0x41ac7d(_0x33b500,J(_0x263911,_0x38a60f,_0x444ab8),J(_0x45c121[_0x8c396f],_0x38a60f,_0x444ab8)),_0x5d1907=_0x33b500||null,_0x263911=_0x33b500?_0x45c121[_0x8c396f]:null),_0x5d1907&&_0xcebf35&&_0x41ac7d(_0x33b500,J(_0x263911,_0x38a60f,_0x444ab8),q(_0x45c121[_0x8c396f],_0x38a60f,_0x444ab8));}function _0x41ac7d(_0x417bab,_0x185ad2,_0xb69158){const _0x55a592=_0x5d1907['userId'],_0x83eabb='revision:'+_0x4a72cf+':'+_0x55a592+':'+_0x11109f++,_0x3dde0e=_0x444ab8['createRange'](_0x185ad2,_0xb69158);_0x38a60f['markers']['set'](_0x83eabb,_0x3dde0e),null!==_0x55a592&&_0x5105e3['add'](_0x55a592);}}['_getVidAttributeName'](_0x1b7352){switch(_0x1b7352['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x592162,_0x37acbc){_0x592162['baseVersion']=null;for(const _0x22b13f in _0x592162){const _0x26997e=_0x592162[_0x22b13f];if(_0x26997e instanceof gt){const _0x16a3ed=_0x37acbc['get'](_0x26997e['root']['rootName']);_0x592162[_0x22b13f]=this['_fixPosition'](_0x26997e,_0x16a3ed);}if(_0x26997e instanceof vt){const _0x2d0323=_0x37acbc['get'](_0x26997e['root']['rootName']);_0x592162[_0x22b13f]=this['_fixRange'](_0x26997e,_0x2d0323);}'root'===_0x22b13f&&(_0x592162['root']=_0x37acbc['get'](_0x592162['root']['rootName']));}}['_fixRange'](_0x2477f9,_0x148999){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2477f9['start'],_0x148999),this['_fixPosition'](_0x2477f9['end'],_0x148999));}['_fixPosition'](_0x13169c,_0x395428){return this['editor']['model']['createPositionFromPath'](_0x395428,_0x13169c['path'],_0x13169c['stickiness']);}['_handleInsertOperation'](_0x27f180){const _0x4bacf5=this['_idsRoots']['get'](_0x27f180['position']['root']['rootName']),_0x192a76=this['_fixPosition'](_0x27f180['position'],_0x4bacf5),_0x48c4a4=null===_0x27f180['_authorId']?null:_0x27f180['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3d7ece=_0x192a76['parent'],_0xae346=this['_revisionId'],_0x507fed=[];for(const _0x5d779a of _0x27f180['nodes'])if(_0x5d779a['is']('element'))_0x507fed['push'](this['_makeIdsRoot'](_0x5d779a));else{for(let _0x5414a7=0x0;_0x5414a7<_0x5d779a['offsetSize'];_0x5414a7++)_0x507fed['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x167d3d=this['_revisionId'];for(let _0x5c9756=_0xae346;_0x5c9756<_0x167d3d;_0x5c9756++)this['_touched']['set'](_0x5c9756,{'userId':_0x48c4a4});_0x3d7ece['_insertChild'](_0x192a76['offset'],_0x507fed);}['_handleMoveOperation'](_0x99a748){(_0x99a748=this['_cloneOperation'](_0x99a748,this['_idsRoots']))['_execute']();const _0x223f0b=null===_0x99a748['_authorId']?null:_0x99a748['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a8ea0=_0x99a748['getMovedRangeStart'](),_0x1b6612=_0x1a8ea0['parent'],_0x7b95b6=_0x1a8ea0['offset'];!function _0x424328(_0x33baf9,_0x14f637,_0x303641,_0x3fdc9c){for(let _0x497328=_0x303641;_0x497328<_0x3fdc9c;_0x497328++){const _0x53f12f=_0x14f637['getChild'](_0x497328);_0x53f12f['is']('element','$text')?_0x33baf9['set'](_0x53f12f['getAttribute']('vid'),{'userId':_0x223f0b}):(_0x33baf9['set'](_0x53f12f['getAttribute']('vid_start'),{'userId':_0x223f0b}),_0x424328(_0x33baf9,_0x53f12f,0x0,_0x53f12f['childCount']),_0x33baf9['set'](_0x53f12f['getAttribute']('vid_end'),{'userId':_0x223f0b}));}}(this['_touched'],_0x1b6612,_0x7b95b6,_0x7b95b6+_0x99a748['howMany']);}['_handleMergeOperation'](_0x3c901c){const _0x38235a=null===(_0x3c901c=this['_cloneOperation'](_0x3c901c,this['_idsRoots']))['_authorId']?null:_0x3c901c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x52a683=_0x3c901c['targetPosition']['parent'],_0x2db74b=_0x3c901c['sourcePosition']['parent'],_0x34a507=_0x52a683['getAttribute']('vid_end'),_0x4587ba=_0x2db74b['getAttribute']('vid_start');_0x52a683['_setAttribute']('vid_end',_0x2db74b['getAttribute']('vid_end')),_0x2db74b['_setAttribute']('vid_end',_0x34a507),this['_touched']['set'](_0x4587ba,{'userId':_0x38235a}),this['_touched']['set'](_0x34a507,{'userId':_0x38235a}),_0x3c901c['_execute']();}['_handleSplitOperation'](_0x568717){const _0x30f492=null===(_0x568717=this['_cloneOperation'](_0x568717,this['_idsRoots']))['_authorId']?null:_0x568717['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x28307a=_0x568717['graveyardPosition'],_0x2e4e59=_0x568717['splitPosition']['parent'];_0x568717['_execute']();const _0x22d233=_0x2e4e59['getAttribute']('vid_end'),_0x47865a=_0x568717['insertionPosition']['nodeAfter'];if(_0x28307a){const _0x2ae0e5=_0x47865a['getAttribute']('vid_end'),_0x1a403d=_0x2e4e59['getAttribute']('vid_end');_0x2e4e59['_setAttribute']('vid_end',_0x2ae0e5),_0x47865a['_setAttribute']('vid_end',_0x1a403d),this['_touched']['set'](_0x2e4e59['getAttribute']('vid_end'),{'userId':_0x30f492}),this['_touched']['set'](_0x47865a['getAttribute']('vid_start'),{'userId':_0x30f492});}else{const _0x543914=this['_revisionId']++,_0x2ca295=this['_revisionId']++;_0x2e4e59['_setAttribute']('vid_end',_0x543914),_0x47865a['_setAttribute']('vid_start',_0x2ca295),_0x47865a['_setAttribute']('vid_end',_0x22d233),this['_touched']['set'](_0x543914,{'userId':_0x30f492}),this['_touched']['set'](_0x2ca295,{'userId':_0x30f492});}}['_handleMarkerOperation'](_0x578598){if(!_0x578598['affectsData'])return;const _0x66c57d=(_0x578598=this['_cloneOperation'](_0x578598,this['_diffRoots']))['oldRange']?_0x578598['oldRange']['root']:null,_0x385e77=_0x578598['newRange']?_0x578598['newRange']['root']:null;_0x66c57d&&this['_markers']['delete'](_0x578598['name']),_0x385e77&&this['_markers']['set'](_0x578598['name'],_0x578598['newRange']['clone']());const _0x331172=null===_0x578598['_authorId']?null:_0x578598['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xf04736=_0x578598['name'];if(!this['_touchedMarkers']['has'](_0xf04736))return void this['_touchedMarkers']['set'](_0xf04736,{'range':_0x578598['oldRange'],'userId':_0x331172});const _0x1b234f=this['_touchedMarkers']['get'](_0xf04736),_0x1aa4b1=_0x1b234f['range'],_0x3ca423=_0x578598['newRange'];null==_0x1aa4b1&&null==_0x3ca423||_0x1aa4b1&&_0x3ca423&&_0x1aa4b1['isEqual'](_0x3ca423)?this['_touchedMarkers']['delete'](_0x578598['name']):_0x1b234f['userId']=_0x331172;}['_handleRootOperation'](_0x71343d,_0x4560b8){this['_diffRoots']['has'](_0x71343d['rootName'])?this['_diffRoots']['get'](_0x71343d['rootName'])['_isAttached']=_0x71343d['isAdd']:(this['_diffRoots']['set'](_0x71343d['rootName'],B(_0x71343d['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x71343d['rootName'],{}),_0x4560b8&&this['_idsRoots']['set'](_0x71343d['rootName'],B(_0x71343d['rootName'],!0x0)));const _0x144b21=null===_0x71343d['_authorId']?null:_0x71343d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x39b07a=this['_touchedRoots']['get'](_0x71343d['rootName']);_0x39b07a&&_0x39b07a['userId']===_0x144b21?this['_touchedRoots']['delete'](_0x71343d['rootName']):this['_touchedRoots']['set'](_0x71343d['rootName'],{'userId':_0x144b21,'isAttached':_0x71343d['isAdd']});}['_handleRootAttributeOperation'](_0x24b039){const _0x5542a9=this['_diffRootsAttributes']['get'](_0x24b039['root']['rootName']);null===_0x24b039['newValue']?delete _0x5542a9[_0x24b039['key']]:_0x5542a9[_0x24b039['key']]=_0x24b039['newValue'];}}function F(_0x4254c3){const _0x65babe=B(_0x4254c3['rootName'],_0x4254c3['isAttached']());for(const _0x10bead of _0x4254c3['getChildren']()){const _0x3afca2=_0x10bead['_clone'](!0x0);_0x65babe['_appendChild'](_0x3afca2);}return _0x65babe;}function B(_0x514389,_0x42e14b=!0x0){const _0x55aa41=new wt();return _0x55aa41['rootName']=_0x514389,_0x55aa41['_isAttached']=_0x42e14b,_0x55aa41['isAttached']=()=>_0x55aa41['_isAttached'],_0x55aa41;}function J(_0x2486e7,_0x153fbc,_0x564884){const _0x42653e='elementEnd'==_0x2486e7['type']?_0x564884['createPositionAt'](_0x2486e7['item'],'end'):_0x564884['createPositionBefore'](_0x2486e7['item']);return _0x564884['createPositionFromPath'](_0x153fbc,_0x42653e['path'],_0x42653e['stickiness']);}function q(_0x45e7a3,_0xf066b5,_0x58c7d7){const _0x55ec1f='elementStart'==_0x45e7a3['type']?_0x58c7d7['createPositionAt'](_0x45e7a3['item'],0x0):_0x58c7d7['createPositionAfter'](_0x45e7a3['item']);return _0x58c7d7['createPositionFromPath'](_0xf066b5,_0x55ec1f['path'],_0x55ec1f['stickiness']);}class ns extends _0x229008{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x447d7f,_0x559eb8){super(_0x447d7f),this['focusTracker']=new _0x222fa5(),this['keystrokes']=new _0x1bd166(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x559eb8),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x8bdb45({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x92e8ae=_0x2b205c=>_0x2b205c['stopPropagation']();this['keystrokes']['set']('arrowright',_0x92e8ae),this['keystrokes']['set']('arrowleft',_0x92e8ae),this['keystrokes']['set']('arrowup',_0x92e8ae),this['keystrokes']['set']('arrowdown',_0x92e8ae);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x3f5c5f){this['revisionNameInputView']['fieldView']['element']['value']=_0x3f5c5f['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x8eeb50){const _0xfea381=new at(this['locale'],_0x204f0c),_0x1f126c=_0xfea381['fieldView'];_0x1f126c['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1bcce1=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x8eeb50&&(_0x1bcce1+='\x20('+R(this['locale'],'optional')+')'),(_0xfea381['label']=_0x1bcce1,_0x1f126c['on']('input',()=>{this['revisionNameInputValue']=_0x1f126c['element']['value']['trim']();}),_0xfea381);}}class u extends _0x52ad62{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x3e8886=this['editor'],_0x3e14ef=_0x3e8886['plugins']['get']('RevisionTracker');_0x3e8886['ui']['componentFactory']['add']('revisionHistory',_0x5b270f=>{const _0x18f247=_0xc86235(_0x5b270f),_0x4aec5e=_0x18f247['panelView']['children'],_0x49d938=new te(_0x5b270f),_0x16c643=new _0x389bc6(_0x5b270f),_0x2be8f3=new _0x51179d(_0x5b270f),_0x273a09=new _0x389bc6(_0x5b270f),_0x101204=new _0x51179d(_0x5b270f);return _0x18f247['bind']('isEnabled')['to'](_0x3e14ef,'isReady',_0x3e14ef,'isEnabled',_0x3e8886,'isReadOnly',(_0x454923,_0x458265,_0x3e1c7b)=>_0x454923&&_0x458265&&!_0x3e1c7b),_0x18f247['buttonView']['set']({'icon':_0x598ba3['history'],'label':R(_0x5b270f,'Revision\x20history'),'tooltip':!0x0}),_0x2be8f3['set']({'label':R(_0x5b270f,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x2be8f3['bind']('isEnabled')['to'](_0x3e14ef,'isReady',_0x3e14ef,'isEnabled',_0x3e8886,'isReadOnly',(_0x16d8fb,_0xd0a1e5,_0x1c8131)=>_0x16d8fb&&_0xd0a1e5&&!_0x1c8131),_0x2be8f3['on']('execute',()=>this['_showDialog']()),_0x101204['set']({'label':R(_0x5b270f,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x101204['bind']('isEnabled')['to'](_0x3e14ef,'isReady',_0x3e8886,'isReadOnly',(_0x20f5fb,_0x4e1099)=>_0x20f5fb&&!_0x4e1099),_0x101204['on']('execute',()=>{_0x3e8886['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x18f247['isOpen']=!0x1,_0x3e8886['editing']['view']['focus']();}),_0x16c643['children']['add'](_0x2be8f3),_0x273a09['children']['add'](_0x101204),_0x49d938['role']='menu',_0x49d938['items']['addMany']([_0x16c643,_0x273a09]),_0x4aec5e['add'](_0x49d938),_0x18f247;}),_0x3e8886['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x54d80e=this['editor'],_0x51262e=_0x54d80e['locale'],_0x321a64=new _0x673cc(_0x51262e),_0x1a6c8b=new _0xea0e98(_0x51262e);_0x321a64['buttonView']['set']({'icon':_0x598ba3['history'],'label':R(_0x51262e,'Revision\x20history')});const _0x1885b1=new _0x50d7c3(_0x51262e,_0x321a64),_0x2b8709=new _0x3abf6d(_0x51262e);_0x2b8709['set']({'label':R(_0x51262e,'Save\x20current\x20revision')}),_0x2b8709['delegate']('execute')['to'](_0x321a64),_0x2b8709['on']('execute',()=>{this['_showDialog']();}),_0x1885b1['children']['add'](_0x2b8709),_0x1a6c8b['items']['add'](_0x1885b1);const _0x551693=new _0x50d7c3(_0x51262e,_0x321a64),_0x2fefe2=new _0x3abf6d(_0x51262e);return _0x2fefe2['set']({'label':R(_0x51262e,'Open\x20revision\x20history')}),_0x2fefe2['delegate']('execute')['to'](_0x321a64),_0x2fefe2['on']('execute',()=>{_0x54d80e['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x551693['children']['add'](_0x2fefe2),_0x1a6c8b['items']['add'](_0x551693),_0x321a64['panelView']['children']['add'](_0x1a6c8b),_0x321a64;}['_showDialog'](){const _0x7a8305=this['editor'],_0x5e28e6=_0x7a8305['locale'],_0xace6b1=_0x7a8305['plugins']['get']('Dialog'),_0x64c74c=_0x7a8305['plugins']['get']('RevisionTracker');function _0xb2adcb(_0x1717d5){_0x7a8305['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1717d5['revisionName']?_0x1717d5['revisionNameInputView']['errorText']=R(_0x5e28e6,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x7a8305['plugins']['get'](l)['saveRevision']({'name':_0x1717d5['revisionName']}),_0xace6b1['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xb2adcb(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0xace6b1['show']({'id':'revisionSave','title':R(_0x5e28e6,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x7a8305['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0xace6b1['hide']()},{'label':R(_0x7a8305['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x57a075){_0x57a075['bind']('isEnabled')['to'](_0x64c74c,'isReady',_0x64c74c,'isEnabled',_0x7a8305,'isReadOnly',(_0x3a4a8d,_0x517d6f,_0x289fd1)=>_0x3a4a8d&&_0x517d6f&&!_0x289fd1);},'onExecute':()=>_0xb2adcb(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x5982e1=this['editor'],_0x2c2fab=_0x5982e1['locale'];this['_saveRevisionFormView']=new ns(_0x2c2fab,_0x5982e1['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Y extends _0x229008{['changeId'];['_model'];constructor(_0x27a942,_0x50a507){super(_0x27a942),this['_model']=_0x50a507,this['changeId']=_0x50a507['id'];const _0x102bd1=this['bindTemplate'],_0x3838c0=R(_0x27a942,_0x50a507['data']['isSuggestion']?'Suggested\x20by':'add'==_0x50a507['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x50a507['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x102bd1['to']('type',_0xfdde46=>'ck-revision-change__'+_0xfdde46)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x3838c0}]},{'text':'\x20'+_0x50a507['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x35ab5a(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x4d77c9){super(),this['id']=_0x4d77c9['id']||_0x164885(),this['author']=_0x4d77c9['author'],this['type']=_0x4d77c9['type'],this['data']=_0x4d77c9['data']||{},this['rootName']=_0x4d77c9['rootName'],this['set']('createdAt',_0x4d77c9['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xc7d9e0,_0x3f8d0d){this['newRevisionId']=_0xc7d9e0,this['oldRevisionId']=_0x3f8d0d,this['changes']=new _0x22f9c7();}['_setChanges'](_0x4fe247){for(const _0x4f4ee3 of _0x4fe247)this['changes']['add'](_0x4f4ee3);}}const Z={'c':_0x268df4,'a':_0x3d4e27,'e':_0x4b27ee,'r':_0x29b634,'u':_0x24fb36};class d extends _0x52ad62{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3253b4,_0x5a3b48,j];}constructor(_0x127cf8){super(_0x127cf8),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x3ccd78,_0x5a2f76,_0x536abf)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x406297=>{for(const _0xd89717 of this['editor']['editing']['view']['document']['roots'])_0x536abf?_0x406297['removeClass']('ck-editor__editable__overlay',_0xd89717):_0x406297['addClass']('ck-editor__editable__overlay',_0xd89717);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3a64ac=>null!==_0x3a64ac),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x404e5d,_0x3c6165,_0x2a2349)=>_0x404e5d&&_0x2a2349?_0x3c6165['changes']['getIndex'](_0x2a2349):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4b074c,_0x511c79)=>_0x4b074c?_0x511c79['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x5a3b48);}['init'](){const _0x3ddc26=this['editor'],_0xf3ffb3=new bt(_0x3ddc26,{'direction':'backward'}),_0x2f3e4a=new bt(_0x3ddc26,{'direction':'forward'});(_0x3ddc26['commands']['add']('showPreviousChange',_0xf3ffb3),_0x3ddc26['commands']['add']('showNextChange',_0x2f3e4a),_0x3ddc26['commands']['add']('restoreRevision',new yt(_0x3ddc26)),this['on']('change:numberOfChanges',()=>{_0xf3ffb3['refresh'](),_0x2f3e4a['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3ddc26['enableReadOnlyMode']('revision-viewer'),_0x3ddc26['plugins']['has']('WidgetToolbarRepository'))&&_0x3ddc26['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x2d5f2f){await this['loadRevisionData'](_0x2d5f2f);const _0x33b72e={};for(const _0x5bc3ce in _0x2d5f2f['diffData']){if(_0x2d5f2f['diffData'][_0x5bc3ce]['attachChange']&&!_0x2d5f2f['diffData'][_0x5bc3ce]['attachChange']['isAttached'])continue;const _0x182425=this['_removeRevisionMarkers'](JSON['parse'](_0x2d5f2f['diffData'][_0x5bc3ce]['insertions'])),_0x5ec68a=this['editor']['editing']['view']['document'],_0x1da982=new _0x2e98fa(_0x5ec68a,_0x182425['map'](_0x2cc215=>this['_getViewObj'](_0x2cc215)));this['editor']['data']['processor']['useFillerType']('marked'),_0x33b72e[_0x5bc3ce]=this['editor']['data']['processor']['toData'](_0x1da982),this['editor']['data']['processor']['useFillerType']('default');}return _0x33b72e;}async['getRevisionRootsAttributes'](_0x486108){await this['loadRevisionData'](_0x486108);const _0x43641f={};for(const _0x3c1506 in _0x486108['diffData'])_0x486108['diffData'][_0x3c1506]['attachChange']&&!_0x486108['diffData'][_0x3c1506]['attachChange']['isAttached']||(_0x43641f[_0x3c1506]=_0x486108['diffData'][_0x3c1506]['attributesAfter']||{});return _0x43641f;}['_removeRevisionMarkers'](_0x1212c7){return(_0x1212c7=_0x1212c7['filter'](_0x567bf3=>!_0x567bf3['name']||'revision-start'!==_0x567bf3['name']&&'revision-end'!==_0x567bf3['name']))['forEach'](_0x30f2e9=>{'string'!=typeof _0x30f2e9&&(_0x30f2e9['children']=this['_removeRevisionMarkers'](_0x30f2e9['children']),_0x30f2e9['attributes']=_0x30f2e9['attributes']['filter'](_0x16f770=>!_0x16f770[0x0]['startsWith']('data-revision-')));}),_0x1212c7;}async['compare'](_0x54e24c,_0x5cbf7e,_0x44c3b7=!0x1){if(!this['isEnabled'])return;const _0x1bc183=this['diff'],_0x59a28b=this['repository'],_0x150f1e='string'==typeof _0x54e24c?_0x59a28b['getRevision'](_0x54e24c):_0x54e24c,_0x4f646d='string'==typeof _0x5cbf7e?_0x59a28b['getRevision'](_0x5cbf7e):_0x5cbf7e,_0x56e7f9=_0x150f1e['id'],_0x3ecd65=_0x4f646d?_0x4f646d['id']:null;if(!_0x44c3b7&&this['diff']&&this['diff']['newRevisionId']===_0x56e7f9&&this['diff']['oldRevisionId']===_0x3ecd65)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x56e7f9,_0x3ecd65);const _0x7f793b=this['_getRevisionsRange'](_0x150f1e,_0x4f646d,!0x0)['map'](_0x50cc97=>this['loadRevisionData'](_0x50cc97));return _0x7f793b['push'](new Promise(_0x5b204d=>{setTimeout(_0x5b204d,0x14);})),Promise['all'](_0x7f793b)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x387f8b=this['_getDiff'](_0x56e7f9,_0x3ecd65);for(const _0x39e9b8 of _0x387f8b['changes'])this['_changeIdToChange']['set'](_0x39e9b8['id'],_0x39e9b8);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x31b692=>{for(const _0x54c20a of this['editor']['model']['document']['getRootNames']())_0x31b692['detachRoot'](_0x54c20a);for(const _0x42cab3 of Object['keys'](_0x387f8b['model'])){const _0x92c818=_0x31b692['addRoot'](_0x42cab3);for(const _0x2368a7 of Object['keys'](_0x387f8b['attributes'][_0x42cab3]))_0x31b692['setAttribute'](_0x2368a7,_0x387f8b['attributes'][_0x42cab3][_0x2368a7],_0x92c818);_0x31b692['insert'](_0x387f8b['model'][_0x42cab3],_0x92c818,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x387f8b['changes'])),this['isReady']=!0x0;})['catch'](_0x154fb4=>{console['error'](_0x154fb4),this['_cleanUp'](),_0x1bc183&&(this['diff']=_0x1bc183),this['isReady']=!0x0;});}['addRevisionData'](_0x50b00e,_0x150929){const _0x31742f=this['repository']['createRevision'](_0x50b00e);return _0x31742f['on']('_update',(_0x3fc620,_0xcb02cd,_0x56f38e)=>_0x150929(_0xcb02cd,_0x56f38e,_0x31742f)),this['repository']['addRevision'](_0x31742f),_0x31742f;}['loadRevisionData'](_0xb78310){if(!_0xb78310||_0xb78310['diffData'])return Promise['resolve']();{const _0x34e9bc=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x34e9bc,'revisionId':_0xb78310['id']})['then'](_0x44baee=>{_0xb78310['_update']({'diffData':_0x44baee['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xc98d36=>{for(const _0x1fae2a of this['editor']['model']['document']['getRootNames']())_0xc98d36['detachRoot'](_0x1fae2a);});}['_sortAndFilterDiffChanges'](_0x2d956c){const _0x2a188a=[],_0xda41d9=new Map();for(const _0x592c1f of this['editor']['model']['document']['getRootNames']()){const _0x29a0d9=this['editor']['editing']['view']['getDomRoot'](_0x592c1f);if(!_0x29a0d9)continue;const _0x31fcc9=_0x29a0d9['getClientRects']()['item'](0x0);_0x31fcc9&&(_0x2a188a['push'](_0x592c1f),_0xda41d9['set'](_0x592c1f,_0x31fcc9));}return _0x2a188a['sort']((_0x4fc9a2,_0x36afb4)=>{const _0x4733fc=_0xda41d9['get'](_0x4fc9a2),_0x4a9405=_0xda41d9['get'](_0x36afb4);return _0x4733fc['y']-_0x4a9405['y']||_0x4733fc['x']-_0x4a9405['x'];}),(_0x2d956c=_0x2d956c['filter'](_0x47dcee=>_0x2a188a['includes'](_0x47dcee['rootName'])))['sort']((_0x361a51,_0x1a29ba)=>_0x2a188a['indexOf'](_0x361a51['rootName'])-_0x2a188a['indexOf'](_0x1a29ba['rootName'])),_0x2d956c;}['_makeTape'](_0x2a0bcd){const _0x42cedf=Array['from'](_0x2a0bcd['markers'])['filter'](([_0x5efbcd,_0xc5d2db])=>_0x5efbcd['startsWith']('revision:')&&!_0xc5d2db['isCollapsed']),_0x27e014=Array['from'](this['editor']['model']['createRangeIn'](_0x2a0bcd)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x42cedf['length'])for(const _0x3b1078 of _0x27e014){const [_0x5a708b,_0x184772]=_0x42cedf[0x0],[,_0x18ff7c,_0x3dd504]=_0x5a708b['split'](':');if(_0x184772['end']['isEqual'](_0x3b1078['nextPosition'])&&_0x42cedf['shift'](),(_0x3b1078['previousPosition']['isEqual'](_0x184772['start'])||_0x3b1078['previousPosition']['isAfter'](_0x184772['start']))&&('insertion'==_0x18ff7c?_0x3b1078['isAdded']={'userId':_0x3dd504}:'deletion'==_0x18ff7c&&(_0x3b1078['isRemoved']={'userId':_0x3dd504})),0x0==_0x42cedf['length'])break;}return _0x27e014;}['_refreshStartEndIndex'](_0x178447){const _0xf2a180=new Map();for(let _0x38604f=0x0;_0x38604f<_0x178447['length'];_0x38604f++)'text'===_0x178447[_0x38604f]['type']?(_0x178447[_0x38604f]['item']['startIndex']=_0x38604f,_0x178447[_0x38604f]['item']['endIndex']=_0x38604f):('elementStart'===_0x178447[_0x38604f]['type']?_0x178447[_0x38604f]['item']['startIndex']=_0x38604f:'elementEnd'===_0x178447[_0x38604f]['type']&&(_0x178447[_0x38604f]['item']['endIndex']=_0x38604f),_0xf2a180['set'](_0x178447[_0x38604f]['id'],_0x38604f));for(const _0x55c0d9 of _0xf2a180['values']())'elementStart'===_0x178447[_0x55c0d9]['type']?_0x178447[_0x55c0d9]['item']['endIndex']=_0xf2a180['get'](_0x178447[_0x55c0d9]['pairId']):'elementEnd'===_0x178447[_0x55c0d9]['type']&&(_0x178447[_0x55c0d9]['item']['startIndex']=_0xf2a180['get'](_0x178447[_0x55c0d9]['pairId']));}['_processTape'](_0x1c8d53){for(let _0x264835=0x0;_0x264835<_0x1c8d53['length'];_0x264835++){if('elementStart'===_0x1c8d53[_0x264835]['type'])_0x1c8d53[_0x264835]['item']['startIndex']=_0x264835;else{if('elementEnd'===_0x1c8d53[_0x264835]['type']){_0x1c8d53[_0x264835]['item']['endIndex']=_0x264835;const _0x525c9a=_0x1c8d53[_0x264835]['item']['startIndex'];_0x1c8d53[_0x525c9a]['pairId']=_0x1c8d53[_0x264835]['id'],_0x1c8d53[_0x264835]['pairId']=_0x1c8d53[_0x525c9a]['id'];}else _0x1c8d53[_0x264835]['item']['startIndex']=_0x264835,_0x1c8d53[_0x264835]['item']['endIndex']=_0x264835,_0x1c8d53[_0x264835]['pairId']=null;}_0x1c8d53[_0x264835]['markersStart']||(_0x1c8d53[_0x264835]['markersStart']=[],_0x1c8d53[_0x264835]['markersEnd']=[]);}}['_markInsertions'](_0x266e06,_0x19b4f0){const _0x2b9eb8=_0x266e06['filter'](_0x3f6e92=>!_0x3f6e92['isAdded']);for(let _0x4aa20d=0x0;_0x4aa20d<_0x19b4f0['length'];_0x4aa20d++)_0x19b4f0[_0x4aa20d]['isAdded']&&(_0x2b9eb8[_0x4aa20d]['isAdded']=_0x19b4f0[_0x4aa20d]['isAdded']);}['_makeModelFromViewString'](_0x1f7d36){const _0x2c662c=JSON['parse'](_0x1f7d36),_0x3abcf6=this['editor']['editing']['view']['document'],_0x6fd841=new _0x2e98fa(_0x3abcf6,_0x2c662c['map'](_0x10d3a2=>this['_getViewObj'](_0x10d3a2)));return this['editor']['data']['toModel'](_0x6fd841);}['_getViewObj'](_0x1dcfb9){const _0x873391=this['editor']['editing']['view']['document'];if('string'==typeof _0x1dcfb9)return new _0x40d627(_0x873391,_0x1dcfb9);{const _0x4e473d=_0x1dcfb9['children']['map'](_0x5aed3c=>this['_getViewObj'](_0x5aed3c));return new(Z[_0x1dcfb9['type']]||_0x6f249f)(_0x873391,_0x1dcfb9['name'],_0x1dcfb9['attributes'],_0x4e473d);}}['_getDiff'](_0x4d7147,_0x545013=null){const _0x2f874c=this['repository']['getRevision'](_0x4d7147),_0x455040=_0x545013?this['repository']['getRevision'](_0x545013):null,_0x26a67d=this['_getRevisionsRange'](_0x2f874c,_0x455040),_0x257bed=_0x26a67d[_0x26a67d['length']-0x1],_0x2ec312=new Map(),_0x2c3244={'model':{},'attributes':{},'changes':[]},_0x497a1a=new Set(),_0x2d408f=new Map();for(let _0x2fc518=_0x26a67d['length']-0x1;_0x2fc518>=0x0;_0x2fc518--){const _0x3ecc88=_0x26a67d[_0x2fc518];for(const _0x2fd8c7 of Object['keys'](_0x3ecc88['diffData']))if(_0x3ecc88['diffData'][_0x2fd8c7]['attachChange']){const _0xae9c97=_0x3ecc88['diffData'][_0x2fd8c7]['attachChange'];_0xae9c97['isAttached']?(_0x497a1a['add'](_0x2fd8c7),_0x2d408f['has'](_0x2fd8c7)&&_0x2d408f['get'](_0x2fd8c7)['userId']==_0xae9c97['userId']?_0x2d408f['delete'](_0x2fd8c7):_0x2d408f['set'](_0x2fd8c7,_0xae9c97)):_0x2d408f['has'](_0x2fd8c7)?(_0x497a1a['delete'](_0x2fd8c7),_0x2d408f['delete'](_0x2fd8c7)):(_0x497a1a['add'](_0x2fd8c7),_0x2d408f['set'](_0x2fd8c7,_0xae9c97));}else _0x497a1a['add'](_0x2fd8c7);}for(const _0x39bdca of _0x497a1a){const _0x57c7c8=_0x2d408f['has'](_0x39bdca)&&!_0x2d408f['get'](_0x39bdca)['isAttached'];let _0x2c4692=_0x57c7c8?_0x26a67d['length']-0x1:0x0;const _0x3dd56b=_0x57c7c8?-0x1:0x1;for(;_0x26a67d[_0x2c4692];){const _0x4bcf35=_0x26a67d[_0x2c4692];if(_0x4bcf35['diffData'][_0x39bdca]){const _0x3c72b1=_0x57c7c8?_0x4bcf35['diffData'][_0x39bdca]['attributesBefore']:_0x4bcf35['diffData'][_0x39bdca]['attributesAfter'];_0x2c3244['attributes'][_0x39bdca]=_0x3c72b1?_0x3a4227(_0x3c72b1):{};break;}_0x2c4692+=_0x3dd56b;}}for(const _0x1cbfea of _0x26a67d){_0x1cbfea['model']={};for(const _0x5b66c7 of _0x1cbfea['authors'])_0x2ec312['set'](_0x5b66c7['id'],_0x5b66c7);for(const _0x19f0b6 of _0x497a1a){const _0x24718f=_0x1cbfea['diffData'][_0x19f0b6]?_0x1cbfea['diffData'][_0x19f0b6]['insertions']:'[]',_0x17a875=_0x1cbfea['diffData'][_0x19f0b6]?_0x1cbfea['diffData'][_0x19f0b6]['deletions']:'[]';_0x1cbfea['model'][_0x19f0b6]={'insertions':this['_makeModelFromViewString'](_0x24718f),'deletions':this['_makeModelFromViewString'](_0x17a875)};}}for(const _0x354a0a of _0x497a1a){let _0x374897=null,_0x4d96a9=0x0;const _0x370d1f=new Map(Array['from'](_0x2f874c['model'][_0x354a0a]['insertions']['markers'])['filter'](([_0xf21265])=>!_0xf21265['startsWith']('revision:')));let _0x116339=0x0;for(const _0x4b9142 of _0x26a67d){const _0x1febbf=this['_makeTape'](_0x4b9142['model'][_0x354a0a]['insertions']);_0x4b9142==_0x2f874c?(_0x374897=_0x1febbf,_0x4d96a9=_0x374897['length'],_0x374897['forEach'](_0x47ed1b=>{_0x47ed1b['id']=_0x116339++;}),this['_processTape'](_0x374897)):this['_markInsertions'](_0x374897,_0x1febbf);const _0x3505c2=_0x374897['filter'](_0x4fed64=>!_0x4fed64['isAdded'])['map'](_0x47a163=>_0x47a163['id']);let _0x410cfc=0x0;const _0x368f7f=this['_makeTape'](_0x4b9142['model'][_0x354a0a]['deletions']);_0x368f7f['forEach'](_0x2f9cc1=>{_0x2f9cc1['isRemoved']?_0x2f9cc1['id']=_0x4d96a9++:_0x2f9cc1['id']=_0x3505c2[_0x410cfc++];}),this['_processTape'](_0x368f7f),this['_setDistance'](_0x374897,'isAdded'),this['_setDistance'](_0x368f7f,'isRemoved'),_0x4b9142==_0x2f874c&&this['_markMarkers'](_0x374897,_0x370d1f),_0x374897=this['_joinTapes'](_0x374897,_0x368f7f),this['_refreshStartEndIndex'](_0x374897),this['_setDistance'](_0x374897,'isRemoved');}_0x374897=_0x374897['filter'](_0x545475=>!(_0x545475['isAdded']&&_0x545475['isRemoved']));const _0x5eb6c4=new Map(_0x257bed['model'][_0x354a0a]['deletions']['markers']),_0x36346b=new Set(_0x370d1f['keys']());for(const _0x1a91b7 of _0x5eb6c4['keys']())_0x36346b['delete'](_0x1a91b7);this['_markSuggestions'](_0x374897,_0x36346b),this['_fixObsoleteTags'](_0x374897),_0x374897=this['_removeMissingPairs'](_0x374897),_0x374897=this['_markMismatchedRemovedTags'](_0x374897),_0x374897=this['_removeUnsupportedChanges'](_0x374897);const {root:_0x503d71,changes:_0x26c8e4}=this['_makeModelFromTape'](_0x374897,_0x2ec312,_0x354a0a);_0x2c3244['model'][_0x354a0a]=_0x503d71;const _0x2a8063=_0x2d408f['get'](_0x354a0a);if(_0x2a8063){const _0x7f1eed=_0x2ec312['get'](_0x2a8063['userId']),_0x2e3da2=new r({'author':_0x7f1eed,'type':_0x2a8063['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x354a0a});_0x26c8e4['unshift'](_0x2e3da2),_0x2c3244['attributes'][_0x354a0a]['revisionHistoryAttachChange']=_0x2e3da2['id'];}_0x2c3244['changes']=_0x2c3244['changes']['concat'](_0x26c8e4);}return _0x2c3244;}['_markMarkers'](_0x2db18c,_0x36e165){for(let _0x12a8b3=0x0;_0x12a8b3<_0x2db18c['length'];_0x12a8b3++)for(const [_0x1be767,_0x5e4e6c]of _0x36e165)_0x5e4e6c['start']['isEqual'](_0x2db18c[_0x12a8b3]['previousPosition'])&&_0x2db18c[_0x12a8b3]['markersStart']['push'](_0x1be767),_0x5e4e6c['end']['isEqual'](_0x2db18c[_0x12a8b3]['nextPosition'])&&_0x2db18c[_0x12a8b3]['markersEnd']['push'](_0x1be767);}['_joinTapes'](_0x53230f,_0x9079a){let _0x18bb0c=[],_0x303f77=0x0,_0x5d72de=0x0;for(;_0x303f77<_0x53230f['length']||_0x5d72de<_0x9079a['length'];){const _0x5cf298=_0x53230f[_0x303f77]||{},_0x3937f1=_0x9079a[_0x5d72de]||{};if(_0x5cf298['id']==_0x3937f1['id'])_0x303f77++,_0x5d72de++,_0x18bb0c['push'](_0x5cf298);else{if(_0x3937f1['isRemoved']&&_0x5cf298['isAdded']){const {commonTape:_0x5e38fa,iEnd:_0x46db7d,jEnd:_0x34fe83}=this['_threeWayMerge'](_0x53230f,_0x303f77,_0x9079a,_0x5d72de);_0x18bb0c=_0x18bb0c['concat'](_0x5e38fa),_0x303f77=_0x46db7d,_0x5d72de=_0x34fe83;}else _0x3937f1['isRemoved']?(_0x5d72de++,_0x18bb0c['push'](_0x3937f1)):(_0x303f77++,_0x18bb0c['push'](_0x5cf298));}}return _0x18bb0c;}['_markSuggestions'](_0x5250f9,_0xefc817){const _0x521b5e=[];for(let _0x536642=0x0;_0x536642<_0x5250f9['length'];_0x536642++){for(let _0x17bb32=0x0;_0x17bb32<_0x5250f9[_0x536642]['markersStart']['length'];_0x17bb32++){const _0xb0ded2=_0x5250f9[_0x536642]['markersStart'][_0x17bb32];if(!_0xefc817['has'](_0xb0ded2))continue;const {group:_0xcd62e1,type:_0x595af4,authorId:_0xed3077}=_0x5106ea(_0xb0ded2);'revision-suggestion'!=_0xcd62e1||'insertion'!=_0x595af4&&'deletion'!=_0x595af4||(_0x521b5e['unshift']({'type':_0x595af4,'name':_0xb0ded2,'userId':_0xed3077}),_0x5250f9[_0x536642]['markersStart']['splice'](_0x17bb32,0x1),_0x17bb32--);}_0x3ff427(_0x5250f9[_0x536642]);for(let _0x50db6e=0x0;_0x50db6e<_0x5250f9[_0x536642]['markersEnd']['length'];_0x50db6e++){const _0x390dfe=_0x5250f9[_0x536642]['markersEnd'][_0x50db6e];if(!_0xefc817['has'](_0x390dfe))continue;const {group:_0x48408c,type:_0x44d313}=_0x5106ea(_0x390dfe);if('revision-suggestion'!=_0x48408c||'insertion'!=_0x44d313&&'deletion'!=_0x44d313)continue;_0x5250f9[_0x536642]['markersEnd']['splice'](_0x50db6e,0x1),_0x50db6e--;const _0xa71649=_0x521b5e['findIndex'](_0x220b53=>_0x220b53['name']==_0x390dfe);_0xa71649>-0x1&&_0x521b5e['splice'](_0xa71649,0x1);}}function _0x5106ea(_0x1de9c4){const _0x1b82f1=_0x1de9c4['split'](':');return{'group':_0x1b82f1[0x0],'type':_0x1b82f1[0x1],'subType':_0x1b82f1['length']>=0x5?_0x1b82f1[0x2]:null,'id':_0x1b82f1['length']<0x5?_0x1b82f1[0x2]:_0x1b82f1[0x3],'authorId':_0x1b82f1['length']<0x5?_0x1b82f1[0x3]:_0x1b82f1[0x4],'markerCount':0x6==_0x1b82f1['length']?_0x1b82f1[0x5]:null};}function _0x3ff427(_0x2aae67){for(let _0x36d055=0x0;_0x36d055<_0x521b5e['length'];_0x36d055++){if(_0x2aae67['isAdded']&&'insertion'==_0x521b5e[_0x36d055]['type'])return _0x2aae67['isAddSuggestion']=_0x521b5e[_0x36d055],void delete _0x2aae67['isAdded'];if(!_0x2aae67['isAdded']&&!_0x2aae67['isRemoved']&&'deletion'==_0x521b5e[_0x36d055]['type'])return void(_0x2aae67['isRemoveSuggestion']=_0x521b5e[_0x36d055]);}}}['_setDistance'](_0x4046c7,_0x452375){let _0x44514b=0x0,_0x348536=!0x1;const _0xa6dcae=new Map();for(const _0xfc4321 of _0x4046c7)_0xfc4321[_0x452375]?_0x348536&&(_0x44514b++,_0x348536=!0x1):(_0x44514b++,_0x348536=!0x0),_0xa6dcae['set'](_0xfc4321['id'],_0x44514b);for(let _0x217055=0x0;_0x217055<_0x4046c7['length'];_0x217055++){if('isRemoved'==_0x452375&&_0x4046c7[_0x217055]['isAdded']||'isAdded'==_0x452375&&_0x4046c7[_0x217055]['isRemoved'])continue;if('text'==_0x4046c7[_0x217055]['type']){_0x4046c7[_0x217055]['distance']=0x0;continue;}const _0x4bc6b2=_0xa6dcae['get'](_0x4046c7[_0x217055]['pairId']),_0x2147fd=_0xa6dcae['get'](_0x4046c7[_0x217055]['id']);_0x4046c7[_0x217055]['distance']=_0x4bc6b2-_0x2147fd;}}['_getRevisionsRange'](_0x3ec4e0,_0x56aa22,_0x21d734=!0x1){const _0xe380c5=[];let _0x2e3074=this['repository']['getIndex'](_0x3ec4e0),_0xb59aa3=this['repository']['getIndex'](_0x56aa22);for(-0x1==_0xb59aa3&&(_0xb59aa3=this['repository']['_revisions']['length'],_0x21d734=!0x1);_0x2e3074<_0xb59aa3;)_0xe380c5['push'](this['repository']['getRevision'](_0x2e3074)),_0x2e3074++;return _0x21d734&&_0xe380c5['push'](this['repository']['getRevision'](_0x2e3074)),_0xe380c5;}['_threeWayMerge'](_0x156bca,_0x50e3d7,_0x300a9a,_0x5a45db){const _0x91e44d=this['editor']['model']['schema'];let _0x168d20=_0x50e3d7;for(;_0x156bca[_0x168d20]&&_0x156bca[_0x168d20]['isAdded'];)_0x168d20++;let _0x55f86c=_0x5a45db;for(;_0x300a9a[_0x55f86c]&&_0x300a9a[_0x55f86c]['isRemoved'];)_0x55f86c++;_0x2b8441(_0x156bca,_0x50e3d7,_0x168d20),_0x2b8441(_0x300a9a,_0x5a45db,_0x55f86c);const _0x21c95f=_0x300a9a['slice'](_0x5a45db,_0x55f86c)['concat'](_0x156bca['slice'](_0x50e3d7,_0x168d20));return _0x21c95f['sort']((_0x5745cd,_0x21f3b7)=>_0x5745cd['side']!=_0x21f3b7['side']?_0x5745cd['side']-_0x21f3b7['side']:_0x5745cd['level']!=_0x21f3b7['level']?_0x5745cd['level']-_0x21f3b7['level']:_0x5745cd['distance']!=_0x21f3b7['distance']?_0x21f3b7['distance']-_0x5745cd['distance']:!!_0x5745cd['isAdded']!=!!_0x21f3b7['isAdded']?-0x1==_0x5745cd['side']||0x0==_0x5745cd['side']?_0x5745cd['isAdded']?-0x1:0x1:_0x5745cd['isAdded']?0x1:-0x1:_0x5745cd['index']-_0x21f3b7['index']),{'commonTape':_0x21c95f,'iEnd':_0x168d20,'jEnd':_0x55f86c};function _0x2b8441(_0x418dbd,_0x55eb40,_0x3eec28){let _0x102e6b=-0x1,_0x20521e=Number['POSITIVE_INFINITY'],_0x3dfc0a=!0x0;for(let _0x10cb7c=_0x55eb40;_0x10cb7c<_0x3eec28;_0x10cb7c++)if(_0x91e44d['isInline'](_0x418dbd[_0x10cb7c]['item'])||(_0x3dfc0a=!0x1),_0x418dbd[_0x10cb7c]['item']['startIndex']<_0x55eb40&&(_0x102e6b=_0x10cb7c),_0x418dbd[_0x10cb7c]['item']['endIndex']>=_0x3eec28){_0x20521e=_0x10cb7c;break;}_0x3dfc0a&&(_0x102e6b=_0x3eec28-0x1);for(let _0x22339d=_0x55eb40;_0x22339d<_0x3eec28;_0x22339d++)_0x418dbd[_0x22339d]['side']=_0x22339d<=_0x102e6b?-0x1:_0x22339d<_0x20521e?0x0:0x1,_0x418dbd[_0x22339d]['index']=_0x22339d;let _0x2d5b0e=0x0;for(let _0x3528e6=_0x55eb40;_0x3528e6<=_0x102e6b;_0x3528e6++)0x0==_0x418dbd[_0x3528e6]['distance']?_0x418dbd[_0x3528e6]['level']=_0x2d5b0e:(_0x2d5b0e++,_0x418dbd[_0x3528e6]['level']=_0x2d5b0e,_0x2d5b0e++);for(let _0x495af2=_0x55eb40;_0x495af2<_0x3eec28;_0x495af2++)0x0==_0x418dbd[_0x495af2]['side']&&(_0x418dbd[_0x495af2]['level']=_0x2d5b0e);_0x2d5b0e=0x0;for(let _0x4c9584=_0x3eec28-0x1;_0x4c9584>=_0x20521e;_0x4c9584--)0x0==_0x418dbd[_0x4c9584]['distance']?_0x418dbd[_0x4c9584]['level']=_0x2d5b0e:(_0x2d5b0e--,_0x418dbd[_0x4c9584]['level']=_0x2d5b0e,_0x2d5b0e--);}}['_fixObsoleteTags'](_0x47045a){const _0x2e9a4d=new Map(),_0xb0a391=this['editor']['model']['schema'];for(let _0x1ec2bd=0x1;_0x1ec2bd<_0x47045a['length'];_0x1ec2bd++){let _0x297873,_0x287632,_0x46f1bb;const _0x3b6349=_0x47045a[_0x1ec2bd],_0x4685d2=_0x47045a[_0x1ec2bd-0x1];if('text'==_0x3b6349['type'])continue;if(_0x3b6349['type']!=_0x4685d2['type'])continue;if(!_0xb0a391['isBlock'](_0x4685d2['item'])||_0xb0a391['isLimit'](_0x4685d2['item']))continue;if(!_0xb0a391['isBlock'](_0x3b6349['item'])||_0xb0a391['isLimit'](_0x3b6349['item']))continue;if((_0x47045a[_0x1ec2bd]['isAdded']||_0x47045a[_0x1ec2bd]['isAddSuggestion'])&&_0x47045a[_0x1ec2bd-0x1]['isRemoved'])_0x297873=_0x47045a[_0x1ec2bd],_0x287632=_0x47045a[_0x1ec2bd-0x1],_0x46f1bb=_0x1ec2bd-0x1;else{if(!_0x47045a[_0x1ec2bd]['isRemoved']||!_0x47045a[_0x1ec2bd-0x1]['isAdded']&&!_0x47045a[_0x1ec2bd-0x1]['isAddSuggestion'])continue;_0x297873=_0x47045a[_0x1ec2bd-0x1],_0x287632=_0x47045a[_0x1ec2bd],_0x46f1bb=_0x1ec2bd;}const _0x1f59cb=_0x297873['level']==_0x287632['level'],_0x4ed6e4=Math['abs'](_0x297873['level'])<Math['abs'](_0x287632['level'])&&0x0==_0x287632['distance'];(_0x1f59cb||_0x4ed6e4)&&(_0x2e9a4d['set'](_0x287632['id'],_0x297873['id']),_0x47045a['splice'](_0x46f1bb,0x1),_0x1ec2bd--,_0x297873['isAdded']=!0x1);}for(let _0x230cdd=0x0;_0x230cdd<_0x47045a['length'];_0x230cdd++)_0x2e9a4d['has'](_0x47045a[_0x230cdd]['pairId'])&&(_0x47045a[_0x230cdd]['pairId']=_0x2e9a4d['get'](_0x47045a[_0x230cdd]['pairId']));}['_removeMissingPairs'](_0x4d870c){const _0x26896e=new Set(_0x4d870c['map'](_0x401865=>_0x401865['id']));for(let _0x514966=0x0;_0x514966<_0x4d870c['length'];_0x514966++)_0x26896e['has'](_0x4d870c[_0x514966]['pairId'])||0x0==_0x4d870c[_0x514966]['distance']||(_0x4d870c[_0x514966]['isIncorrect']=!0x0);return _0x4d870c['filter'](_0x463f7b=>!_0x463f7b['isIncorrect']);}['_markMismatchedRemovedTags'](_0x35fd0d){const _0x2fde3a=new Set();for(let _0x44ce88=0x0;_0x44ce88<_0x35fd0d['length'];_0x44ce88++){if(_0x2fde3a['has'](_0x35fd0d[_0x44ce88]['id'])&&_0x35fd0d[_0x44ce88]['isRemoved']&&(_0x35fd0d[_0x44ce88]['isIncorrect']=!0x0),_0x35fd0d[_0x44ce88]['isIncorrect'])continue;if(0x0==_0x35fd0d[_0x44ce88]['distance'])continue;if('elementStart'!=_0x35fd0d[_0x44ce88]['type'])continue;if(null==_0x35fd0d[_0x44ce88]['pairId'])continue;let _0x5c1c57=_0x44ce88+0x1,_0x115607=0x0;for(;_0x35fd0d[_0x5c1c57]['id']!=_0x35fd0d[_0x44ce88]['pairId'];)'elementStart'==_0x35fd0d[_0x5c1c57]['type']?_0x115607++:'elementEnd'==_0x35fd0d[_0x5c1c57]['type']&&_0x115607--,_0x5c1c57++;if(0x0!=_0x115607){if(_0x35fd0d[_0x44ce88]['isRemoved'])_0x35fd0d[_0x44ce88]['isIncorrect']=!0x0;else{for(;_0x5c1c57!=_0x44ce88;)_0x35fd0d[_0x5c1c57]['isRemoved']&&0x0!=_0x35fd0d[_0x5c1c57]['distance']&&(_0x35fd0d[_0x5c1c57]['isIncorrect']=!0x0,_0x2fde3a['add'](_0x35fd0d[_0x5c1c57]['pairId'])),_0x5c1c57--;}}}return _0x35fd0d['filter'](_0x16a7be=>!_0x16a7be['isIncorrect']);}['_removeUnsupportedChanges'](_0x4f077e){const _0x3613dd=this['editor']['model']['schema'];for(let _0x456da7=0x0;_0x456da7<_0x4f077e['length'];_0x456da7++){if(!(_0x4f077e[_0x456da7]['isAdded']||_0x4f077e[_0x456da7]['isAddSuggestion']||_0x4f077e[_0x456da7]['isRemoved']||_0x4f077e[_0x456da7]['isRemoveSuggestion']))continue;if(0x0==_0x4f077e[_0x456da7]['distance'])continue;const _0x4a7841=_0x4f077e[_0x456da7]['item'];_0x3613dd['isBlock'](_0x4a7841)||_0x3613dd['isLimit'](_0x4a7841)||(_0x4f077e[_0x456da7]['isAdded']&&delete _0x4f077e[_0x456da7]['isAdded'],_0x4f077e[_0x456da7]['isAddSuggestion']&&delete _0x4f077e[_0x456da7]['isAddSuggestion'],_0x4f077e[_0x456da7]['isRemoveSuggestion']&&delete _0x4f077e[_0x456da7]['isRemoveSuggestion'],_0x4f077e[_0x456da7]['isRemoved']&&(_0x4f077e[_0x456da7]['isIncorrect']=!0x0));}return _0x4f077e['filter'](_0x521b24=>!_0x521b24['isIncorrect']);}['_makeModelFromTape'](_0x41f66b,_0x633e6c,_0x107a0e){const _0x32fbca=new wt(),_0x54d10e=[],_0x145ebc=new Map(),_0x725121=this['editor']['model'],_0x5a4a83=_0x725121['schema'],_0x271188=[_0x32fbca],_0x2fd940={},_0xc9db77={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5cd6a0=null;const _0x15f723=[0x0];for(let _0x407f9e=0x0;_0x407f9e<_0x41f66b['length'];_0x407f9e++)if('elementStart'===_0x41f66b[_0x407f9e]['type']){_0x41f66b[_0x407f9e]['previousPosition']=_0x725121['createPositionFromPath'](_0x32fbca,_0x15f723);const _0x4e891c=new ft(_0x41f66b[_0x407f9e]['item']['name'],_0x41f66b[_0x407f9e]['item']['getAttributes']());_0x271188[0x0]['_appendChild'](_0x4e891c),_0x15f723['push'](0x0),_0x271188['unshift'](_0x4e891c),_0x41f66b[_0x407f9e]['nextPosition']=_0x725121['createPositionFromPath'](_0x32fbca,_0x15f723);}else'elementEnd'===_0x41f66b[_0x407f9e]['type']?(_0x271188['shift'](),_0x41f66b[_0x407f9e]['previousPosition']=_0x725121['createPositionFromPath'](_0x32fbca,_0x15f723),_0x15f723['pop'](),_0x15f723[_0x15f723['length']-0x1]++,_0x41f66b[_0x407f9e]['nextPosition']=_0x725121['createPositionFromPath'](_0x32fbca,_0x15f723)):(_0x41f66b[_0x407f9e]['previousPosition']=_0x725121['createPositionFromPath'](_0x32fbca,_0x15f723),_0x5cd6a0?_0x5cd6a0['_data']+=_0x41f66b[_0x407f9e]['item']['data']:_0x5cd6a0=new _t(_0x41f66b[_0x407f9e]['item']['data'],_0x41f66b[_0x407f9e]['item']['getAttributes']()),_0x41f66b[_0x407f9e+0x1]&&'text'===_0x41f66b[_0x407f9e+0x1]['type']&&_0x168ace(_0x5cd6a0,_0x41f66b[_0x407f9e+0x1]['item'])||(_0x271188[0x0]['_appendChild'](_0x5cd6a0),_0x5cd6a0=null),_0x15f723[_0x15f723['length']-0x1]+=_0x41f66b[_0x407f9e]['item']['offsetSize'],_0x41f66b[_0x407f9e]['nextPosition']=_0x725121['createPositionFromPath'](_0x32fbca,_0x15f723));for(let _0x162f0b=0x0;_0x162f0b<_0x41f66b['length'];_0x162f0b++){const _0x3540a9=_0x41f66b[_0x162f0b]['previousPosition'],_0x1c1e7e=_0x41f66b[_0x162f0b]['nextPosition'];for(const _0x442c39 of _0x41f66b[_0x162f0b]['markersStart'])_0x145ebc['set'](_0x442c39,{'start':_0x3540a9,'end':null});_0x538789('isRemoveSuggestion',_0x162f0b,_0x3540a9,_0x1c1e7e),_0x538789('isAddSuggestion',_0x162f0b,_0x3540a9,_0x1c1e7e),_0x538789('isRemoved',_0x162f0b,_0x3540a9,_0x1c1e7e),_0x538789('isAdded',_0x162f0b,_0x3540a9,_0x1c1e7e);for(const _0x2e9c17 of _0x41f66b[_0x162f0b]['markersEnd']){_0x145ebc['get'](_0x2e9c17)['end']=_0x1c1e7e;}}for(const [_0xf77e12,_0x43a10e]of _0x145ebc){const _0x4eab1a=this['editor']['model']['createRange'](_0x43a10e['start'],_0x43a10e['end']);_0x32fbca['markers']['set'](_0xf77e12,_0x4eab1a);}return _0x54d10e['sort']((_0x2c6faf,_0x483cf1)=>{const _0x5eb749=_0x32fbca['markers']['get']('revision:'+_0x2c6faf['id']),_0x265dfd=_0x32fbca['markers']['get']('revision:'+_0x483cf1['id']);return _0x5eb749['start']['isBefore'](_0x265dfd['start'])?-0x1:_0x5eb749['start']['isAfter'](_0x265dfd['start'])?0x1:_0x5eb749['end']['isBefore'](_0x265dfd['end'])?-0x1:_0x5eb749['end']['isAfter'](_0x265dfd['end'])?0x1:'add'===_0x2c6faf['type']?-0x1:0x1;}),{'root':_0x32fbca,'changes':_0x54d10e};function _0x538789(_0x5004b7,_0x4f911c,_0x3d10a2,_0x257553){const _0x9e4d8c=!!_0x41f66b[_0x4f911c][_0x5004b7],_0x5f481c=_0x9e4d8c?_0x41f66b[_0x4f911c][_0x5004b7]['userId']:null,_0x5ed344=_0x4f911c===_0x41f66b['length']-0x1,_0x35662c=_0xc9db77[_0x5004b7][0x0],_0x12548a=_0x5a4a83['isObject'](_0x41f66b[_0x4f911c]['item']);!_0x2fd940[_0x5004b7]&&_0x9e4d8c?_0x2fd940[_0x5004b7]={'start':_0x3d10a2,'tapeItem':_0x41f66b[_0x4f911c],'userId':_0x5f481c,'type':_0x5004b7}:_0x2fd940[_0x5004b7]&&!_0x9e4d8c?(_0x2fd940[_0x5004b7]['end']=_0x3d10a2,_0x3ee062(_0x2fd940[_0x5004b7]),_0x2fd940[_0x5004b7]=null):_0x2fd940[_0x5004b7]&&_0x9e4d8c&&_0x2fd940[_0x5004b7]['userId']!==_0x5f481c&&(_0x2fd940[_0x5004b7]['end']=_0x3d10a2,_0x35662c&&_0x35662c['userId']===_0x2fd940[_0x5004b7]['userId']||_0x3ee062(_0x2fd940[_0x5004b7]),_0x2fd940[_0x5004b7]={'start':_0x3d10a2,'tapeItem':_0x41f66b[_0x4f911c],'userId':_0x5f481c,'type':_0x5004b7}),_0x2fd940[_0x5004b7]&&_0x12548a&&('elementStart'!==_0x41f66b[_0x4f911c]['type']||_0x35662c&&_0x35662c['userId']===_0x5f481c||_0xc9db77[_0x5004b7]['unshift']({'userId':_0x5f481c,'object':_0x41f66b[_0x4f911c]['item'],'change':_0x2fd940[_0x5004b7]}),'elementEnd'===_0x41f66b[_0x4f911c]['type']&&_0x35662c&&_0x35662c['object']===_0x41f66b[_0x4f911c]['item']&&(_0xc9db77[_0x5004b7]['shift'](),_0x2fd940[_0x5004b7]=_0x35662c['change'])),_0x2fd940[_0x5004b7]&&_0x5ed344&&(_0x2fd940[_0x5004b7]['end']=_0x257553,_0x3ee062(_0x2fd940[_0x5004b7]),_0x2fd940[_0x5004b7]=null);}function _0x3ee062({start:_0x598b4f,end:_0x5f22d5,tapeItem:_0x282cd2,userId:_0x35248a,type:_0x41b1ca}){const _0x5b7d55=_0x282cd2['item'],_0x413f7b=_0x725121['schema']['isBlock'](_0x5b7d55)&&!_0x725121['schema']['isLimit'](_0x5b7d55),_0x215aa6=_0x598b4f['nodeAfter']==_0x5f22d5['parent']&&_0x5f22d5['isAtStart'];if(_0x413f7b&&_0x215aa6)return;const _0x426608=_0x725121['createRange'](_0x598b4f,_0x5f22d5),_0xe0c98a=_0x633e6c['get'](_0x35248a),_0x2b1159=new r({'author':_0xe0c98a,'type':'isAdded'==_0x41b1ca||'isAddSuggestion'==_0x41b1ca?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x41b1ca||'isRemoveSuggestion'==_0x41b1ca},'createdAt':new Date(),'rootName':_0x107a0e});_0x54d10e['push'](_0x2b1159),_0x32fbca['markers']['set']('revision:'+_0x2b1159['id'],_0x426608);}function _0x168ace(_0x742086,_0x88a9e1){const _0x57f005=_0x742086['getAttributes'](),_0x58e624=_0x88a9e1['getAttributes']();for(const _0x2ff9dd of _0x57f005){if(_0x2ff9dd[0x1]!==_0x88a9e1['getAttribute'](_0x2ff9dd[0x0]))return!0x1;_0x58e624['next']();}return _0x58e624['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1f890c=>{const _0x5f54ba=_0x1f890c['markerName']['split'](':')[0x1],_0xf30852=this['_getChangeFromId'](_0x5f54ba);if(!_0xf30852)return null;const _0x422900='add'==_0xf30852['type']?'insertion':'deletion',_0x211b3b=['ck-suggestion-marker','ck-suggestion-marker-'+_0x422900];return _0xf30852['data']['isSuggestion']&&_0x211b3b['push']('ck-suggestion-marker-'+_0x422900+'-new'),this['activeChange']==_0xf30852&&_0x211b3b['push']('ck-suggestion-marker--active'),{'classes':_0x211b3b,'attributes':{'data-change-id':_0x5f54ba}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x9a3fbd=>{_0x9a3fbd['on']('element:pre',(_0x389fc1,_0xb9a0d5,_0x48de55)=>{const _0x34b4fa=_0xb9a0d5['viewItem']['getChild'](0x0);if(!_0x34b4fa||!_0x34b4fa['is']('element','code'))return;if(!_0x48de55['consumable']['consume'](_0x34b4fa,{'attributes':['vid_start','vid_end']}))return;const _0x26ad79=_0xb9a0d5['modelRange']['start']['nodeAfter'];_0x48de55['writer']['setAttribute']('vid_start',_0x34b4fa['getAttribute']('vid_start'),_0x26ad79),_0x48de55['writer']['setAttribute']('vid_end',_0x34b4fa['getAttribute']('vid_end'),_0x26ad79);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x49eeb8=>{_0x49eeb8['on']('element',(_0x1c560d,_0x5947f4,_0x1b1b99)=>{if(!_0x1b1b99['consumable']['consume'](_0x5947f4['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5947f4['modelRange']['isCollapsed'])return;const _0x2b9281=_0x5947f4['modelRange']['start']['nodeAfter'];_0x2b9281['hasAttribute']('vid_start')||_0x2b9281['hasAttribute']('vid')||(_0x1b1b99['writer']['setAttribute']('vid_start',_0x5947f4['viewItem']['getAttribute']('vid_start'),_0x2b9281),_0x1b1b99['writer']['setAttribute']('vid_end',_0x5947f4['viewItem']['getAttribute']('vid_end'),_0x2b9281));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x57a0b9=>_0x57a0b9['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x24511b,[,_0x459b30])=>{['vid_start','vid_end','vid']['includes'](_0x459b30)&&(_0x24511b['return']=!0x0,_0x24511b['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2b3b15=>{_0x2b3b15['on']('attribute:vid',(_0x43d2e5,_0xa59f92,_0x457299)=>{if('\x20'!=_0xa59f92['item']['data']||_0xa59f92['item']['parent']['maxOffset']>0x1)return;if(!_0x457299['consumable']['consume'](_0xa59f92['item'],_0x43d2e5['name']))return;const _0x33a147=_0x457299['writer'],_0x579eff=_0x457299['mapper']['toViewRange'](_0xa59f92['range']);_0x33a147['wrap'](_0x579eff,_0x33a147['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4618a0){const _0x3b9358=_0x4618a0['plugins']['get']('RevisionViewer');return(_0x5c1a86,_0x58a403,_0x1f8c08)=>{const _0x2c92b8=_0x58a403['markerName']['split'](':')[0x1],_0x2385ca=_0x3b9358['_getChangeFromId'](_0x2c92b8);if(!_0x2385ca)return null;const _0x591618='add'==_0x2385ca['type']?'split':'merge';if(!_0x1f8c08['consumable']['test'](_0x58a403['markerRange'],_0x5c1a86['name']))return;const _0x1ba67c=_0x58a403['markerRange']['getWalker'](),_0x3d1254=_0x58a403['markerRange']['start'],_0x1a0d3e=_0x4618a0['model']['schema'];let _0x3ab36a=null,_0x235832=null,_0xffc7d3=!0x1,_0x9ef38f=!0x1;for(const _0x4285f6 of _0x1ba67c){const _0x400945=_0x4285f6['item'];_0xffc7d3=_0xffc7d3||_0x1a0d3e['isContent'](_0x400945);const _0x3bbf35=_0x1f8c08['mapper']['toViewElement'](_0x400945);if(_0x3bbf35&&_0x3bbf35['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4285f6['type']&&(_0x1a0d3e['isBlock'](_0x400945)&&!_0x1a0d3e['isLimit'](_0x400945)&&(_0x400945['nextSibling']||_0x3d1254['isAtEnd']?_0x3ab36a&&_0x3ab36a['parent']==_0x400945||(_0x3ab36a=_0x400945,_0x4363b2(_0x4285f6['previousPosition']),_0x9ef38f=!0x0):_0x235832=_0x235832||_0x4285f6['previousPosition']));}function _0x4363b2(_0x508d93){const _0x497e18=_0x1f8c08['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x591618}),_0x2c5683=_0x1f8c08['mapper']['toViewPosition'](_0x508d93);_0x2385ca['data']['isSuggestion']&&_0x1f8c08['writer']['addClass']('ck-suggestion-marker-'+_0x591618+'-new',_0x497e18),_0x3b9358['activeChange']==_0x2385ca&&_0x1f8c08['writer']['addClass']('ck-suggestion-marker--active',_0x497e18),_0x1f8c08['writer']['insert'](_0x2c5683,_0x497e18),_0x1f8c08['mapper']['bindElementToMarker'](_0x497e18,_0x58a403['markerName']);}_0xffc7d3||_0x9ef38f||!_0x235832||_0x4363b2(_0x235832);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3fe67b,_0xe45e95,_0xa517c2)=>{const _0x4e5d65=_0xa517c2['mapper']['markerNameToElements'](_0xe45e95['markerName']);if(_0x4e5d65){for(const _0x4ff4f8 of _0x4e5d65)(_0x4ff4f8['hasClass']('ck-suggestion-marker-split')||_0x4ff4f8['hasClass']('ck-suggestion-marker-merge'))&&(_0xa517c2['mapper']['unbindElementFromMarkerName'](_0x4ff4f8,_0xe45e95['markerName']),_0xa517c2['writer']['remove'](_0x4ff4f8));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x23f1a9,_0x1d5bf9,_0x3f04b9)=>{const _0x5b720a=_0x1d5bf9['markerName']['split'](':')[0x1],_0x1eb5c4=this['_getChangeFromId'](_0x5b720a);if(!_0x1eb5c4)return null;const _0x5e143e='add'==_0x1eb5c4['type']?'split':'merge';if(_0x3f04b9['consumable']['test'](_0x1d5bf9['markerRange'],_0x23f1a9['name']))for(const _0x1e1a57 of _0x1d5bf9['markerRange']['getItems']()){if(!_0x1e1a57['is']('element','softBreak'))continue;const _0x39ca57=_0x3f04b9['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5e143e}),_0x1e3cbc=_0x3f04b9['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1e1a57));_0x1eb5c4['data']['isSuggestion']&&_0x3f04b9['writer']['addClass']('ck-suggestion-marker-'+_0x5e143e+'-new',_0x39ca57),this['activeChange']==_0x1eb5c4&&_0x3f04b9['writer']['addClass']('ck-suggestion-marker--active',_0x39ca57),_0x3f04b9['writer']['insert'](_0x1e3cbc,_0x39ca57),_0x3f04b9['mapper']['bindElementToMarker'](_0x39ca57,_0x1d5bf9['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3127ff=>{for(const _0x330f5d of this['editor']['model']['document']['getRootNames']()){const _0x4b1279=this['editor']['model']['document']['getRoot'](_0x330f5d),_0x95a32=this['editor']['editing']['view']['document']['getRoot'](_0x330f5d);if(_0x95a32){const _0x4ada09=_0x4b1279['getAttribute']('revisionHistoryAttachChange');if(_0x3127ff['removeAttribute']('data-change-id',_0x95a32),_0x3127ff['removeClass']('ck-revision-history-root-add',_0x95a32),_0x3127ff['removeClass']('ck-revision-history-root-remove',_0x95a32),_0x3127ff['removeClass']('ck-revision-history-root--active',_0x95a32),_0x4ada09){const _0x5aaa4d=this['_getChangeFromId'](_0x4ada09);if(!_0x5aaa4d)return null;_0x3127ff['setAttribute']('data-change-id',_0x4ada09,_0x95a32),_0x3127ff['addClass']('ck-revision-history-root-'+_0x5aaa4d['type'],_0x95a32),this['activeChange']==_0x5aaa4d&&_0x3127ff['addClass']('ck-revision-history-root--active',_0x95a32);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x297d70=>'revision-comment:'+_0x297d70,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3750b7=>'revision-suggestion:'+_0x3750b7,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x34a643=>({'name':'suggestion:'+_0x34a643,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x548a6b=>{const _0x125882=_0x548a6b['markerName']['split'](':')[0x1];return'insertion'!=_0x125882&&'deletion'!=_0x125882?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x125882]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',tt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',tt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2990b4,_0x38233a,_0xa562ba)=>{const _0x2a8e7b=_0xa562ba['mapper']['markerNameToElements'](_0x38233a['markerName']);if(_0x2a8e7b){for(const _0x1d01d5 of _0x2a8e7b)_0x1d01d5['is']('uiElement')&&(_0xa562ba['mapper']['unbindElementFromMarkerName'](_0x1d01d5,_0x38233a['markerName']),_0xa562ba['writer']['remove'](_0x1d01d5));}},{'priority':'high'});}['_getChangeFromId'](_0x39590c){return this['_changeIdToChange']['get'](_0x39590c);}['_getViewForChange'](_0x566b16){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Y(this['editor']['locale'],_0x566b16),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x50693e,_0x449eec,_0x205a5f,_0x29169c)=>{_0x29169c&&this['_balloon']['remove'](_0x29169c),_0x205a5f&&(this['_balloon']['add']({'view':_0x205a5f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4439e7=this['editor']['editing'],_0x3c2c44=this['_getChangeFromId'](_0x205a5f['changeId']);let _0x50eba3;if(_0x3c2c44['data']['isOnRoot']){const _0x1c6da9=_0x4439e7['view']['getDomRoot'](_0x3c2c44['rootName']);_0x50eba3=Array['from'](_0x1c6da9['getClientRects']());}else{const _0x1191c0=this['editor']['model']['markers']['get']('revision:'+_0x205a5f['changeId']);_0x50eba3=Array['from'](_0x4439e7['mapper']['markerNameToElements'](_0x1191c0['name']))['map'](_0x4b31f3=>_0x4439e7['view']['domConverter']['mapViewToDom'](_0x4b31f3))['map'](_0x1a3aa0=>Array['from'](_0x1a3aa0['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x50eba3[0x0];return _0x50eba3['find'](_0x16c16c=>_0x16c16c['top']-0x3<=this['_activeViewTarget']['y']&&_0x16c16c['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x16c16c['left']-0x3<=this['_activeViewTarget']['x']&&_0x16c16c['right']+0x3>=this['_activeViewTarget']['x'])||_0x50eba3[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2ed4b1,_0x20a46c,_0x10384d,_0x54493d)=>{this['activeView']=_0x10384d?this['_getViewForChange'](_0x10384d):null,this['editor']['model']['change'](()=>{const _0x595128=this['editor']['editing'];_0x54493d&&(_0x54493d['data']['isOnRoot']?_0x595128['view']['change'](_0x40dcd0=>{_0x40dcd0['removeClass']('ck-revision-history-root--active',_0x595128['view']['document']['getRoot'](_0x54493d['rootName']));}):_0x595128['reconvertMarker']('revision:'+_0x54493d['id'])),_0x10384d&&(_0x10384d['data']['isOnRoot']?_0x595128['view']['change'](_0x4dba08=>{_0x4dba08['addClass']('ck-revision-history-root--active',_0x595128['view']['document']['getRoot'](_0x10384d['rootName']));}):_0x595128['reconvertMarker']('revision:'+_0x10384d['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1ac97d,_0x308aa6)=>{if(this['activeChange'])return;const _0x55957a=this['_findChangeIdFromDomTarget'](_0x308aa6['target']),_0x27b2f5=this['_changeIdToChange']['get'](_0x55957a);_0x27b2f5?(this['_activeViewTarget']={'x':_0x308aa6['domEvent']['x'],'y':_0x308aa6['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x27b2f5)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4a4728,_0x5d7883)=>{const _0x3da5b9=this['_findChangeIdFromDomTarget'](_0x5d7883['target']),_0x1b66e5=this['_changeIdToChange']['get'](_0x3da5b9);_0x1b66e5?(this['_activeViewTarget']={'x':_0x5d7883['domEvent']['x'],'y':_0x5d7883['domEvent']['y']},_0x1b66e5===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1b66e5):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x107a10){do{const _0x54a3bc=_0x107a10['getAttribute']('data-change-id');if(_0x54a3bc)return _0x54a3bc;_0x107a10=_0x107a10['parent'];}while(_0x107a10);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x3e4dd6=>{for(const _0x5d41d6 of this['editor']['model']['markers'])_0x3e4dd6['removeMarker'](_0x5d41d6);});}}function tt(_0x549df3,_0x14128c){return(_0x4b8514,_0x438a4a,_0x7200ad)=>{if(!_0x7200ad['consumable']['test'](_0x438a4a['markerRange'],_0x4b8514['name']))return;const _0x102066=_0x438a4a['markerRange']['getWalker'](),_0x1a34f4=_0x438a4a['markerRange']['start'],_0x1d2b6a=_0x549df3['model']['schema'];let _0x113f1f=null,_0x1c0f8b=null,_0x603e89=!0x1,_0x56dc9b=!0x1;for(const _0x25fdda of _0x102066){const _0x12b428=_0x25fdda['item'];_0x603e89=_0x603e89||_0x1d2b6a['isContent'](_0x12b428);const _0x5c06e0=_0x7200ad['mapper']['toViewElement'](_0x12b428);if(_0x5c06e0&&_0x5c06e0['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x25fdda['type']&&(_0x1d2b6a['isBlock'](_0x12b428)&&!_0x1d2b6a['isLimit'](_0x12b428)&&(_0x12b428['nextSibling']||_0x1a34f4['isAtEnd']?_0x113f1f&&_0x113f1f['parent']==_0x12b428||(_0x113f1f=_0x12b428,_0x50f298(_0x25fdda['previousPosition']),_0x56dc9b=!0x0):_0x1c0f8b=_0x1c0f8b||_0x25fdda['previousPosition']));}function _0x50f298(_0x550dd4){const _0x119cf7=_0x7200ad['mapper']['toViewPosition'](_0x550dd4),_0x4887b1=_0x7200ad['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x14128c});_0x7200ad['writer']['insert'](_0x119cf7,_0x4887b1),_0x7200ad['mapper']['bindElementToMarker'](_0x4887b1,_0x438a4a['markerName']);}_0x603e89||_0x56dc9b||!_0x1c0f8b||_0x50f298(_0x1c0f8b);};}class yt extends _0x5c5c03{constructor(_0x115f1d){super(_0x115f1d);const _0x45fef1=_0x115f1d['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x45fef1,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x45fef1,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x58d9f2=this['editor'],_0x557bf4=_0x58d9f2['plugins']['get'](d),_0x56980b=_0x557bf4['isReady']?_0x557bf4['diff']['newRevisionId']:null;_0x58d9f2['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x56980b);}['refresh'](){const {isReady:_0x28783b,isEnabled:_0x1f2b82}=this['editor']['plugins']['get'](d);this['isEnabled']=_0x28783b&&_0x1f2b82;}}class bt extends _0x5c5c03{['_step'];constructor(_0x495f18,{direction:_0x4e476b}){super(_0x495f18);const _0x45ddaa=_0x495f18['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x4e476b?0x1:-0x1,this['listenTo'](_0x45ddaa,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x45ddaa,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x45ddaa,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x5018b5=this['editor'],_0x15c33c=_0x5018b5['plugins']['get'](d),{isNavigationMode:_0x336a60,currentChangeNumber:_0xb1cb3a}=_0x15c33c;let _0x5424d0;if(_0x15c33c['activeChange']=_0x336a60?_0x15c33c['diff']['changes']['get'](_0xb1cb3a+this['_step']):_0x15c33c['diff']['changes']['first'],_0x15c33c['activeChange']['data']['isOnRoot'])_0x5424d0=_0x5018b5['editing']['view']['getDomRoot'](_0x15c33c['activeChange']['rootName']);else{const _0x1b57aa=_0x5018b5['model']['markers']['get']('revision:'+_0x15c33c['activeChange']['id']);_0x5424d0=_0x556edb(_0x5018b5['editing'],_0x1b57aa);}_0x49616c({'target':_0x5424d0,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x13fee1,currentChangeNumber:_0x260e58,numberOfChanges:_0x28bb70,isReady:_0x419a22,isEnabled:_0x193804}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x193804&&_0x419a22&&_0x28bb70)&&(!_0x13fee1||(0x1===this['_step']?_0x260e58<_0x28bb70-0x1:_0x260e58>0x0));}}class _i extends _0x229008{constructor(_0x3877e3){super(_0x3877e3);const _0x2593aa=this['bindTemplate'],_0x394116=new _0x51179d(_0x3877e3),_0x488e3b=new _0x51179d(_0x3877e3);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',(_0x102330,_0x11b114)=>_0x102330&&_0x11b114>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x14e6cc,_0x3801a3,_0x388c33,_0x1af6d6)=>{if(!_0x14e6cc)return R(_0x3877e3,'Loading...');if(!_0x388c33)return R(_0x3877e3,'No\x20changes');const _0x57a354=R(_0x3877e3,'NUMBER_OF_CHANGES',_0x388c33);return _0x1af6d6?R(_0x3877e3,'X_OF_Y_CHANGES',[_0x3801a3+0x1,_0x388c33]):_0x57a354;}),_0x394116['set']({'label':R(_0x3877e3,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x488e3b['set']({'label':R(_0x3877e3,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x394116['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x488e3b['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x394116['on']('execute',()=>this['fire']('execute','backward')),_0x488e3b['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',_0x2593aa['if']('_isStatusLabelVisible','ck-hidden',_0x5b7f50=>!_0x5b7f50)]},'children':[{'text':_0x2593aa['to']('isNavigationMode',_0x5225e3=>_0x5225e3?R(_0x3877e3,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x3877e3,'Total')+':\x20')}]},{'text':_0x2593aa['to']('_statusText')}]},new _0x86f0e9(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x394116,_0x488e3b]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x52ad62{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x42e618=this['editor']['editing']['view'];_0x42e618['change'](_0x5dd7e3=>{for(const _0x10c86f of _0x42e618['document']['roots'])_0x5dd7e3['addClass'](ce,_0x10c86f);});}['hide'](){const _0x3de9a4=this['editor']['editing']['view'];_0x3de9a4['change'](_0x8515d7=>{for(const _0x249a7a of _0x3de9a4['document']['roots'])_0x8515d7['removeClass'](ce,_0x249a7a);});}}class m extends _0x52ad62{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x193d2b=this['editor'],_0x13b618=_0x193d2b['plugins']['get'](d),_0x37abad=_0x193d2b['plugins']['get'](le);_0x193d2b['ui']['componentFactory']['add']('exitToEditing',_0x54ba9e=>{const _0x51510b=new _0x51179d(_0x54ba9e);return _0x51510b['set']({'label':R(_0x54ba9e,'Back\x20to\x20editing'),'icon':_0x598ba3['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x51510b,'execute',()=>{_0x193d2b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x51510b;}),_0x193d2b['ui']['componentFactory']['add']('restoreRevision',_0x4642f3=>{const _0x11d976=new _0x51179d(_0x4642f3);return _0x11d976['set']({'label':R(_0x4642f3,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x11d976['bind']('isEnabled')['to'](_0x193d2b['commands']['get']('restoreRevision')),this['listenTo'](_0x11d976,'execute',()=>_0x193d2b['execute']('restoreRevision')),_0x11d976;}),_0x193d2b['ui']['componentFactory']['add']('changesNavigation',_0x135cdf=>{const _0xe14129=new _i(_0x135cdf),_0x288993=_0x193d2b['commands']['get']('showPreviousChange'),_0x25f6e8=_0x193d2b['commands']['get']('showNextChange');return _0xe14129['bind']('isBackwardNavigationEnabled')['to'](_0x288993,'isEnabled'),_0xe14129['bind']('isForwardNavigationEnabled')['to'](_0x25f6e8,'isEnabled'),_0xe14129['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x13b618),this['listenTo'](_0xe14129,'execute',(_0x56ad7b,_0x38d6b0)=>{_0x193d2b['execute']('forward'===_0x38d6b0?'showNextChange':'showPreviousChange');}),_0xe14129;}),_0x37abad['show'](),_0x13b618['on']('change:isReady',(_0x382bf3,_0x168254,_0x37a5b1)=>{_0x37a5b1?_0x37abad['hide']():_0x37abad['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x3c3093,_0x318e05){super(_0x3c3093,_0x318e05);const _0xfcb62b=this['bindTemplate'];this['set']({'label':R(_0x3c3093,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x3c3093,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0xfcb62b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4b2258=this['fieldView']['element'];this['_tooltipString']=_0x4b2258['scrollWidth']>_0x4b2258['clientWidth']&&_0x4b2258['value']||'';}}class ti extends _0x229008{constructor(_0x5b4606,_0x150dda,_0x8d7163){super(_0x5b4606);const _0x2d86fd=new _0x3df9f2();_0x2d86fd['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x1ef04f=['ck','ck-revision-history-sidebar__revision-author'];_0x8d7163&&_0x1ef04f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x565e70=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x5b4606,_0x8d7163?'Revision\x20creator':'Revision\x20author')},'children':[_0x2d86fd,_0x150dda['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1ef04f},'children':_0x565e70});}}function ni(_0x1cf8bf,_0x46814a){const _0x303d4f=_0x1cf8bf['bindTemplate'],_0x38cbf2=_0x1cf8bf['locale'],_0x1d1d1c=_0xc86235(_0x38cbf2);_0x1d1d1c['panelPosition']='sw';const _0x36bbda=function(_0x1bff5f,_0x1d548c){const _0x445273=function(_0xb93af8,_0x48950a){const _0x8628dc=_0xb93af8['locale'],_0x816c40={'Compare\x20against\x20selected':R(_0x8628dc,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x8628dc,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x8628dc,'Restore\x20this\x20revision')};return _0x48950a['map'](_0x2a0dff=>{const _0x35d61a=_0x816c40[_0x2a0dff['name']];return _0x35d61a&&_0x35d61a!==_0x2a0dff['name']&&(_0x2a0dff['name']=_0x35d61a),_0x2a0dff;});}(_0x1bff5f,_0x1d548c),_0x131f41=new _0x22f9c7();for(const _0x634184 of _0x445273){const _0x5bb18d={'type':'button','model':new to({'label':_0x634184['name'],'class':_0x634184['class'],'withText':!0x0,'role':'menuitem','_action':_0x634184['action']})};_0x5bb18d['model']['bind']('isEnabled')['to'](_0x1bff5f,'isActionsDropdownOpen',_0x35a350=>'function'!=typeof _0x634184['isEnabled']||(!_0x35a350||_0x634184['isEnabled'](_0x1bff5f))),_0x131f41['add'](_0x5bb18d);}return _0x131f41;}(_0x1cf8bf,_0x46814a);return _0x1cf8bf['bind']('isActionsDropdownOpen')['to'](_0x1d1d1c,'isOpen'),_0x1d1d1c['buttonView']['set']({'label':R(_0x38cbf2,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x598ba3['threeVerticalDots']}),_0x1d1d1c['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x303d4f['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x303d4f['to'](_0x2f72c5=>_0x2f72c5['stopPropagation']())}}),_0x1d1d1c['on']('execute',_0x39d24f=>{_0x1cf8bf['isReady']&&'function'==typeof _0x39d24f['source']['_action']&&_0x39d24f['source']['_action'](_0x1cf8bf);}),_0xcaaeaa(_0x1d1d1c,_0x36bbda,{'role':'menu'}),_0x1d1d1c['listenTo'](_0x1cf8bf,'change:isActionsDropdownOpen',(_0x22ebb4,_0x2bd915,_0x5c475a)=>{if(_0x5c475a)for(const _0x10a0d6 of _0x1d1d1c['listView']['items']){const _0x34907c=_0x10a0d6['children']['first'],_0xa8663d=_0x46814a['find'](_0x26349d=>_0x26349d['action']===_0x34907c['_action'])['isVisible'];_0x10a0d6['isVisible']=void 0x0===_0xa8663d||_0xa8663d(_0x1cf8bf);}}),_0x1d1d1c;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x23c90d(_0x229008){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0xa6ca58,_0x2d1813,_0x32ffdd,_0x1d6d0a){super(_0xa6ca58);const _0x49b06e=this['bindTemplate'],_0x447cee=function(_0x4fb068,_0x28eba9){const _0x19c5b5=Array['from'](_0x28eba9['authors'])['filter'](_0x3e21d1=>_0x3e21d1!=_0x28eba9['creator']);return _0x28eba9['creator']&&_0x19c5b5['unshift'](_0x28eba9['creator']),_0x19c5b5['map'](_0x7a2c2b=>new ti(_0x4fb068,_0x7a2c2b,_0x7a2c2b==_0x28eba9['creator']));}(_0xa6ca58,_0x2d1813);this['id']=_0x2d1813['id'],this['_revision']=_0x2d1813,this['_requireRevisionName']=_0x1d6d0a,this['bind']('name','createdAt')['to'](_0x2d1813),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x113352=>{return _0x2d56ad=_0xa6ca58['uiLanguage'],(_0x4e6545=_0x113352)['toLocaleDateString'](_0x2d56ad,{'month':'long','day':'numeric'})+',\x20'+_0x4e6545['toLocaleTimeString'](_0x2d56ad,{'hour':'numeric','minute':'numeric'});var _0x2d56ad,_0x4e6545;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0xa6ca58,_0x204f0c),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x38bfce=>_0x38bfce||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x425974,_0x5de3ae)=>_0x425974&&_0x5de3ae),this['revisionActionsView']=_0x32ffdd&&_0x32ffdd['length']?ni(this,_0x32ffdd):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x49b06e['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x49b06e['if']('isEnabled','ck-disabled',_0x506ba7=>!_0x506ba7),_0x49b06e['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x49b06e['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x49b06e['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':_0x49b06e['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':_0x447cee}]},this['revisionActionsView']],'on':{'click':_0x49b06e['to'](_0x58d53a=>{_0x58d53a['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4aad07=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4aad07,'change',()=>{this['_requireRevisionName']&&!_0x4aad07['value']||this['fire']('setName',{'id':this['id'],'name':_0x4aad07['value']}),_0x4aad07['value']||(_0x4aad07['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function di(_0x20ec15,_0x49b2ad){const _0x13ace8=_0x16e050['fromJSDate'](_0x20ec15)['setLocale'](_0x49b2ad),_0x47910f=_0x16e050['local'](),_0xb2c41=_0x47910f['minus']({'days':0x1})['startOf']('day');let _0x143346,_0x4b2adf;return _0x13ace8['hasSame'](_0x47910f,'day')?(_0x143346=_0x13ace8['startOf']('day')['toJSDate'](),_0x4b2adf=_0x13ace8['toRelativeCalendar']()):_0x13ace8['hasSame'](_0xb2c41,'day')?(_0x143346=_0xb2c41['toJSDate'](),_0x4b2adf=_0x13ace8['toRelativeCalendar']()):_0x13ace8['hasSame'](_0x47910f,'week')?(_0x143346=_0x13ace8['startOf']('week')['toJSDate'](),_0x4b2adf=_0x13ace8['weekdayLong']||''):_0x13ace8['hasSame'](_0x47910f,'year')?(_0x143346=_0x13ace8['startOf']('month')['toJSDate'](),_0x4b2adf=_0x13ace8['monthLong']||''):(_0x143346=_0x13ace8['startOf']('year')['toJSDate'](),_0x4b2adf=String(_0x13ace8['year'])),{'startDate':_0x143346,'localizedPeriodName':_0x4b2adf};}class mi extends _0x229008{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3f8820,_0x21a54e,_0xb5fe80,_0x10d9aa){super(_0x3f8820);const _0x1c3233=di(_0x21a54e,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x21a54e,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xb5fe80,this['_requireRevisionName']=_0x10d9aa,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':_0x1c3233}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x8bf7d2){const _0x1fb5bc=new ai(this['locale'],_0x8bf7d2,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1fb5bc);}['removeRevision'](_0x5ef506){const _0x64c02=this['revisionViews']['find'](_0x83ba54=>_0x83ba54['id']===_0x5ef506['id']);this['revisionViews']['remove'](_0x64c02);}}class as extends _0x229008{constructor(_0x100156){super(_0x100156);const _0x59b1fe=new _0x3df9f2();_0x59b1fe['content']=_0x598ba3['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x59b1fe,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x100156,'Revision\x20history')]}]});}}class ci extends _0x229008{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x53a221,_0x203715,_0x1623ee,_0x393223){super(_0x53a221);const _0x38537e=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x203715,this['_revisionActions']=_0x1623ee,this['_requireRevisionName']=_0x393223,this['on']('select',(_0x34e9b0,_0x2ee5b0)=>{this['fire']('revisionSelected',_0x2ee5b0);}),this['on']('setName',(_0x2b30ba,_0x54b5f3)=>{this['fire']('revisionSetName',_0x54b5f3);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x53a221),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x38537e['if']('isEnabled','ck-disabled',_0xcde07e=>!_0xcde07e)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x391c5c of this['_revisions'])this['_addRevision'](_0x391c5c);this['_revisions']['on']('add',(_0x5c3729,_0x3d9894)=>{this['_addRevision'](_0x3d9894);}),this['_revisions']['on']('remove',(_0x61e159,_0x51ffb6)=>{this['_removeRevision'](_0x51ffb6);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x27f02e=>_0x27f02e['revisionViews']['map'](_0x55d466=>_0x55d466))['flat']();}['selectRevision'](_0x358eb4){for(const _0x2eccef of this['revisionViews'])_0x358eb4&&_0x358eb4['id']===_0x2eccef['id']?_0x2eccef['select']():_0x2eccef['deselect']();}['highlightRevisions'](_0x77ead6){for(const _0x226de1 of this['revisionViews'])_0x77ead6['some'](({id:_0x125825})=>_0x125825===_0x226de1['id'])?_0x226de1['highlight']():_0x226de1['unhighlight']();}['_addRevision'](_0x3eb1d5){const _0x4a6e1e=di(_0x3eb1d5['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x24e00d=this['timePeriodViews']['get'](0x0);_0x24e00d&&_0x24e00d['startDate']['getTime']()===_0x4a6e1e['getTime']()||(_0x24e00d=new mi(this['locale'],_0x4a6e1e,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x24e00d)),_0x24e00d['addRevision'](_0x3eb1d5);}['_removeRevision'](_0x53b12b){const _0x87a475=di(_0x53b12b['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x87a475)['removeRevision'](_0x53b12b);}['_getTimePeriodViewByStartDate'](_0x445063){return this['timePeriodViews']['find'](_0x168917=>_0x168917['startDate']['getTime']()===_0x445063['getTime']());}}class g extends _0x52ad62{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
Rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(
|
|
29
|
-
rt(it){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x205c10,_0x292749){super(_0x292749),this['sourceElement']=_0x205c10,this['model']['document']['createRoot']();const _0x15be77=new st(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new et(this,_0x15be77);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x125290,_0x4484d6){const _0x2b92d3=new this(_0x125290,_0x4484d6);return await _0x2b92d3['initPlugins'](),await _0x2b92d3['ui']['init'](_0x125290),await _0x2b92d3['data']['init'](_0x2b92d3['config']['get']('initialData')||''),_0x2b92d3['fire']('ready'),_0x2b92d3;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class k extends _0x9a5545{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c5713){function _0x1ac147(_0x3d5207){return _0x3d5207['map'](_0x9d4357=>String['fromCharCode'](_0x9d4357))['join']('');}super(_0x3c5713),this['result']='end',_0x3c5713[_0x1ac147([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1ac147([0x76,0x69,0x65,0x77])][_0x1ac147([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1ac147([0x61,0x75,0x74,0x6f]),_0x3c5713[_0x1ac147([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1ac147([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1ac147([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1ac147([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1ac147([0x6f,0x6b])});}}class H extends _0x9a5545{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x3671e5){if(super(_0x3671e5),!this['editor']['config']['get']('revisionHistory'))throw new _0x52c9ac('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xd1dcb3=>this['_showRevisionViewer']({..._0xd1dcb3,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1e610f=>this['_closeRevisionViewer'](_0x1e610f)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x14378c=>this['_restoreRevision'](_0x14378c)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0xaa7ef5){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0xaa7ef5;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x336ea6){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x336ea6);}['getRevision'](_0x4fefed){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4fefed);}['getRevisions'](_0x4ab34a){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4ab34a||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4cb82c=this['editor'],_0x1e833f=_0x48122b(_0x4cb82c,p),_0x3d535d=_0x4cb82c['plugins']['get']('RevisionTracker'),_0x27f321=_0x4cb82c['plugins']['get']('Users')['users'];return _0x1e833f['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1e833f['lazyRoots'],(_0x1e833f['plugins']['push'](k,d,m,class extends _0x9a5545{static get['requires'](){return[d,'Users'];}['init'](){const _0x8960f0=this['editor']['plugins']['get']('Users');for(const _0x4c521a of _0x27f321)_0x4c521a['isAnonymous']||_0x8960f0['getUser'](_0x4c521a['id'])||_0x8960f0['addUser'](_0x4c521a);const _0x24bd02=_0x3d535d['repository']['getRevisions']();let _0x302dbe=null;const _0x89efa0=this['editor']['plugins']['get']('RevisionViewer');_0x89efa0['adapter']=_0x3d535d['adapter'],_0x89efa0['bind']('isEnabled')['to'](_0x3d535d),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4cb82c,'isReadOnly',_0x1df206=>!_0x1df206);for(const _0x538037 of _0x24bd02){const _0x38210a=null===_0x538037['creator'];if(_0x38210a&&_0x538037['toVersion']===_0x538037['fromVersion'])continue;const _0x4ea644=_0x538037['toJSON']();_0x89efa0['addRevisionData'](_0x4ea644,(_0x1ecd1c,_0x276866,_0x55f73e)=>{if(_0x38210a){if(_0x302dbe)_0x302dbe['_update'](_0x1ecd1c,_0x276866);else{if(!_0x276866){const _0x5b08e0=_0x55f73e['toJSON']();_0x5b08e0['id']=_0x1ced54(),_0x3d535d['saveRevision'](_0x5b08e0,_0x55f73e['toVersion'])['then'](_0x4e472a=>{_0x302dbe=_0x4e472a;});}}}else _0x538037['_update'](_0x1ecd1c,_0x276866);});}}},g),_0x1e833f);}['_enhanceShowRevisionViewerCallback'](){const _0x3e00d1=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x48b95a=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x52dcfa=this['editor']['plugins']['get']('Autosave');await _0x52dcfa['save']();}else await _0x48b95a['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x4161db=this['editor']['plugins']['get']('Dialog');_0x4161db['isOpen']&&_0x4161db['hide']();}const _0x56c004=this['_getRevisionViewerEditorConfig']();return _0x3e00d1(_0x56c004)['then'](_0x37b99a=>{return(this['_viewerEditor']=_0x37b99a,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x37b99a;})['catch'](_0x5ac3f6=>(console['error'](_0x5ac3f6),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xc17422=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xc17422(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x39e2bf=this['editor']['plugins']['get']('Annotations');_0x39e2bf['refreshVisibility'](),_0x39e2bf['refreshPositioning']();}})));}['_showRevisionViewer'](_0x5f0f0c){const _0x1d8bf6=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x437908=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2830c2=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x2830c2,_0x5f0f0c)['then'](_0xb848c3=>(_0x437908['style']['display']='block',_0x1d8bf6['style']['display']='none',_0xb848c3));}['_closeRevisionViewer'](_0x5b240a){const _0x56654f=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x56654f['style']['display']='',_0x5b240a['destroy']();}async['_restoreRevision'](_0x41033e){const _0x42da29=this['editor'],_0x2d39b1=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x58b872=_0x42da29['plugins']['get']('RevisionTracker'),_0x3e16bb=_0x2d39b1['repository']['getRevision'](_0x41033e);let _0x23f3f4,_0x3d240d,_0x575e66;try{_0x23f3f4=await _0x2d39b1['getRevisionData'](_0x3e16bb),_0x3d240d=await _0x2d39b1['getRevisionRootsAttributes'](_0x3e16bb);}catch(_0x1843d4){return void console['error'](_0x1843d4);}_0x42da29['model']['change'](_0x58b400=>{for(const _0x382d89 of Array['from'](_0x42da29['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x58b400['removeMarker'](_0x382d89);}),_0x2d39b1['isReady']=!0x1,_0x42da29['model']['enqueueChange'](_0x311643=>{_0x311643['setSelection'](null),_0x311643['removeSelectionAttribute'](_0x42da29['model']['document']['selection']['getAttributeKeys']());const _0x451bd5=Object['keys'](_0x23f3f4);for(const _0x49df59 of _0x42da29['model']['document']['roots'])'$graveyard'!=_0x49df59['rootName']&&_0x49df59['isAttached']()&&!_0x451bd5['includes'](_0x49df59['rootName'])&&_0x311643['detachRoot'](_0x49df59);for(const _0x3af571 of _0x451bd5){let _0x1307ff=_0x42da29['model']['document']['getRoot'](_0x3af571);_0x1307ff&&_0x1307ff['isAttached']()||(_0x1307ff=_0x311643['addRoot'](_0x3af571));const _0x29e9db=_0x3d240d[_0x3af571],_0x6f4fc7=Object['keys'](_0x29e9db),_0x492c19=_0x23f3f4[_0x3af571];for(const _0x2ae031 of _0x1307ff['getAttributeKeys']())_0x6f4fc7['includes'](_0x2ae031)||_0x311643['removeAttribute'](_0x2ae031,_0x1307ff);for(const _0x395f9c of _0x6f4fc7)_0x311643['setAttribute'](_0x395f9c,_0x3d240d[_0x3af571][_0x395f9c],_0x1307ff);_0x311643['remove'](_0x311643['createRangeIn'](_0x1307ff)),_0x311643['insert'](_0x42da29['data']['parse'](_0x492c19,_0x1307ff),_0x1307ff,0x0);}});const _0x311173=R(_0x42da29['locale'],'Restored');if(_0x3e16bb['name'])_0x575e66=-0x1==_0x3e16bb['name']['indexOf'](_0x311173)?_0x311173+':\x20'+_0x3e16bb['name']:_0x3e16bb['name'];else _0x575e66=_0x311173+':\x20'+(_0x3e16bb['createdAt']['toLocaleDateString'](_0x42da29['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3e16bb['createdAt']['toLocaleTimeString'](_0x42da29['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x58b872['saveRevision']({'name':_0x575e66}),_0x2d39b1['isReady']=!0x0,_0x42da29['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,H as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,ae as RevisionViewerLoadingOverlay,m as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
|
|
28
|
+
Rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x49d0cf){super(_0x49d0cf),this['_revisionViewer']=_0x49d0cf['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x434904=this['_revisionsRepository']['_revisions'],_0x128e57=this['_createRevisionActions'](),_0x54ccd1=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ci(this['editor']['locale'],_0x434904,_0x128e57,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',(_0x56b8b2,_0x1fe467)=>{_0x1fe467['revisionViews']['on']('add',(_0x1bbe88,_0x532a6c)=>{_0x532a6c['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)),_0x54ccd1['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x1f2ace=this['_revisionsRepository']['getRevision'](0x0);if(_0x1f2ace){const _0x789bfd=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1f2ace['id']);this['_revisionViewer']['compare'](_0x1f2ace,_0x789bfd);}}['_handleRevisionSelected'](_0x5c2c32,_0x412c64){const _0x42289a=this['_revisionsRepository']['getRevision'](_0x412c64['id']),_0x2c0163=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x42289a['id']);this['_revisionViewer']['compare'](_0x42289a,_0x2c0163);}['_handleRevisionSetName'](_0x50f9db,_0x214012){this['_revisionsRepository']['getRevision'](_0x214012['id'])['setName'](_0x214012['name']);}['_handleDiffChange'](_0x2a32a1,_0x262459,_0x52e806){const _0x751b91=this['_revisionsRepository']['getRevisionsInDiff'](_0x52e806);_0x751b91['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x751b91),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x751b91[0x0]));}['_createRevisionActions'](){const _0x2042c4=this['editor'],_0x216382=g['availableRevisionActions'],_0x3d594b=_0x2042c4['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x3d594b['length'])return _0x3d594b['map'](_0x54ea85=>{const _0x4ce663='string'==typeof _0x54ea85?Object['assign']({},_0x216382[_0x54ea85]):_0x54ea85;return _0x4ce663['action']=_0x4ce663['action']['bind'](this,_0x2042c4),_0x4ce663['isVisible']&&(_0x4ce663['isVisible']=_0x4ce663['isVisible']['bind'](this,_0x2042c4)),_0x4ce663;});}}function Rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0xd3fa59},_0xd06ec5)=>{const _0x255284=_0xd3fa59['get'](d),_0x24e9ea=_0x255284['repository'];let _0x1ff466=_0x255284['diff']['newRevisionId'],_0x400868=_0xd06ec5['id'];_0x24e9ea['getIndex'](_0x1ff466)>_0x24e9ea['getIndex'](_0x400868)&&([_0x1ff466,_0x400868]=[_0x400868,_0x1ff466]),_0x255284['compare'](_0x1ff466,_0x400868);},'isVisible':({plugins:_0x32c488},_0x465b36)=>{const _0x1e1bf4=_0x32c488['get'](d);return!(_0x1e1bf4['repository']['getRevisionsInDiff'](_0x1e1bf4['diff'])['length']>0x2)&&!_0x465b36['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4d3499,{id:_0xbdf087})=>{_0x4d3499['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xbdf087);},'isVisible':({plugins:_0x42ee46},_0x2c3a45)=>!!_0x42ee46['get'](d)['repository']['getLaterVisibleRevision'](_0x2c3a45['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x144732},{id:_0x50bd70,revisionNameView:_0x1b3976})=>{const _0x1f65b9=_0x144732['get'](d),_0x4552b2=_0x1f65b9['repository']['getEarlierVisibleRevision'](_0x50bd70);_0x1f65b9['compare'](_0x50bd70,_0x4552b2),_0x1b3976['focus'](),_0x1b3976['fieldView']['select']();}}};}class et extends ot{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x436fbe,_0x490f5c){super(_0x436fbe),this['_view']=_0x490f5c,this['_toolbarConfig']=ht(_0x436fbe['config']['get']('toolbar')),this['_elementReplacer']=new ct();}get['element'](){return this['view']['element'];}['init'](_0x326ae3){const _0x4dc53e=this['editor'],_0x4c7da4=this['view'],_0x4d31e0=_0x4dc53e['editing']['view'],_0x43dc1c=_0x4c7da4['editable'],_0x2a3c5b=_0x4d31e0['document']['getRoot']();_0x43dc1c['name']=_0x2a3c5b['rootName'],_0x4c7da4['render']();const _0x1217ca=_0x43dc1c['element'];this['setEditableElement'](_0x43dc1c['name'],_0x1217ca),_0x4c7da4['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4d31e0['attachDomRoot'](_0x1217ca),this['_elementReplacer']['replace'](_0x326ae3,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5246e7=this['view'],_0x5901b9=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5901b9['detachDomRoot'](_0x5246e7['editable']['name']),_0x5246e7['destroy']();}['_initToolbar'](){const _0xb04a7d=this['view'];_0xb04a7d['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0xb04a7d['stickyPanel']['limiterElement']=_0xb04a7d['element'],_0xb04a7d['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xf29023})=>_0xf29023),_0xb04a7d['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0xb04a7d['toolbar']);}}class st extends dt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x3dbf9e,_0x368028,_0x1fa9c2={}){super(_0x3dbf9e),this['stickyPanel']=new lt(_0x3dbf9e),this['toolbar']=new nt(_0x3dbf9e,{'shouldGroupWhenFull':_0x1fa9c2['shouldToolbarGroupWhenFull']}),this['_editable']=new ut(_0x3dbf9e,_0x368028);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
|
|
29
|
+
rt(it){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4f7b08,_0x42bd31){super(_0x42bd31),this['sourceElement']=_0x4f7b08,this['model']['document']['createRoot']();const _0x4752ed=new st(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new et(this,_0x4752ed);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x547d60,_0x15ac25){const _0x1b340f=new this(_0x547d60,_0x15ac25);return await _0x1b340f['initPlugins'](),await _0x1b340f['ui']['init'](_0x547d60),await _0x1b340f['data']['init'](_0x1b340f['config']['get']('initialData')||''),_0x1b340f['fire']('ready'),_0x1b340f;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class k extends _0x52ad62{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b6d85){function _0x37fa9f(_0x31c1aa){return _0x31c1aa['map'](_0x13d974=>String['fromCharCode'](_0x13d974))['join']('');}super(_0x2b6d85),this['result']='end',_0x2b6d85[_0x37fa9f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37fa9f([0x76,0x69,0x65,0x77])][_0x37fa9f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x37fa9f([0x61,0x75,0x74,0x6f]),_0x2b6d85[_0x37fa9f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x37fa9f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x37fa9f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x37fa9f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x37fa9f([0x6f,0x6b])});}}class H extends _0x52ad62{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x3d9c7a){if(super(_0x3d9c7a),!this['editor']['config']['get']('revisionHistory'))throw new _0x93f9cb('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x41fd7d=>this['_showRevisionViewer']({..._0x41fd7d,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x591265=>this['_closeRevisionViewer'](_0x591265)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x335cec=>this['_restoreRevision'](_0x335cec)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x40d536){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x40d536;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x33d266){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x33d266);}['getRevision'](_0x56675e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x56675e);}['getRevisions'](_0x221daf){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x221daf||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4fece4=this['editor'],_0x589a2d=_0x3f13e4(_0x4fece4,p),_0x20563c=_0x4fece4['plugins']['get']('RevisionTracker'),_0x1b6e80=_0x4fece4['plugins']['get']('Users')['users'];return _0x589a2d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x589a2d['lazyRoots'],(_0x589a2d['plugins']['push'](k,d,m,class extends _0x52ad62{static get['requires'](){return[d,'Users'];}['init'](){const _0x4f79ef=this['editor']['plugins']['get']('Users');for(const _0x38a79a of _0x1b6e80)_0x38a79a['isAnonymous']||_0x4f79ef['getUser'](_0x38a79a['id'])||_0x4f79ef['addUser'](_0x38a79a);const _0x2ca9e8=_0x20563c['repository']['getRevisions']();let _0x421ddd=null;const _0x66102d=this['editor']['plugins']['get']('RevisionViewer');_0x66102d['adapter']=_0x20563c['adapter'],_0x66102d['bind']('isEnabled')['to'](_0x20563c),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4fece4,'isReadOnly',_0x3cba4d=>!_0x3cba4d);for(const _0xf1ca7c of _0x2ca9e8){const _0x355ff6=null===_0xf1ca7c['creator'];if(_0x355ff6&&_0xf1ca7c['toVersion']===_0xf1ca7c['fromVersion'])continue;const _0x409384=_0xf1ca7c['toJSON']();_0x66102d['addRevisionData'](_0x409384,(_0x1012c4,_0x25df00,_0xa2f1ab)=>{if(_0x355ff6){if(_0x421ddd)_0x421ddd['_update'](_0x1012c4,_0x25df00);else{if(!_0x25df00){const _0x1ff2ee=_0xa2f1ab['toJSON']();_0x1ff2ee['id']=_0x164885(),_0x20563c['saveRevision'](_0x1ff2ee,_0xa2f1ab['toVersion'])['then'](_0x404052=>{_0x421ddd=_0x404052;});}}}else _0xf1ca7c['_update'](_0x1012c4,_0x25df00);});}}},g),_0x589a2d);}['_enhanceShowRevisionViewerCallback'](){const _0xb6a06d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x5d3e7f=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x857b47=this['editor']['plugins']['get']('Autosave');await _0x857b47['save']();}else await _0x5d3e7f['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x30609d=this['editor']['plugins']['get']('Dialog');_0x30609d['isOpen']&&_0x30609d['hide']();}const _0x3137aa=this['_getRevisionViewerEditorConfig']();return _0xb6a06d(_0x3137aa)['then'](_0x4bc47f=>{return(this['_viewerEditor']=_0x4bc47f,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x4bc47f;})['catch'](_0x770a73=>(console['error'](_0x770a73),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2fa777=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2fa777(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x353c29=this['editor']['plugins']['get']('Annotations');_0x353c29['refreshVisibility'](),_0x353c29['refreshPositioning']();}})));}['_showRevisionViewer'](_0x11ecb6){const _0x24f2b8=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x37d6bd=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4abf3f=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x4abf3f,_0x11ecb6)['then'](_0x3f58f3=>(_0x37d6bd['style']['display']='block',_0x24f2b8['style']['display']='none',_0x3f58f3));}['_closeRevisionViewer'](_0x496d78){const _0x524240=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x524240['style']['display']='',_0x496d78['destroy']();}async['_restoreRevision'](_0x1cf7df){const _0x4c3a22=this['editor'],_0x497c45=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x109bd8=_0x4c3a22['plugins']['get']('RevisionTracker'),_0x1de4c9=_0x497c45['repository']['getRevision'](_0x1cf7df);let _0x249675,_0x654fbc,_0x3b1372;try{_0x249675=await _0x497c45['getRevisionData'](_0x1de4c9),_0x654fbc=await _0x497c45['getRevisionRootsAttributes'](_0x1de4c9);}catch(_0x13668e){return void console['error'](_0x13668e);}_0x4c3a22['model']['change'](_0x5549d0=>{for(const _0x100ca6 of Array['from'](_0x4c3a22['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5549d0['removeMarker'](_0x100ca6);}),_0x497c45['isReady']=!0x1,_0x4c3a22['model']['enqueueChange'](_0x3f218c=>{_0x3f218c['setSelection'](null),_0x3f218c['removeSelectionAttribute'](_0x4c3a22['model']['document']['selection']['getAttributeKeys']());const _0x11e699=Object['keys'](_0x249675);for(const _0x300419 of _0x4c3a22['model']['document']['roots'])'$graveyard'!=_0x300419['rootName']&&_0x300419['isAttached']()&&!_0x11e699['includes'](_0x300419['rootName'])&&_0x3f218c['detachRoot'](_0x300419);for(const _0x56dd72 of _0x11e699){let _0x13af40=_0x4c3a22['model']['document']['getRoot'](_0x56dd72);_0x13af40&&_0x13af40['isAttached']()||(_0x13af40=_0x3f218c['addRoot'](_0x56dd72));const _0x59d580=_0x654fbc[_0x56dd72],_0x188cee=Object['keys'](_0x59d580),_0x21e4d2=_0x249675[_0x56dd72];for(const _0x32714c of _0x13af40['getAttributeKeys']())_0x188cee['includes'](_0x32714c)||_0x3f218c['removeAttribute'](_0x32714c,_0x13af40);for(const _0x5272fa of _0x188cee)_0x3f218c['setAttribute'](_0x5272fa,_0x654fbc[_0x56dd72][_0x5272fa],_0x13af40);_0x3f218c['remove'](_0x3f218c['createRangeIn'](_0x13af40)),_0x3f218c['insert'](_0x4c3a22['data']['parse'](_0x21e4d2,_0x13af40),_0x13af40,0x0);}});const _0x19b8c1=R(_0x4c3a22['locale'],'Restored');if(_0x1de4c9['name'])_0x3b1372=-0x1==_0x1de4c9['name']['indexOf'](_0x19b8c1)?_0x19b8c1+':\x20'+_0x1de4c9['name']:_0x1de4c9['name'];else _0x3b1372=_0x19b8c1+':\x20'+(_0x1de4c9['createdAt']['toLocaleDateString'](_0x4c3a22['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1de4c9['createdAt']['toLocaleTimeString'](_0x4c3a22['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x109bd8['saveRevision']({'name':_0x3b1372}),_0x497c45['isReady']=!0x0,_0x4c3a22['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,H as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,m as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
|