@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250218.0 → 0.0.0-nightly-next-20250219.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/build/revision-history.js +1 -1
- package/ckeditor5-metadata.json +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 +12 -11
- 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/theme/icons/arrow-down.svg +0 -1
- package/theme/icons/arrow-up.svg +0 -1
- package/theme/icons/revision-history.svg +0 -1
- package/theme/icons/user.svg +0 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x2efc47(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x369620){super(),this['id']=_0x369620['id']||_0x370f5b(),this['creator']=_0x369620['creator']||null,this['authors']=_0x369620['authors']||[],this['diffData']=_0x369620['diffData']||null,this['toVersion']=_0x369620['toVersion']||0x0,this['fromVersion']=_0x369620['fromVersion']||0x0,this['set']('name',_0x369620['name']||''),this['set']('createdAt',_0x369620['createdAt']||new Date()),this['set']('attributes',_0x369620['attributes']||{});}['setName'](_0x648317){this['_update']({'name':_0x648317});}['setAttribute'](_0x15daf6,_0x3c94fd){const _0x439bb9=_0x3bebdd(this['attributes']);_0x3e4587(_0x439bb9,_0x15daf6,_0x3c94fd),this['_update']({'attributes':_0x439bb9});}['removeAttribute'](_0xdec1c2){const _0x22434a=_0x3bebdd(this['attributes']);_0x4ae894(_0x22434a,_0xdec1c2),this['_update']({'attributes':_0x22434a});}['_update'](_0x2abf9f,_0x59fce8=!0x1){let _0x3d9067=!0x1;const _0x408f64={'id':this['id']},_0x5472a1=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x37ac1e of _0x5472a1){const _0x5c7246=_0x2abf9f[_0x37ac1e];void 0x0!==_0x5c7246&&_0x5c7246!==this[_0x37ac1e]&&(this[_0x37ac1e]=_0x5c7246,_0x408f64[_0x37ac1e]=_0x5c7246,_0x3d9067=!0x0);}_0x3d9067&&(_0x408f64['authors']&&(_0x408f64['authorsIds']=_0x408f64['authors']['map'](_0x29d2f4=>_0x29d2f4['id']),delete _0x408f64['authors']),this['fire']('_update',_0x408f64,_0x59fce8));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x7161a=>_0x7161a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x3494fb{['_revisions'];static get['requires'](){return[_0x550701];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1b53f6){super(_0x1b53f6),this['_revisions']=new _0x1aa1e7();}['afterInit'](){!async function(_0x3063fc){const _0x48cd43=_0x3980b9([0x68,0x4f,0x31,0x74,0x52,0x44,0x50,0x45,0x6e,0x4d,0x4c,0x34,0x33,0x37,0x65,0x54,0x32,0x72,0x48,0x67,0x71,0x51,0x6d,0x30,0x56,0x47,0x46,0x69,0x59,0x62,0x55,0x73,0x7a,0x58,0x6a,0x70,0x79,0x41,0x64,0x76,0x4e,0x6b,0x61,0x43,0x75,0x6c,0x63,0x4a,0x78,0x66,0x38,0x57,0x42,0x36,0x35,0x6f,0x5a,0x39,0x53,0x77,0x4b,0x49]),_0x598057=0xeb829,_0x388aba=0x57f18261,_0x46a0e3=0x57f6ddb9^_0x388aba,_0x536f04=window[_0x3980b9([0x44,0x61,0x74,0x65])][_0x3980b9([0x6e,0x6f,0x77])](),_0x23e6ae=_0x3063fc[_0x3980b9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3f08ca=new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b6136=>{_0x23e6ae[_0x3980b9([0x6f,0x6e,0x63,0x65])](_0x3980b9([0x72,0x65,0x61,0x64,0x79]),_0x3b6136);}),_0x3264e3={[_0x3980b9([0x6b,0x74,0x79])]:_0x3980b9([0x45,0x43]),[_0x3980b9([0x75,0x73,0x65])]:_0x3980b9([0x73,0x69,0x67]),[_0x3980b9([0x63,0x72,0x76])]:_0x3980b9([0x50,0x2d,0x32,0x35,0x36]),[_0x3980b9([0x78])]:_0x3980b9([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]),[_0x3980b9([0x79])]:_0x3980b9([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]),[_0x3980b9([0x61,0x6c,0x67])]:_0x3980b9([0x45,0x53,0x32,0x35,0x36])},_0x46b737=_0x23e6ae[_0x3980b9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3980b9([0x67,0x65,0x74])](_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x214c04(){let _0x403f46,_0x2618aa=null,_0x3a15d8=null;try{if(_0x46b737==_0x3980b9([0x47,0x50,0x4c]))return _0x3980b9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x403f46=_0x3e8a93(),!_0x403f46)return _0x3980b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x403f46[_0x3980b9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3a15d8=_0x4a92b1(_0x403f46[_0x3980b9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x403f46[_0x3980b9([0x6a,0x74,0x69])])),await _0x4cae0a()?_0xd08131()?_0x5af405()?_0x3980b9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x57aeb2()?(_0x403f46[_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3980b9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2618aa=_0x31b0b2(_0x3980b9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x403f46[_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3980b9([0x74,0x72,0x69,0x61,0x6c])&&(_0x2618aa=_0x31b0b2(_0x3980b9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xadae21()):_0x3980b9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3980b9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3980b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3556c3){return _0x3980b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5af405(){const _0x27c85d=[_0x3980b9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3980b9([0x74,0x72,0x69,0x61,0x6c])][_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x403f46[_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x536f04/0x3e8:0xe10*_0x46a0e3;return _0x403f46[_0x3980b9([0x65,0x78,0x70])]<_0x27c85d;}function _0xd08131(){const _0x4680fc=_0x403f46[_0x3980b9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4680fc)return!0x1;if(_0x4680fc[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3980b9([0x2a])))return!0x0;if(_0x4680fc[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3980b9([0x52,0x48])))return!0x0;if(_0x4680fc[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3980b9([0x52,0x52,0x48]))){if(_0x3b67a4())return!0x0;if(_0x1a9ec1()||_0x471e35())return!0x0;}return!0x1;}function _0x57aeb2(){const _0x53b9d7=_0x403f46[_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x53b9d7||0x0==_0x53b9d7[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x155572}=new URL(window[_0x3980b9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x53b9d7[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x155572))return!0x0;const _0xfbf6d9=_0x155572[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])](_0x3980b9([0x2e]));return _0x53b9d7[_0x3980b9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4255cf=>_0x4255cf[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3980b9([0x2a])))[_0x3980b9([0x6d,0x61,0x70])](_0x53debe=>_0x53debe[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])](_0x3980b9([0x2e])))[_0x3980b9([0x73,0x6f,0x6d,0x65])](_0x4f1898=>_0xfbf6d9[_0x3980b9([0x65,0x76,0x65,0x72,0x79])]((_0x1f2ea7,_0x49b4c5)=>_0x4f1898[_0x49b4c5]===_0x1f2ea7||_0x4f1898[_0x49b4c5]===_0x3980b9([0x2a])));}function _0xadae21(){return _0x2618aa&&_0x3a15d8?new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x35dfa4,_0x2afa75)=>{_0x2618aa[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x35dfa4,_0x2afa75),_0x3a15d8[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x4ac284=>{_0x4ac284!=_0x3980b9([0x56,0x61,0x6c,0x69,0x64])&&_0x35dfa4(_0x4ac284);},_0x2afa75);}):_0x2618aa||_0x3a15d8||_0x3980b9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4a92b1(_0x436ae5,_0x1b3c3c){return new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58ee96=>{if(_0xdb4505())return _0x58ee96(_0x3980b9([0x56,0x61,0x6c,0x69,0x64]));_0xa58931(),_0x23e6ae[_0x3980b9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3980b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x34ad26=!0x1;const _0x564c54=_0x370f5b();function _0x5b177a(_0x343ec1){return!!_0x343ec1&&(typeof _0x343ec1===_0x3980b9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x343ec1===_0x3980b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x343ec1[_0x3980b9([0x74,0x68,0x65,0x6e])]===_0x3980b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x343ec1[_0x3980b9([0x63,0x61,0x74,0x63,0x68])]===_0x3980b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x42d93b(_0x5a07e0){_0x2c92cc(_0x5a07e0)[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x267a07=>{if(!_0x267a07||_0x267a07[_0x3980b9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3980b9([0x6f,0x6b]))return _0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a9c6b(_0x4bbab6(_0x564c54+_0x1b3c3c))!=_0x267a07[_0x3980b9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3980b9([0x56,0x61,0x6c,0x69,0x64]);})[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x23c519=>(_0x3475ff(),_0x23c519),()=>{const _0x5c4e87=_0x42a7c9();return null==_0x5c4e87?(_0x3475ff(),_0x3980b9([0x56,0x61,0x6c,0x69,0x64])):_0x3980b9(_0x536f04-_0x5c4e87>(0x73fd0661^_0x388aba)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x58ee96)[_0x3980b9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x58ee96(_0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x269386=0x57c76ce1^_0x388aba;function _0x3475ff(){const _0x145250=_0x3980b9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a9c6b(_0x4bbab6(_0x436ae5)),_0x1d0e5e=_0x5339c0(_0x4a9c6b(window[_0x3980b9([0x4d,0x61,0x74,0x68])][_0x3980b9([0x63,0x65,0x69,0x6c])](_0x536f04/_0x269386)));window[_0x3980b9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3980b9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x145250,_0x1d0e5e);}function _0x42a7c9(){const _0x5d44f7=_0x3980b9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a9c6b(_0x4bbab6(_0x436ae5)),_0x359a80=window[_0x3980b9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3980b9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5d44f7);return _0x359a80?window[_0x3980b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5339c0(_0x359a80),0x10)*_0x269386:null;}function _0x2c92cc(_0x1fa175){return new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x160f45,_0x47c1ed)=>{_0x1fa175[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x160f45,_0x47c1ed),window[_0x3980b9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x47c1ed,0x57f056a1^_0x388aba);});}}_0x23e6ae[_0x3980b9([0x6f,0x6e])](_0x3980b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xddeda9,_0x519d7c)=>{if(_0x519d7c[0x0]!=_0x436ae5)return _0x58ee96(_0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x519d7c[0x1]={..._0x519d7c[0x1],[_0x3980b9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x564c54};},{[_0x3980b9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3980b9([0x68,0x69,0x67,0x68])}),_0x23e6ae[_0x3980b9([0x6f,0x6e])](_0x3980b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2df8ce=>{_0x5b177a(_0x2df8ce[_0x3980b9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x34ad26=!0x0,_0x42d93b(_0x2df8ce[_0x3980b9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3980b9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3980b9([0x6c,0x6f,0x77])}),_0x3f08ca[_0x3980b9([0x74,0x68,0x65,0x6e])](()=>{_0x34ad26||_0x58ee96(_0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xdb4505(){return _0x23e6ae[_0x3980b9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3980b9([0x76,0x69,0x65,0x77])][_0x3980b9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3980b9([0x61,0x75,0x74,0x6f]);}function _0xa58931(){_0x23e6ae[_0x3980b9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3980b9([0x76,0x69,0x65,0x77])][_0x3980b9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3980b9([0x61,0x75,0x74,0x6f]);}}function _0x31b0b2(_0x4bcc71){const _0x493a7a=[new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d23ef=>setTimeout(_0x5d23ef,0x57f8bcad^_0x388aba)),_0x3f08ca[_0x3980b9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26016e=>{const _0x4ba165=0x57f18266^_0x388aba,_0x59717d=_0x3063fc[_0x3980b9([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x584aa9(){_0x59717d[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x4ba165&&_0x26016e();}_0x584aa9(),_0x59717d[_0x3980b9([0x6f,0x6e])](_0x3980b9([0x61,0x64,0x64]),_0x584aa9);})),new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5316b7=>{function _0x2800f6(){for(const _0x5eb9bb in window)if(window[_0x3980b9([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x3980b9([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x5eb9bb))&&window[_0x5eb9bb]==_0x598057)return _0x5316b7();_0x23e6ae[_0x3980b9([0x73,0x74,0x61,0x74,0x65])]!=_0x3980b9([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x3980b9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2800f6,0x57f191e9^_0x388aba);}_0x521e16(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2800f6();})];return window[_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3980b9([0x72,0x61,0x63,0x65])](_0x493a7a)[_0x3980b9([0x74,0x68,0x65,0x6e])](()=>_0x4bcc71);}async function _0x1e4d36(){if(await _0x3f08ca,_0x521e16(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4764c7=_0x3063fc[_0x3980b9([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5e5255=_0x3063fc[_0x3980b9([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])](_0x4764c7[_0x3980b9([0x69,0x64])]),_0x3abab1=_0x439b61(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3abab1[_0x3980b9([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4764c7['id'],_0x5e5255?_0x5e5255['id']:null,!0x0),_0x3abab1[_0x3980b9([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3980b9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3abab1[_0x3980b9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3abab1[_0x3980b9([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x212bb3,void(_0x3abab1[_0x3980b9([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x212bb3);}if(_0x521e16(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2da6a8=_0x439b61(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2da6a8[_0x3980b9([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3980b9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2da6a8[_0x3980b9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2da6a8[_0x3980b9([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x212bb3,_0x2da6a8[_0x3980b9([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x212bb3;}_0x23e6ae[_0x3980b9([0x6d,0x6f,0x64,0x65,0x6c])][_0x3980b9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x212bb3,_0x23e6ae[_0x3980b9([0x6d,0x6f,0x64,0x65,0x6c])][_0x3980b9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x212bb3,_0x23e6ae[_0x3980b9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3980b9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3b67a4(){return _0x521e16(_0x3980b9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x439b61(_0x3980b9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3980b9([0x73,0x74,0x61,0x74,0x65])]==_0x3980b9([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1a9ec1(){return _0x521e16(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x471e35(){return _0x521e16(_0x3980b9([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x43513e(_0x52faab){const _0x2cafe1=_0x30978c();_0x23e6ae[_0x2cafe1]=_0x3980b9([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])+_0x52faab,_0x52faab[_0x3980b9([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x3980b9([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x30978c()]=_0x598057),_0x52faab!=_0x3980b9([0x56,0x61,0x6c,0x69,0x64])&&_0x1e4d36();}function _0x30978c(){const _0x119ba5=window[_0x3980b9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3980b9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3980b9([0x6e,0x6f,0x77])]())[_0x3980b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3980b9([0x2e]),'');let _0x5d53b1=_0x3980b9([0x68]);for(let _0x17443d=0x0;_0x17443d<_0x119ba5[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x17443d+=0x2){let _0x472eea=window[_0x3980b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x119ba5[_0x3980b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x17443d,_0x17443d+0x2));_0x472eea>=_0x48cd43[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x472eea-=_0x48cd43[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5d53b1+=_0x48cd43[_0x472eea];}return _0x5d53b1;}function _0x3e8a93(){const _0x59ddd6=_0x46b737[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])](_0x3980b9([0x2e]));if(0x3!=_0x59ddd6[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xf2ae77(_0x59ddd6[0x1]);function _0xf2ae77(_0x10e4c8){const _0x2e2a4e=_0x261e14(_0x10e4c8);return _0x2e2a4e&&_0x44dc60()?_0x2e2a4e:null;function _0x44dc60(){const _0x4dba89=_0x2e2a4e[_0x3980b9([0x6a,0x74,0x69])],_0x55d63d=window[_0x3980b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4dba89[_0x3980b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4dba89[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x370ca4={..._0x2e2a4e,[_0x3980b9([0x6a,0x74,0x69])]:_0x4dba89[_0x3980b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4dba89[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x370ca4[_0x3980b9([0x76,0x63])],_0x4bbab6(_0x370ca4)==_0x55d63d;}}}async function _0x4cae0a(){let _0x1036e2=!0x0;try{const _0x1aba46=_0x46b737[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])](_0x3980b9([0x2e])),[_0x3d887e,_0xc14eb2,_0x5ca9aa]=_0x1aba46;return _0x582deb(_0x3d887e),await _0x6622ee(_0x3d887e,_0xc14eb2,_0x5ca9aa),_0x1036e2;}catch(_0x5a6eff){return!0x1;}function _0x582deb(_0x200d99){const _0x5b27fe=_0x261e14(_0x200d99);_0x5b27fe&&_0x5b27fe[_0x3980b9([0x61,0x6c,0x67])]==_0x3980b9([0x45,0x53,0x32,0x35,0x36])||(_0x1036e2=!0x1);}async function _0x6622ee(_0x26c4f1,_0x8e86a6,_0x98863b){const _0x4a4878=window[_0x3980b9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3980b9([0x66,0x72,0x6f,0x6d])](_0x113f77(_0x98863b),_0x5e39f4=>_0x5e39f4[_0x3980b9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x511093=new window[(_0x3980b9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3980b9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x26c4f1+_0x3980b9([0x2e])+_0x8e86a6),_0xc6be2a=window[_0x3980b9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3980b9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc6be2a)return;const _0x1a8144=await _0xc6be2a[_0x3980b9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3980b9([0x6a,0x77,0x6b]),_0x3264e3,{[_0x3980b9([0x6e,0x61,0x6d,0x65])]:_0x3980b9([0x45,0x43,0x44,0x53,0x41]),[_0x3980b9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3980b9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3980b9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc6be2a[_0x3980b9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3980b9([0x6e,0x61,0x6d,0x65])]:_0x3980b9([0x45,0x43,0x44,0x53,0x41]),[_0x3980b9([0x68,0x61,0x73,0x68])]:{[_0x3980b9([0x6e,0x61,0x6d,0x65])]:_0x3980b9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1a8144,_0x4a4878,_0x511093)||(_0x1036e2=!0x1);}}function _0x261e14(_0x9e1989){return _0x9e1989[_0x3980b9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3980b9([0x65,0x79]))?JSON[_0x3980b9([0x70,0x61,0x72,0x73,0x65])](_0x113f77(_0x9e1989)):null;}function _0x113f77(_0x41c7a5){return window[_0x3980b9([0x61,0x74,0x6f,0x62])](_0x41c7a5[_0x3980b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3980b9([0x2b]))[_0x3980b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3980b9([0x2f])));}function _0x4bbab6(_0x895ef5){let _0x51f5f1=0x1505;function _0x5d1005(_0x58b990){for(let _0x5f43cd=0x0;_0x5f43cd<_0x58b990[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5f43cd++){const _0x324828=_0x58b990[_0x3980b9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5f43cd);_0x51f5f1=(_0x51f5f1<<0x5)+_0x51f5f1+_0x324828,_0x51f5f1&=_0x51f5f1;}}function _0x5db4bf(_0x4cc6de){Array[_0x3980b9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4cc6de)?_0x4cc6de[_0x3980b9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5db4bf):_0x4cc6de&&typeof _0x4cc6de==_0x3980b9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3980b9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4cc6de)[_0x3980b9([0x73,0x6f,0x72,0x74])]()[_0x3980b9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x108417,_0x4703dd])=>{_0x5d1005(_0x108417),_0x5db4bf(_0x4703dd);}):_0x5d1005(window[_0x3980b9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4cc6de));}return _0x5db4bf(_0x895ef5),_0x51f5f1>>>0x0;}function _0x4a9c6b(_0x2c52a7){return _0x2c52a7[_0x3980b9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3980b9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3980b9([0x30]));}function _0x5339c0(_0x564f33){return _0x564f33[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3980b9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3980b9([0x6a,0x6f,0x69,0x6e])]('');}function _0x521e16(_0x278038){return _0x23e6ae[_0x3980b9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3980b9([0x68,0x61,0x73])](_0x278038);}function _0x439b61(_0x28515d){return _0x23e6ae[_0x3980b9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3980b9([0x67,0x65,0x74])](_0x28515d);}function _0x212bb3(){}function _0x3980b9(_0x68c18a){return _0x68c18a['map'](_0x4d206b=>String['fromCharCode'](_0x4d206b))['join']('');}_0x43513e(await _0x214c04());}(this);}['createRevision'](_0x83bd03){const _0x5824de=this['editor']['plugins']['get']('Users');return new a({'id':_0x83bd03['id'],'name':_0x83bd03['name'],'creator':_0x83bd03['creatorId']?_0x5824de['getUser'](_0x83bd03['creatorId']):null,'diffData':_0x83bd03['diffData']||_0x83bd03['data'],'authors':_0x83bd03['authorsIds']['map'](_0x3967c2=>_0x5824de['getUser'](_0x3967c2)),'createdAt':new Date(_0x83bd03['createdAt']),'attributes':_0x83bd03['attributes'],'fromVersion':_0x83bd03['fromVersion'],'toVersion':_0x83bd03['toVersion']});}['addRevision'](_0x32de8a,_0x4d0cca=0x0){this['_revisions']['add'](_0x32de8a,_0x4d0cca);}['getRevision'](_0x4be57c){return this['_revisions']['get'](_0x4be57c);}['getRevisions'](_0x12bc1a={'toJSON':!0x1}){const _0xe71550=Array['from'](this['_revisions']);return _0xe71550['reverse'](),_0x12bc1a['toJSON']?_0xe71550['map'](_0x4a4667=>_0x4a4667['toJSON']()):_0xe71550;}['getIndex'](_0x18bcca){return this['_revisions']['getIndex'](_0x18bcca);}['getEarlierVisibleRevision'](_0x577a7a){const [,_0x49f17a]=this['getRevisionsIterator'](_0x577a7a,{'direction':'earlier'});return _0x49f17a;}['getLaterVisibleRevision'](_0x5b21c5){const [,_0x2498e6]=this['getRevisionsIterator'](_0x5b21c5,{'direction':'later'});return _0x2498e6;}['getRevisionsInDiff'](_0x853383){const _0x10239f=[];for(const _0x1225da of this['getRevisionsIterator'](_0x853383['newRevisionId']))if(_0x10239f['push'](_0x1225da),_0x1225da['id']===_0x853383['oldRevisionId'])break;return _0x10239f;}*['getRevisionsIterator'](_0xba6224,{direction:_0x12cff6='earlier',filter:_0x5b501e=()=>!0x0}={}){const _0x3ac49c='earlier'===_0x12cff6?0x1:-0x1;let _0x487e33=this['_revisions']['get'](_0xba6224),_0x5926ff=this['getIndex'](_0x487e33);for(yield _0x487e33;_0x487e33;){if(_0x5926ff+=_0x3ac49c,_0x487e33=this['getRevision'](_0x5926ff),!_0x487e33)return;_0x5b501e(_0x487e33)&&(yield _0x487e33);}}}function m(_0x4e4be4,_0x112b55,_0x362c06){const t=_0x4e4be4['t'];switch(_0x112b55){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'},_0x362c06);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x362c06);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 P={'c':_0x4085a3,'a':_0x21393e,'e':_0x55b6d9,'r':_0x156c3d,'u':_0x10755e};class l extends _0x3494fb{['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[_0x550701,j,_0x23a927];}constructor(_0x53090c){super(_0x53090c),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x4dbcdd=_0x370f5b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4dbcdd},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 _0x9866a5=this['repository']['getRevision'](0x0),_0x2cc18a=_0x9866a5&&null===_0x9866a5['creator']?_0x9866a5:null;if(this['_continueCurrentRevision']=!!_0x2cc18a&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4f71cc=this['_source']['getCurrentRevisionId'](),_0x2120d3=this['repository']['getRevision'](_0x4f71cc);if(_0x2120d3)this['_startingVersion']=_0x2120d3['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x52e18b=this['_source']['history']['_operations']['find'](_0x5e9fa5=>!_0x5e9fa5['_isInit']),_0x297dba=_0x52e18b?_0x52e18b['baseVersion']:this['_source']['history']['version'];_0x9866a5?(_0x9866a5['toVersion']<_0x297dba&&_0x9866a5['_update']({'toVersion':_0x297dba}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2cc18a['id'],this['_startingVersion']=_0x2cc18a['fromVersion']):(this['_startingVersion']=_0x9866a5['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x297dba,this['_continueCurrentRevision']=!0x1);}}else _0x2cc18a&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2cc18a['toVersion'],this['editor']['model']['document']['history']['version']),_0x2cc18a['fromVersion']===_0x2cc18a['toVersion']?(0x0!==_0x2cc18a['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2cc18a['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2cc18a['id'],this['_startingVersion']=_0x2cc18a['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',_0x368b10=>!_0x368b10),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xba7a28=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x481f48;for(const _0x1f673f in _0xba7a28){const _0x2690cf=_0x1f673f,_0x1b80e1=_0xba7a28[_0x2690cf];if('revisionHistoryLicenseKeyValid'==_0x1b80e1||'revisionHistoryLicenseKeyInvalid'==_0x1b80e1||'revisionHistoryLicenseKeyExpired'==_0x1b80e1||'revisionHistoryLicenseKeyDomainLimit'==_0x1b80e1||'revisionHistoryLicenseKeyNotAllowed'==_0x1b80e1||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1b80e1||'revisionHistoryLicenseKeyTrialLimit'==_0x1b80e1||'revisionHistoryLicenseKeyUsageLimit'==_0x1b80e1){delete _0xba7a28[_0x2690cf],_0x481f48=_0x1b80e1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x481f48&&_0xba7a28['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x481f48&&_0xba7a28['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x481f48&&_0xba7a28['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x481f48&&_0xba7a28['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x481f48&&_0xba7a28['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x481f48&&_0xba7a28['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x481f48&&_0xba7a28['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x1ade3b=this['repository']['getRevision'](0x0),_0x3a8b8b=await this['getRevisionDocumentData'](_0x1ade3b),_0x46fc6c=await this['getRevisionRootsAttributes'](_0x1ade3b);this['_replaceEditorDataWithRevisionData'](_0x3a8b8b,_0x46fc6c);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x5f4187){this['_source']=_0x5f4187;}async['update'](){const _0x446927=await this['_source']['getLatestVersion']();if(_0x446927>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5b23f2=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x446927});_0x5b23f2['authors']=_0x5b23f2['authorsIds']['map'](_0x57fcb8=>this['editor']['plugins']['get']('Users')['getUser'](_0x57fcb8)),this['currentRevision']['_update'](_0x5b23f2);}}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'](_0x50b402={},_0x9432c8=null){const _0x5f516a=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x9432c8>this['currentRevision']['toVersion']&&(_0x9432c8=null),null===_0x9432c8&&(_0x9432c8=await this['_source']['getLatestVersion']());const _0x34039b=this['_getFromVersion'](_0x9432c8),_0x3caf66=this['buildRevisionData']({'from':_0x34039b,'to':_0x9432c8});if(this['currentRevision']['toVersion']<_0x9432c8){const _0x44655d=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x9432c8,'to':_0x9432c8});_0x44655d['authors']=[],_0x44655d['authorsIds']=[],_0x44655d['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x44655d,!0x0),delete _0x44655d['authors'],_0x5f516a['push'](_0x44655d);}_0x50b402['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x50b402['name']=_0x50b402['name']||null,_0x50b402['id']=_0x50b402['id']||_0x370f5b(),_0x50b402={..._0x50b402,..._0x3caf66};const _0x53a704=this['addRevisionData'](_0x50b402);_0x5f516a['push'](_0x50b402);const _0x53e999=this['repository']['getIndex'](_0x53a704);if(0x0!==_0x53e999){const _0x2606e2=this['repository']['getRevision'](_0x53e999-0x1);if(_0x2606e2['fromVersion']!==_0x9432c8){const _0x38d58b=this['_revisionDataBuilder']['getData'](_0x9432c8,_0x2606e2['toVersion']),_0x4ac270={'id':_0x2606e2['id'],'diffData':_0x38d58b['diffData'],'authorsIds':_0x38d58b['authorsIds'],'authors':_0x38d58b['authorsIds']['map'](_0x1dc887=>this['editor']['plugins']['get']('Users')['getUser'](_0x1dc887)),'fromVersion':_0x9432c8};_0x2606e2===this['currentRevision']&&(_0x4ac270['createdAt']=new Date(_0x50b402['createdAt']['getTime']()+0xa)),_0x2606e2['_update'](_0x4ac270,!0x0),delete _0x4ac270['authors'],_0x5f516a['push'](_0x4ac270);}}if(this['adapter']){for(const _0x54567f of _0x5f516a)this['_bufferUpdate'](_0x54567f['id'],_0x54567f,!0x0);this['sendBufferedUpdates']();}return _0x53a704;}['addRevisionData'](_0x7f8219){const _0x5f0ebc=this['repository']['createRevision'](_0x7f8219);return this['adapter']&&_0x5f0ebc['on']('_update',(_0x3f8b7d,_0x242650,_0x1fe4f8)=>{_0x1fe4f8||(this['_bufferUpdate'](_0x242650['id'],_0x242650,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5f0ebc,this['_findInsertionIndex'](_0x5f0ebc)),_0x5f0ebc;}async['getRevisionDocumentData'](_0x117241){await this['_loadRevisionData'](_0x117241);const _0x4a92cf={};for(const _0x587f74 in _0x117241['diffData']){if(_0x117241['diffData'][_0x587f74]['attachChange']&&!_0x117241['diffData'][_0x587f74]['attachChange']['isAttached'])continue;const _0x2bf7a7=this['_removeRevisionMarkers'](JSON['parse'](_0x117241['diffData'][_0x587f74]['insertions'])),_0x4adb08=this['editor']['editing']['view']['document'],_0xfb801=new _0x2c3601(_0x4adb08,_0x2bf7a7['map'](_0x133974=>C(_0x133974,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x4a92cf[_0x587f74]=this['editor']['data']['processor']['toData'](_0xfb801),this['editor']['data']['processor']['useFillerType']('default');}return _0x4a92cf;}async['getRevisionRootsAttributes'](_0x426089){await this['_loadRevisionData'](_0x426089);const _0x26ae0a={};for(const _0x2655e8 in _0x426089['diffData'])_0x426089['diffData'][_0x2655e8]['attachChange']&&!_0x426089['diffData'][_0x2655e8]['attachChange']['isAttached']||(_0x26ae0a[_0x2655e8]=_0x426089['diffData'][_0x2655e8]['attributesAfter']||{});return _0x26ae0a;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x329c7d=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1fc925=0x0;_0x1fc925<_0x329c7d['length'];_0x1fc925++){const _0x141dec=_0x329c7d[_0x1fc925];let _0x502345=!0x1;for(const _0xb1210 of Object['keys'](_0x141dec))void 0x0===_0x141dec[_0xb1210]?delete _0x141dec[_0xb1210]:'id'!==_0xb1210&&(_0x502345=!0x0);_0x502345||(_0x329c7d[_0x1fc925]=null);}if(_0x329c7d=_0x329c7d['filter'](_0x1ddbc3=>null!==_0x1ddbc3),!_0x329c7d['length'])return;for(let _0x3cfcee=0x0;_0x3cfcee<_0x329c7d['length'];_0x3cfcee++){const _0x37ae40=_0x329c7d[_0x3cfcee];void 0x0!==_0x37ae40['fromVersion']&&void 0x0===_0x37ae40['toVersion']&&(_0x37ae40['toVersion']=this['repository']['getRevision'](_0x37ae40['id'])['toVersion']),void 0x0!==_0x37ae40['toVersion']&&void 0x0===_0x37ae40['fromVersion']&&(_0x37ae40['fromVersion']=this['repository']['getRevision'](_0x37ae40['id'])['fromVersion']);}const _0x18aa7b=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x329c7d,_0x18aa7b)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x7ad3bf=>{if(_0x7ad3bf){for(const _0x375fbc of _0x7ad3bf)this['setRevisionData']({'id':_0x375fbc['id'],'createdAt':_0x375fbc['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x177162,_0x44b66f){let _0x812614=this['editor']['config']['get']('initialData'),_0x5d7818=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x812614){_0x812614={};for(const _0xf774c4 of this['editor']['model']['document']['getRootNames']())_0x812614[_0xf774c4]='';}if('string'==typeof _0x812614&&(_0x812614={'main':_0x812614}),void 0x0===_0x5d7818){_0x5d7818={};for(const _0x2535b5 of this['editor']['model']['document']['getRootNames']())_0x5d7818[_0x2535b5]={};}let _0x1146aa=!0x1;const _0x49b229=Object['keys'](_0x812614),_0x5294d2=Object['keys'](_0x177162);for(const _0x2df076 of _0x49b229){if(_0x812614[_0x2df076]!==_0x177162[_0x2df076]&&''!==_0x812614[_0x2df076]['trim']()){_0x1146aa=!0x0;break;}if(!_0x48fe1a(_0x5d7818[_0x2df076],_0x44b66f[_0x2df076])&&Object['keys'](_0x5d7818[_0x2df076])['length']>0x0){_0x1146aa=!0x0;break;}}_0x1146aa||(_0x1146aa=_0x5294d2['some'](_0x28f278=>!this['editor']['model']['document']['getRoot'](_0x28f278))),_0x1146aa&&_0x32af2b('editor-initial-data-replaced-with-revision-data',{'editorData':_0x812614,'editorRootsAttributes':_0x5d7818,'revisionData':_0x177162,'revisionRootsAttributes':_0x44b66f}),this['editor']['config']['set']('initialData',_0x177162),this['editor']['config']['set']('rootsAttributes',_0x44b66f);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x540ec6=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x540ec6['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1adfed){const _0x4f0c27=this['repository']['getRevisions']();_0x4f0c27['reverse']();let _0x46a613=0x0;for(;_0x46a613<_0x4f0c27['length'];){const _0x41b421=_0x4f0c27[_0x46a613];if(_0x41b421===this['currentRevision']){_0x46a613++;continue;}if(_0x41b421['id']===this['_initialRevisionId'])break;const _0x221010=_0x1adfed['toVersion']-_0x41b421['toVersion']||_0x1adfed['fromVersion']-_0x41b421['fromVersion'];if(_0x221010>0x0)break;if(_0x221010<0x0)_0x46a613++;else{if(!_0x1adfed['creator']&&_0x41b421['creator'])break;if(_0x41b421['creator']||!_0x1adfed['creator']){if(_0x1adfed['createdAt']>_0x41b421['createdAt'])break;_0x46a613++;}else _0x46a613++;}}return _0x46a613;}['setRevisionData'](_0x3a90fd){const _0x5cdcd9=this['repository']['getRevision'](_0x3a90fd['id']);if(_0x3a90fd['createdAt']&&(_0x3a90fd['createdAt']=new Date(_0x3a90fd['createdAt'])),_0x3a90fd['authorsIds']){const _0x53d34e=this['editor']['plugins']['get']('Users');_0x3a90fd['authors']=_0x3a90fd['authorsIds']['map'](_0x452655=>_0x53d34e['getUser'](_0x452655));}_0x5cdcd9['_update'](_0x3a90fd,!0x0);}['buildRevisionData']({revision:_0x4ac3a0=null,from:_0x13eeff=null,to:_0x418b73=null}){_0x13eeff=null!==_0x13eeff?_0x13eeff:_0x4ac3a0['fromVersion'],_0x418b73=null!==_0x418b73?_0x418b73:_0x4ac3a0['toVersion'];const _0x6c054c=this['_revisionDataBuilder']['getData'](_0x13eeff,_0x418b73),_0x2d2478={'diffData':_0x6c054c['diffData'],'authorsIds':_0x6c054c['authorsIds'],'fromVersion':_0x13eeff,'toVersion':_0x418b73};if(!_0x4ac3a0||_0x418b73!==_0x4ac3a0['toVersion']){const _0x599824=_0x418b73-0x1,_0x5ee5ef=this['_source']['history']['getOperation'](_0x599824);_0x2d2478['createdAt']=_0x5ee5ef&&_0x5ee5ef['createdAt']||new Date();}if(this['_loadedStateData']&&_0x13eeff===this['_loadedStateData']['fromVersion']){for(const _0x4db7cb of this['_loadedStateData']['authors'])_0x2d2478['authorsIds']['includes'](_0x4db7cb['id'])||_0x2d2478['authorsIds']['push'](_0x4db7cb['id']);}return _0x2d2478;}['_loadRevisionData'](_0x59bd45){if(!_0x59bd45||_0x59bd45['diffData'])return Promise['resolve']();{const _0xfbbbe2=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0xfbbbe2,'revisionId':_0x59bd45['id']})['then'](_0x411a4a=>{_0x59bd45['diffData']=_0x411a4a['diffData'];});}}['_bufferUpdate'](_0x5d7951,_0x519c00,_0x53b308){if(this['_bufferedUpdates']['has'](_0x5d7951)){const _0x37247c=this['_bufferedUpdates']['get'](_0x5d7951);_0x519c00=_0x53b308?{..._0x37247c,..._0x519c00}:{..._0x519c00,..._0x37247c};}this['_bufferedUpdates']['set'](_0x5d7951,_0x519c00);}['_getFromVersion'](_0x5d4182){const _0x2359c5=this['repository']['getRevisions']();_0x2359c5['reverse'](),_0x2359c5['shift']();const _0x4c2c11=_0x2359c5['find'](_0x2e08c6=>_0x2e08c6['toVersion']<=_0x5d4182)['toVersion'];return _0x4c2c11<this['_startingVersion']?this['_startingVersion']:_0x4c2c11;}['_createInitialRevision'](_0x236954){const _0x3b1b38=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3b1b38)this['_initialRevisionId']=_0x3b1b38['id'];else{const _0x4d2284=!this['editor']['model']['document']['roots']['find'](_0x1c1fa6=>this['editor']['model']['hasContent'](_0x1c1fa6)),_0x59c352=this['editor']['plugins']['get']('Users')['me']['id'],_0x48c72b=m(this['editor']['locale'],_0x4d2284?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x236954,'to':_0x236954,'id':this['_initialRevisionId'],'name':_0x48c72b,'creatorId':_0x59c352});}}['_createCurrentRevision'](_0x492147){const _0x23994f=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x23994f),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x492147,'to':_0x492147,'id':_0x23994f,'name':'','creatorId':null}));}['_makeRevision']({name:_0x4e5762,from:_0x3b1f4c,to:_0x1ed88c,creatorId:_0x7a15dd,id:_0x5c5486}){const _0x2c5e34=this['buildRevisionData']({'from':_0x3b1f4c,'to':_0x1ed88c});_0x2c5e34['name']=_0x4e5762,_0x2c5e34['creatorId']=_0x7a15dd,_0x2c5e34['id']=_0x5c5486;const _0x58b5d1=this['addRevisionData'](_0x2c5e34);return this['adapter']&&this['_bufferUpdate'](_0x2c5e34['id'],_0x2c5e34,!0x0),_0x58b5d1;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x4fdf6f){return(_0x4fdf6f=_0x4fdf6f['filter'](_0x432e95=>!_0x432e95['name']||'revision-start'!==_0x432e95['name']&&'revision-end'!==_0x432e95['name']))['forEach'](_0x44cedc=>{'string'!=typeof _0x44cedc&&(_0x44cedc['children']=this['_removeRevisionMarkers'](_0x44cedc['children']),_0x44cedc['attributes']=_0x44cedc['attributes']['filter'](_0x282b7f=>!_0x282b7f[0x0]['startsWith']('data-revision-')));}),_0x4fdf6f;}}function C(_0x54054f,_0x5884ba){const _0x420ebc=_0x5884ba['editing']['view']['document'];if('string'==typeof _0x54054f)return new _0x6c429f(_0x420ebc,_0x54054f);{const _0x4bf450=_0x54054f['children']['map'](_0x3d34ce=>C(_0x3d34ce,_0x5884ba));return new(P[_0x54054f['type']]||_0xcb3cb1)(_0x420ebc,_0x54054f['name'],_0x54054f['attributes'],_0x4bf450);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x25b39b){this['editor']=_0x25b39b,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'](_0x28218c){this['source']=_0x28218c;const _0x29cff6=new Map(),_0x57b0c7=new Map(),_0x189533=this['editor']['model']['document']['roots']['map'](_0x3dbae7=>_0x3dbae7['rootName']);for(const _0x93f4cf of _0x189533){const _0x42cece=this['editor']['model']['document']['getRoot'](_0x93f4cf),_0x2fc371=T(_0x42cece);_0x29cff6['set'](_0x93f4cf,_0x2fc371),_0x57b0c7['set'](_0x93f4cf,Object['fromEntries'](_0x42cece['getAttributes']()));}const _0x3b4952=Array['from'](this['editor']['model']['markers'])['map'](_0x32379c=>[_0x32379c['name'],_0x32379c['getRange']()]),_0x127fa3=this['source']['version'];this['_saveMetaData'](_0x127fa3,_0x29cff6,_0x3b4952,_0x57b0c7),this['_startingRevisionId']=this['_revisionId'];const _0x87f2ab=new Map(),_0x3cfc5b=new Map();for(const _0x528da7 of _0x189533){const _0x4537af=F(_0x528da7);_0x87f2ab['set'](_0x528da7,_0x4537af),_0x3cfc5b['set'](_0x528da7,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x87f2ab,[],_0x3cfc5b);}['getData'](_0x1f0fce,_0x44471b){if(this['_lastFrom']===_0x1f0fce&&this['_lastTo']<=_0x44471b)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x44471b,!0x0);else{if(!this['_savedMetaData']['has'](_0x1f0fce)){const _0x54731d=this['_getPreviousFrom'](_0x1f0fce);this['_calculateMetaData'](_0x54731d,_0x1f0fce,!0x1);}this['_calculateMetaData'](_0x1f0fce,_0x44471b,!0x0);}return this['_lastFrom']=_0x1f0fce,this['_lastTo']=_0x44471b,this['_getState']();}['loadState'](_0xce776a){this['_reset'](),this['_lastFrom']=_0xce776a['fromVersion'],this['_lastTo']=_0xce776a['toVersion'];for(const _0x3fddb4 in _0xce776a['diffData']){const _0x194e84=_0xce776a['diffData'][_0x3fddb4]['attachChange'],_0xd296ce=_0x3bebdd(_0xce776a['diffData'][_0x3fddb4]['attributesBefore'])||{},_0x11b787=this['_makeModelFromViewString'](_0xce776a['diffData'][_0x3fddb4]['deletions']);_0x11b787['rootName']=_0x3fddb4,_0x11b787['_isAttached']=!_0x194e84||!_0x194e84['isAttached'],_0x11b787['isAttached']=()=>_0x11b787['_isAttached'],this['_baseRoots']['set'](_0x3fddb4,_0x11b787),this['_baseRootsAttributes']['set'](_0x3fddb4,_0xd296ce),_0x194e84&&this['_touchedRoots']['set'](_0x3fddb4,_0x194e84);const _0x2af621=this['_makeIdsRoot'](_0x11b787);this['_baseIdsRoots']['set'](_0x3fddb4,_0x2af621);for(const [_0x43822e,_0x3e6dd5]of _0x11b787['markers']){if(!_0x43822e['startsWith']('revision:'))continue;const _0x4acf0c=_0x43822e['split'](':')[0x2];for(const _0x48fec9 of _0x3e6dd5['getWalker']({'singleCharacters':!0x0})){const _0x106558=this['_getVidAttributeName'](_0x48fec9),_0x11fc4b='elementEnd'==_0x48fec9['type']?_0x48fec9['previousPosition']['path']['slice'](0x0,-0x1):_0x48fec9['previousPosition']['path'],_0x4a0328=_0x2af621['getNodeByPath'](_0x11fc4b)['getAttribute'](_0x106558);this['_touched']['set'](_0x4a0328,{'userId':_0x4acf0c});}}}this['_startingRevisionId']=this['_revisionId'];const _0x1b7c5d=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x116042=>!this['_touched']['has'](_0x116042));let _0x2ac3b7=0x0;const _0x201920=new Map();for(const _0x56db3b in _0xce776a['diffData']){const _0x568ac5=_0xce776a['diffData'][_0x56db3b]['attachChange'],_0x1bff2a=_0x3bebdd(_0xce776a['diffData'][_0x56db3b]['attributesAfter'])||{},_0x59af5c=this['_makeModelFromViewString'](_0xce776a['diffData'][_0x56db3b]['insertions']);_0x59af5c['rootName']=_0x56db3b,_0x59af5c['_isAttached']=!_0x568ac5||_0x568ac5['isAttached'],_0x59af5c['isAttached']=()=>_0x59af5c['_isAttached'],this['_diffRoots']['set'](_0x56db3b,_0x59af5c),this['_diffRootsAttributes']['set'](_0x56db3b,_0x1bff2a);const _0x2a104e=this['_makeIdsRoot'](_0x59af5c,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x56db3b,_0x2a104e),_0x201920['set'](_0x56db3b,_0x59af5c['isAttached']()?_0x1bff2a:{});for(const [_0x16aa5d,_0x7ddd1]of _0x59af5c['markers']){if(!_0x16aa5d['startsWith']('revision:'))continue;const _0x452c61=_0x16aa5d['split'](':')[0x2];for(const _0x22ede5 of _0x7ddd1['getWalker']({'singleCharacters':!0x0})){const _0x1c05da=this['_getVidAttributeName'](_0x22ede5),_0x5c02d7=this['_revisionId']++,_0x128c50='elementEnd'==_0x22ede5['type']?_0x22ede5['previousPosition']['path']['slice'](0x0,-0x1):_0x22ede5['previousPosition']['path'];_0x2a104e['getNodeByPath'](_0x128c50)['_setAttribute'](_0x1c05da,_0x5c02d7),this['_touched']['set'](_0x5c02d7,{'userId':_0x452c61});}}for(const _0x400c37 of this['editor']['model']['createRangeIn'](_0x59af5c)['getWalker']({'singleCharacters':!0x0})){const _0x4e325e=this['_getVidAttributeName'](_0x400c37),_0x6b85cc='elementEnd'==_0x400c37['type']?_0x400c37['previousPosition']['path']['slice'](0x0,-0x1):_0x400c37['previousPosition']['path'],_0x2b46ff=_0x2a104e['getNodeByPath'](_0x6b85cc);_0x2b46ff['getAttribute'](_0x4e325e)>0x0||_0x2b46ff['_setAttribute'](_0x4e325e,_0x1b7c5d[_0x2ac3b7++]);}for(const [_0x4069f3,_0x5912fa]of _0x59af5c['markers'])_0x4069f3['startsWith']('revision:')||this['_markers']['set'](_0x4069f3,_0x5912fa);}const _0x1e86a9=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x1e86a9),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1e86a9,0x1));const _0x37bfe=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x37bfe),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x37bfe,0x1));const _0x4b600f=Array['from'](this['_diffRoots'])['map'](([_0xbaa5b6,_0x11125e])=>[_0xbaa5b6,T(_0x11125e)]);this['_saveMetaData'](this['_lastTo'],_0x4b600f,this['_markers'],_0x201920);}['_makeModelFromViewString'](_0x5b395c){const _0x4bfd2a=JSON['parse'](_0x5b395c),_0x531064=this['editor']['editing']['view']['document'],_0x30934e=new _0x2c3601(_0x531064,_0x4bfd2a['map'](_0x49863a=>C(_0x49863a,this['editor'])));return this['editor']['data']['toModel'](_0x30934e);}['_saveMetaData'](_0x52c960,_0x216666,_0x580947,_0x243a9e){const _0x370919=new Map(_0x216666),_0x2c46fc=new Map(_0x3bebdd(_0x243a9e)),_0x38c07a=new Map();for(const [_0x141367,_0x3e2fb9]of _0x580947)_0x38c07a['set'](_0x141367,{'start':_0x3e2fb9['start']['clone'](),'end':_0x3e2fb9['end']['clone'](),'rootName':_0x3e2fb9['root']['rootName']});this['_savedMetaData']['set'](_0x52c960,{'roots':_0x370919,'markers':_0x38c07a,'rootsAttributes':_0x2c46fc});}['_removeMetaData'](_0x44be12){this['_savedMetaData']['delete'](_0x44be12);}['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'](_0x356041,_0x18eeb5=null){let _0x159478=null;_0x356041['is']('documentFragment')||(_0x159478=new ft(_0x356041['name'],{'vid_start':null===_0x18eeb5?this['_revisionId']++:_0x18eeb5++}));const _0x30c047=[];for(const _0x6f5488 of _0x356041['getChildren']())if(_0x6f5488['is']('element')){_0x30c047['push'](this['_makeIdsRoot'](_0x6f5488,_0x18eeb5));const _0x42c8fa=_0x30c047[_0x30c047['length']-0x1];null!==_0x18eeb5&&(_0x18eeb5=_0x42c8fa['is']('element','$text')?_0x42c8fa['getAttribute']('vid')+0x1:_0x42c8fa['getAttribute']('vid_end')+0x1);}else{for(let _0x427496=0x0;_0x427496<_0x6f5488['offsetSize'];_0x427496++)_0x30c047['push'](new ft('$text',{'vid':null===_0x18eeb5?this['_revisionId']++:_0x18eeb5++}));}if(_0x356041['is']('documentFragment')){const _0x1bc934=F(_0x356041['rootName']);return _0x1bc934['_insertChild'](0x0,_0x30c047),_0x1bc934;}return _0x159478['_setAttribute']('vid_end',null===_0x18eeb5?this['_revisionId']++:_0x18eeb5++),_0x159478['_insertChild'](0x0,_0x30c047),_0x159478;}['_calculateMetaData'](_0x1d0212,_0x970cad,_0x5eb5c2){this['_reset']();const {roots:_0x32aac5,markers:_0x438838,rootsAttributes:_0xdf8724}=this['_savedMetaData']['get'](_0x1d0212);this['_baseRoots']=new Map(_0x32aac5),this['_baseRootsAttributes']=new Map(_0x3bebdd(_0xdf8724));for(const [_0x140481,_0xa28bfb]of this['_baseRoots'])if('$graveyard'!==_0x140481&&(this['_diffRoots']['set'](_0x140481,T(_0xa28bfb)),this['_diffRootsAttributes']=new Map(_0x3bebdd(_0xdf8724)),_0x5eb5c2)){const _0x3ce62f=this['_revisionId'];this['_idsRoots']['set'](_0x140481,this['_makeIdsRoot'](_0xa28bfb)),this['_baseIdsRoots']['set'](_0x140481,this['_makeIdsRoot'](_0xa28bfb,_0x3ce62f));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x5eb5c2&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1366e3,_0x5a747b]of _0x438838){const _0xa2d3ec=this['_baseRoots']['get'](_0x5a747b['rootName']),_0x590270=this['_diffRoots']['get'](_0x5a747b['rootName']),_0x40cec1=new vt(this['_fixPosition'](_0x5a747b['start'],_0xa2d3ec),this['_fixPosition'](_0x5a747b['end'],_0xa2d3ec)),_0x189a09=this['_fixRange'](_0x40cec1,_0x590270);_0xa2d3ec['markers']['set'](_0x1366e3,_0x40cec1),this['_markers']['set'](_0x1366e3,_0x189a09);}this['_applyOperations'](_0x1d0212,_0x970cad,_0x5eb5c2);}['_applyOperations'](_0x332958,_0x50aebc,_0x284243){for(const _0x4e4e6d of this['source']['getOperations'](_0x332958,_0x50aebc))this['_handleOperation'](_0x4e4e6d,_0x284243);for(const _0xc7e678 of this['_diffRoots']['values']())_0xc7e678['markers']['clear']();for(const [_0x12a301,_0x237ef7]of this['_markers']){this['_diffRoots']['get'](_0x237ef7['root']['rootName'])['markers']['set'](_0x12a301,_0x237ef7['clone']());}const _0x33c549=new Map(),_0x226d1c=new Map();for(const [_0x4e5d89,_0x112c09]of this['_diffRoots'])_0x33c549['set'](_0x4e5d89,T(_0x112c09)),_0x226d1c['set'](_0x4e5d89,this['_diffRootsAttributes']['get'](_0x4e5d89));this['_saveMetaData'](_0x50aebc,_0x33c549,this['_markers'],_0x226d1c);}['_getPreviousFrom'](_0x430edd){const _0xebf95c=Array['from'](this['_savedMetaData']['keys']());_0xebf95c['sort']((_0x165bb6,_0x4dc2dd)=>_0x165bb6-_0x4dc2dd),_0xebf95c['reverse']();for(const _0x52b80a of _0xebf95c)if(_0x52b80a<_0x430edd)return _0x52b80a;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x3a539f,_0x583250){const _0x4f66e5=Array['from'](_0x583250['markers'])['map'](([_0x45cae6,_0x1b23bb])=>[_0x45cae6,this['_fixRange'](_0x1b23bb,_0x3a539f)]);_0x3a539f['markers']=new Map(_0x4f66e5);}['_transformMarkers'](_0x3c3b4b){for(const _0x59779f of this['_markers']['values']()){const _0x30f20c=_0x59779f['getTransformedByOperation'](_0x3c3b4b),_0x993ac3=vt['_createFromRanges'](_0x30f20c);_0x59779f['start']=_0x993ac3['start'],_0x59779f['end']=_0x993ac3['end'];}}['_handleOperation'](_0x5c9d93,_0x1518a7){if('addRoot'!=_0x5c9d93['type']&&'detachRoot'!=_0x5c9d93['type']){if('insert'==_0x5c9d93['type']){const _0x1eb385=_0x5c9d93['position']['root']['rootName'];this['_diffRoots']['has'](_0x1eb385)||(this['_diffRoots']['set'](_0x1eb385,F(_0x1eb385,!0x0)),this['_diffRootsAttributes']['set'](_0x1eb385,{}),_0x1518a7&&this['_idsRoots']['set'](_0x1eb385,F(_0x1eb385,!0x0)));}else{if('addRootAttribute'==_0x5c9d93['type']||'removeRootAttribute'==_0x5c9d93['type']||'changeRootAttribute'==_0x5c9d93['type'])return void this['_handleRootAttributeOperation'](_0x5c9d93);'marker'==_0x5c9d93['type']&&this['_handleMarkerOperation'](_0x5c9d93);}if('marker'!==_0x5c9d93['type']){const _0xad848c=this['_cloneOperation'](_0x5c9d93,this['_diffRoots']);_0xad848c['_execute'](),this['_transformMarkers'](_0xad848c);}if(_0x1518a7)switch(_0x5c9d93['type']){case'insert':this['_handleInsertOperation'](_0x5c9d93);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5c9d93);break;case'merge':this['_handleMergeOperation'](_0x5c9d93);break;case'split':this['_handleSplitOperation'](_0x5c9d93);}}else this['_handleRootOperation'](_0x5c9d93,_0x1518a7);}['_cloneOperation'](_0x45c739,_0xb040f){const _0x4feee0=_0x45c739['clone']();return _0x4feee0['_authorId']=_0x45c739['_authorId'],this['_fixOperation'](_0x4feee0,_0xb040f),_0x4feee0;}['_getBaseVids'](_0x3d5a60){return _0x3d5a60['map'](_0x335b12=>{const _0x120f91=this['_getVidAttributeName'](_0x335b12);return Number(_0x335b12['item']['getAttribute'](_0x120f91));});}['_generateTape'](_0x218407,_0x2879a2){if(_0x218407['is']('element','$text'))_0x2879a2['push']({'item':_0x218407,'type':'text'});else{_0x218407['is']('element')&&_0x2879a2['push']({'item':_0x218407,'type':'elementStart'});for(const _0x421f00 of _0x218407['getChildren']())this['_generateTape'](_0x421f00,_0x2879a2);_0x218407['is']('element')&&_0x2879a2['push']({'item':_0x218407,'type':'elementEnd'});}return _0x2879a2;}['_getState'](){const _0x4d84d0=new Map(this['_touched']),_0x3f2577=new Map(_0x4d84d0),_0xfc6577=new Map(),_0x39956a={'insertions':{},'deletions':{}},_0x2654c7={'insertions':{},'deletions':{}},_0x44b3c1=new Map(),_0x4dc26e=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x4dc26e['delete']('$graveyard');for(const _0x199a58 of _0x4dc26e){const _0x4818f8=this['_diffRoots']['get'](_0x199a58)||F(_0x199a58,!0x1),_0x219b42=this['_baseRoots']['get'](_0x199a58)||F(_0x199a58,!0x1);_0x4818f8['isAttached']()||_0x219b42['isAttached']()?(_0x39956a['insertions'][_0x199a58]=T(_0x4818f8),_0x39956a['deletions'][_0x199a58]=T(_0x219b42),this['_copyMarkers'](_0x39956a['deletions'][_0x199a58],_0x219b42),this['_copyMarkers'](_0x39956a['insertions'][_0x199a58],_0x4818f8),_0x2654c7['insertions'][_0x199a58]=this['_generateTape'](this['_idsRoots']['get'](_0x199a58),[]),_0x2654c7['deletions'][_0x199a58]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x199a58)||F(_0x199a58,!0x1),[])):_0x4dc26e['delete'](_0x199a58);}for(const _0x5d1666 of _0x4dc26e){const _0x4780f1=_0x2654c7['insertions'][_0x5d1666];for(const _0x312c2c of _0x4780f1){const _0x359162=this['_getVidAttributeName'](_0x312c2c),_0x470f2a=_0x312c2c['item']['getAttribute'](_0x359162);_0x3f2577['delete'](_0x470f2a),_0x470f2a>=this['_startingRevisionId']&&_0xfc6577['set'](_0x470f2a,_0x4d84d0['get'](_0x470f2a));}}for(const _0x28b1ec of _0x4dc26e){const _0x1b6e57=_0x2654c7['insertions'][_0x28b1ec],_0x383f7b=this['_getBaseVids'](_0x2654c7['deletions'][_0x28b1ec]);let _0x5b7a70=0x0;for(const _0x5e813d of _0x1b6e57){const _0x5d6494=this['_getVidAttributeName'](_0x5e813d),_0x37250b=_0x5e813d['item']['getAttribute'](_0x5d6494);if(!_0xfc6577['has'](_0x37250b)&&!_0x44b3c1['has'](_0x37250b)){if(_0x3f2577['has'](_0x37250b))_0x5b7a70++;else{if(_0x37250b!=_0x383f7b[_0x5b7a70]){const _0x58831f=_0x4d84d0['get'](_0x37250b)||_0x4d84d0['get'](_0x383f7b[_0x5b7a70]);for(;_0x37250b!=_0x383f7b[_0x5b7a70];)_0x3f2577['has'](_0x383f7b[_0x5b7a70])||(_0x44b3c1['set'](_0x383f7b[_0x5b7a70],_0x58831f),_0x4d84d0['set'](_0x383f7b[_0x5b7a70],_0x58831f)),_0x5b7a70++;}_0x5b7a70++;}}}}for(const _0x3bab62 of _0x4dc26e){const _0x579e01=_0x2654c7['insertions'][_0x3bab62];for(const _0x5eef7d of _0x579e01){const _0x507719=this['_getVidAttributeName'](_0x5eef7d),_0x2973b4=_0x5eef7d['item']['getAttribute'](_0x507719);if(_0x44b3c1['has'](_0x2973b4)){const _0xa2179a=_0x44b3c1['get'](_0x2973b4);_0x3f2577['has'](_0x2973b4)||_0x3f2577['set'](_0x2973b4,{..._0xa2179a}),_0xfc6577['set'](_0x2973b4,{..._0xa2179a});}}}for(const _0x4d2353 of _0x3f2577['keys']())_0x4d2353>=this['_startingRevisionId']&&_0x3f2577['delete'](_0x4d2353);const _0x24e12e=new Map();for(const _0x3f6ad8 of _0x4dc26e){let _0x25284e=_0x2654c7['insertions'][_0x3f6ad8];for(const _0xcc0588 of _0x25284e)if(_0xcc0588['item']['is']('element','tableCell')){const _0x377ee7=this['_getVidAttributeName'](_0xcc0588),_0x4740a9=_0xcc0588['item']['getAttribute'](_0x377ee7);if(_0xfc6577['has'](_0x4740a9)){const _0x273068=_0xcc0588['item']['parent']['parent']['getAttribute']('vid_start'),_0x5cf431=_0x24e12e['get'](_0x273068)||new Set();_0x5cf431['add'](_0xfc6577['get'](_0x4740a9)['userId']),_0x24e12e['set'](_0x273068,_0x5cf431);}}_0x25284e=_0x2654c7['deletions'][_0x3f6ad8];for(const _0x496817 of _0x25284e)if(_0x496817['item']['is']('element','tableCell')){const _0x3684b2=this['_getVidAttributeName'](_0x496817),_0xad0f30=_0x496817['item']['getAttribute'](_0x3684b2);if(_0x3f2577['has'](_0xad0f30)){const _0x3564cf=_0x496817['item']['parent']['parent']['getAttribute']('vid_start'),_0x9eb29a=_0x24e12e['get'](_0x3564cf)||new Set();_0x9eb29a['add'](_0x3f2577['get'](_0xad0f30)['userId']),_0x24e12e['set'](_0x3564cf,_0x9eb29a);}}for(const _0xc0abae of _0x24e12e['keys']())(_0xfc6577['has'](_0xc0abae)||_0x3f2577['has'](_0xc0abae))&&_0x24e12e['delete'](_0xc0abae);}for(const _0x535bed of _0x4dc26e){const _0x2e5879=_0x2654c7['insertions'][_0x535bed];let _0x27afc3=null,_0xc9d95f=null;for(const _0x153a7f of _0x2e5879){const _0x105caf=this['_getVidAttributeName'](_0x153a7f),_0x1cf3e7=_0x153a7f['item']['getAttribute'](_0x105caf),_0x218939=_0x24e12e['get'](_0x1cf3e7);_0x218939&&'elementStart'==_0x153a7f['type']&&(_0x27afc3=Array['from'](_0x218939)[0x0],_0xc9d95f=_0x153a7f['item']['getAttribute']('vid_end')),_0x27afc3&&(_0x3f2577['set'](_0x1cf3e7,{'userId':_0x27afc3}),_0xfc6577['set'](_0x1cf3e7,{'userId':_0x27afc3})),_0x1cf3e7==_0xc9d95f&&(_0x27afc3=null,_0xc9d95f=null);}}const _0x283f2b={},_0x3bb6fb=new Set();for(const _0xf820fd of _0x4dc26e){const _0x57e7e0=_0x39956a['deletions'][_0xf820fd],_0x323b56=_0x39956a['insertions'][_0xf820fd];for(const {userId:_0x7b633a}of this['_touchedMarkers']['values']())null!==_0x7b633a&&_0x3bb6fb['add'](_0x7b633a);for(const {userId:_0x302de8}of this['_touchedRoots']['values']())null!==_0x302de8&&_0x3bb6fb['add'](_0x302de8);this['_markChanges'](_0x323b56,_0x2654c7['insertions'][_0xf820fd],_0xfc6577,'insertion',_0x3bb6fb),this['_markChanges'](_0x57e7e0,_0x2654c7['deletions'][_0xf820fd],_0x3f2577,'deletion',_0x3bb6fb),_0x283f2b[_0xf820fd]={'insertions':this['_prepareViewToSave'](_0x323b56),'deletions':this['_prepareViewToSave'](_0x57e7e0),'attachChange':this['_touchedRoots']['get'](_0xf820fd)||null,'attributesBefore':_0x3bebdd(this['_baseRootsAttributes']['get'](_0xf820fd))||{},'attributesAfter':_0x3bebdd(this['_diffRootsAttributes']['get'](_0xf820fd))};}return{'diffData':_0x283f2b,'authorsIds':Array['from'](_0x3bb6fb)};}['_processRootBeforeSave'](_0x2a3999){for(const [,_0x35876f]of _0x2a3999['markers']){const _0xf20ad7=_0x35876f['start']['getAncestors']()['filter'](_0x5d25a4=>'tableCell'==_0x5d25a4['name']);for(const _0x1a4cfa of _0xf20ad7)0x1==_0x1a4cfa['childCount']&&_0x1a4cfa['getChild'](0x0)['is']('element','paragraph')&&_0x1a4cfa['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5c3dec){this['_processRootBeforeSave'](_0x5c3dec);const _0x428bc0=this['editor']['data']['toView'](_0x5c3dec,{}),_0x589a6f=Array['from'](_0x428bc0['getChildren']())['map'](_0x3029d8=>this['_getViewJson'](_0x3029d8));return JSON['stringify'](_0x589a6f);}['_getViewJson'](_0x460552){if(_0x460552['is']('$text'))return _0x460552['data'];{const _0x4eaffb=_0x460552;return{'type':Object['keys'](P)['find'](_0xaaadf0=>_0x460552 instanceof P[_0xaaadf0]),'name':_0x4eaffb['name'],'attributes':Array['from'](_0x4eaffb['getAttributes']()),'children':Array['from'](_0x4eaffb['getChildren']())['map'](_0x49e61a=>this['_getViewJson'](_0x49e61a))};}}['_markChanges'](_0x1b24e3,_0x23b785,_0x109552,_0x109a03,_0x1ba646){let _0x5167df=null,_0x125eb4=null,_0x44bdc3=0x0;const _0x38e552=this['editor']['model'];for(let _0x2587c7=0x0;_0x2587c7<_0x23b785['length'];_0x2587c7++){const _0x1b21db=this['_getVidAttributeName'](_0x23b785[_0x2587c7]),_0x2a8712=_0x23b785[_0x2587c7]['item']['getAttribute'](_0x1b21db),_0x5834ab=_0x109552['get'](_0x2a8712),_0x206f2a=_0x2587c7==_0x23b785['length']-0x1;(!_0x5167df&&_0x5834ab&&(_0x5167df=_0x5834ab,_0x125eb4=_0x23b785[_0x2587c7]),_0x5167df&&(!_0x5834ab||_0x5834ab['userId']!=_0x5167df['userId']))&&(_0x5ee37f(_0x5834ab,B(_0x125eb4,_0x1b24e3,_0x38e552),B(_0x23b785[_0x2587c7],_0x1b24e3,_0x38e552)),_0x5167df=_0x5834ab||null,_0x125eb4=_0x5834ab?_0x23b785[_0x2587c7]:null),_0x5167df&&_0x206f2a&&_0x5ee37f(_0x5834ab,B(_0x125eb4,_0x1b24e3,_0x38e552),J(_0x23b785[_0x2587c7],_0x1b24e3,_0x38e552));}function _0x5ee37f(_0x40b2b7,_0x56b12b,_0x2da52a){const _0x178416=_0x5167df['userId'],_0x55647b='revision:'+_0x109a03+':'+_0x178416+':'+_0x44bdc3++,_0x18fd93=_0x38e552['createRange'](_0x56b12b,_0x2da52a);_0x1b24e3['markers']['set'](_0x55647b,_0x18fd93),null!==_0x178416&&_0x1ba646['add'](_0x178416);}}['_getVidAttributeName'](_0x22aa34){switch(_0x22aa34['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3bf09a,_0x225767){_0x3bf09a['baseVersion']=null;for(const _0x306166 in _0x3bf09a){const _0x368dc3=_0x3bf09a[_0x306166];if(_0x368dc3 instanceof gt){const _0x1c5c44=_0x225767['get'](_0x368dc3['root']['rootName']);_0x3bf09a[_0x306166]=this['_fixPosition'](_0x368dc3,_0x1c5c44);}if(_0x368dc3 instanceof vt){const _0x296699=_0x225767['get'](_0x368dc3['root']['rootName']);_0x3bf09a[_0x306166]=this['_fixRange'](_0x368dc3,_0x296699);}'root'===_0x306166&&(_0x3bf09a['root']=_0x225767['get'](_0x3bf09a['root']['rootName']));}}['_fixRange'](_0x2ecd17,_0x171662){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2ecd17['start'],_0x171662),this['_fixPosition'](_0x2ecd17['end'],_0x171662));}['_fixPosition'](_0x1036b7,_0x1116ec){return this['editor']['model']['createPositionFromPath'](_0x1116ec,_0x1036b7['path'],_0x1036b7['stickiness']);}['_handleInsertOperation'](_0x4bc474){const _0x423d3f=this['_idsRoots']['get'](_0x4bc474['position']['root']['rootName']),_0x4e500b=this['_fixPosition'](_0x4bc474['position'],_0x423d3f),_0xf4a369=null===_0x4bc474['_authorId']?null:_0x4bc474['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3c3319=_0x4e500b['parent'],_0x381672=this['_revisionId'],_0x2844ac=[];for(const _0x371192 of _0x4bc474['nodes'])if(_0x371192['is']('element'))_0x2844ac['push'](this['_makeIdsRoot'](_0x371192));else{for(let _0x5e37b6=0x0;_0x5e37b6<_0x371192['offsetSize'];_0x5e37b6++)_0x2844ac['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x506ed3=this['_revisionId'];for(let _0x17484e=_0x381672;_0x17484e<_0x506ed3;_0x17484e++)this['_touched']['set'](_0x17484e,{'userId':_0xf4a369});_0x3c3319['_insertChild'](_0x4e500b['offset'],_0x2844ac);}['_handleMoveOperation'](_0x128e24){(_0x128e24=this['_cloneOperation'](_0x128e24,this['_idsRoots']))['_execute']();const _0x2c4455=null===_0x128e24['_authorId']?null:_0x128e24['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4df2ee=_0x128e24['getMovedRangeStart'](),_0x37b372=_0x4df2ee['parent'],_0x53e602=_0x4df2ee['offset'];!function _0x110f18(_0x2a683e,_0x3a9fe4,_0x520330,_0x9f5251){for(let _0x5f1990=_0x520330;_0x5f1990<_0x9f5251;_0x5f1990++){const _0x50f9d9=_0x3a9fe4['getChild'](_0x5f1990);_0x50f9d9['is']('element','$text')?_0x2a683e['set'](_0x50f9d9['getAttribute']('vid'),{'userId':_0x2c4455}):(_0x2a683e['set'](_0x50f9d9['getAttribute']('vid_start'),{'userId':_0x2c4455}),_0x110f18(_0x2a683e,_0x50f9d9,0x0,_0x50f9d9['childCount']),_0x2a683e['set'](_0x50f9d9['getAttribute']('vid_end'),{'userId':_0x2c4455}));}}(this['_touched'],_0x37b372,_0x53e602,_0x53e602+_0x128e24['howMany']);}['_handleMergeOperation'](_0x7edc27){const _0x7b54df=null===(_0x7edc27=this['_cloneOperation'](_0x7edc27,this['_idsRoots']))['_authorId']?null:_0x7edc27['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d69b8=_0x7edc27['targetPosition']['parent'],_0x4962d3=_0x7edc27['sourcePosition']['parent'],_0x305606=_0x4d69b8['getAttribute']('vid_end'),_0x3ec6b9=_0x4962d3['getAttribute']('vid_start');_0x4d69b8['_setAttribute']('vid_end',_0x4962d3['getAttribute']('vid_end')),_0x4962d3['_setAttribute']('vid_end',_0x305606),this['_touched']['set'](_0x3ec6b9,{'userId':_0x7b54df}),this['_touched']['set'](_0x305606,{'userId':_0x7b54df}),_0x7edc27['_execute']();}['_handleSplitOperation'](_0x3ac52c){const _0x441437=null===(_0x3ac52c=this['_cloneOperation'](_0x3ac52c,this['_idsRoots']))['_authorId']?null:_0x3ac52c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x582cc8=_0x3ac52c['graveyardPosition'],_0xf33631=_0x3ac52c['splitPosition']['parent'];_0x3ac52c['_execute']();const _0x3fea01=_0xf33631['getAttribute']('vid_end'),_0x15f9bf=_0x3ac52c['insertionPosition']['nodeAfter'];if(_0x582cc8){const _0xc80fcf=_0x15f9bf['getAttribute']('vid_end'),_0x43b12e=_0xf33631['getAttribute']('vid_end');_0xf33631['_setAttribute']('vid_end',_0xc80fcf),_0x15f9bf['_setAttribute']('vid_end',_0x43b12e),this['_touched']['set'](_0xf33631['getAttribute']('vid_end'),{'userId':_0x441437}),this['_touched']['set'](_0x15f9bf['getAttribute']('vid_start'),{'userId':_0x441437});}else{const _0xb29f85=this['_revisionId']++,_0x39eaf5=this['_revisionId']++;_0xf33631['_setAttribute']('vid_end',_0xb29f85),_0x15f9bf['_setAttribute']('vid_start',_0x39eaf5),_0x15f9bf['_setAttribute']('vid_end',_0x3fea01),this['_touched']['set'](_0xb29f85,{'userId':_0x441437}),this['_touched']['set'](_0x39eaf5,{'userId':_0x441437});}}['_handleMarkerOperation'](_0x340450){if(!_0x340450['affectsData'])return;const _0x51baf1=(_0x340450=this['_cloneOperation'](_0x340450,this['_diffRoots']))['oldRange']?_0x340450['oldRange']['root']:null,_0x2ef30c=_0x340450['newRange']?_0x340450['newRange']['root']:null;_0x51baf1&&this['_markers']['delete'](_0x340450['name']),_0x2ef30c&&this['_markers']['set'](_0x340450['name'],_0x340450['newRange']['clone']());const _0x288c64=null===_0x340450['_authorId']?null:_0x340450['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f9833=_0x340450['name'];if(!this['_touchedMarkers']['has'](_0x4f9833))return void this['_touchedMarkers']['set'](_0x4f9833,{'range':_0x340450['oldRange'],'userId':_0x288c64});const _0x1098ea=this['_touchedMarkers']['get'](_0x4f9833),_0x561af3=_0x1098ea['range'],_0x56f219=_0x340450['newRange'];null==_0x561af3&&null==_0x56f219||_0x561af3&&_0x56f219&&_0x561af3['isEqual'](_0x56f219)?this['_touchedMarkers']['delete'](_0x340450['name']):_0x1098ea['userId']=_0x288c64;}['_handleRootOperation'](_0x47e4fd,_0x1e0826){this['_diffRoots']['has'](_0x47e4fd['rootName'])?this['_diffRoots']['get'](_0x47e4fd['rootName'])['_isAttached']=_0x47e4fd['isAdd']:(this['_diffRoots']['set'](_0x47e4fd['rootName'],F(_0x47e4fd['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x47e4fd['rootName'],{}),_0x1e0826&&this['_idsRoots']['set'](_0x47e4fd['rootName'],F(_0x47e4fd['rootName'],!0x0)));const _0x189a1c=null===_0x47e4fd['_authorId']?null:_0x47e4fd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f7770=this['_touchedRoots']['get'](_0x47e4fd['rootName']);_0x1f7770&&_0x1f7770['userId']===_0x189a1c?this['_touchedRoots']['delete'](_0x47e4fd['rootName']):this['_touchedRoots']['set'](_0x47e4fd['rootName'],{'userId':_0x189a1c,'isAttached':_0x47e4fd['isAdd']});}['_handleRootAttributeOperation'](_0x5dc038){const _0x4b26bd=this['_diffRootsAttributes']['get'](_0x5dc038['root']['rootName']);null===_0x5dc038['newValue']?delete _0x4b26bd[_0x5dc038['key']]:_0x4b26bd[_0x5dc038['key']]=_0x5dc038['newValue'];}}function T(_0x22c168){const _0x510b4a=F(_0x22c168['rootName'],_0x22c168['isAttached']());for(const _0x373324 of _0x22c168['getChildren']()){const _0x3690bb=_0x373324['_clone'](!0x0);_0x510b4a['_appendChild'](_0x3690bb);}return _0x510b4a;}function F(_0x577403,_0x366661=!0x0){const _0x32a47e=new mt();return _0x32a47e['rootName']=_0x577403,_0x32a47e['_isAttached']=_0x366661,_0x32a47e['isAttached']=()=>_0x32a47e['_isAttached'],_0x32a47e;}function B(_0x19f81c,_0x14c7e2,_0x2dd307){const _0x2760bb='elementEnd'==_0x19f81c['type']?_0x2dd307['createPositionAt'](_0x19f81c['item'],'end'):_0x2dd307['createPositionBefore'](_0x19f81c['item']);return _0x2dd307['createPositionFromPath'](_0x14c7e2,_0x2760bb['path'],_0x2760bb['stickiness']);}function J(_0x270060,_0x4fad32,_0xb21ed2){const _0x1ca072='elementStart'==_0x270060['type']?_0xb21ed2['createPositionAt'](_0x270060['item'],0x0):_0xb21ed2['createPositionAfter'](_0x270060['item']);return _0xb21ed2['createPositionFromPath'](_0x4fad32,_0x1ca072['path'],_0x1ca072['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3f9d02,_0xfc011a){super(_0x3f9d02),this['focusTracker']=new _0x4cb843(),this['keystrokes']=new _0x162a7a(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0xfc011a),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x52e3fd(this);}['render'](){super['render'](),_0x4d8186({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x2285c0=_0x4d454e=>_0x4d454e['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2285c0),this['keystrokes']['set']('arrowleft',_0x2285c0),this['keystrokes']['set']('arrowup',_0x2285c0),this['keystrokes']['set']('arrowdown',_0x2285c0);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x491c1e){this['revisionNameInputView']['fieldView']['element']['value']=_0x491c1e['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x39e034){const _0x16e028=new _0x3701ba(this['locale'],_0x21eb44),_0x2d4cfa=_0x16e028['fieldView'];_0x2d4cfa['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x9c4053=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x39e034&&(_0x9c4053+='\x20('+m(this['locale'],'optional')+')'),(_0x16e028['label']=_0x9c4053,_0x2d4cfa['on']('input',()=>{this['revisionNameInputValue']=_0x2d4cfa['element']['value']['trim']();}),_0x16e028);}}class u extends _0x3494fb{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x258ad1=this['editor'],_0x27cff7=_0x258ad1['plugins']['get']('RevisionTracker');_0x258ad1['ui']['componentFactory']['add']('revisionHistory',_0x1f859b=>{const _0x677f12=_0x31f333(_0x1f859b),_0x5ea333=_0x677f12['panelView']['children'],_0x1e5dc1=new _0x3be14a(_0x1f859b),_0x2bd70a=new _0x37fdfc(_0x1f859b),_0x3cb2c3=new te(_0x1f859b),_0x5513bb=new _0x37fdfc(_0x1f859b),_0x1b99d3=new te(_0x1f859b);return _0x677f12['bind']('isEnabled')['to'](_0x27cff7,'isReady',_0x27cff7,'isEnabled',_0x258ad1,'isReadOnly',(_0x693398,_0x1a09c4,_0xe391f6)=>_0x693398&&_0x1a09c4&&!_0xe391f6),_0x677f12['buttonView']['set']({'icon':_0x351c88['history'],'label':m(_0x1f859b,'Revision\x20history'),'tooltip':!0x0}),_0x3cb2c3['set']({'label':m(_0x1f859b,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x3cb2c3['bind']('isEnabled')['to'](_0x27cff7,'isReady',_0x27cff7,'isEnabled',_0x258ad1,'isReadOnly',(_0x22e44f,_0x141b7f,_0x1d0d8f)=>_0x22e44f&&_0x141b7f&&!_0x1d0d8f),_0x3cb2c3['on']('execute',()=>this['_showDialog']()),_0x1b99d3['set']({'label':m(_0x1f859b,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x1b99d3['bind']('isEnabled')['to'](_0x27cff7,'isReady',_0x258ad1,'isReadOnly',(_0x2a7a9c,_0x4b7981)=>_0x2a7a9c&&!_0x4b7981),_0x1b99d3['on']('execute',()=>{_0x258ad1['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x677f12['isOpen']=!0x1,_0x258ad1['editing']['view']['focus']();}),_0x2bd70a['children']['add'](_0x3cb2c3),_0x5513bb['children']['add'](_0x1b99d3),_0x1e5dc1['role']='menu',_0x1e5dc1['items']['addMany']([_0x2bd70a,_0x5513bb]),_0x5ea333['add'](_0x1e5dc1),_0x677f12;}),_0x258ad1['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x14b351=this['editor'],_0x813ca0=_0x14b351['locale'],_0x4d274a=new _0x3f9623(_0x813ca0),_0x50d956=new _0x2db903(_0x813ca0);_0x4d274a['buttonView']['set']({'icon':_0x351c88['history'],'label':m(_0x813ca0,'Revision\x20history')});const _0x453c6c=new _0x265cfc(_0x813ca0,_0x4d274a),_0x5adb55=new _0x2a0176(_0x813ca0);_0x5adb55['set']({'label':m(_0x813ca0,'Save\x20current\x20revision')}),_0x5adb55['delegate']('execute')['to'](_0x4d274a),_0x5adb55['on']('execute',()=>{this['_showDialog']();}),_0x453c6c['children']['add'](_0x5adb55),_0x50d956['items']['add'](_0x453c6c);const _0x477ca0=new _0x265cfc(_0x813ca0,_0x4d274a),_0x37f6c7=new _0x2a0176(_0x813ca0);return _0x37f6c7['set']({'label':m(_0x813ca0,'Open\x20revision\x20history')}),_0x37f6c7['delegate']('execute')['to'](_0x4d274a),_0x37f6c7['on']('execute',()=>{_0x14b351['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x477ca0['children']['add'](_0x37f6c7),_0x50d956['items']['add'](_0x477ca0),_0x4d274a['panelView']['children']['add'](_0x50d956),_0x4d274a;}['_showDialog'](){const _0xd00021=this['editor'],_0x8fe911=_0xd00021['locale'],_0x448862=_0xd00021['plugins']['get']('Dialog'),_0x457418=_0xd00021['plugins']['get']('RevisionTracker');function _0x2e8571(_0x13e4a4){_0xd00021['config']['get']('revisionHistory.requireRevisionName')&&''===_0x13e4a4['revisionName']?_0x13e4a4['revisionNameInputView']['errorText']=m(_0x8fe911,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0xd00021['plugins']['get'](l)['saveRevision']({'name':_0x13e4a4['revisionName']}),_0x448862['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x2e8571(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x448862['show']({'id':'revisionSave','title':m(_0x8fe911,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0xd00021['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x448862['hide']()},{'label':m(_0xd00021['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5d1d58){_0x5d1d58['bind']('isEnabled')['to'](_0x457418,'isReady',_0x457418,'isEnabled',_0xd00021,'isReadOnly',(_0x465c84,_0x549066,_0x4bc958)=>_0x465c84&&_0x549066&&!_0x4bc958);},'onExecute':()=>_0x2e8571(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x316bc3=this['editor'],_0x425e24=_0x316bc3['locale'];this['_saveRevisionFormView']=new hs(_0x425e24,_0x316bc3['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends ts{['changeId'];['_model'];constructor(_0x2c5722,_0x490116){super(_0x2c5722),this['_model']=_0x490116,this['changeId']=_0x490116['id'];const _0x175f4d=this['bindTemplate'],_0x3b96dc=m(_0x2c5722,_0x490116['data']['isSuggestion']?'Suggested\x20by':'add'==_0x490116['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x490116['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x175f4d['to']('type',_0x38cba8=>'ck-revision-change__'+_0x38cba8)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x3b96dc}]},{'text':'\x20'+_0x490116['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x2efc47(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2f425c){super(),this['id']=_0x2f425c['id']||_0x370f5b(),this['author']=_0x2f425c['author'],this['type']=_0x2f425c['type'],this['data']=_0x2f425c['data']||{},this['rootName']=_0x2f425c['rootName'],this['set']('createdAt',_0x2f425c['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(_0x4e23b4,_0x1e536d){this['newRevisionId']=_0x4e23b4,this['oldRevisionId']=_0x1e536d,this['changes']=new _0x1aa1e7();}['_setChanges'](_0x4bfd02){for(const _0x1c89bd of _0x4bfd02)this['changes']['add'](_0x1c89bd);}}const Y={'c':_0x4085a3,'a':_0x21393e,'e':_0x55b6d9,'r':_0x156c3d,'u':_0x10755e};class d extends _0x3494fb{['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[_0x550701,_0x5233a0,j];}constructor(_0x1a203f){super(_0x1a203f),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',(_0x5047cc,_0x49701d,_0x4a570b)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3645d9=>{for(const _0x1e5f59 of this['editor']['editing']['view']['document']['roots'])_0x4a570b?_0x3645d9['removeClass']('ck-editor__editable__overlay',_0x1e5f59):_0x3645d9['addClass']('ck-editor__editable__overlay',_0x1e5f59);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x444238=>null!==_0x444238),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3eee4e,_0x36f672,_0x135666)=>_0x3eee4e&&_0x135666?_0x36f672['changes']['getIndex'](_0x135666):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xa29ba1,_0x1f7003)=>_0xa29ba1?_0x1f7003['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x5233a0);}['init'](){const _0x31ebdb=this['editor'],_0x54df68=new _t(_0x31ebdb,{'direction':'backward'}),_0x2a6eb1=new _t(_0x31ebdb,{'direction':'forward'});(_0x31ebdb['commands']['add']('showPreviousChange',_0x54df68),_0x31ebdb['commands']['add']('showNextChange',_0x2a6eb1),_0x31ebdb['commands']['add']('restoreRevision',new pt(_0x31ebdb)),this['on']('change:numberOfChanges',()=>{_0x54df68['refresh'](),_0x2a6eb1['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x31ebdb['enableReadOnlyMode']('revision-viewer'),_0x31ebdb['plugins']['has']('WidgetToolbarRepository'))&&_0x31ebdb['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x5a86ac){await this['loadRevisionData'](_0x5a86ac);const _0x53fbe7={};for(const _0x19f708 in _0x5a86ac['diffData']){if(_0x5a86ac['diffData'][_0x19f708]['attachChange']&&!_0x5a86ac['diffData'][_0x19f708]['attachChange']['isAttached'])continue;const _0x5914e7=this['_removeRevisionMarkers'](JSON['parse'](_0x5a86ac['diffData'][_0x19f708]['insertions'])),_0x1167e2=this['editor']['editing']['view']['document'],_0x41107d=new _0x2c3601(_0x1167e2,_0x5914e7['map'](_0x25cc40=>this['_getViewObj'](_0x25cc40)));this['editor']['data']['processor']['useFillerType']('marked'),_0x53fbe7[_0x19f708]=this['editor']['data']['processor']['toData'](_0x41107d),this['editor']['data']['processor']['useFillerType']('default');}return _0x53fbe7;}async['getRevisionRootsAttributes'](_0x30acdb){await this['loadRevisionData'](_0x30acdb);const _0x8ce5b={};for(const _0x25cdc1 in _0x30acdb['diffData'])_0x30acdb['diffData'][_0x25cdc1]['attachChange']&&!_0x30acdb['diffData'][_0x25cdc1]['attachChange']['isAttached']||(_0x8ce5b[_0x25cdc1]=_0x30acdb['diffData'][_0x25cdc1]['attributesAfter']||{});return _0x8ce5b;}['_removeRevisionMarkers'](_0x132032){return(_0x132032=_0x132032['filter'](_0x415dc2=>!_0x415dc2['name']||'revision-start'!==_0x415dc2['name']&&'revision-end'!==_0x415dc2['name']))['forEach'](_0x14a792=>{'string'!=typeof _0x14a792&&(_0x14a792['children']=this['_removeRevisionMarkers'](_0x14a792['children']),_0x14a792['attributes']=_0x14a792['attributes']['filter'](_0x551b22=>!_0x551b22[0x0]['startsWith']('data-revision-')));}),_0x132032;}async['compare'](_0x27ae1a,_0x5c5841,_0x179381=!0x1){if(!this['isEnabled'])return;const _0x50d751=this['diff'],_0x136ff2=this['repository'],_0x189839='string'==typeof _0x27ae1a?_0x136ff2['getRevision'](_0x27ae1a):_0x27ae1a,_0xaaa5ef='string'==typeof _0x5c5841?_0x136ff2['getRevision'](_0x5c5841):_0x5c5841,_0x21e243=_0x189839['id'],_0x411e03=_0xaaa5ef?_0xaaa5ef['id']:null;if(!_0x179381&&this['diff']&&this['diff']['newRevisionId']===_0x21e243&&this['diff']['oldRevisionId']===_0x411e03)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x21e243,_0x411e03);const _0x1a2f4a=this['_getRevisionsRange'](_0x189839,_0xaaa5ef,!0x0)['map'](_0x48a88a=>this['loadRevisionData'](_0x48a88a));return _0x1a2f4a['push'](new Promise(_0x3d67ea=>{setTimeout(_0x3d67ea,0x14);})),Promise['all'](_0x1a2f4a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x425ac0=this['_getDiff'](_0x21e243,_0x411e03);for(const _0x3dd477 of _0x425ac0['changes'])this['_changeIdToChange']['set'](_0x3dd477['id'],_0x3dd477);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5918d8=>{for(const _0x537a7d of this['editor']['model']['document']['getRootNames']())_0x5918d8['detachRoot'](_0x537a7d);for(const _0xebfa21 of Object['keys'](_0x425ac0['model'])){const _0x2db9eb=_0x5918d8['addRoot'](_0xebfa21);for(const _0x3a394e of Object['keys'](_0x425ac0['attributes'][_0xebfa21]))_0x5918d8['setAttribute'](_0x3a394e,_0x425ac0['attributes'][_0xebfa21][_0x3a394e],_0x2db9eb);_0x5918d8['insert'](_0x425ac0['model'][_0xebfa21],_0x2db9eb,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x425ac0['changes'])),this['isReady']=!0x0;})['catch'](_0x3cfeab=>{console['error'](_0x3cfeab),this['_cleanUp'](),_0x50d751&&(this['diff']=_0x50d751),this['isReady']=!0x0;});}['addRevisionData'](_0x15ee21,_0x10baf1){const _0x464afa=this['repository']['createRevision'](_0x15ee21);return _0x464afa['on']('_update',(_0x3580b4,_0x2a0711,_0x55c62e)=>_0x10baf1(_0x2a0711,_0x55c62e,_0x464afa)),this['repository']['addRevision'](_0x464afa),_0x464afa;}['loadRevisionData'](_0x4fd0b2){if(!_0x4fd0b2||_0x4fd0b2['diffData'])return Promise['resolve']();{const _0x9e5ed8=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x9e5ed8,'revisionId':_0x4fd0b2['id']})['then'](_0x2236f2=>{_0x4fd0b2['_update']({'diffData':_0x2236f2['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},_0xc61acc=>{for(const _0x4f0e1c of this['editor']['model']['document']['getRootNames']())_0xc61acc['detachRoot'](_0x4f0e1c);});}['_sortAndFilterDiffChanges'](_0x2e05b3){const _0x593a9c=[],_0x41d1b0=new Map();for(const _0x14c8c4 of this['editor']['model']['document']['getRootNames']()){const _0x3a71fa=this['editor']['editing']['view']['getDomRoot'](_0x14c8c4);if(!_0x3a71fa)continue;const _0x976689=_0x3a71fa['getClientRects']()['item'](0x0);_0x976689&&(_0x593a9c['push'](_0x14c8c4),_0x41d1b0['set'](_0x14c8c4,_0x976689));}return _0x593a9c['sort']((_0x363152,_0x535ec0)=>{const _0x43fd3a=_0x41d1b0['get'](_0x363152),_0x3b79f1=_0x41d1b0['get'](_0x535ec0);return _0x43fd3a['y']-_0x3b79f1['y']||_0x43fd3a['x']-_0x3b79f1['x'];}),(_0x2e05b3=_0x2e05b3['filter'](_0x13e546=>_0x593a9c['includes'](_0x13e546['rootName'])))['sort']((_0x178e74,_0x347326)=>_0x593a9c['indexOf'](_0x178e74['rootName'])-_0x593a9c['indexOf'](_0x347326['rootName'])),_0x2e05b3;}['_makeTape'](_0x9cc7a7){const _0x3a72bc=Array['from'](_0x9cc7a7['markers'])['filter'](([_0x418599,_0x1f4fa3])=>_0x418599['startsWith']('revision:')&&!_0x1f4fa3['isCollapsed']),_0x30f825=Array['from'](this['editor']['model']['createRangeIn'](_0x9cc7a7)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3a72bc['length'])for(const _0x4ec48b of _0x30f825){const [_0x18923c,_0x34eade]=_0x3a72bc[0x0],[,_0x447ca1,_0x3b289a]=_0x18923c['split'](':');if(_0x34eade['end']['isEqual'](_0x4ec48b['nextPosition'])&&_0x3a72bc['shift'](),(_0x4ec48b['previousPosition']['isEqual'](_0x34eade['start'])||_0x4ec48b['previousPosition']['isAfter'](_0x34eade['start']))&&('insertion'==_0x447ca1?_0x4ec48b['isAdded']={'userId':_0x3b289a}:'deletion'==_0x447ca1&&(_0x4ec48b['isRemoved']={'userId':_0x3b289a})),0x0==_0x3a72bc['length'])break;}return _0x30f825;}['_refreshStartEndIndex'](_0xc8e47a){const _0xea4f36=new Map();for(let _0x4774ee=0x0;_0x4774ee<_0xc8e47a['length'];_0x4774ee++)'text'===_0xc8e47a[_0x4774ee]['type']?(_0xc8e47a[_0x4774ee]['item']['startIndex']=_0x4774ee,_0xc8e47a[_0x4774ee]['item']['endIndex']=_0x4774ee):('elementStart'===_0xc8e47a[_0x4774ee]['type']?_0xc8e47a[_0x4774ee]['item']['startIndex']=_0x4774ee:'elementEnd'===_0xc8e47a[_0x4774ee]['type']&&(_0xc8e47a[_0x4774ee]['item']['endIndex']=_0x4774ee),_0xea4f36['set'](_0xc8e47a[_0x4774ee]['id'],_0x4774ee));for(const _0x1f3a05 of _0xea4f36['values']())'elementStart'===_0xc8e47a[_0x1f3a05]['type']?_0xc8e47a[_0x1f3a05]['item']['endIndex']=_0xea4f36['get'](_0xc8e47a[_0x1f3a05]['pairId']):'elementEnd'===_0xc8e47a[_0x1f3a05]['type']&&(_0xc8e47a[_0x1f3a05]['item']['startIndex']=_0xea4f36['get'](_0xc8e47a[_0x1f3a05]['pairId']));}['_processTape'](_0xf5d08f){for(let _0x54494a=0x0;_0x54494a<_0xf5d08f['length'];_0x54494a++){if('elementStart'===_0xf5d08f[_0x54494a]['type'])_0xf5d08f[_0x54494a]['item']['startIndex']=_0x54494a;else{if('elementEnd'===_0xf5d08f[_0x54494a]['type']){_0xf5d08f[_0x54494a]['item']['endIndex']=_0x54494a;const _0x309315=_0xf5d08f[_0x54494a]['item']['startIndex'];_0xf5d08f[_0x309315]['pairId']=_0xf5d08f[_0x54494a]['id'],_0xf5d08f[_0x54494a]['pairId']=_0xf5d08f[_0x309315]['id'];}else _0xf5d08f[_0x54494a]['item']['startIndex']=_0x54494a,_0xf5d08f[_0x54494a]['item']['endIndex']=_0x54494a,_0xf5d08f[_0x54494a]['pairId']=null;}_0xf5d08f[_0x54494a]['markersStart']||(_0xf5d08f[_0x54494a]['markersStart']=[],_0xf5d08f[_0x54494a]['markersEnd']=[]);}}['_markInsertions'](_0x5368fe,_0x8512f4){const _0x310c0f=_0x5368fe['filter'](_0x1e74fe=>!_0x1e74fe['isAdded']);for(let _0x4a24be=0x0;_0x4a24be<_0x8512f4['length'];_0x4a24be++)_0x8512f4[_0x4a24be]['isAdded']&&(_0x310c0f[_0x4a24be]['isAdded']=_0x8512f4[_0x4a24be]['isAdded']);}['_makeModelFromViewString'](_0x54cbd6){const _0x29b663=JSON['parse'](_0x54cbd6),_0x292ab6=this['editor']['editing']['view']['document'],_0x1384e0=new _0x2c3601(_0x292ab6,_0x29b663['map'](_0x36ac08=>this['_getViewObj'](_0x36ac08)));return this['editor']['data']['toModel'](_0x1384e0);}['_getViewObj'](_0x558777){const _0x51a5d4=this['editor']['editing']['view']['document'];if('string'==typeof _0x558777)return new _0x6c429f(_0x51a5d4,_0x558777);{const _0x2d4b2c=_0x558777['children']['map'](_0x4154b1=>this['_getViewObj'](_0x4154b1));return new(Y[_0x558777['type']]||_0xcb3cb1)(_0x51a5d4,_0x558777['name'],_0x558777['attributes'],_0x2d4b2c);}}['_getDiff'](_0x31a1e5,_0x42ef30=null){const _0x3810f6=this['repository']['getRevision'](_0x31a1e5),_0x366e16=_0x42ef30?this['repository']['getRevision'](_0x42ef30):null,_0x3f5c50=this['_getRevisionsRange'](_0x3810f6,_0x366e16),_0x61daf3=_0x3f5c50[_0x3f5c50['length']-0x1],_0x27f37b=new Map(),_0x465bcd={'model':{},'attributes':{},'changes':[]},_0x3c8af0=new Set(),_0x1113ff=new Map();for(let _0x2a7038=_0x3f5c50['length']-0x1;_0x2a7038>=0x0;_0x2a7038--){const _0x25afff=_0x3f5c50[_0x2a7038];for(const _0x689163 of Object['keys'](_0x25afff['diffData']))if(_0x25afff['diffData'][_0x689163]['attachChange']){const _0x391819=_0x25afff['diffData'][_0x689163]['attachChange'];_0x391819['isAttached']?(_0x3c8af0['add'](_0x689163),_0x1113ff['has'](_0x689163)&&_0x1113ff['get'](_0x689163)['userId']==_0x391819['userId']?_0x1113ff['delete'](_0x689163):_0x1113ff['set'](_0x689163,_0x391819)):_0x1113ff['has'](_0x689163)?(_0x3c8af0['delete'](_0x689163),_0x1113ff['delete'](_0x689163)):(_0x3c8af0['add'](_0x689163),_0x1113ff['set'](_0x689163,_0x391819));}else _0x3c8af0['add'](_0x689163);}for(const _0x565269 of _0x3c8af0){const _0x4a93c3=_0x1113ff['has'](_0x565269)&&!_0x1113ff['get'](_0x565269)['isAttached'];let _0xa26085=_0x4a93c3?_0x3f5c50['length']-0x1:0x0;const _0x289367=_0x4a93c3?-0x1:0x1;for(;_0x3f5c50[_0xa26085];){const _0x252a1f=_0x3f5c50[_0xa26085];if(_0x252a1f['diffData'][_0x565269]){const _0xdcf325=_0x4a93c3?_0x252a1f['diffData'][_0x565269]['attributesBefore']:_0x252a1f['diffData'][_0x565269]['attributesAfter'];_0x465bcd['attributes'][_0x565269]=_0xdcf325?_0x3bebdd(_0xdcf325):{};break;}_0xa26085+=_0x289367;}}for(const _0x3cb21d of _0x3f5c50){_0x3cb21d['model']={};for(const _0x4b0355 of _0x3cb21d['authors'])_0x27f37b['set'](_0x4b0355['id'],_0x4b0355);for(const _0x4fef3e of _0x3c8af0){const _0x4e0add=_0x3cb21d['diffData'][_0x4fef3e]?_0x3cb21d['diffData'][_0x4fef3e]['insertions']:'[]',_0x5c6e8d=_0x3cb21d['diffData'][_0x4fef3e]?_0x3cb21d['diffData'][_0x4fef3e]['deletions']:'[]';_0x3cb21d['model'][_0x4fef3e]={'insertions':this['_makeModelFromViewString'](_0x4e0add),'deletions':this['_makeModelFromViewString'](_0x5c6e8d)};}}for(const _0x4f519a of _0x3c8af0){let _0x3e504d=null,_0x2921e1=0x0;const _0x40a048=new Map(Array['from'](_0x3810f6['model'][_0x4f519a]['insertions']['markers'])['filter'](([_0x6cc6b4])=>!_0x6cc6b4['startsWith']('revision:')));let _0x314f7d=0x0;for(const _0x1a6081 of _0x3f5c50){const _0xfcd058=this['_makeTape'](_0x1a6081['model'][_0x4f519a]['insertions']);_0x1a6081==_0x3810f6?(_0x3e504d=_0xfcd058,_0x2921e1=_0x3e504d['length'],_0x3e504d['forEach'](_0x1701d6=>{_0x1701d6['id']=_0x314f7d++;}),this['_processTape'](_0x3e504d)):this['_markInsertions'](_0x3e504d,_0xfcd058);const _0x145198=_0x3e504d['filter'](_0x5bbb76=>!_0x5bbb76['isAdded'])['map'](_0x5806e5=>_0x5806e5['id']);let _0x1bb140=0x0;const _0x4806fc=this['_makeTape'](_0x1a6081['model'][_0x4f519a]['deletions']);_0x4806fc['forEach'](_0x5b2ffa=>{_0x5b2ffa['isRemoved']?_0x5b2ffa['id']=_0x2921e1++:_0x5b2ffa['id']=_0x145198[_0x1bb140++];}),this['_processTape'](_0x4806fc),this['_setDistance'](_0x3e504d,'isAdded'),this['_setDistance'](_0x4806fc,'isRemoved'),_0x1a6081==_0x3810f6&&this['_markMarkers'](_0x3e504d,_0x40a048),_0x3e504d=this['_joinTapes'](_0x3e504d,_0x4806fc),this['_refreshStartEndIndex'](_0x3e504d),this['_setDistance'](_0x3e504d,'isRemoved');}_0x3e504d=_0x3e504d['filter'](_0x11bab3=>!(_0x11bab3['isAdded']&&_0x11bab3['isRemoved']));const _0x307643=new Map(_0x61daf3['model'][_0x4f519a]['deletions']['markers']),_0x5ee759=new Set(_0x40a048['keys']());for(const _0x1e3c16 of _0x307643['keys']())_0x5ee759['delete'](_0x1e3c16);this['_markSuggestions'](_0x3e504d,_0x5ee759),this['_fixObsoleteTags'](_0x3e504d),_0x3e504d=this['_removeMissingPairs'](_0x3e504d),_0x3e504d=this['_markMismatchedRemovedTags'](_0x3e504d),_0x3e504d=this['_removeUnsupportedChanges'](_0x3e504d);const {root:_0x1e5d5d,changes:_0x4f8f77}=this['_makeModelFromTape'](_0x3e504d,_0x27f37b,_0x4f519a);_0x465bcd['model'][_0x4f519a]=_0x1e5d5d;const _0x4c2820=_0x1113ff['get'](_0x4f519a);if(_0x4c2820){const _0x34ae95=_0x27f37b['get'](_0x4c2820['userId']),_0x50610e=new r({'author':_0x34ae95,'type':_0x4c2820['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4f519a});_0x4f8f77['unshift'](_0x50610e),_0x465bcd['attributes'][_0x4f519a]['revisionHistoryAttachChange']=_0x50610e['id'];}_0x465bcd['changes']=_0x465bcd['changes']['concat'](_0x4f8f77);}return _0x465bcd;}['_markMarkers'](_0x2d9e34,_0x312bb0){for(let _0x3beb84=0x0;_0x3beb84<_0x2d9e34['length'];_0x3beb84++)for(const [_0x350585,_0x1f569a]of _0x312bb0)_0x1f569a['start']['isEqual'](_0x2d9e34[_0x3beb84]['previousPosition'])&&_0x2d9e34[_0x3beb84]['markersStart']['push'](_0x350585),_0x1f569a['end']['isEqual'](_0x2d9e34[_0x3beb84]['nextPosition'])&&_0x2d9e34[_0x3beb84]['markersEnd']['push'](_0x350585);}['_joinTapes'](_0x3cfee6,_0x27a1fc){let _0x13af63=[],_0x572b93=0x0,_0x7f9fd7=0x0;for(;_0x572b93<_0x3cfee6['length']||_0x7f9fd7<_0x27a1fc['length'];){const _0x5d5838=_0x3cfee6[_0x572b93]||{},_0x1c80fc=_0x27a1fc[_0x7f9fd7]||{};if(_0x5d5838['id']==_0x1c80fc['id'])_0x572b93++,_0x7f9fd7++,_0x13af63['push'](_0x5d5838);else{if(_0x1c80fc['isRemoved']&&_0x5d5838['isAdded']){const {commonTape:_0x44d2f9,iEnd:_0x6a1f73,jEnd:_0x17461b}=this['_threeWayMerge'](_0x3cfee6,_0x572b93,_0x27a1fc,_0x7f9fd7);_0x13af63=_0x13af63['concat'](_0x44d2f9),_0x572b93=_0x6a1f73,_0x7f9fd7=_0x17461b;}else _0x1c80fc['isRemoved']?(_0x7f9fd7++,_0x13af63['push'](_0x1c80fc)):(_0x572b93++,_0x13af63['push'](_0x5d5838));}}return _0x13af63;}['_markSuggestions'](_0x390de8,_0x55c842){const _0x32a826=[];for(let _0x24f814=0x0;_0x24f814<_0x390de8['length'];_0x24f814++){for(let _0x4b246a=0x0;_0x4b246a<_0x390de8[_0x24f814]['markersStart']['length'];_0x4b246a++){const _0x12ee72=_0x390de8[_0x24f814]['markersStart'][_0x4b246a];if(!_0x55c842['has'](_0x12ee72))continue;const {group:_0x360555,type:_0x378660,authorId:_0x101f5}=_0xb59266(_0x12ee72);'revision-suggestion'!=_0x360555||'insertion'!=_0x378660&&'deletion'!=_0x378660||(_0x32a826['unshift']({'type':_0x378660,'name':_0x12ee72,'userId':_0x101f5}),_0x390de8[_0x24f814]['markersStart']['splice'](_0x4b246a,0x1),_0x4b246a--);}_0x54bf1f(_0x390de8[_0x24f814]);for(let _0x2429d2=0x0;_0x2429d2<_0x390de8[_0x24f814]['markersEnd']['length'];_0x2429d2++){const _0x2311cf=_0x390de8[_0x24f814]['markersEnd'][_0x2429d2];if(!_0x55c842['has'](_0x2311cf))continue;const {group:_0x430d60,type:_0x47ef50}=_0xb59266(_0x2311cf);if('revision-suggestion'!=_0x430d60||'insertion'!=_0x47ef50&&'deletion'!=_0x47ef50)continue;_0x390de8[_0x24f814]['markersEnd']['splice'](_0x2429d2,0x1),_0x2429d2--;const _0x4bc041=_0x32a826['findIndex'](_0x453aaf=>_0x453aaf['name']==_0x2311cf);_0x4bc041>-0x1&&_0x32a826['splice'](_0x4bc041,0x1);}}function _0xb59266(_0x1bd27c){const _0xb92966=_0x1bd27c['split'](':');return{'group':_0xb92966[0x0],'type':_0xb92966[0x1],'subType':_0xb92966['length']>=0x5?_0xb92966[0x2]:null,'id':_0xb92966['length']<0x5?_0xb92966[0x2]:_0xb92966[0x3],'authorId':_0xb92966['length']<0x5?_0xb92966[0x3]:_0xb92966[0x4],'markerCount':0x6==_0xb92966['length']?_0xb92966[0x5]:null};}function _0x54bf1f(_0x5e03d2){for(let _0x41f550=0x0;_0x41f550<_0x32a826['length'];_0x41f550++){if(_0x5e03d2['isAdded']&&'insertion'==_0x32a826[_0x41f550]['type'])return _0x5e03d2['isAddSuggestion']=_0x32a826[_0x41f550],void delete _0x5e03d2['isAdded'];if(!_0x5e03d2['isAdded']&&!_0x5e03d2['isRemoved']&&'deletion'==_0x32a826[_0x41f550]['type'])return void(_0x5e03d2['isRemoveSuggestion']=_0x32a826[_0x41f550]);}}}['_setDistance'](_0x38b4a0,_0x6fcb1f){let _0x49bdbb=0x0,_0x232741=!0x1;const _0x5a1835=new Map();for(const _0x50ed16 of _0x38b4a0)_0x50ed16[_0x6fcb1f]?_0x232741&&(_0x49bdbb++,_0x232741=!0x1):(_0x49bdbb++,_0x232741=!0x0),_0x5a1835['set'](_0x50ed16['id'],_0x49bdbb);for(let _0x381469=0x0;_0x381469<_0x38b4a0['length'];_0x381469++){if('isRemoved'==_0x6fcb1f&&_0x38b4a0[_0x381469]['isAdded']||'isAdded'==_0x6fcb1f&&_0x38b4a0[_0x381469]['isRemoved'])continue;if('text'==_0x38b4a0[_0x381469]['type']){_0x38b4a0[_0x381469]['distance']=0x0;continue;}const _0x79dfee=_0x5a1835['get'](_0x38b4a0[_0x381469]['pairId']),_0x487aaa=_0x5a1835['get'](_0x38b4a0[_0x381469]['id']);_0x38b4a0[_0x381469]['distance']=_0x79dfee-_0x487aaa;}}['_getRevisionsRange'](_0x1ffa03,_0x382736,_0xe25f14=!0x1){const _0x44bf19=[];let _0x4ef20d=this['repository']['getIndex'](_0x1ffa03),_0x5dc3df=this['repository']['getIndex'](_0x382736);for(-0x1==_0x5dc3df&&(_0x5dc3df=this['repository']['_revisions']['length'],_0xe25f14=!0x1);_0x4ef20d<_0x5dc3df;)_0x44bf19['push'](this['repository']['getRevision'](_0x4ef20d)),_0x4ef20d++;return _0xe25f14&&_0x44bf19['push'](this['repository']['getRevision'](_0x4ef20d)),_0x44bf19;}['_threeWayMerge'](_0x1d320b,_0x363714,_0x3fad90,_0x151c50){const _0x54dd08=this['editor']['model']['schema'];let _0x52c3d3=_0x363714;for(;_0x1d320b[_0x52c3d3]&&_0x1d320b[_0x52c3d3]['isAdded'];)_0x52c3d3++;let _0x104108=_0x151c50;for(;_0x3fad90[_0x104108]&&_0x3fad90[_0x104108]['isRemoved'];)_0x104108++;_0x5b6b95(_0x1d320b,_0x363714,_0x52c3d3),_0x5b6b95(_0x3fad90,_0x151c50,_0x104108);const _0x3992c5=_0x3fad90['slice'](_0x151c50,_0x104108)['concat'](_0x1d320b['slice'](_0x363714,_0x52c3d3));return _0x3992c5['sort']((_0x5797b4,_0x250fbb)=>_0x5797b4['side']!=_0x250fbb['side']?_0x5797b4['side']-_0x250fbb['side']:_0x5797b4['level']!=_0x250fbb['level']?_0x5797b4['level']-_0x250fbb['level']:_0x5797b4['distance']!=_0x250fbb['distance']?_0x250fbb['distance']-_0x5797b4['distance']:!!_0x5797b4['isAdded']!=!!_0x250fbb['isAdded']?-0x1==_0x5797b4['side']||0x0==_0x5797b4['side']?_0x5797b4['isAdded']?-0x1:0x1:_0x5797b4['isAdded']?0x1:-0x1:_0x5797b4['index']-_0x250fbb['index']),{'commonTape':_0x3992c5,'iEnd':_0x52c3d3,'jEnd':_0x104108};function _0x5b6b95(_0x1de9fe,_0x521f7e,_0x1643d8){let _0x1f86ed=-0x1,_0x1fe2d3=Number['POSITIVE_INFINITY'],_0x5eb51f=!0x0;for(let _0x1ffc59=_0x521f7e;_0x1ffc59<_0x1643d8;_0x1ffc59++)if(_0x54dd08['isInline'](_0x1de9fe[_0x1ffc59]['item'])||(_0x5eb51f=!0x1),_0x1de9fe[_0x1ffc59]['item']['startIndex']<_0x521f7e&&(_0x1f86ed=_0x1ffc59),_0x1de9fe[_0x1ffc59]['item']['endIndex']>=_0x1643d8){_0x1fe2d3=_0x1ffc59;break;}_0x5eb51f&&(_0x1f86ed=_0x1643d8-0x1);for(let _0x2d6614=_0x521f7e;_0x2d6614<_0x1643d8;_0x2d6614++)_0x1de9fe[_0x2d6614]['side']=_0x2d6614<=_0x1f86ed?-0x1:_0x2d6614<_0x1fe2d3?0x0:0x1,_0x1de9fe[_0x2d6614]['index']=_0x2d6614;let _0x3da64a=0x0;for(let _0x42f1be=_0x521f7e;_0x42f1be<=_0x1f86ed;_0x42f1be++)0x0==_0x1de9fe[_0x42f1be]['distance']?_0x1de9fe[_0x42f1be]['level']=_0x3da64a:(_0x3da64a++,_0x1de9fe[_0x42f1be]['level']=_0x3da64a,_0x3da64a++);for(let _0x1f2671=_0x521f7e;_0x1f2671<_0x1643d8;_0x1f2671++)0x0==_0x1de9fe[_0x1f2671]['side']&&(_0x1de9fe[_0x1f2671]['level']=_0x3da64a);_0x3da64a=0x0;for(let _0x265f1a=_0x1643d8-0x1;_0x265f1a>=_0x1fe2d3;_0x265f1a--)0x0==_0x1de9fe[_0x265f1a]['distance']?_0x1de9fe[_0x265f1a]['level']=_0x3da64a:(_0x3da64a--,_0x1de9fe[_0x265f1a]['level']=_0x3da64a,_0x3da64a--);}}['_fixObsoleteTags'](_0x1e4846){const _0x505063=new Map(),_0x4e0a06=this['editor']['model']['schema'];for(let _0x1e69c7=0x1;_0x1e69c7<_0x1e4846['length'];_0x1e69c7++){let _0xa9e218,_0x1b61c0,_0x1ef22b;const _0x3165ff=_0x1e4846[_0x1e69c7],_0x130983=_0x1e4846[_0x1e69c7-0x1];if('text'==_0x3165ff['type'])continue;if(_0x3165ff['type']!=_0x130983['type'])continue;if(!_0x4e0a06['isBlock'](_0x130983['item'])||_0x4e0a06['isLimit'](_0x130983['item']))continue;if(!_0x4e0a06['isBlock'](_0x3165ff['item'])||_0x4e0a06['isLimit'](_0x3165ff['item']))continue;if((_0x1e4846[_0x1e69c7]['isAdded']||_0x1e4846[_0x1e69c7]['isAddSuggestion'])&&_0x1e4846[_0x1e69c7-0x1]['isRemoved'])_0xa9e218=_0x1e4846[_0x1e69c7],_0x1b61c0=_0x1e4846[_0x1e69c7-0x1],_0x1ef22b=_0x1e69c7-0x1;else{if(!_0x1e4846[_0x1e69c7]['isRemoved']||!_0x1e4846[_0x1e69c7-0x1]['isAdded']&&!_0x1e4846[_0x1e69c7-0x1]['isAddSuggestion'])continue;_0xa9e218=_0x1e4846[_0x1e69c7-0x1],_0x1b61c0=_0x1e4846[_0x1e69c7],_0x1ef22b=_0x1e69c7;}const _0x191a4c=_0xa9e218['level']==_0x1b61c0['level'],_0x5e3c17=Math['abs'](_0xa9e218['level'])<Math['abs'](_0x1b61c0['level'])&&0x0==_0x1b61c0['distance'];(_0x191a4c||_0x5e3c17)&&(_0x505063['set'](_0x1b61c0['id'],_0xa9e218['id']),_0x1e4846['splice'](_0x1ef22b,0x1),_0x1e69c7--,_0xa9e218['isAdded']=!0x1);}for(let _0x40e8a2=0x0;_0x40e8a2<_0x1e4846['length'];_0x40e8a2++)_0x505063['has'](_0x1e4846[_0x40e8a2]['pairId'])&&(_0x1e4846[_0x40e8a2]['pairId']=_0x505063['get'](_0x1e4846[_0x40e8a2]['pairId']));}['_removeMissingPairs'](_0x2d0649){const _0x24ddd6=new Set(_0x2d0649['map'](_0x332356=>_0x332356['id']));for(let _0x29b92e=0x0;_0x29b92e<_0x2d0649['length'];_0x29b92e++)_0x24ddd6['has'](_0x2d0649[_0x29b92e]['pairId'])||0x0==_0x2d0649[_0x29b92e]['distance']||(_0x2d0649[_0x29b92e]['isIncorrect']=!0x0);return _0x2d0649['filter'](_0x55bbce=>!_0x55bbce['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3fa4f3){const _0x5ad6b3=new Set();for(let _0x17e6b=0x0;_0x17e6b<_0x3fa4f3['length'];_0x17e6b++){if(_0x5ad6b3['has'](_0x3fa4f3[_0x17e6b]['id'])&&_0x3fa4f3[_0x17e6b]['isRemoved']&&(_0x3fa4f3[_0x17e6b]['isIncorrect']=!0x0),_0x3fa4f3[_0x17e6b]['isIncorrect'])continue;if(0x0==_0x3fa4f3[_0x17e6b]['distance'])continue;if('elementStart'!=_0x3fa4f3[_0x17e6b]['type'])continue;if(null==_0x3fa4f3[_0x17e6b]['pairId'])continue;let _0x99c01=_0x17e6b+0x1,_0x5529db=0x0;for(;_0x3fa4f3[_0x99c01]['id']!=_0x3fa4f3[_0x17e6b]['pairId'];)'elementStart'==_0x3fa4f3[_0x99c01]['type']?_0x5529db++:'elementEnd'==_0x3fa4f3[_0x99c01]['type']&&_0x5529db--,_0x99c01++;if(0x0!=_0x5529db){if(_0x3fa4f3[_0x17e6b]['isRemoved'])_0x3fa4f3[_0x17e6b]['isIncorrect']=!0x0;else{for(;_0x99c01!=_0x17e6b;)_0x3fa4f3[_0x99c01]['isRemoved']&&0x0!=_0x3fa4f3[_0x99c01]['distance']&&(_0x3fa4f3[_0x99c01]['isIncorrect']=!0x0,_0x5ad6b3['add'](_0x3fa4f3[_0x99c01]['pairId'])),_0x99c01--;}}}return _0x3fa4f3['filter'](_0x105573=>!_0x105573['isIncorrect']);}['_removeUnsupportedChanges'](_0x55ef98){const _0x582783=this['editor']['model']['schema'];for(let _0x683497=0x0;_0x683497<_0x55ef98['length'];_0x683497++){if(!(_0x55ef98[_0x683497]['isAdded']||_0x55ef98[_0x683497]['isAddSuggestion']||_0x55ef98[_0x683497]['isRemoved']||_0x55ef98[_0x683497]['isRemoveSuggestion']))continue;if(0x0==_0x55ef98[_0x683497]['distance'])continue;const _0x134185=_0x55ef98[_0x683497]['item'];_0x582783['isBlock'](_0x134185)||_0x582783['isLimit'](_0x134185)||(_0x55ef98[_0x683497]['isAdded']&&delete _0x55ef98[_0x683497]['isAdded'],_0x55ef98[_0x683497]['isAddSuggestion']&&delete _0x55ef98[_0x683497]['isAddSuggestion'],_0x55ef98[_0x683497]['isRemoveSuggestion']&&delete _0x55ef98[_0x683497]['isRemoveSuggestion'],_0x55ef98[_0x683497]['isRemoved']&&(_0x55ef98[_0x683497]['isIncorrect']=!0x0));}return _0x55ef98['filter'](_0x16e29e=>!_0x16e29e['isIncorrect']);}['_makeModelFromTape'](_0x498dc6,_0x1e5d87,_0x144165){const _0x4b485b=new mt(),_0x35f485=[],_0x3f8d34=new Map(),_0x143362=this['editor']['model'],_0x3b21e3=_0x143362['schema'],_0x40993b=[_0x4b485b],_0x274311={},_0x3d621e={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x295d53=null;const _0x19c55e=[0x0];for(let _0x2198c2=0x0;_0x2198c2<_0x498dc6['length'];_0x2198c2++)if('elementStart'===_0x498dc6[_0x2198c2]['type']){_0x498dc6[_0x2198c2]['previousPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e);const _0x20eb74=new ft(_0x498dc6[_0x2198c2]['item']['name'],_0x498dc6[_0x2198c2]['item']['getAttributes']());_0x40993b[0x0]['_appendChild'](_0x20eb74),_0x19c55e['push'](0x0),_0x40993b['unshift'](_0x20eb74),_0x498dc6[_0x2198c2]['nextPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e);}else'elementEnd'===_0x498dc6[_0x2198c2]['type']?(_0x40993b['shift'](),_0x498dc6[_0x2198c2]['previousPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e),_0x19c55e['pop'](),_0x19c55e[_0x19c55e['length']-0x1]++,_0x498dc6[_0x2198c2]['nextPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e)):(_0x498dc6[_0x2198c2]['previousPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e),_0x295d53?_0x295d53['_data']+=_0x498dc6[_0x2198c2]['item']['data']:_0x295d53=new wt(_0x498dc6[_0x2198c2]['item']['data'],_0x498dc6[_0x2198c2]['item']['getAttributes']()),_0x498dc6[_0x2198c2+0x1]&&'text'===_0x498dc6[_0x2198c2+0x1]['type']&&_0xf5fac7(_0x295d53,_0x498dc6[_0x2198c2+0x1]['item'])||(_0x40993b[0x0]['_appendChild'](_0x295d53),_0x295d53=null),_0x19c55e[_0x19c55e['length']-0x1]+=_0x498dc6[_0x2198c2]['item']['offsetSize'],_0x498dc6[_0x2198c2]['nextPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e));for(let _0x2f0f30=0x0;_0x2f0f30<_0x498dc6['length'];_0x2f0f30++){const _0x53ac50=_0x498dc6[_0x2f0f30]['previousPosition'],_0x410b30=_0x498dc6[_0x2f0f30]['nextPosition'];for(const _0x49696b of _0x498dc6[_0x2f0f30]['markersStart'])_0x3f8d34['set'](_0x49696b,{'start':_0x53ac50,'end':null});_0x3bca03('isRemoveSuggestion',_0x2f0f30,_0x53ac50,_0x410b30),_0x3bca03('isAddSuggestion',_0x2f0f30,_0x53ac50,_0x410b30),_0x3bca03('isRemoved',_0x2f0f30,_0x53ac50,_0x410b30),_0x3bca03('isAdded',_0x2f0f30,_0x53ac50,_0x410b30);for(const _0x590587 of _0x498dc6[_0x2f0f30]['markersEnd']){_0x3f8d34['get'](_0x590587)['end']=_0x410b30;}}for(const [_0x2eb425,_0x4b2173]of _0x3f8d34){const _0x531c0e=this['editor']['model']['createRange'](_0x4b2173['start'],_0x4b2173['end']);_0x4b485b['markers']['set'](_0x2eb425,_0x531c0e);}return _0x35f485['sort']((_0x3b9f9b,_0x5541f7)=>{const _0x1b4a88=_0x4b485b['markers']['get']('revision:'+_0x3b9f9b['id']),_0x3614fc=_0x4b485b['markers']['get']('revision:'+_0x5541f7['id']);return _0x1b4a88['start']['isBefore'](_0x3614fc['start'])?-0x1:_0x1b4a88['start']['isAfter'](_0x3614fc['start'])?0x1:_0x1b4a88['end']['isBefore'](_0x3614fc['end'])?-0x1:_0x1b4a88['end']['isAfter'](_0x3614fc['end'])?0x1:'add'===_0x3b9f9b['type']?-0x1:0x1;}),{'root':_0x4b485b,'changes':_0x35f485};function _0x3bca03(_0x5e5290,_0x408389,_0x345dd8,_0x36fe3e){const _0x21494e=!!_0x498dc6[_0x408389][_0x5e5290],_0x518c54=_0x21494e?_0x498dc6[_0x408389][_0x5e5290]['userId']:null,_0x48e9d8=_0x408389===_0x498dc6['length']-0x1,_0x134388=_0x3d621e[_0x5e5290][0x0],_0x9c6935=_0x3b21e3['isObject'](_0x498dc6[_0x408389]['item']);!_0x274311[_0x5e5290]&&_0x21494e?_0x274311[_0x5e5290]={'start':_0x345dd8,'tapeItem':_0x498dc6[_0x408389],'userId':_0x518c54,'type':_0x5e5290}:_0x274311[_0x5e5290]&&!_0x21494e?(_0x274311[_0x5e5290]['end']=_0x345dd8,_0x2f043f(_0x274311[_0x5e5290]),_0x274311[_0x5e5290]=null):_0x274311[_0x5e5290]&&_0x21494e&&_0x274311[_0x5e5290]['userId']!==_0x518c54&&(_0x274311[_0x5e5290]['end']=_0x345dd8,_0x134388&&_0x134388['userId']===_0x274311[_0x5e5290]['userId']||_0x2f043f(_0x274311[_0x5e5290]),_0x274311[_0x5e5290]={'start':_0x345dd8,'tapeItem':_0x498dc6[_0x408389],'userId':_0x518c54,'type':_0x5e5290}),_0x274311[_0x5e5290]&&_0x9c6935&&('elementStart'!==_0x498dc6[_0x408389]['type']||_0x134388&&_0x134388['userId']===_0x518c54||_0x3d621e[_0x5e5290]['unshift']({'userId':_0x518c54,'object':_0x498dc6[_0x408389]['item'],'change':_0x274311[_0x5e5290]}),'elementEnd'===_0x498dc6[_0x408389]['type']&&_0x134388&&_0x134388['object']===_0x498dc6[_0x408389]['item']&&(_0x3d621e[_0x5e5290]['shift'](),_0x274311[_0x5e5290]=_0x134388['change'])),_0x274311[_0x5e5290]&&_0x48e9d8&&(_0x274311[_0x5e5290]['end']=_0x36fe3e,_0x2f043f(_0x274311[_0x5e5290]),_0x274311[_0x5e5290]=null);}function _0x2f043f({start:_0x4e3538,end:_0x6e90fa,tapeItem:_0x38d632,userId:_0x33b75c,type:_0x319214}){const _0xfdcdd=_0x38d632['item'],_0x35d3c8=_0x143362['schema']['isBlock'](_0xfdcdd)&&!_0x143362['schema']['isLimit'](_0xfdcdd),_0x492717=_0x4e3538['nodeAfter']==_0x6e90fa['parent']&&_0x6e90fa['isAtStart'];if(_0x35d3c8&&_0x492717)return;const _0x5ed4bd=_0x143362['createRange'](_0x4e3538,_0x6e90fa),_0x45095c=_0x1e5d87['get'](_0x33b75c),_0x3fccae=new r({'author':_0x45095c,'type':'isAdded'==_0x319214||'isAddSuggestion'==_0x319214?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x319214||'isRemoveSuggestion'==_0x319214},'createdAt':new Date(),'rootName':_0x144165});_0x35f485['push'](_0x3fccae),_0x4b485b['markers']['set']('revision:'+_0x3fccae['id'],_0x5ed4bd);}function _0xf5fac7(_0x48a092,_0x3c73e1){const _0x4d8c95=_0x48a092['getAttributes'](),_0x59d3d6=_0x3c73e1['getAttributes']();for(const _0x26c6be of _0x4d8c95){if(_0x26c6be[0x1]!==_0x3c73e1['getAttribute'](_0x26c6be[0x0]))return!0x1;_0x59d3d6['next']();}return _0x59d3d6['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x28a61e=>{const _0x5bb842=_0x28a61e['markerName']['split'](':')[0x1],_0x1cf94f=this['_getChangeFromId'](_0x5bb842);if(!_0x1cf94f)return null;const _0x419011='add'==_0x1cf94f['type']?'insertion':'deletion',_0x41dfd2=['ck-suggestion-marker','ck-suggestion-marker-'+_0x419011];return _0x1cf94f['data']['isSuggestion']&&_0x41dfd2['push']('ck-suggestion-marker-'+_0x419011+'-new'),this['activeChange']==_0x1cf94f&&_0x41dfd2['push']('ck-suggestion-marker--active'),{'classes':_0x41dfd2,'attributes':{'data-change-id':_0x5bb842}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5dc5b7=>{_0x5dc5b7['on']('element:pre',(_0x646c59,_0x4ccf76,_0x5d2b80)=>{const _0xe50331=_0x4ccf76['viewItem']['getChild'](0x0);if(!_0xe50331||!_0xe50331['is']('element','code'))return;if(!_0x5d2b80['consumable']['consume'](_0xe50331,{'attributes':['vid_start','vid_end']}))return;const _0x8080e0=_0x4ccf76['modelRange']['start']['nodeAfter'];_0x5d2b80['writer']['setAttribute']('vid_start',_0xe50331['getAttribute']('vid_start'),_0x8080e0),_0x5d2b80['writer']['setAttribute']('vid_end',_0xe50331['getAttribute']('vid_end'),_0x8080e0);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x389e92=>{_0x389e92['on']('element',(_0x6ceb77,_0x4837c4,_0x526746)=>{if(!_0x526746['consumable']['consume'](_0x4837c4['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4837c4['modelRange']['isCollapsed'])return;const _0x1f602d=_0x4837c4['modelRange']['start']['nodeAfter'];_0x1f602d['hasAttribute']('vid_start')||_0x1f602d['hasAttribute']('vid')||(_0x526746['writer']['setAttribute']('vid_start',_0x4837c4['viewItem']['getAttribute']('vid_start'),_0x1f602d),_0x526746['writer']['setAttribute']('vid_end',_0x4837c4['viewItem']['getAttribute']('vid_end'),_0x1f602d));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x861b07=>_0x861b07['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4e5866,[,_0x4a9858])=>{['vid_start','vid_end','vid']['includes'](_0x4a9858)&&(_0x4e5866['return']=!0x0,_0x4e5866['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x388a22=>{_0x388a22['on']('attribute:vid',(_0x34b433,_0x315a46,_0x2bde2c)=>{if('\x20'!=_0x315a46['item']['data']||_0x315a46['item']['parent']['maxOffset']>0x1)return;if(!_0x2bde2c['consumable']['consume'](_0x315a46['item'],_0x34b433['name']))return;const _0x519be9=_0x2bde2c['writer'],_0x2aadb7=_0x2bde2c['mapper']['toViewRange'](_0x315a46['range']);_0x519be9['wrap'](_0x2aadb7,_0x519be9['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2def15){const _0x5bdcb1=_0x2def15['plugins']['get']('RevisionViewer');return(_0x103032,_0x2449e2,_0x4f8a0d)=>{const _0x175f6d=_0x2449e2['markerName']['split'](':')[0x1],_0x15e386=_0x5bdcb1['_getChangeFromId'](_0x175f6d);if(!_0x15e386)return null;const _0x55c09d='add'==_0x15e386['type']?'split':'merge';if(!_0x4f8a0d['consumable']['test'](_0x2449e2['markerRange'],_0x103032['name']))return;const _0x515611=_0x2449e2['markerRange']['getWalker'](),_0x11adf4=_0x2449e2['markerRange']['start'],_0x1381fe=_0x2def15['model']['schema'];let _0x4070ca=null,_0x4123c5=null,_0x268c1d=!0x1,_0x3d4e64=!0x1;for(const _0x301863 of _0x515611){const _0x3515cc=_0x301863['item'];_0x268c1d=_0x268c1d||_0x1381fe['isContent'](_0x3515cc);const _0x1b0313=_0x4f8a0d['mapper']['toViewElement'](_0x3515cc);if(_0x1b0313&&_0x1b0313['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x301863['type']&&(_0x1381fe['isBlock'](_0x3515cc)&&!_0x1381fe['isLimit'](_0x3515cc)&&(_0x3515cc['nextSibling']||_0x11adf4['isAtEnd']?_0x4070ca&&_0x4070ca['parent']==_0x3515cc||(_0x4070ca=_0x3515cc,_0x1534d6(_0x301863['previousPosition']),_0x3d4e64=!0x0):_0x4123c5=_0x4123c5||_0x301863['previousPosition']));}function _0x1534d6(_0x415a67){const _0x55d088=_0x4f8a0d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x55c09d}),_0xd3fe26=_0x4f8a0d['mapper']['toViewPosition'](_0x415a67);_0x15e386['data']['isSuggestion']&&_0x4f8a0d['writer']['addClass']('ck-suggestion-marker-'+_0x55c09d+'-new',_0x55d088),_0x5bdcb1['activeChange']==_0x15e386&&_0x4f8a0d['writer']['addClass']('ck-suggestion-marker--active',_0x55d088),_0x4f8a0d['writer']['insert'](_0xd3fe26,_0x55d088),_0x4f8a0d['mapper']['bindElementToMarker'](_0x55d088,_0x2449e2['markerName']);}_0x268c1d||_0x3d4e64||!_0x4123c5||_0x1534d6(_0x4123c5);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x5c5388,_0x142221,_0x30ecee)=>{const _0xe5e22b=_0x30ecee['mapper']['markerNameToElements'](_0x142221['markerName']);if(_0xe5e22b){for(const _0x3424ba of _0xe5e22b)(_0x3424ba['hasClass']('ck-suggestion-marker-split')||_0x3424ba['hasClass']('ck-suggestion-marker-merge'))&&(_0x30ecee['mapper']['unbindElementFromMarkerName'](_0x3424ba,_0x142221['markerName']),_0x30ecee['writer']['remove'](_0x3424ba));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3e67d7,_0x58931d,_0x285737)=>{const _0x488cc9=_0x58931d['markerName']['split'](':')[0x1],_0x56e66c=this['_getChangeFromId'](_0x488cc9);if(!_0x56e66c)return null;const _0xfb0ad6='add'==_0x56e66c['type']?'split':'merge';if(_0x285737['consumable']['test'](_0x58931d['markerRange'],_0x3e67d7['name']))for(const _0xe7e5c3 of _0x58931d['markerRange']['getItems']()){if(!_0xe7e5c3['is']('element','softBreak'))continue;const _0x3109f2=_0x285737['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xfb0ad6}),_0x3143c8=_0x285737['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xe7e5c3));_0x56e66c['data']['isSuggestion']&&_0x285737['writer']['addClass']('ck-suggestion-marker-'+_0xfb0ad6+'-new',_0x3109f2),this['activeChange']==_0x56e66c&&_0x285737['writer']['addClass']('ck-suggestion-marker--active',_0x3109f2),_0x285737['writer']['insert'](_0x3143c8,_0x3109f2),_0x285737['mapper']['bindElementToMarker'](_0x3109f2,_0x58931d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3eaa58=>{for(const _0xf4865d of this['editor']['model']['document']['getRootNames']()){const _0x2c2cab=this['editor']['model']['document']['getRoot'](_0xf4865d),_0x58619d=this['editor']['editing']['view']['document']['getRoot'](_0xf4865d);if(_0x58619d){const _0x52e0c2=_0x2c2cab['getAttribute']('revisionHistoryAttachChange');if(_0x3eaa58['removeAttribute']('data-change-id',_0x58619d),_0x3eaa58['removeClass']('ck-revision-history-root-add',_0x58619d),_0x3eaa58['removeClass']('ck-revision-history-root-remove',_0x58619d),_0x3eaa58['removeClass']('ck-revision-history-root--active',_0x58619d),_0x52e0c2){const _0xfe185=this['_getChangeFromId'](_0x52e0c2);if(!_0xfe185)return null;_0x3eaa58['setAttribute']('data-change-id',_0x52e0c2,_0x58619d),_0x3eaa58['addClass']('ck-revision-history-root-'+_0xfe185['type'],_0x58619d),this['activeChange']==_0xfe185&&_0x3eaa58['addClass']('ck-revision-history-root--active',_0x58619d);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4f5ca8=>'revision-comment:'+_0x4f5ca8,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x26678b=>'revision-suggestion:'+_0x26678b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x774384=>({'name':'suggestion:'+_0x774384,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5b8b95=>{const _0x1f25f6=_0x5b8b95['markerName']['split'](':')[0x1];return'insertion'!=_0x1f25f6&&'deletion'!=_0x1f25f6?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1f25f6]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1f63ce,_0x3398ae,_0x3a5029)=>{const _0x38bc59=_0x3a5029['mapper']['markerNameToElements'](_0x3398ae['markerName']);if(_0x38bc59){for(const _0x1f91d7 of _0x38bc59)_0x1f91d7['is']('uiElement')&&(_0x3a5029['mapper']['unbindElementFromMarkerName'](_0x1f91d7,_0x3398ae['markerName']),_0x3a5029['writer']['remove'](_0x1f91d7));}},{'priority':'high'});}['_getChangeFromId'](_0x1eeff6){return this['_changeIdToChange']['get'](_0x1eeff6);}['_getViewForChange'](_0x4e8402){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x4e8402),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x37f2db,_0x15fd21,_0x2f7bc1,_0x1530f7)=>{_0x1530f7&&this['_balloon']['remove'](_0x1530f7),_0x2f7bc1&&(this['_balloon']['add']({'view':_0x2f7bc1,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x3acb9c=this['editor']['editing'],_0x4a7dd3=this['_getChangeFromId'](_0x2f7bc1['changeId']);let _0xac23a0;if(_0x4a7dd3['data']['isOnRoot']){const _0x2e7c37=_0x3acb9c['view']['getDomRoot'](_0x4a7dd3['rootName']);_0xac23a0=Array['from'](_0x2e7c37['getClientRects']());}else{const _0x5cbe7b=this['editor']['model']['markers']['get']('revision:'+_0x2f7bc1['changeId']);_0xac23a0=Array['from'](_0x3acb9c['mapper']['markerNameToElements'](_0x5cbe7b['name']))['map'](_0x3944a5=>_0x3acb9c['view']['domConverter']['mapViewToDom'](_0x3944a5))['map'](_0x3130b7=>Array['from'](_0x3130b7['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0xac23a0[0x0];return _0xac23a0['find'](_0x571682=>_0x571682['top']-0x3<=this['_activeViewTarget']['y']&&_0x571682['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x571682['left']-0x3<=this['_activeViewTarget']['x']&&_0x571682['right']+0x3>=this['_activeViewTarget']['x'])||_0xac23a0[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x44af0b,_0x53aa6e,_0x3007e7,_0x17a36b)=>{this['activeView']=_0x3007e7?this['_getViewForChange'](_0x3007e7):null,this['editor']['model']['change'](()=>{const _0x861e47=this['editor']['editing'];_0x17a36b&&(_0x17a36b['data']['isOnRoot']?_0x861e47['view']['change'](_0x5b8e82=>{_0x5b8e82['removeClass']('ck-revision-history-root--active',_0x861e47['view']['document']['getRoot'](_0x17a36b['rootName']));}):_0x861e47['reconvertMarker']('revision:'+_0x17a36b['id'])),_0x3007e7&&(_0x3007e7['data']['isOnRoot']?_0x861e47['view']['change'](_0x48d69f=>{_0x48d69f['addClass']('ck-revision-history-root--active',_0x861e47['view']['document']['getRoot'](_0x3007e7['rootName']));}):_0x861e47['reconvertMarker']('revision:'+_0x3007e7['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1a44f2,_0x535b1c)=>{if(this['activeChange'])return;const _0x39aded=this['_findChangeIdFromDomTarget'](_0x535b1c['target']),_0x317df9=this['_changeIdToChange']['get'](_0x39aded);_0x317df9?(this['_activeViewTarget']={'x':_0x535b1c['domEvent']['x'],'y':_0x535b1c['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x317df9)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x413f77,_0x5bca59)=>{const _0xfe2c93=this['_findChangeIdFromDomTarget'](_0x5bca59['target']),_0x44c4b3=this['_changeIdToChange']['get'](_0xfe2c93);_0x44c4b3?(this['_activeViewTarget']={'x':_0x5bca59['domEvent']['x'],'y':_0x5bca59['domEvent']['y']},_0x44c4b3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x44c4b3):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5b85a0){do{const _0x5c4718=_0x5b85a0['getAttribute']('data-change-id');if(_0x5c4718)return _0x5c4718;_0x5b85a0=_0x5b85a0['parent'];}while(_0x5b85a0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x240d31=>{for(const _0x608be6 of this['editor']['model']['markers'])_0x240d31['removeMarker'](_0x608be6);});}}function Z(_0x1e180a,_0x125f63){return(_0x1ca891,_0x41d7cb,_0x152aa4)=>{if(!_0x152aa4['consumable']['test'](_0x41d7cb['markerRange'],_0x1ca891['name']))return;const _0x311162=_0x41d7cb['markerRange']['getWalker'](),_0x3dd5df=_0x41d7cb['markerRange']['start'],_0x2767ba=_0x1e180a['model']['schema'];let _0x5abe55=null,_0x2bc86a=null,_0xd8d1eb=!0x1,_0x553066=!0x1;for(const _0x267dc0 of _0x311162){const _0x4b7c1a=_0x267dc0['item'];_0xd8d1eb=_0xd8d1eb||_0x2767ba['isContent'](_0x4b7c1a);const _0xf36aa3=_0x152aa4['mapper']['toViewElement'](_0x4b7c1a);if(_0xf36aa3&&_0xf36aa3['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x267dc0['type']&&(_0x2767ba['isBlock'](_0x4b7c1a)&&!_0x2767ba['isLimit'](_0x4b7c1a)&&(_0x4b7c1a['nextSibling']||_0x3dd5df['isAtEnd']?_0x5abe55&&_0x5abe55['parent']==_0x4b7c1a||(_0x5abe55=_0x4b7c1a,_0x5a7716(_0x267dc0['previousPosition']),_0x553066=!0x0):_0x2bc86a=_0x2bc86a||_0x267dc0['previousPosition']));}function _0x5a7716(_0x5f2ea5){const _0x4d5f1e=_0x152aa4['mapper']['toViewPosition'](_0x5f2ea5),_0x437324=_0x152aa4['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x125f63});_0x152aa4['writer']['insert'](_0x4d5f1e,_0x437324),_0x152aa4['mapper']['bindElementToMarker'](_0x437324,_0x41d7cb['markerName']);}_0xd8d1eb||_0x553066||!_0x2bc86a||_0x5a7716(_0x2bc86a);};}class pt extends _0x408465{constructor(_0x386772){super(_0x386772);const _0x1b40a5=_0x386772['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x1b40a5,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1b40a5,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x32095f=this['editor'],_0x52bed2=_0x32095f['plugins']['get'](d),_0x5bd4bb=_0x52bed2['isReady']?_0x52bed2['diff']['newRevisionId']:null;_0x32095f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5bd4bb);}['refresh'](){const {isReady:_0x26292c,isEnabled:_0x5bcba1,repository:_0x3281cf,diff:_0x8e83ea}=this['editor']['plugins']['get'](d),_0x4ae6bb=_0x8e83ea&&_0x3281cf['getLaterVisibleRevision'](_0x8e83ea['newRevisionId']);this['isEnabled']=_0x26292c&&_0x5bcba1&&Boolean(_0x4ae6bb);}}class _t extends _0x408465{['_step'];constructor(_0x3abf16,{direction:_0x3844c6}){super(_0x3abf16);const _0x23ddaf=_0x3abf16['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x3844c6?0x1:-0x1,this['listenTo'](_0x23ddaf,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x23ddaf,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x23ddaf,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x171d4b=this['editor'],_0x554c45=_0x171d4b['plugins']['get'](d),{isNavigationMode:_0x1a11a6,currentChangeNumber:_0x5b31f7}=_0x554c45;let _0x44d4c7;if(_0x554c45['activeChange']=_0x1a11a6?_0x554c45['diff']['changes']['get'](_0x5b31f7+this['_step']):_0x554c45['diff']['changes']['first'],_0x554c45['activeChange']['data']['isOnRoot'])_0x44d4c7=_0x171d4b['editing']['view']['getDomRoot'](_0x554c45['activeChange']['rootName']);else{const _0x3c51df=_0x171d4b['model']['markers']['get']('revision:'+_0x554c45['activeChange']['id']);_0x44d4c7=_0x514c98(_0x171d4b['editing'],_0x3c51df);}_0x215337({'target':_0x44d4c7,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x3cc68f,currentChangeNumber:_0x36a4a8,numberOfChanges:_0x86d5d9,isReady:_0x289d20,isEnabled:_0x184c88}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x184c88&&_0x289d20&&_0x86d5d9)&&(!_0x3cc68f||(0x1===this['_step']?_0x36a4a8<_0x86d5d9-0x1:_0x36a4a8>0x0));}}class li extends ts{constructor(_0x2d2949){super(_0x2d2949);const _0x2d9444=this['bindTemplate'],_0x566669=new te(_0x2d2949),_0x37c9a6=new te(_0x2d2949);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',(_0x1ad513,_0x1b1dcc)=>_0x1ad513&&_0x1b1dcc>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x38c77c,_0x49dfb9,_0x144cfe,_0x2420b2)=>{if(!_0x38c77c)return m(_0x2d2949,'Loading...');if(!_0x144cfe)return m(_0x2d2949,'No\x20changes');const _0x5cd0eb=m(_0x2d2949,'NUMBER_OF_CHANGES',_0x144cfe);return _0x2420b2?m(_0x2d2949,'X_OF_Y_CHANGES',[_0x49dfb9+0x1,_0x144cfe]):_0x5cd0eb;}),_0x566669['set']({'label':m(_0x2d2949,'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'}),_0x37c9a6['set']({'label':m(_0x2d2949,'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'}),_0x566669['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x37c9a6['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x566669['on']('execute',()=>this['fire']('execute','backward')),_0x37c9a6['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',_0x2d9444['if']('_isStatusLabelVisible','ck-hidden',_0x3a4317=>!_0x3a4317)]},'children':[{'text':_0x2d9444['to']('isNavigationMode',_0x2dc9ac=>_0x2dc9ac?m(_0x2d2949,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x2d2949,'Total')+':\x20')}]},{'text':_0x2d9444['to']('_statusText')}]},new _0x353fcd(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x566669,_0x37c9a6]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x3494fb{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4782ab=this['editor']['editing']['view'];_0x4782ab['change'](_0x4104c0=>{for(const _0x485507 of _0x4782ab['document']['roots'])_0x4104c0['addClass'](le,_0x485507);});}['hide'](){const _0x593417=this['editor']['editing']['view'];_0x593417['change'](_0x214a97=>{for(const _0x122952 of _0x593417['document']['roots'])_0x214a97['removeClass'](le,_0x122952);});}}class g extends _0x3494fb{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ge];}['init'](){const _0x23bf57=this['editor'],_0x3c836b=_0x23bf57['plugins']['get'](d),_0x41df0b=_0x23bf57['plugins']['get'](ge);_0x23bf57['ui']['componentFactory']['add']('exitToEditing',_0x4ab4dd=>{const _0x213ca8=new te(_0x4ab4dd);return _0x213ca8['set']({'label':m(_0x4ab4dd,'Back\x20to\x20editing'),'icon':_0x351c88['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x213ca8,'execute',()=>{_0x23bf57['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x213ca8;}),_0x23bf57['ui']['componentFactory']['add']('restoreRevision',_0x45ea9d=>{const _0x322afd=new te(_0x45ea9d);return _0x322afd['set']({'label':m(_0x45ea9d,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x322afd['bind']('isEnabled')['to'](_0x23bf57['commands']['get']('restoreRevision')),this['listenTo'](_0x322afd,'execute',()=>_0x23bf57['execute']('restoreRevision')),_0x322afd;}),_0x23bf57['ui']['componentFactory']['add']('changesNavigation',_0x2330fd=>{const _0x39d5a7=new li(_0x2330fd),_0x5acde3=_0x23bf57['commands']['get']('showPreviousChange'),_0x4f86d4=_0x23bf57['commands']['get']('showNextChange');return _0x39d5a7['bind']('isBackwardNavigationEnabled')['to'](_0x5acde3,'isEnabled'),_0x39d5a7['bind']('isForwardNavigationEnabled')['to'](_0x4f86d4,'isEnabled'),_0x39d5a7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3c836b),this['listenTo'](_0x39d5a7,'execute',(_0x1693ed,_0x3e72f6)=>{_0x23bf57['execute']('forward'===_0x3e72f6?'showNextChange':'showPreviousChange');}),_0x39d5a7;}),_0x41df0b['show'](),_0x3c836b['on']('change:isReady',(_0x132ba9,_0x243651,_0x4f7688)=>{_0x4f7688?_0x41df0b['hide']():_0x41df0b['show']();});}}class at extends _0x3701ba{['_resizeObserver']=null;constructor(_0x30db7d,_0x4cfec3){super(_0x30db7d,_0x4cfec3);const _0x48e481=this['bindTemplate'];this['set']({'label':m(_0x30db7d,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x30db7d,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x48e481['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new nt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5a500b=this['fieldView']['element'];this['_tooltipString']=_0x5a500b['scrollWidth']>_0x5a500b['clientWidth']&&_0x5a500b['value']||'';}}class ri extends ts{constructor(_0x5ae68e,_0x90f54b,_0x5d1990){super(_0x5ae68e);const _0x13a8ba=new _0x4a8f8b();_0x13a8ba['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 _0x593965=['ck','ck-revision-history-sidebar__revision-author'];_0x5d1990&&_0x593965['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1ad3ab=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5ae68e,_0x5d1990?'Revision\x20creator':'Revision\x20author')},'children':[_0x13a8ba,_0x90f54b['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x593965},'children':_0x1ad3ab});}}function oi(_0x18a746,_0x510735){const _0x3f8d93=_0x18a746['bindTemplate'],_0x5e8742=_0x18a746['locale'],_0x1e9058=_0x31f333(_0x5e8742);_0x1e9058['panelPosition']='sw';const _0x2048ec=function(_0x29f4ce,_0x41def6){const _0x89f015=function(_0x1719cb,_0x2d6a74){const _0x882370=_0x1719cb['locale'],_0x54aea5={'Compare\x20against\x20selected':m(_0x882370,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x882370,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x882370,'Restore\x20this\x20revision')};return _0x2d6a74['map'](_0x5a32b7=>{const _0x225588=_0x54aea5[_0x5a32b7['name']];return _0x225588&&_0x225588!==_0x5a32b7['name']&&(_0x5a32b7['name']=_0x225588),_0x5a32b7;});}(_0x29f4ce,_0x41def6),_0x5e2d8a=new _0x1aa1e7();for(const _0x5ac871 of _0x89f015){const _0x3215f3={'type':'button','model':new _0x4da109({'label':_0x5ac871['name'],'class':_0x5ac871['class'],'withText':!0x0,'role':'menuitem','_action':_0x5ac871['action']})};_0x3215f3['model']['bind']('isEnabled')['to'](_0x29f4ce,'isActionsDropdownOpen',_0x5cfc53=>'function'!=typeof _0x5ac871['isEnabled']||(!_0x5cfc53||_0x5ac871['isEnabled'](_0x29f4ce))),_0x5e2d8a['add'](_0x3215f3);}return _0x5e2d8a;}(_0x18a746,_0x510735);return _0x18a746['bind']('isActionsDropdownOpen')['to'](_0x1e9058,'isOpen'),_0x1e9058['buttonView']['set']({'label':m(_0x5e8742,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x351c88['threeVerticalDots']}),_0x1e9058['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3f8d93['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3f8d93['to'](_0x4423cf=>_0x4423cf['stopPropagation']())}}),_0x1e9058['on']('execute',_0x1f3eaa=>{_0x18a746['isReady']&&'function'==typeof _0x1f3eaa['source']['_action']&&_0x1f3eaa['source']['_action'](_0x18a746);}),to(_0x1e9058,_0x2048ec,{'role':'menu'}),_0x1e9058['listenTo'](_0x18a746,'change:isActionsDropdownOpen',(_0x40478f,_0x25c96b,_0x120a70)=>{if(_0x120a70)for(const _0x480565 of _0x1e9058['listView']['items']){const _0x27a76f=_0x480565['children']['first'],_0x4ea49e=_0x510735['find'](_0x3670f7=>_0x3670f7['action']===_0x27a76f['_action'])['isVisible'];_0x480565['isVisible']=void 0x0===_0x4ea49e||_0x4ea49e(_0x18a746);}}),_0x1e9058;}class hi extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x122d77,uid as _0x26ec69,Collection as _0x35d588,logWarning as _0x2e97d8,FocusTracker as _0x2fa1d4,KeystrokeHandler as _0x28165a,scrollViewportToShowTarget as _0x248613,ResizeObserver as pt,ElementReplacer as ht,CKEditorError as _0x233041}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x4c51a9,set as _0x3fce89,unset as _0x1f588a,isEqual as _0x444116}from'es-toolkit/compat';import{Plugin as _0x1b3b72,PendingActions as _0x5e4ec4,Command as _0x4f6e52,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x440b0a,getMarkerDomElement as _0x18151f,ConfirmMixin as _0x1e0d94,sanitizeEditorConfig as _0x13be12}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x290c5e,Element as ut,Range as ft,ViewUIElement as _0x2e158c,ViewRawElement as _0x50fc29,ViewEmptyElement as _0xbcd520,ViewAttributeElement as _0x37234a,ViewContainerElement as _0x5bd0fa,Position as vt,ViewText as _0x2c8453,ViewElement as _0x34046a,DocumentFragment as gt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x47b65b,IconChevronUp as _0x1e14a0,IconChevronDown as _0x5e5440,IconUndo as _0x422683,IconUser as _0x4b5c20,IconThreeVerticalDots as _0x1e6a30}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x646829,injectCssTransitionDisabler as ts,submitHandler as _0x5d124a,LabeledFieldView as at,createLabeledInputText as ti,createDropdown as _0x2b8694,ListView as _0x1848d4,ListItemView as _0xea1274,ButtonView as _0x3e960e,MenuBarMenuView as _0x28acf8,MenuBarMenuListView as _0x3a45c2,MenuBarMenuListItemView as _0x59df58,MenuBarMenuListItemButtonView as _0x604b5c,ContextualBalloon as _0xb68efe,ToolbarSeparatorView as _0x1df1ed,IconView as _0x1011e4,addListToDropdown as _0x1338b3,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0xd95469}from'luxon';class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x122d77(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x153a88){super(),this['id']=_0x153a88['id']||_0x26ec69(),this['creator']=_0x153a88['creator']||null,this['authors']=_0x153a88['authors']||[],this['diffData']=_0x153a88['diffData']||null,this['toVersion']=_0x153a88['toVersion']||0x0,this['fromVersion']=_0x153a88['fromVersion']||0x0,this['set']('name',_0x153a88['name']||''),this['set']('createdAt',_0x153a88['createdAt']||new Date()),this['set']('attributes',_0x153a88['attributes']||{});}['setName'](_0x3c8613){this['_update']({'name':_0x3c8613});}['setAttribute'](_0x6408ab,_0x438c10){const _0x5d47eb=_0x4c51a9(this['attributes']);_0x3fce89(_0x5d47eb,_0x6408ab,_0x438c10),this['_update']({'attributes':_0x5d47eb});}['removeAttribute'](_0x374107){const _0x7f6a9a=_0x4c51a9(this['attributes']);_0x1f588a(_0x7f6a9a,_0x374107),this['_update']({'attributes':_0x7f6a9a});}['_update'](_0x1d21b4,_0x2e881d=!0x1){let _0x452124=!0x1;const _0x30da42={'id':this['id']},_0x45fe3e=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x27693d of _0x45fe3e){const _0x5743af=_0x1d21b4[_0x27693d];void 0x0!==_0x5743af&&_0x5743af!==this[_0x27693d]&&(this[_0x27693d]=_0x5743af,_0x30da42[_0x27693d]=_0x5743af,_0x452124=!0x0);}_0x452124&&(_0x30da42['authors']&&(_0x30da42['authorsIds']=_0x30da42['authors']['map'](_0x1f6de9=>_0x1f6de9['id']),delete _0x30da42['authors']),this['fire']('_update',_0x30da42,_0x2e881d));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4ec283=>_0x4ec283['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x1b3b72{['_revisions'];static get['requires'](){return[_0x440b0a];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x402d25){super(_0x402d25),this['_revisions']=new _0x35d588();}['afterInit'](){!async function(_0x3065fe){const _0x59552b=_0x16a1b0([0x74,0x30,0x77,0x48,0x45,0x37,0x66,0x52,0x58,0x36,0x6a,0x51,0x57,0x33,0x47,0x72,0x62,0x76,0x39,0x34,0x44,0x75,0x64,0x6c,0x67,0x7a,0x4e,0x6d,0x43,0x50,0x73,0x4f,0x53,0x31,0x5a,0x41,0x63,0x68,0x71,0x61,0x4b,0x55,0x78,0x46,0x59,0x70,0x54,0x38,0x6b,0x32,0x35,0x4a,0x56,0x79,0x6e,0x49,0x4c,0x4d,0x69,0x42,0x6f,0x65]),_0x373972=0xeb829,_0x162627=0xd92f00a,_0x4298fc=0xd95affa^_0x162627,_0x167fea=window[_0x16a1b0([0x44,0x61,0x74,0x65])][_0x16a1b0([0x6e,0x6f,0x77])](),_0x402eee=_0x3065fe[_0x16a1b0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4c0dd3=new window[(_0x16a1b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xcf07e5=>{_0x402eee[_0x16a1b0([0x6f,0x6e,0x63,0x65])](_0x16a1b0([0x72,0x65,0x61,0x64,0x79]),_0xcf07e5);}),_0x3931b8={[_0x16a1b0([0x6b,0x74,0x79])]:_0x16a1b0([0x45,0x43]),[_0x16a1b0([0x75,0x73,0x65])]:_0x16a1b0([0x73,0x69,0x67]),[_0x16a1b0([0x63,0x72,0x76])]:_0x16a1b0([0x50,0x2d,0x32,0x35,0x36]),[_0x16a1b0([0x78])]:_0x16a1b0([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]),[_0x16a1b0([0x79])]:_0x16a1b0([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]),[_0x16a1b0([0x61,0x6c,0x67])]:_0x16a1b0([0x45,0x53,0x32,0x35,0x36])},_0x10a6ae=_0x402eee[_0x16a1b0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x16a1b0([0x67,0x65,0x74])](_0x16a1b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x13f5dd(){let _0x18c29e,_0x1946e0=null,_0x8df193=null;try{if(_0x10a6ae==_0x16a1b0([0x47,0x50,0x4c]))return _0x16a1b0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x18c29e=_0x2b07cd(),!_0x18c29e)return _0x16a1b0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x18c29e[_0x16a1b0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x8df193=_0x5ae59e(_0x18c29e[_0x16a1b0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x18c29e[_0x16a1b0([0x6a,0x74,0x69])])),await _0x3c06dc()?_0x915afc()?_0x2899a8()?_0x16a1b0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x17ea5e()?(_0x18c29e[_0x16a1b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x16a1b0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1946e0=_0x25b2a9(_0x16a1b0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x18c29e[_0x16a1b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x16a1b0([0x74,0x72,0x69,0x61,0x6c])&&(_0x1946e0=_0x25b2a9(_0x16a1b0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5ef446()):_0x16a1b0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x16a1b0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x16a1b0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x24b8d2){return _0x16a1b0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2899a8(){const _0x56db76=[_0x16a1b0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x16a1b0([0x74,0x72,0x69,0x61,0x6c])][_0x16a1b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18c29e[_0x16a1b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x167fea/0x3e8:0xe10*_0x4298fc;return _0x18c29e[_0x16a1b0([0x65,0x78,0x70])]<_0x56db76;}function _0x915afc(){const _0x1cf6d4=_0x18c29e[_0x16a1b0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1cf6d4)return!0x1;if(_0x1cf6d4[_0x16a1b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16a1b0([0x2a])))return!0x0;if(_0x1cf6d4[_0x16a1b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16a1b0([0x52,0x48])))return!0x0;if(_0x1cf6d4[_0x16a1b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16a1b0([0x52,0x52,0x48]))){if(_0x45198f())return!0x0;if(_0xa1b5ca()||_0x398d3f())return!0x0;}return!0x1;}function _0x17ea5e(){const _0x7337f5=_0x18c29e[_0x16a1b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x7337f5||0x0==_0x7337f5[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2548d2}=new URL(window[_0x16a1b0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x7337f5[_0x16a1b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2548d2))return!0x0;const _0x439b3c=_0x2548d2[_0x16a1b0([0x73,0x70,0x6c,0x69,0x74])](_0x16a1b0([0x2e]));return _0x7337f5[_0x16a1b0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b793b=>_0x2b793b[_0x16a1b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16a1b0([0x2a])))[_0x16a1b0([0x6d,0x61,0x70])](_0x29b1b5=>_0x29b1b5[_0x16a1b0([0x73,0x70,0x6c,0x69,0x74])](_0x16a1b0([0x2e])))[_0x16a1b0([0x73,0x6f,0x6d,0x65])](_0x5c2cb4=>_0x439b3c[_0x16a1b0([0x65,0x76,0x65,0x72,0x79])]((_0x4cfee0,_0x2d145a)=>_0x5c2cb4[_0x2d145a]===_0x4cfee0||_0x5c2cb4[_0x2d145a]===_0x16a1b0([0x2a])));}function _0x5ef446(){return _0x1946e0&&_0x8df193?new window[(_0x16a1b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2c3812,_0x13e92b)=>{_0x1946e0[_0x16a1b0([0x74,0x68,0x65,0x6e])](_0x2c3812,_0x13e92b),_0x8df193[_0x16a1b0([0x74,0x68,0x65,0x6e])](_0x51c833=>{_0x51c833!=_0x16a1b0([0x56,0x61,0x6c,0x69,0x64])&&_0x2c3812(_0x51c833);},_0x13e92b);}):_0x1946e0||_0x8df193||_0x16a1b0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5ae59e(_0x367526,_0x2a4ab6){return new window[(_0x16a1b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x48c576=>{if(_0x56e804())return _0x48c576(_0x16a1b0([0x56,0x61,0x6c,0x69,0x64]));_0x3ff3af(),_0x402eee[_0x16a1b0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x16a1b0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2a2407=!0x1;const _0x1e19c7=_0x26ec69();function _0x288acb(_0x596288){return!!_0x596288&&(typeof _0x596288===_0x16a1b0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x596288===_0x16a1b0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x596288[_0x16a1b0([0x74,0x68,0x65,0x6e])]===_0x16a1b0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x596288[_0x16a1b0([0x63,0x61,0x74,0x63,0x68])]===_0x16a1b0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1bcaf7(_0x1e580a){_0x1769fd(_0x1e580a)[_0x16a1b0([0x74,0x68,0x65,0x6e])](_0x39b237=>{if(!_0x39b237||_0x39b237[_0x16a1b0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x16a1b0([0x6f,0x6b]))return _0x16a1b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x55745e(_0x1633b7(_0x1e19c7+_0x2a4ab6))!=_0x39b237[_0x16a1b0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x16a1b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x16a1b0([0x56,0x61,0x6c,0x69,0x64]);})[_0x16a1b0([0x74,0x68,0x65,0x6e])](_0x3551c1=>(_0x4976b9(),_0x3551c1),()=>{const _0x1afea1=_0x2c1f75();return null==_0x1afea1?(_0x4976b9(),_0x16a1b0([0x56,0x61,0x6c,0x69,0x64])):_0x16a1b0(_0x167fea-_0x1afea1>(0x299e740a^_0x162627)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x16a1b0([0x74,0x68,0x65,0x6e])](_0x48c576)[_0x16a1b0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x48c576(_0x16a1b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xe7fbb=0xda41e8a^_0x162627;function _0x4976b9(){const _0x23ffa9=_0x16a1b0([0x6c,0x6c,0x63,0x74,0x2d])+_0x55745e(_0x1633b7(_0x367526)),_0x79a89d=_0x428faf(_0x55745e(window[_0x16a1b0([0x4d,0x61,0x74,0x68])][_0x16a1b0([0x63,0x65,0x69,0x6c])](_0x167fea/_0xe7fbb)));window[_0x16a1b0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x16a1b0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x23ffa9,_0x79a89d);}function _0x2c1f75(){const _0x46974e=_0x16a1b0([0x6c,0x6c,0x63,0x74,0x2d])+_0x55745e(_0x1633b7(_0x367526)),_0x4696c7=window[_0x16a1b0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x16a1b0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46974e);return _0x4696c7?window[_0x16a1b0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x428faf(_0x4696c7),0x10)*_0xe7fbb:null;}function _0x1769fd(_0x35a326){return new window[(_0x16a1b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1b4b7a,_0x1541cf)=>{_0x35a326[_0x16a1b0([0x74,0x68,0x65,0x6e])](_0x1b4b7a,_0x1541cf),window[_0x16a1b0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1541cf,0xd9324ca^_0x162627);});}}_0x402eee[_0x16a1b0([0x6f,0x6e])](_0x16a1b0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5cac4a,_0x16f0e3)=>{if(_0x16f0e3[0x0]!=_0x367526)return _0x48c576(_0x16a1b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x16f0e3[0x1]={..._0x16f0e3[0x1],[_0x16a1b0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1e19c7};},{[_0x16a1b0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x16a1b0([0x68,0x69,0x67,0x68])}),_0x402eee[_0x16a1b0([0x6f,0x6e])](_0x16a1b0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x263872=>{_0x288acb(_0x263872[_0x16a1b0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2a2407=!0x0,_0x1bcaf7(_0x263872[_0x16a1b0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x16a1b0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x16a1b0([0x6c,0x6f,0x77])}),_0x4c0dd3[_0x16a1b0([0x74,0x68,0x65,0x6e])](()=>{_0x2a2407||_0x48c576(_0x16a1b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x56e804(){return _0x402eee[_0x16a1b0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16a1b0([0x76,0x69,0x65,0x77])][_0x16a1b0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x16a1b0([0x61,0x75,0x74,0x6f]);}function _0x3ff3af(){_0x402eee[_0x16a1b0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16a1b0([0x76,0x69,0x65,0x77])][_0x16a1b0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x16a1b0([0x61,0x75,0x74,0x6f]);}}function _0x25b2a9(_0x3a5506){const _0x58fb76=[new window[(_0x16a1b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x476b63=>setTimeout(_0x476b63,0xd9bcec6^_0x162627)),_0x4c0dd3[_0x16a1b0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x16a1b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ac858=>{const _0x2dcdb0=0xd92f00d^_0x162627,_0x4ca140=_0x3065fe[_0x16a1b0([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x54c48c(){_0x4ca140[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x2dcdb0&&_0x1ac858();}_0x54c48c(),_0x4ca140[_0x16a1b0([0x6f,0x6e])](_0x16a1b0([0x61,0x64,0x64]),_0x54c48c);})),new window[(_0x16a1b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b485c=>{function _0x3d9a26(){for(const _0x1d1e0d in window)if(window[_0x16a1b0([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x16a1b0([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1d1e0d))&&window[_0x1d1e0d]==_0x373972)return _0x4b485c();_0x402eee[_0x16a1b0([0x73,0x74,0x61,0x74,0x65])]!=_0x16a1b0([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x16a1b0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3d9a26,0xd92e382^_0x162627);}_0x37a0fa(_0x16a1b0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3d9a26();})];return window[_0x16a1b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x16a1b0([0x72,0x61,0x63,0x65])](_0x58fb76)[_0x16a1b0([0x74,0x68,0x65,0x6e])](()=>_0x3a5506);}async function _0x481f8c(){if(await _0x4c0dd3,_0x37a0fa(_0x16a1b0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x1b8081=_0x3065fe[_0x16a1b0([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x58d8ed=_0x3065fe[_0x16a1b0([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])](_0x1b8081[_0x16a1b0([0x69,0x64])]),_0x1f7fc8=_0x220894(_0x16a1b0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1f7fc8[_0x16a1b0([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x1b8081['id'],_0x58d8ed?_0x58d8ed['id']:null,!0x0),_0x1f7fc8[_0x16a1b0([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x16a1b0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1f7fc8[_0x16a1b0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1f7fc8[_0x16a1b0([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x33379c,void(_0x1f7fc8[_0x16a1b0([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x33379c);}if(_0x37a0fa(_0x16a1b0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1c7e5c=_0x220894(_0x16a1b0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1c7e5c[_0x16a1b0([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x16a1b0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1c7e5c[_0x16a1b0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1c7e5c[_0x16a1b0([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x33379c,_0x1c7e5c[_0x16a1b0([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x33379c;}_0x402eee[_0x16a1b0([0x6d,0x6f,0x64,0x65,0x6c])][_0x16a1b0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x33379c,_0x402eee[_0x16a1b0([0x6d,0x6f,0x64,0x65,0x6c])][_0x16a1b0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x33379c,_0x402eee[_0x16a1b0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x16a1b0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x45198f(){return _0x37a0fa(_0x16a1b0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x220894(_0x16a1b0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x16a1b0([0x73,0x74,0x61,0x74,0x65])]==_0x16a1b0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xa1b5ca(){return _0x37a0fa(_0x16a1b0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x398d3f(){return _0x37a0fa(_0x16a1b0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x632e02(_0xce2393){const _0x441351=_0xc5201d();_0x402eee[_0x441351]=_0x16a1b0([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])+_0xce2393,_0xce2393[_0x16a1b0([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x16a1b0([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0xc5201d()]=_0x373972),_0xce2393!=_0x16a1b0([0x56,0x61,0x6c,0x69,0x64])&&_0x481f8c();}function _0xc5201d(){const _0x24b9a0=window[_0x16a1b0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x16a1b0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x16a1b0([0x6e,0x6f,0x77])]())[_0x16a1b0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x16a1b0([0x2e]),'');let _0x383e10=_0x16a1b0([0x74]);for(let _0x684ad8=0x0;_0x684ad8<_0x24b9a0[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x684ad8+=0x2){let _0x4640a6=window[_0x16a1b0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24b9a0[_0x16a1b0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x684ad8,_0x684ad8+0x2));_0x4640a6>=_0x59552b[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4640a6-=_0x59552b[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x383e10+=_0x59552b[_0x4640a6];}return _0x383e10;}function _0x2b07cd(){const _0x5e82f7=_0x10a6ae[_0x16a1b0([0x73,0x70,0x6c,0x69,0x74])](_0x16a1b0([0x2e]));if(0x3!=_0x5e82f7[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1c7d7d(_0x5e82f7[0x1]);function _0x1c7d7d(_0x58e461){const _0x182841=_0x3ce844(_0x58e461);return _0x182841&&_0x5dbabb()?_0x182841:null;function _0x5dbabb(){const _0xcbef4e=_0x182841[_0x16a1b0([0x6a,0x74,0x69])],_0x29cc99=window[_0x16a1b0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xcbef4e[_0x16a1b0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xcbef4e[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x801960={..._0x182841,[_0x16a1b0([0x6a,0x74,0x69])]:_0xcbef4e[_0x16a1b0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xcbef4e[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x801960[_0x16a1b0([0x76,0x63])],_0x1633b7(_0x801960)==_0x29cc99;}}}async function _0x3c06dc(){let _0x4ce9b4=!0x0;try{const _0xc449db=_0x10a6ae[_0x16a1b0([0x73,0x70,0x6c,0x69,0x74])](_0x16a1b0([0x2e])),[_0x11790c,_0x8b3492,_0x180bfa]=_0xc449db;return _0x10f30b(_0x11790c),await _0x2ee1d1(_0x11790c,_0x8b3492,_0x180bfa),_0x4ce9b4;}catch(_0x7c2a92){return!0x1;}function _0x10f30b(_0x221de0){const _0x18441d=_0x3ce844(_0x221de0);_0x18441d&&_0x18441d[_0x16a1b0([0x61,0x6c,0x67])]==_0x16a1b0([0x45,0x53,0x32,0x35,0x36])||(_0x4ce9b4=!0x1);}async function _0x2ee1d1(_0x1002fe,_0xc4e100,_0x5ed979){const _0x33f531=window[_0x16a1b0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x16a1b0([0x66,0x72,0x6f,0x6d])](_0x585119(_0x5ed979),_0x4d3f78=>_0x4d3f78[_0x16a1b0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x20c896=new window[(_0x16a1b0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x16a1b0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1002fe+_0x16a1b0([0x2e])+_0xc4e100),_0x5ecc9e=window[_0x16a1b0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x16a1b0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5ecc9e)return;const _0x55fc1c=await _0x5ecc9e[_0x16a1b0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x16a1b0([0x6a,0x77,0x6b]),_0x3931b8,{[_0x16a1b0([0x6e,0x61,0x6d,0x65])]:_0x16a1b0([0x45,0x43,0x44,0x53,0x41]),[_0x16a1b0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x16a1b0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x16a1b0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5ecc9e[_0x16a1b0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x16a1b0([0x6e,0x61,0x6d,0x65])]:_0x16a1b0([0x45,0x43,0x44,0x53,0x41]),[_0x16a1b0([0x68,0x61,0x73,0x68])]:{[_0x16a1b0([0x6e,0x61,0x6d,0x65])]:_0x16a1b0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x55fc1c,_0x33f531,_0x20c896)||(_0x4ce9b4=!0x1);}}function _0x3ce844(_0x591018){return _0x591018[_0x16a1b0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x16a1b0([0x65,0x79]))?JSON[_0x16a1b0([0x70,0x61,0x72,0x73,0x65])](_0x585119(_0x591018)):null;}function _0x585119(_0x7cb899){return window[_0x16a1b0([0x61,0x74,0x6f,0x62])](_0x7cb899[_0x16a1b0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x16a1b0([0x2b]))[_0x16a1b0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x16a1b0([0x2f])));}function _0x1633b7(_0x1eedd8){let _0x164b75=0x1505;function _0x83f68(_0x2e6fa9){for(let _0x58d551=0x0;_0x58d551<_0x2e6fa9[_0x16a1b0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x58d551++){const _0x15c22a=_0x2e6fa9[_0x16a1b0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x58d551);_0x164b75=(_0x164b75<<0x5)+_0x164b75+_0x15c22a,_0x164b75&=_0x164b75;}}function _0xa8001e(_0x4b9e8f){Array[_0x16a1b0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4b9e8f)?_0x4b9e8f[_0x16a1b0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xa8001e):_0x4b9e8f&&typeof _0x4b9e8f==_0x16a1b0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x16a1b0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4b9e8f)[_0x16a1b0([0x73,0x6f,0x72,0x74])]()[_0x16a1b0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4949cd,_0x5eb05d])=>{_0x83f68(_0x4949cd),_0xa8001e(_0x5eb05d);}):_0x83f68(window[_0x16a1b0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4b9e8f));}return _0xa8001e(_0x1eedd8),_0x164b75>>>0x0;}function _0x55745e(_0x696ddc){return _0x696ddc[_0x16a1b0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x16a1b0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x16a1b0([0x30]));}function _0x428faf(_0x7e7d97){return _0x7e7d97[_0x16a1b0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x16a1b0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x16a1b0([0x6a,0x6f,0x69,0x6e])]('');}function _0x37a0fa(_0x2ee5e7){return _0x402eee[_0x16a1b0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x16a1b0([0x68,0x61,0x73])](_0x2ee5e7);}function _0x220894(_0x242bde){return _0x402eee[_0x16a1b0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x16a1b0([0x67,0x65,0x74])](_0x242bde);}function _0x33379c(){}function _0x16a1b0(_0x2179b7){return _0x2179b7['map'](_0x1b2c59=>String['fromCharCode'](_0x1b2c59))['join']('');}_0x632e02(await _0x13f5dd());}(this);}['createRevision'](_0x43310f){const _0x3e9c21=this['editor']['plugins']['get']('Users');return new h({'id':_0x43310f['id'],'name':_0x43310f['name'],'creator':_0x43310f['creatorId']?_0x3e9c21['getUser'](_0x43310f['creatorId']):null,'diffData':_0x43310f['diffData']||_0x43310f['data'],'authors':_0x43310f['authorsIds']['map'](_0x1521d8=>_0x3e9c21['getUser'](_0x1521d8)),'createdAt':new Date(_0x43310f['createdAt']),'attributes':_0x43310f['attributes'],'fromVersion':_0x43310f['fromVersion'],'toVersion':_0x43310f['toVersion']});}['addRevision'](_0x2faee1,_0xe2faff=0x0){this['_revisions']['add'](_0x2faee1,_0xe2faff);}['getRevision'](_0x2081f2){return this['_revisions']['get'](_0x2081f2);}['getRevisions'](_0x498c46={'toJSON':!0x1}){const _0x33564d=Array['from'](this['_revisions']);return _0x33564d['reverse'](),_0x498c46['toJSON']?_0x33564d['map'](_0x481959=>_0x481959['toJSON']()):_0x33564d;}['getIndex'](_0x3e2732){return this['_revisions']['getIndex'](_0x3e2732);}['getEarlierVisibleRevision'](_0x274b59){const [,_0x5c7489]=this['getRevisionsIterator'](_0x274b59,{'direction':'earlier'});return _0x5c7489;}['getLaterVisibleRevision'](_0x4ab30a){const [,_0x170292]=this['getRevisionsIterator'](_0x4ab30a,{'direction':'later'});return _0x170292;}['getRevisionsInDiff'](_0x2b37e5){const _0x3a5f8a=[];for(const _0x4a600a of this['getRevisionsIterator'](_0x2b37e5['newRevisionId']))if(_0x3a5f8a['push'](_0x4a600a),_0x4a600a['id']===_0x2b37e5['oldRevisionId'])break;return _0x3a5f8a;}*['getRevisionsIterator'](_0x56a5d6,{direction:_0x54cfe1='earlier',filter:_0x5962e5=()=>!0x0}={}){const _0x1e8bc1='earlier'===_0x54cfe1?0x1:-0x1;let _0x251025=this['_revisions']['get'](_0x56a5d6),_0x166419=this['getIndex'](_0x251025);for(yield _0x251025;_0x251025;){if(_0x166419+=_0x1e8bc1,_0x251025=this['getRevision'](_0x166419),!_0x251025)return;_0x5962e5(_0x251025)&&(yield _0x251025);}}}function m(_0x53b5f1,_0x18cd8c,_0x17d590){const t=_0x53b5f1['t'];switch(_0x18cd8c){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'},_0x17d590);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x17d590);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const E={'c':_0x5bd0fa,'a':_0x37234a,'e':_0xbcd520,'r':_0x50fc29,'u':_0x2e158c};class u extends _0x1b3b72{['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[_0x440b0a,j,_0x5e4ec4];}constructor(_0x221cc4){super(_0x221cc4),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2cfd41=_0x26ec69();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2cfd41},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 _0x5b7158=this['repository']['getRevision'](0x0),_0x2213e6=_0x5b7158&&null===_0x5b7158['creator']?_0x5b7158:null;if(this['_continueCurrentRevision']=!!_0x2213e6&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x30fcb7=this['_source']['getCurrentRevisionId'](),_0xfca22c=this['repository']['getRevision'](_0x30fcb7);if(_0xfca22c)this['_startingVersion']=_0xfca22c['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3967e3=this['_source']['history']['_operations']['find'](_0x4795ab=>!_0x4795ab['_isInit']),_0x35fe19=_0x3967e3?_0x3967e3['baseVersion']:this['_source']['history']['version'];_0x5b7158?(_0x5b7158['toVersion']<_0x35fe19&&_0x5b7158['_update']({'toVersion':_0x35fe19}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2213e6['id'],this['_startingVersion']=_0x2213e6['fromVersion']):(this['_startingVersion']=_0x5b7158['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x35fe19,this['_continueCurrentRevision']=!0x1);}}else _0x2213e6&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2213e6['toVersion'],this['editor']['model']['document']['history']['version']),_0x2213e6['fromVersion']===_0x2213e6['toVersion']?(0x0!==_0x2213e6['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2213e6['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2213e6['id'],this['_startingVersion']=_0x2213e6['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',_0x22b658=>!_0x22b658),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4f7cb0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4d7720;for(const _0x455a4c in _0x4f7cb0){const _0x1ab73d=_0x455a4c,_0x483099=_0x4f7cb0[_0x1ab73d];if('revisionHistoryLicenseKeyValid'==_0x483099||'revisionHistoryLicenseKeyInvalid'==_0x483099||'revisionHistoryLicenseKeyExpired'==_0x483099||'revisionHistoryLicenseKeyDomainLimit'==_0x483099||'revisionHistoryLicenseKeyNotAllowed'==_0x483099||'revisionHistoryLicenseKeyEvaluationLimit'==_0x483099||'revisionHistoryLicenseKeyTrialLimit'==_0x483099||'revisionHistoryLicenseKeyUsageLimit'==_0x483099){delete _0x4f7cb0[_0x1ab73d],_0x4d7720=_0x483099,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4d7720&&_0x4f7cb0['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4d7720&&_0x4f7cb0['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4d7720&&_0x4f7cb0['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4d7720&&_0x4f7cb0['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4d7720&&_0x4f7cb0['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x4d7720&&_0x4f7cb0['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4d7720&&_0x4f7cb0['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x32ecbb=this['repository']['getRevision'](0x0),_0x55f231=await this['getRevisionDocumentData'](_0x32ecbb),_0x312bf2=await this['getRevisionRootsAttributes'](_0x32ecbb);this['_replaceEditorDataWithRevisionData'](_0x55f231,_0x312bf2);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1420d8){this['_source']=_0x1420d8;}async['update'](){const _0x2c538e=await this['_source']['getLatestVersion']();if(_0x2c538e>this['currentRevision']['toVersion']){await this['_loadState']();const _0x21afa2=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x2c538e});_0x21afa2['authors']=_0x21afa2['authorsIds']['map'](_0x2e722d=>this['editor']['plugins']['get']('Users')['getUser'](_0x2e722d)),this['currentRevision']['_update'](_0x21afa2);}}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'](_0x2fe406={},_0x1a0123=null){const _0x1a0a1f=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x1a0123>this['currentRevision']['toVersion']&&(_0x1a0123=null),null===_0x1a0123&&(_0x1a0123=await this['_source']['getLatestVersion']());const _0x43ff3d=this['_getFromVersion'](_0x1a0123),_0x5d2fd9=this['buildRevisionData']({'from':_0x43ff3d,'to':_0x1a0123});if(this['currentRevision']['toVersion']<_0x1a0123){const _0x283fa1=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x1a0123,'to':_0x1a0123});_0x283fa1['authors']=[],_0x283fa1['authorsIds']=[],_0x283fa1['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x283fa1,!0x0),delete _0x283fa1['authors'],_0x1a0a1f['push'](_0x283fa1);}_0x2fe406['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x2fe406['name']=_0x2fe406['name']||null,_0x2fe406['id']=_0x2fe406['id']||_0x26ec69(),_0x2fe406={..._0x2fe406,..._0x5d2fd9};const _0x3ac9ec=this['addRevisionData'](_0x2fe406);_0x1a0a1f['push'](_0x2fe406);const _0x5ecdbc=this['repository']['getIndex'](_0x3ac9ec);if(0x0!==_0x5ecdbc){const _0x476726=this['repository']['getRevision'](_0x5ecdbc-0x1);if(_0x476726['fromVersion']!==_0x1a0123){const _0x2be1d0=this['_revisionDataBuilder']['getData'](_0x1a0123,_0x476726['toVersion']),_0x250010={'id':_0x476726['id'],'diffData':_0x2be1d0['diffData'],'authorsIds':_0x2be1d0['authorsIds'],'authors':_0x2be1d0['authorsIds']['map'](_0x298d15=>this['editor']['plugins']['get']('Users')['getUser'](_0x298d15)),'fromVersion':_0x1a0123};_0x476726===this['currentRevision']&&(_0x250010['createdAt']=new Date(_0x2fe406['createdAt']['getTime']()+0xa)),_0x476726['_update'](_0x250010,!0x0),delete _0x250010['authors'],_0x1a0a1f['push'](_0x250010);}}if(this['adapter']){for(const _0x443177 of _0x1a0a1f)this['_bufferUpdate'](_0x443177['id'],_0x443177,!0x0);this['sendBufferedUpdates']();}return _0x3ac9ec;}['addRevisionData'](_0x18896f){const _0x1d6462=this['repository']['createRevision'](_0x18896f);return this['adapter']&&_0x1d6462['on']('_update',(_0x2cd8e1,_0x45a7a2,_0x57fc54)=>{_0x57fc54||(this['_bufferUpdate'](_0x45a7a2['id'],_0x45a7a2,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1d6462,this['_findInsertionIndex'](_0x1d6462)),_0x1d6462;}async['getRevisionDocumentData'](_0x28e123){await this['_loadRevisionData'](_0x28e123);const _0x3c18f8={};for(const _0x5b9064 in _0x28e123['diffData']){if(_0x28e123['diffData'][_0x5b9064]['attachChange']&&!_0x28e123['diffData'][_0x5b9064]['attachChange']['isAttached'])continue;const _0x59478f=this['_removeRevisionMarkers'](JSON['parse'](_0x28e123['diffData'][_0x5b9064]['insertions'])),_0xb31364=this['editor']['editing']['view']['document'],_0x11942f=new _0x290c5e(_0xb31364,_0x59478f['map'](_0xf62276=>P(_0xf62276,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x3c18f8[_0x5b9064]=this['editor']['data']['processor']['toData'](_0x11942f),this['editor']['data']['processor']['useFillerType']('default');}return _0x3c18f8;}async['getRevisionRootsAttributes'](_0x5d59be){await this['_loadRevisionData'](_0x5d59be);const _0x3fd93c={};for(const _0x3f15ef in _0x5d59be['diffData'])_0x5d59be['diffData'][_0x3f15ef]['attachChange']&&!_0x5d59be['diffData'][_0x3f15ef]['attachChange']['isAttached']||(_0x3fd93c[_0x3f15ef]=_0x5d59be['diffData'][_0x3f15ef]['attributesAfter']||{});return _0x3fd93c;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x574335=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3e552d=0x0;_0x3e552d<_0x574335['length'];_0x3e552d++){const _0x1253a2=_0x574335[_0x3e552d];let _0x2f6d95=!0x1;for(const _0x217b10 of Object['keys'](_0x1253a2))void 0x0===_0x1253a2[_0x217b10]?delete _0x1253a2[_0x217b10]:'id'!==_0x217b10&&(_0x2f6d95=!0x0);_0x2f6d95||(_0x574335[_0x3e552d]=null);}if(_0x574335=_0x574335['filter'](_0x23cea9=>null!==_0x23cea9),!_0x574335['length'])return;for(let _0x59e520=0x0;_0x59e520<_0x574335['length'];_0x59e520++){const _0x28f73f=_0x574335[_0x59e520];void 0x0!==_0x28f73f['fromVersion']&&void 0x0===_0x28f73f['toVersion']&&(_0x28f73f['toVersion']=this['repository']['getRevision'](_0x28f73f['id'])['toVersion']),void 0x0!==_0x28f73f['toVersion']&&void 0x0===_0x28f73f['fromVersion']&&(_0x28f73f['fromVersion']=this['repository']['getRevision'](_0x28f73f['id'])['fromVersion']);}const _0x4f6e20=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x574335,_0x4f6e20)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x40bdb0=>{if(_0x40bdb0){for(const _0x1bd835 of _0x40bdb0)this['setRevisionData']({'id':_0x1bd835['id'],'createdAt':_0x1bd835['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x13d6f6,_0x367fbc){let _0x3d61d1=this['editor']['config']['get']('initialData'),_0x198ad3=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x3d61d1){_0x3d61d1={};for(const _0x16e1ce of this['editor']['model']['document']['getRootNames']())_0x3d61d1[_0x16e1ce]='';}if('string'==typeof _0x3d61d1&&(_0x3d61d1={'main':_0x3d61d1}),void 0x0===_0x198ad3){_0x198ad3={};for(const _0x2a0fb1 of this['editor']['model']['document']['getRootNames']())_0x198ad3[_0x2a0fb1]={};}let _0x58ec79=!0x1;const _0x320d44=Object['keys'](_0x3d61d1),_0x1dcca1=Object['keys'](_0x13d6f6);for(const _0x1cc384 of _0x320d44){if(_0x3d61d1[_0x1cc384]!==_0x13d6f6[_0x1cc384]&&''!==_0x3d61d1[_0x1cc384]['trim']()){_0x58ec79=!0x0;break;}if(!_0x444116(_0x198ad3[_0x1cc384],_0x367fbc[_0x1cc384])&&Object['keys'](_0x198ad3[_0x1cc384])['length']>0x0){_0x58ec79=!0x0;break;}}_0x58ec79||(_0x58ec79=_0x1dcca1['some'](_0x3a7b80=>!this['editor']['model']['document']['getRoot'](_0x3a7b80))),_0x58ec79&&_0x2e97d8('editor-initial-data-replaced-with-revision-data',{'editorData':_0x3d61d1,'editorRootsAttributes':_0x198ad3,'revisionData':_0x13d6f6,'revisionRootsAttributes':_0x367fbc}),this['editor']['config']['set']('initialData',_0x13d6f6),this['editor']['config']['set']('rootsAttributes',_0x367fbc);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5be96b=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5be96b['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2d8271){const _0x3b408d=this['repository']['getRevisions']();_0x3b408d['reverse']();let _0xa1c2b=0x0;for(;_0xa1c2b<_0x3b408d['length'];){const _0x59c4b4=_0x3b408d[_0xa1c2b];if(_0x59c4b4===this['currentRevision']){_0xa1c2b++;continue;}if(_0x59c4b4['id']===this['_initialRevisionId'])break;const _0x2fd1a9=_0x2d8271['toVersion']-_0x59c4b4['toVersion']||_0x2d8271['fromVersion']-_0x59c4b4['fromVersion'];if(_0x2fd1a9>0x0)break;if(_0x2fd1a9<0x0)_0xa1c2b++;else{if(!_0x2d8271['creator']&&_0x59c4b4['creator'])break;if(_0x59c4b4['creator']||!_0x2d8271['creator']){if(_0x2d8271['createdAt']>_0x59c4b4['createdAt'])break;_0xa1c2b++;}else _0xa1c2b++;}}return _0xa1c2b;}['setRevisionData'](_0x2ac5ca){const _0x921e9e=this['repository']['getRevision'](_0x2ac5ca['id']);if(_0x2ac5ca['createdAt']&&(_0x2ac5ca['createdAt']=new Date(_0x2ac5ca['createdAt'])),_0x2ac5ca['authorsIds']){const _0x4c1d3e=this['editor']['plugins']['get']('Users');_0x2ac5ca['authors']=_0x2ac5ca['authorsIds']['map'](_0x26fe5f=>_0x4c1d3e['getUser'](_0x26fe5f));}_0x921e9e['_update'](_0x2ac5ca,!0x0);}['buildRevisionData']({revision:_0x4ad8ad=null,from:_0x243ded=null,to:_0x47ba88=null}){_0x243ded=null!==_0x243ded?_0x243ded:_0x4ad8ad['fromVersion'],_0x47ba88=null!==_0x47ba88?_0x47ba88:_0x4ad8ad['toVersion'];const _0x56e871=this['_revisionDataBuilder']['getData'](_0x243ded,_0x47ba88),_0x635319={'diffData':_0x56e871['diffData'],'authorsIds':_0x56e871['authorsIds'],'fromVersion':_0x243ded,'toVersion':_0x47ba88};if(!_0x4ad8ad||_0x47ba88!==_0x4ad8ad['toVersion']){const _0x49ad4d=_0x47ba88-0x1,_0xe29962=this['_source']['history']['getOperation'](_0x49ad4d);_0x635319['createdAt']=_0xe29962&&_0xe29962['createdAt']||new Date();}if(this['_loadedStateData']&&_0x243ded===this['_loadedStateData']['fromVersion']){for(const _0x4c3b5b of this['_loadedStateData']['authors'])_0x635319['authorsIds']['includes'](_0x4c3b5b['id'])||_0x635319['authorsIds']['push'](_0x4c3b5b['id']);}return _0x635319;}['_loadRevisionData'](_0x1185d5){if(!_0x1185d5||_0x1185d5['diffData'])return Promise['resolve']();{const _0x556919=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x556919,'revisionId':_0x1185d5['id']})['then'](_0x1dc22d=>{_0x1185d5['diffData']=_0x1dc22d['diffData'];});}}['_bufferUpdate'](_0x2184fc,_0x3ec471,_0x8f1a09){if(this['_bufferedUpdates']['has'](_0x2184fc)){const _0x4d5554=this['_bufferedUpdates']['get'](_0x2184fc);_0x3ec471=_0x8f1a09?{..._0x4d5554,..._0x3ec471}:{..._0x3ec471,..._0x4d5554};}this['_bufferedUpdates']['set'](_0x2184fc,_0x3ec471);}['_getFromVersion'](_0x1bad5f){const _0x39e8aa=this['repository']['getRevisions']();_0x39e8aa['reverse'](),_0x39e8aa['shift']();const _0x46dbca=_0x39e8aa['find'](_0x5a60e4=>_0x5a60e4['toVersion']<=_0x1bad5f)['toVersion'];return _0x46dbca<this['_startingVersion']?this['_startingVersion']:_0x46dbca;}['_createInitialRevision'](_0x6532f1){const _0x3480d7=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3480d7)this['_initialRevisionId']=_0x3480d7['id'];else{const _0x13de2e=!this['editor']['model']['document']['roots']['find'](_0x58eac3=>this['editor']['model']['hasContent'](_0x58eac3)),_0x3fa348=this['editor']['plugins']['get']('Users')['me']['id'],_0x1cb57d=m(this['editor']['locale'],_0x13de2e?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x6532f1,'to':_0x6532f1,'id':this['_initialRevisionId'],'name':_0x1cb57d,'creatorId':_0x3fa348});}}['_createCurrentRevision'](_0x1f9716){const _0x479f81=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x479f81),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1f9716,'to':_0x1f9716,'id':_0x479f81,'name':'','creatorId':null}));}['_makeRevision']({name:_0x4a1747,from:_0x3cf729,to:_0x516f37,creatorId:_0x358375,id:_0x251fad}){const _0x3041bf=this['buildRevisionData']({'from':_0x3cf729,'to':_0x516f37});_0x3041bf['name']=_0x4a1747,_0x3041bf['creatorId']=_0x358375,_0x3041bf['id']=_0x251fad;const _0x51ff14=this['addRevisionData'](_0x3041bf);return this['adapter']&&this['_bufferUpdate'](_0x3041bf['id'],_0x3041bf,!0x0),_0x51ff14;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0xfbc024){return(_0xfbc024=_0xfbc024['filter'](_0x52b7ce=>!_0x52b7ce['name']||'revision-start'!==_0x52b7ce['name']&&'revision-end'!==_0x52b7ce['name']))['forEach'](_0x496ae9=>{'string'!=typeof _0x496ae9&&(_0x496ae9['children']=this['_removeRevisionMarkers'](_0x496ae9['children']),_0x496ae9['attributes']=_0x496ae9['attributes']['filter'](_0x3fd9dd=>!_0x3fd9dd[0x0]['startsWith']('data-revision-')));}),_0xfbc024;}}function P(_0x3be13b,_0x36dfc2){const _0x3db4fa=_0x36dfc2['editing']['view']['document'];if('string'==typeof _0x3be13b)return new _0x2c8453(_0x3db4fa,_0x3be13b);{const _0x5ce709=_0x3be13b['children']['map'](_0x61f5a7=>P(_0x61f5a7,_0x36dfc2));return new(E[_0x3be13b['type']]||_0x34046a)(_0x3db4fa,_0x3be13b['name'],_0x3be13b['attributes'],_0x5ce709);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x775652){this['editor']=_0x775652,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'](_0x235026){this['source']=_0x235026;const _0x337452=new Map(),_0x4c0251=new Map(),_0x111c6c=this['editor']['model']['document']['roots']['map'](_0x1968fc=>_0x1968fc['rootName']);for(const _0x419b38 of _0x111c6c){const _0x265eee=this['editor']['model']['document']['getRoot'](_0x419b38),_0x42bcdd=T(_0x265eee);_0x337452['set'](_0x419b38,_0x42bcdd),_0x4c0251['set'](_0x419b38,Object['fromEntries'](_0x265eee['getAttributes']()));}const _0x3d530f=Array['from'](this['editor']['model']['markers'])['map'](_0x406a9e=>[_0x406a9e['name'],_0x406a9e['getRange']()]),_0x551aee=this['source']['version'];this['_saveMetaData'](_0x551aee,_0x337452,_0x3d530f,_0x4c0251),this['_startingRevisionId']=this['_revisionId'];const _0x54962b=new Map(),_0x12f42c=new Map();for(const _0x359e78 of _0x111c6c){const _0x5db0dd=F(_0x359e78);_0x54962b['set'](_0x359e78,_0x5db0dd),_0x12f42c['set'](_0x359e78,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x54962b,[],_0x12f42c);}['getData'](_0x12a346,_0xb20f7d){if(this['_lastFrom']===_0x12a346&&this['_lastTo']<=_0xb20f7d)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xb20f7d,!0x0);else{if(!this['_savedMetaData']['has'](_0x12a346)){const _0x4537fb=this['_getPreviousFrom'](_0x12a346);this['_calculateMetaData'](_0x4537fb,_0x12a346,!0x1);}this['_calculateMetaData'](_0x12a346,_0xb20f7d,!0x0);}return this['_lastFrom']=_0x12a346,this['_lastTo']=_0xb20f7d,this['_getState']();}['loadState'](_0x191a7){this['_reset'](),this['_lastFrom']=_0x191a7['fromVersion'],this['_lastTo']=_0x191a7['toVersion'];for(const _0x1cda2b in _0x191a7['diffData']){const _0x1ec311=_0x191a7['diffData'][_0x1cda2b]['attachChange'],_0x34fa6d=_0x4c51a9(_0x191a7['diffData'][_0x1cda2b]['attributesBefore'])||{},_0x420fbc=this['_makeModelFromViewString'](_0x191a7['diffData'][_0x1cda2b]['deletions']);_0x420fbc['rootName']=_0x1cda2b,_0x420fbc['_isAttached']=!_0x1ec311||!_0x1ec311['isAttached'],_0x420fbc['isAttached']=()=>_0x420fbc['_isAttached'],this['_baseRoots']['set'](_0x1cda2b,_0x420fbc),this['_baseRootsAttributes']['set'](_0x1cda2b,_0x34fa6d),_0x1ec311&&this['_touchedRoots']['set'](_0x1cda2b,_0x1ec311);const _0x3b583a=this['_makeIdsRoot'](_0x420fbc);this['_baseIdsRoots']['set'](_0x1cda2b,_0x3b583a);for(const [_0x9fc858,_0xae6483]of _0x420fbc['markers']){if(!_0x9fc858['startsWith']('revision:'))continue;const _0x523043=_0x9fc858['split'](':')[0x2];for(const _0x28617e of _0xae6483['getWalker']({'singleCharacters':!0x0})){const _0x14eafa=this['_getVidAttributeName'](_0x28617e),_0xea04da='elementEnd'==_0x28617e['type']?_0x28617e['previousPosition']['path']['slice'](0x0,-0x1):_0x28617e['previousPosition']['path'],_0x5eb006=_0x3b583a['getNodeByPath'](_0xea04da)['getAttribute'](_0x14eafa);this['_touched']['set'](_0x5eb006,{'userId':_0x523043});}}}this['_startingRevisionId']=this['_revisionId'];const _0x4204e6=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x58732d=>!this['_touched']['has'](_0x58732d));let _0x12be8a=0x0;const _0x1140f2=new Map();for(const _0x2ecd72 in _0x191a7['diffData']){const _0x5135ef=_0x191a7['diffData'][_0x2ecd72]['attachChange'],_0x1649f2=_0x4c51a9(_0x191a7['diffData'][_0x2ecd72]['attributesAfter'])||{},_0x4c8614=this['_makeModelFromViewString'](_0x191a7['diffData'][_0x2ecd72]['insertions']);_0x4c8614['rootName']=_0x2ecd72,_0x4c8614['_isAttached']=!_0x5135ef||_0x5135ef['isAttached'],_0x4c8614['isAttached']=()=>_0x4c8614['_isAttached'],this['_diffRoots']['set'](_0x2ecd72,_0x4c8614),this['_diffRootsAttributes']['set'](_0x2ecd72,_0x1649f2);const _0x38fc40=this['_makeIdsRoot'](_0x4c8614,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2ecd72,_0x38fc40),_0x1140f2['set'](_0x2ecd72,_0x4c8614['isAttached']()?_0x1649f2:{});for(const [_0x19aca0,_0x28aa4f]of _0x4c8614['markers']){if(!_0x19aca0['startsWith']('revision:'))continue;const _0x3bbd21=_0x19aca0['split'](':')[0x2];for(const _0xc5fd7 of _0x28aa4f['getWalker']({'singleCharacters':!0x0})){const _0x2a5891=this['_getVidAttributeName'](_0xc5fd7),_0x341a31=this['_revisionId']++,_0x3d4b45='elementEnd'==_0xc5fd7['type']?_0xc5fd7['previousPosition']['path']['slice'](0x0,-0x1):_0xc5fd7['previousPosition']['path'];_0x38fc40['getNodeByPath'](_0x3d4b45)['_setAttribute'](_0x2a5891,_0x341a31),this['_touched']['set'](_0x341a31,{'userId':_0x3bbd21});}}for(const _0x44643c of this['editor']['model']['createRangeIn'](_0x4c8614)['getWalker']({'singleCharacters':!0x0})){const _0x16780c=this['_getVidAttributeName'](_0x44643c),_0x5f37b1='elementEnd'==_0x44643c['type']?_0x44643c['previousPosition']['path']['slice'](0x0,-0x1):_0x44643c['previousPosition']['path'],_0x529d9e=_0x38fc40['getNodeByPath'](_0x5f37b1);_0x529d9e['getAttribute'](_0x16780c)>0x0||_0x529d9e['_setAttribute'](_0x16780c,_0x4204e6[_0x12be8a++]);}for(const [_0x176d38,_0x435248]of _0x4c8614['markers'])_0x176d38['startsWith']('revision:')||this['_markers']['set'](_0x176d38,_0x435248);}const _0x35d6cb=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x35d6cb),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x35d6cb,0x1));const _0x27eb43=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x27eb43),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x27eb43,0x1));const _0x175039=Array['from'](this['_diffRoots'])['map'](([_0x19ff0d,_0x3c98f1])=>[_0x19ff0d,T(_0x3c98f1)]);this['_saveMetaData'](this['_lastTo'],_0x175039,this['_markers'],_0x1140f2);}['_makeModelFromViewString'](_0x4d1ac7){const _0x1aa5cc=JSON['parse'](_0x4d1ac7),_0x494f11=this['editor']['editing']['view']['document'],_0x1d142c=new _0x290c5e(_0x494f11,_0x1aa5cc['map'](_0x552b4c=>P(_0x552b4c,this['editor'])));return this['editor']['data']['toModel'](_0x1d142c);}['_saveMetaData'](_0x22da59,_0x166fbf,_0xc55cad,_0x2f522a){const _0x433343=new Map(_0x166fbf),_0x403e5c=new Map(_0x4c51a9(_0x2f522a)),_0x98ab36=new Map();for(const [_0x1e14f9,_0x35e7e6]of _0xc55cad)_0x98ab36['set'](_0x1e14f9,{'start':_0x35e7e6['start']['clone'](),'end':_0x35e7e6['end']['clone'](),'rootName':_0x35e7e6['root']['rootName']});this['_savedMetaData']['set'](_0x22da59,{'roots':_0x433343,'markers':_0x98ab36,'rootsAttributes':_0x403e5c});}['_removeMetaData'](_0x2a3e35){this['_savedMetaData']['delete'](_0x2a3e35);}['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'](_0x5a7094,_0x3a9975=null){let _0x5b8d79=null;_0x5a7094['is']('documentFragment')||(_0x5b8d79=new ut(_0x5a7094['name'],{'vid_start':null===_0x3a9975?this['_revisionId']++:_0x3a9975++}));const _0x453a67=[];for(const _0x5d9b76 of _0x5a7094['getChildren']())if(_0x5d9b76['is']('element')){_0x453a67['push'](this['_makeIdsRoot'](_0x5d9b76,_0x3a9975));const _0x57decc=_0x453a67[_0x453a67['length']-0x1];null!==_0x3a9975&&(_0x3a9975=_0x57decc['is']('element','$text')?_0x57decc['getAttribute']('vid')+0x1:_0x57decc['getAttribute']('vid_end')+0x1);}else{for(let _0x28d42f=0x0;_0x28d42f<_0x5d9b76['offsetSize'];_0x28d42f++)_0x453a67['push'](new ut('$text',{'vid':null===_0x3a9975?this['_revisionId']++:_0x3a9975++}));}if(_0x5a7094['is']('documentFragment')){const _0x7b496b=F(_0x5a7094['rootName']);return _0x7b496b['_insertChild'](0x0,_0x453a67),_0x7b496b;}return _0x5b8d79['_setAttribute']('vid_end',null===_0x3a9975?this['_revisionId']++:_0x3a9975++),_0x5b8d79['_insertChild'](0x0,_0x453a67),_0x5b8d79;}['_calculateMetaData'](_0x2c9f0f,_0x516ee8,_0x272984){this['_reset']();const {roots:_0x353734,markers:_0xe83874,rootsAttributes:_0x51c4be}=this['_savedMetaData']['get'](_0x2c9f0f);this['_baseRoots']=new Map(_0x353734),this['_baseRootsAttributes']=new Map(_0x4c51a9(_0x51c4be));for(const [_0x37e950,_0x52cc31]of this['_baseRoots'])if('$graveyard'!==_0x37e950&&(this['_diffRoots']['set'](_0x37e950,T(_0x52cc31)),this['_diffRootsAttributes']=new Map(_0x4c51a9(_0x51c4be)),_0x272984)){const _0x4e5ffa=this['_revisionId'];this['_idsRoots']['set'](_0x37e950,this['_makeIdsRoot'](_0x52cc31)),this['_baseIdsRoots']['set'](_0x37e950,this['_makeIdsRoot'](_0x52cc31,_0x4e5ffa));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x272984&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0xa462ac,_0x1ac9ae]of _0xe83874){const _0x553323=this['_baseRoots']['get'](_0x1ac9ae['rootName']),_0x32147e=this['_diffRoots']['get'](_0x1ac9ae['rootName']),_0x4cefe7=new ft(this['_fixPosition'](_0x1ac9ae['start'],_0x553323),this['_fixPosition'](_0x1ac9ae['end'],_0x553323)),_0x207b39=this['_fixRange'](_0x4cefe7,_0x32147e);_0x553323['markers']['set'](_0xa462ac,_0x4cefe7),this['_markers']['set'](_0xa462ac,_0x207b39);}this['_applyOperations'](_0x2c9f0f,_0x516ee8,_0x272984);}['_applyOperations'](_0x3e9ae3,_0x330f38,_0x2a0122){for(const _0x31e7ef of this['source']['getOperations'](_0x3e9ae3,_0x330f38))this['_handleOperation'](_0x31e7ef,_0x2a0122);for(const _0x405d3b of this['_diffRoots']['values']())_0x405d3b['markers']['clear']();for(const [_0x2c40e9,_0x3c8409]of this['_markers']){this['_diffRoots']['get'](_0x3c8409['root']['rootName'])['markers']['set'](_0x2c40e9,_0x3c8409['clone']());}const _0x2120db=new Map(),_0x1654f1=new Map();for(const [_0x3538d3,_0x29c2ae]of this['_diffRoots'])_0x2120db['set'](_0x3538d3,T(_0x29c2ae)),_0x1654f1['set'](_0x3538d3,this['_diffRootsAttributes']['get'](_0x3538d3));this['_saveMetaData'](_0x330f38,_0x2120db,this['_markers'],_0x1654f1);}['_getPreviousFrom'](_0x5cca03){const _0x1441f9=Array['from'](this['_savedMetaData']['keys']());_0x1441f9['sort']((_0x97bf98,_0x4afc62)=>_0x97bf98-_0x4afc62),_0x1441f9['reverse']();for(const _0x5741ae of _0x1441f9)if(_0x5741ae<_0x5cca03)return _0x5741ae;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x35b350,_0x2cbcc2){const _0x2470bb=Array['from'](_0x2cbcc2['markers'])['map'](([_0x511463,_0x514d8a])=>[_0x511463,this['_fixRange'](_0x514d8a,_0x35b350)]);_0x35b350['markers']=new Map(_0x2470bb);}['_transformMarkers'](_0x35c81b){for(const _0x16b451 of this['_markers']['values']()){const _0x2bda75=_0x16b451['getTransformedByOperation'](_0x35c81b),_0x3ac3d9=ft['_createFromRanges'](_0x2bda75);_0x16b451['start']=_0x3ac3d9['start'],_0x16b451['end']=_0x3ac3d9['end'];}}['_handleOperation'](_0x4607bb,_0x44028a){if('addRoot'!=_0x4607bb['type']&&'detachRoot'!=_0x4607bb['type']){if('insert'==_0x4607bb['type']){const _0x2aeab3=_0x4607bb['position']['root']['rootName'];this['_diffRoots']['has'](_0x2aeab3)||(this['_diffRoots']['set'](_0x2aeab3,F(_0x2aeab3,!0x0)),this['_diffRootsAttributes']['set'](_0x2aeab3,{}),_0x44028a&&this['_idsRoots']['set'](_0x2aeab3,F(_0x2aeab3,!0x0)));}else{if('addRootAttribute'==_0x4607bb['type']||'removeRootAttribute'==_0x4607bb['type']||'changeRootAttribute'==_0x4607bb['type'])return void this['_handleRootAttributeOperation'](_0x4607bb);'marker'==_0x4607bb['type']&&this['_handleMarkerOperation'](_0x4607bb);}if('marker'!==_0x4607bb['type']){const _0x36f502=this['_cloneOperation'](_0x4607bb,this['_diffRoots']);_0x36f502['_execute'](),this['_transformMarkers'](_0x36f502);}if(_0x44028a)switch(_0x4607bb['type']){case'insert':this['_handleInsertOperation'](_0x4607bb);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4607bb);break;case'merge':this['_handleMergeOperation'](_0x4607bb);break;case'split':this['_handleSplitOperation'](_0x4607bb);}}else this['_handleRootOperation'](_0x4607bb,_0x44028a);}['_cloneOperation'](_0x110201,_0x3371a8){const _0x3fd66c=_0x110201['clone']();return _0x3fd66c['_authorId']=_0x110201['_authorId'],this['_fixOperation'](_0x3fd66c,_0x3371a8),_0x3fd66c;}['_getBaseVids'](_0x3a1d84){return _0x3a1d84['map'](_0x279682=>{const _0x456bec=this['_getVidAttributeName'](_0x279682);return Number(_0x279682['item']['getAttribute'](_0x456bec));});}['_generateTape'](_0x3a8f22,_0x2d6357){if(_0x3a8f22['is']('element','$text'))_0x2d6357['push']({'item':_0x3a8f22,'type':'text'});else{_0x3a8f22['is']('element')&&_0x2d6357['push']({'item':_0x3a8f22,'type':'elementStart'});for(const _0x3d1c84 of _0x3a8f22['getChildren']())this['_generateTape'](_0x3d1c84,_0x2d6357);_0x3a8f22['is']('element')&&_0x2d6357['push']({'item':_0x3a8f22,'type':'elementEnd'});}return _0x2d6357;}['_getState'](){const _0x11ee46=new Map(this['_touched']),_0x29046a=new Map(_0x11ee46),_0x3dddee=new Map(),_0xbf2e9c={'insertions':{},'deletions':{}},_0x58f9bd={'insertions':{},'deletions':{}},_0x596da3=new Map(),_0x3ebc80=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3ebc80['delete']('$graveyard');for(const _0xf16674 of _0x3ebc80){const _0x5ce6b7=this['_diffRoots']['get'](_0xf16674)||F(_0xf16674,!0x1),_0xe30e03=this['_baseRoots']['get'](_0xf16674)||F(_0xf16674,!0x1);_0x5ce6b7['isAttached']()||_0xe30e03['isAttached']()?(_0xbf2e9c['insertions'][_0xf16674]=T(_0x5ce6b7),_0xbf2e9c['deletions'][_0xf16674]=T(_0xe30e03),this['_copyMarkers'](_0xbf2e9c['deletions'][_0xf16674],_0xe30e03),this['_copyMarkers'](_0xbf2e9c['insertions'][_0xf16674],_0x5ce6b7),_0x58f9bd['insertions'][_0xf16674]=this['_generateTape'](this['_idsRoots']['get'](_0xf16674),[]),_0x58f9bd['deletions'][_0xf16674]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xf16674)||F(_0xf16674,!0x1),[])):_0x3ebc80['delete'](_0xf16674);}for(const _0x5b808b of _0x3ebc80){const _0x14a9ee=_0x58f9bd['insertions'][_0x5b808b];for(const _0x5a540d of _0x14a9ee){const _0x5651e4=this['_getVidAttributeName'](_0x5a540d),_0x20b6a5=_0x5a540d['item']['getAttribute'](_0x5651e4);_0x29046a['delete'](_0x20b6a5),_0x20b6a5>=this['_startingRevisionId']&&_0x3dddee['set'](_0x20b6a5,_0x11ee46['get'](_0x20b6a5));}}for(const _0x5e554d of _0x3ebc80){const _0x5f0143=_0x58f9bd['insertions'][_0x5e554d],_0x4a7595=this['_getBaseVids'](_0x58f9bd['deletions'][_0x5e554d]);let _0x1ea9f4=0x0;for(const _0x32f078 of _0x5f0143){const _0x3678e3=this['_getVidAttributeName'](_0x32f078),_0x1521f6=_0x32f078['item']['getAttribute'](_0x3678e3);if(!_0x3dddee['has'](_0x1521f6)&&!_0x596da3['has'](_0x1521f6)){if(_0x29046a['has'](_0x1521f6))_0x1ea9f4++;else{if(_0x1521f6!=_0x4a7595[_0x1ea9f4]){const _0x5c54fa=_0x11ee46['get'](_0x1521f6)||_0x11ee46['get'](_0x4a7595[_0x1ea9f4]);for(;_0x1521f6!=_0x4a7595[_0x1ea9f4];)_0x29046a['has'](_0x4a7595[_0x1ea9f4])||(_0x596da3['set'](_0x4a7595[_0x1ea9f4],_0x5c54fa),_0x11ee46['set'](_0x4a7595[_0x1ea9f4],_0x5c54fa)),_0x1ea9f4++;}_0x1ea9f4++;}}}}for(const _0x16b441 of _0x3ebc80){const _0x3c4df5=_0x58f9bd['insertions'][_0x16b441];for(const _0x22e252 of _0x3c4df5){const _0x3733ca=this['_getVidAttributeName'](_0x22e252),_0x576d69=_0x22e252['item']['getAttribute'](_0x3733ca);if(_0x596da3['has'](_0x576d69)){const _0x3af795=_0x596da3['get'](_0x576d69);_0x29046a['has'](_0x576d69)||_0x29046a['set'](_0x576d69,{..._0x3af795}),_0x3dddee['set'](_0x576d69,{..._0x3af795});}}}for(const _0x56d95c of _0x29046a['keys']())_0x56d95c>=this['_startingRevisionId']&&_0x29046a['delete'](_0x56d95c);const _0x21a9b8=new Map();for(const _0x18d98f of _0x3ebc80){let _0x2b8f0f=_0x58f9bd['insertions'][_0x18d98f];for(const _0x945196 of _0x2b8f0f)if(_0x945196['item']['is']('element','tableCell')){const _0x13316a=this['_getVidAttributeName'](_0x945196),_0x354df3=_0x945196['item']['getAttribute'](_0x13316a);if(_0x3dddee['has'](_0x354df3)){const _0x4bf1e5=_0x945196['item']['parent']['parent']['getAttribute']('vid_start'),_0xd55d73=_0x21a9b8['get'](_0x4bf1e5)||new Set();_0xd55d73['add'](_0x3dddee['get'](_0x354df3)['userId']),_0x21a9b8['set'](_0x4bf1e5,_0xd55d73);}}_0x2b8f0f=_0x58f9bd['deletions'][_0x18d98f];for(const _0x263379 of _0x2b8f0f)if(_0x263379['item']['is']('element','tableCell')){const _0x1795f5=this['_getVidAttributeName'](_0x263379),_0x59e7bd=_0x263379['item']['getAttribute'](_0x1795f5);if(_0x29046a['has'](_0x59e7bd)){const _0x1bcc24=_0x263379['item']['parent']['parent']['getAttribute']('vid_start'),_0x4aa582=_0x21a9b8['get'](_0x1bcc24)||new Set();_0x4aa582['add'](_0x29046a['get'](_0x59e7bd)['userId']),_0x21a9b8['set'](_0x1bcc24,_0x4aa582);}}for(const _0x211c05 of _0x21a9b8['keys']())(_0x3dddee['has'](_0x211c05)||_0x29046a['has'](_0x211c05))&&_0x21a9b8['delete'](_0x211c05);}for(const _0x53195b of _0x3ebc80){const _0x58c386=_0x58f9bd['insertions'][_0x53195b];let _0x5356c3=null,_0x1ebb90=null;for(const _0x1bad0f of _0x58c386){const _0x516ce1=this['_getVidAttributeName'](_0x1bad0f),_0x4c304b=_0x1bad0f['item']['getAttribute'](_0x516ce1),_0x4e6dee=_0x21a9b8['get'](_0x4c304b);_0x4e6dee&&'elementStart'==_0x1bad0f['type']&&(_0x5356c3=Array['from'](_0x4e6dee)[0x0],_0x1ebb90=_0x1bad0f['item']['getAttribute']('vid_end')),_0x5356c3&&(_0x29046a['set'](_0x4c304b,{'userId':_0x5356c3}),_0x3dddee['set'](_0x4c304b,{'userId':_0x5356c3})),_0x4c304b==_0x1ebb90&&(_0x5356c3=null,_0x1ebb90=null);}}const _0x245e47={},_0x2650ee=new Set();for(const _0x2c4e99 of _0x3ebc80){const _0x3ddc04=_0xbf2e9c['deletions'][_0x2c4e99],_0xddfee7=_0xbf2e9c['insertions'][_0x2c4e99];for(const {userId:_0xe5cab9}of this['_touchedMarkers']['values']())null!==_0xe5cab9&&_0x2650ee['add'](_0xe5cab9);for(const {userId:_0x21f38f}of this['_touchedRoots']['values']())null!==_0x21f38f&&_0x2650ee['add'](_0x21f38f);this['_markChanges'](_0xddfee7,_0x58f9bd['insertions'][_0x2c4e99],_0x3dddee,'insertion',_0x2650ee),this['_markChanges'](_0x3ddc04,_0x58f9bd['deletions'][_0x2c4e99],_0x29046a,'deletion',_0x2650ee),_0x245e47[_0x2c4e99]={'insertions':this['_prepareViewToSave'](_0xddfee7),'deletions':this['_prepareViewToSave'](_0x3ddc04),'attachChange':this['_touchedRoots']['get'](_0x2c4e99)||null,'attributesBefore':_0x4c51a9(this['_baseRootsAttributes']['get'](_0x2c4e99))||{},'attributesAfter':_0x4c51a9(this['_diffRootsAttributes']['get'](_0x2c4e99))};}return{'diffData':_0x245e47,'authorsIds':Array['from'](_0x2650ee)};}['_processRootBeforeSave'](_0x4548d3){for(const [,_0x22da4f]of _0x4548d3['markers']){const _0x37b5e9=_0x22da4f['start']['getAncestors']()['filter'](_0x1c4809=>'tableCell'==_0x1c4809['name']);for(const _0x25a185 of _0x37b5e9)0x1==_0x25a185['childCount']&&_0x25a185['getChild'](0x0)['is']('element','paragraph')&&_0x25a185['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x30518f){this['_processRootBeforeSave'](_0x30518f);const _0x589a9b=this['editor']['data']['toView'](_0x30518f,{}),_0x49f602=Array['from'](_0x589a9b['getChildren']())['map'](_0x3563c4=>this['_getViewJson'](_0x3563c4));return JSON['stringify'](_0x49f602);}['_getViewJson'](_0x16935a){if(_0x16935a['is']('$text'))return _0x16935a['data'];{const _0x1781c0=_0x16935a;return{'type':Object['keys'](E)['find'](_0x11ac31=>_0x16935a instanceof E[_0x11ac31]),'name':_0x1781c0['name'],'attributes':Array['from'](_0x1781c0['getAttributes']()),'children':Array['from'](_0x1781c0['getChildren']())['map'](_0x3f01fa=>this['_getViewJson'](_0x3f01fa))};}}['_markChanges'](_0x74e8c,_0x3e4026,_0x3c108e,_0x3fd610,_0x38c708){let _0x52623a=null,_0x36687f=null,_0x415c30=0x0;const _0x292f57=this['editor']['model'];for(let _0x5024bb=0x0;_0x5024bb<_0x3e4026['length'];_0x5024bb++){const _0xca2c23=this['_getVidAttributeName'](_0x3e4026[_0x5024bb]),_0x2d73d4=_0x3e4026[_0x5024bb]['item']['getAttribute'](_0xca2c23),_0x5efb92=_0x3c108e['get'](_0x2d73d4),_0x41484f=_0x5024bb==_0x3e4026['length']-0x1;(!_0x52623a&&_0x5efb92&&(_0x52623a=_0x5efb92,_0x36687f=_0x3e4026[_0x5024bb]),_0x52623a&&(!_0x5efb92||_0x5efb92['userId']!=_0x52623a['userId']))&&(_0x40754a(_0x5efb92,B(_0x36687f,_0x74e8c,_0x292f57),B(_0x3e4026[_0x5024bb],_0x74e8c,_0x292f57)),_0x52623a=_0x5efb92||null,_0x36687f=_0x5efb92?_0x3e4026[_0x5024bb]:null),_0x52623a&&_0x41484f&&_0x40754a(_0x5efb92,B(_0x36687f,_0x74e8c,_0x292f57),J(_0x3e4026[_0x5024bb],_0x74e8c,_0x292f57));}function _0x40754a(_0xda134,_0x1ccfcc,_0x88d1f){const _0x2ec259=_0x52623a['userId'],_0x28d397='revision:'+_0x3fd610+':'+_0x2ec259+':'+_0x415c30++,_0x2f5aa7=_0x292f57['createRange'](_0x1ccfcc,_0x88d1f);_0x74e8c['markers']['set'](_0x28d397,_0x2f5aa7),null!==_0x2ec259&&_0x38c708['add'](_0x2ec259);}}['_getVidAttributeName'](_0x1f6380){switch(_0x1f6380['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1f4c2e,_0x362abf){_0x1f4c2e['baseVersion']=null;for(const _0x399172 in _0x1f4c2e){const _0x547592=_0x1f4c2e[_0x399172];if(_0x547592 instanceof vt){const _0x29d304=_0x362abf['get'](_0x547592['root']['rootName']);_0x1f4c2e[_0x399172]=this['_fixPosition'](_0x547592,_0x29d304);}if(_0x547592 instanceof ft){const _0x4cdc73=_0x362abf['get'](_0x547592['root']['rootName']);_0x1f4c2e[_0x399172]=this['_fixRange'](_0x547592,_0x4cdc73);}'root'===_0x399172&&(_0x1f4c2e['root']=_0x362abf['get'](_0x1f4c2e['root']['rootName']));}}['_fixRange'](_0x27161d,_0x5a0c36){return this['editor']['model']['createRange'](this['_fixPosition'](_0x27161d['start'],_0x5a0c36),this['_fixPosition'](_0x27161d['end'],_0x5a0c36));}['_fixPosition'](_0x300a27,_0x48e7c1){return this['editor']['model']['createPositionFromPath'](_0x48e7c1,_0x300a27['path'],_0x300a27['stickiness']);}['_handleInsertOperation'](_0x461513){const _0x5bad35=this['_idsRoots']['get'](_0x461513['position']['root']['rootName']),_0x3de021=this['_fixPosition'](_0x461513['position'],_0x5bad35),_0x198bd0=null===_0x461513['_authorId']?null:_0x461513['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3f413d=_0x3de021['parent'],_0x17be2a=this['_revisionId'],_0x56eba3=[];for(const _0x24e0a7 of _0x461513['nodes'])if(_0x24e0a7['is']('element'))_0x56eba3['push'](this['_makeIdsRoot'](_0x24e0a7));else{for(let _0x29f0d9=0x0;_0x29f0d9<_0x24e0a7['offsetSize'];_0x29f0d9++)_0x56eba3['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x3f88db=this['_revisionId'];for(let _0x5077a8=_0x17be2a;_0x5077a8<_0x3f88db;_0x5077a8++)this['_touched']['set'](_0x5077a8,{'userId':_0x198bd0});_0x3f413d['_insertChild'](_0x3de021['offset'],_0x56eba3);}['_handleMoveOperation'](_0x27a498){(_0x27a498=this['_cloneOperation'](_0x27a498,this['_idsRoots']))['_execute']();const _0x4c078e=null===_0x27a498['_authorId']?null:_0x27a498['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x178d09=_0x27a498['getMovedRangeStart'](),_0x449aa1=_0x178d09['parent'],_0x3ca13d=_0x178d09['offset'];!function _0x4d69ec(_0x182ce7,_0x4b60e3,_0x3c8282,_0x1839a2){for(let _0x4d49c8=_0x3c8282;_0x4d49c8<_0x1839a2;_0x4d49c8++){const _0x49f35a=_0x4b60e3['getChild'](_0x4d49c8);_0x49f35a['is']('element','$text')?_0x182ce7['set'](_0x49f35a['getAttribute']('vid'),{'userId':_0x4c078e}):(_0x182ce7['set'](_0x49f35a['getAttribute']('vid_start'),{'userId':_0x4c078e}),_0x4d69ec(_0x182ce7,_0x49f35a,0x0,_0x49f35a['childCount']),_0x182ce7['set'](_0x49f35a['getAttribute']('vid_end'),{'userId':_0x4c078e}));}}(this['_touched'],_0x449aa1,_0x3ca13d,_0x3ca13d+_0x27a498['howMany']);}['_handleMergeOperation'](_0x688935){const _0x585af1=null===(_0x688935=this['_cloneOperation'](_0x688935,this['_idsRoots']))['_authorId']?null:_0x688935['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x173e48=_0x688935['targetPosition']['parent'],_0x42d2c4=_0x688935['sourcePosition']['parent'],_0x3abd2a=_0x173e48['getAttribute']('vid_end'),_0x272a9f=_0x42d2c4['getAttribute']('vid_start');_0x173e48['_setAttribute']('vid_end',_0x42d2c4['getAttribute']('vid_end')),_0x42d2c4['_setAttribute']('vid_end',_0x3abd2a),this['_touched']['set'](_0x272a9f,{'userId':_0x585af1}),this['_touched']['set'](_0x3abd2a,{'userId':_0x585af1}),_0x688935['_execute']();}['_handleSplitOperation'](_0x7f41b2){const _0x5e5e65=null===(_0x7f41b2=this['_cloneOperation'](_0x7f41b2,this['_idsRoots']))['_authorId']?null:_0x7f41b2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5bffb1=_0x7f41b2['graveyardPosition'],_0x148ae8=_0x7f41b2['splitPosition']['parent'];_0x7f41b2['_execute']();const _0x174f7f=_0x148ae8['getAttribute']('vid_end'),_0x49fcbf=_0x7f41b2['insertionPosition']['nodeAfter'];if(_0x5bffb1){const _0x3fc7db=_0x49fcbf['getAttribute']('vid_end'),_0x394c4c=_0x148ae8['getAttribute']('vid_end');_0x148ae8['_setAttribute']('vid_end',_0x3fc7db),_0x49fcbf['_setAttribute']('vid_end',_0x394c4c),this['_touched']['set'](_0x148ae8['getAttribute']('vid_end'),{'userId':_0x5e5e65}),this['_touched']['set'](_0x49fcbf['getAttribute']('vid_start'),{'userId':_0x5e5e65});}else{const _0x4f6b57=this['_revisionId']++,_0x392a2f=this['_revisionId']++;_0x148ae8['_setAttribute']('vid_end',_0x4f6b57),_0x49fcbf['_setAttribute']('vid_start',_0x392a2f),_0x49fcbf['_setAttribute']('vid_end',_0x174f7f),this['_touched']['set'](_0x4f6b57,{'userId':_0x5e5e65}),this['_touched']['set'](_0x392a2f,{'userId':_0x5e5e65});}}['_handleMarkerOperation'](_0x274e6d){if(!_0x274e6d['affectsData'])return;const _0x80ec55=(_0x274e6d=this['_cloneOperation'](_0x274e6d,this['_diffRoots']))['oldRange']?_0x274e6d['oldRange']['root']:null,_0x512cf9=_0x274e6d['newRange']?_0x274e6d['newRange']['root']:null;_0x80ec55&&this['_markers']['delete'](_0x274e6d['name']),_0x512cf9&&this['_markers']['set'](_0x274e6d['name'],_0x274e6d['newRange']['clone']());const _0x2426de=null===_0x274e6d['_authorId']?null:_0x274e6d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37b2a6=_0x274e6d['name'];if(!this['_touchedMarkers']['has'](_0x37b2a6))return void this['_touchedMarkers']['set'](_0x37b2a6,{'range':_0x274e6d['oldRange'],'userId':_0x2426de});const _0x20e082=this['_touchedMarkers']['get'](_0x37b2a6),_0x495b1c=_0x20e082['range'],_0x5f22b6=_0x274e6d['newRange'];null==_0x495b1c&&null==_0x5f22b6||_0x495b1c&&_0x5f22b6&&_0x495b1c['isEqual'](_0x5f22b6)?this['_touchedMarkers']['delete'](_0x274e6d['name']):_0x20e082['userId']=_0x2426de;}['_handleRootOperation'](_0x57ff88,_0x56e5c2){this['_diffRoots']['has'](_0x57ff88['rootName'])?this['_diffRoots']['get'](_0x57ff88['rootName'])['_isAttached']=_0x57ff88['isAdd']:(this['_diffRoots']['set'](_0x57ff88['rootName'],F(_0x57ff88['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x57ff88['rootName'],{}),_0x56e5c2&&this['_idsRoots']['set'](_0x57ff88['rootName'],F(_0x57ff88['rootName'],!0x0)));const _0x1e5b51=null===_0x57ff88['_authorId']?null:_0x57ff88['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2776b0=this['_touchedRoots']['get'](_0x57ff88['rootName']);_0x2776b0&&_0x2776b0['userId']===_0x1e5b51?this['_touchedRoots']['delete'](_0x57ff88['rootName']):this['_touchedRoots']['set'](_0x57ff88['rootName'],{'userId':_0x1e5b51,'isAttached':_0x57ff88['isAdd']});}['_handleRootAttributeOperation'](_0x63e271){const _0x189044=this['_diffRootsAttributes']['get'](_0x63e271['root']['rootName']);null===_0x63e271['newValue']?delete _0x189044[_0x63e271['key']]:_0x189044[_0x63e271['key']]=_0x63e271['newValue'];}}function T(_0x220f36){const _0x4a08c7=F(_0x220f36['rootName'],_0x220f36['isAttached']());for(const _0x2a3f80 of _0x220f36['getChildren']()){const _0x189f97=_0x2a3f80['_clone'](!0x0);_0x4a08c7['_appendChild'](_0x189f97);}return _0x4a08c7;}function F(_0x21cae8,_0x417b2a=!0x0){const _0x1ac92c=new gt();return _0x1ac92c['rootName']=_0x21cae8,_0x1ac92c['_isAttached']=_0x417b2a,_0x1ac92c['isAttached']=()=>_0x1ac92c['_isAttached'],_0x1ac92c;}function B(_0x58048c,_0x55c544,_0x262315){const _0x3ef83f='elementEnd'==_0x58048c['type']?_0x262315['createPositionAt'](_0x58048c['item'],'end'):_0x262315['createPositionBefore'](_0x58048c['item']);return _0x262315['createPositionFromPath'](_0x55c544,_0x3ef83f['path'],_0x3ef83f['stickiness']);}function J(_0x296c62,_0x443ffc,_0x4bae60){const _0x5c73aa='elementStart'==_0x296c62['type']?_0x4bae60['createPositionAt'](_0x296c62['item'],0x0):_0x4bae60['createPositionAfter'](_0x296c62['item']);return _0x4bae60['createPositionFromPath'](_0x443ffc,_0x5c73aa['path'],_0x5c73aa['stickiness']);}class hs extends _0x646829{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x434433,_0x59dea0){super(_0x434433),this['focusTracker']=new _0x2fa1d4(),this['keystrokes']=new _0x28165a(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x59dea0),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'](),_0x5d124a({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x59916f=_0x35fdd3=>_0x35fdd3['stopPropagation']();this['keystrokes']['set']('arrowright',_0x59916f),this['keystrokes']['set']('arrowleft',_0x59916f),this['keystrokes']['set']('arrowup',_0x59916f),this['keystrokes']['set']('arrowdown',_0x59916f);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x18daa6){this['revisionNameInputView']['fieldView']['element']['value']=_0x18daa6['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x271f4e){const _0xee987d=new at(this['locale'],ti),_0x3b0680=_0xee987d['fieldView'];_0x3b0680['extendTemplate']({'attributes':{'maxlength':'220'}});let _0xf1b2fb=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x271f4e&&(_0xf1b2fb+='\x20('+m(this['locale'],'optional')+')'),(_0xee987d['label']=_0xf1b2fb,_0x3b0680['on']('input',()=>{this['revisionNameInputValue']=_0x3b0680['element']['value']['trim']();}),_0xee987d);}}class f extends _0x1b3b72{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x218186=this['editor'],_0x5076b7=_0x218186['plugins']['get']('RevisionTracker');_0x218186['ui']['componentFactory']['add']('revisionHistory',_0x178dcf=>{const _0x1e4cfd=_0x2b8694(_0x178dcf),_0x39b2e1=_0x1e4cfd['panelView']['children'],_0x2d24dc=new _0x1848d4(_0x178dcf),_0x21a261=new _0xea1274(_0x178dcf),_0x478da5=new _0x3e960e(_0x178dcf),_0x978475=new _0xea1274(_0x178dcf),_0x1308eb=new _0x3e960e(_0x178dcf);return _0x1e4cfd['bind']('isEnabled')['to'](_0x5076b7,'isReady',_0x5076b7,'isEnabled',_0x218186,'isReadOnly',(_0x30be24,_0x3385a3,_0x2d8e98)=>_0x30be24&&_0x3385a3&&!_0x2d8e98),_0x1e4cfd['buttonView']['set']({'icon':_0x47b65b,'label':m(_0x178dcf,'Revision\x20history'),'tooltip':!0x0}),_0x478da5['set']({'label':m(_0x178dcf,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x478da5['bind']('isEnabled')['to'](_0x5076b7,'isReady',_0x5076b7,'isEnabled',_0x218186,'isReadOnly',(_0x2c4c56,_0x53451a,_0x345c64)=>_0x2c4c56&&_0x53451a&&!_0x345c64),_0x478da5['on']('execute',()=>this['_showDialog']()),_0x1308eb['set']({'label':m(_0x178dcf,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x1308eb['bind']('isEnabled')['to'](_0x5076b7,'isReady',_0x218186,'isReadOnly',(_0x27617b,_0x3b5b27)=>_0x27617b&&!_0x3b5b27),_0x1308eb['on']('execute',()=>{_0x218186['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x1e4cfd['isOpen']=!0x1,_0x218186['editing']['view']['focus']();}),_0x21a261['children']['add'](_0x478da5),_0x978475['children']['add'](_0x1308eb),_0x2d24dc['role']='menu',_0x2d24dc['items']['addMany']([_0x21a261,_0x978475]),_0x39b2e1['add'](_0x2d24dc),_0x1e4cfd;}),_0x218186['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x31597b=this['editor'],_0x43e785=_0x31597b['locale'],_0x19a0f3=new _0x28acf8(_0x43e785),_0x586ef2=new _0x3a45c2(_0x43e785);_0x19a0f3['buttonView']['set']({'icon':_0x47b65b,'label':m(_0x43e785,'Revision\x20history')});const _0x483c8b=new _0x59df58(_0x43e785,_0x19a0f3),_0x46e7bf=new _0x604b5c(_0x43e785);_0x46e7bf['set']({'label':m(_0x43e785,'Save\x20current\x20revision')}),_0x46e7bf['delegate']('execute')['to'](_0x19a0f3),_0x46e7bf['on']('execute',()=>{this['_showDialog']();}),_0x483c8b['children']['add'](_0x46e7bf),_0x586ef2['items']['add'](_0x483c8b);const _0x2aee0c=new _0x59df58(_0x43e785,_0x19a0f3),_0x175954=new _0x604b5c(_0x43e785);return _0x175954['set']({'label':m(_0x43e785,'Open\x20revision\x20history')}),_0x175954['delegate']('execute')['to'](_0x19a0f3),_0x175954['on']('execute',()=>{_0x31597b['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x2aee0c['children']['add'](_0x175954),_0x586ef2['items']['add'](_0x2aee0c),_0x19a0f3['panelView']['children']['add'](_0x586ef2),_0x19a0f3;}['_showDialog'](){const _0x510071=this['editor'],_0x54ef58=_0x510071['locale'],_0x4d8933=_0x510071['plugins']['get']('Dialog'),_0x3d31c4=_0x510071['plugins']['get']('RevisionTracker');function _0x5b0286(_0x13bcd5){_0x510071['config']['get']('revisionHistory.requireRevisionName')&&''===_0x13bcd5['revisionName']?_0x13bcd5['revisionNameInputView']['errorText']=m(_0x54ef58,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x510071['plugins']['get'](u)['saveRevision']({'name':_0x13bcd5['revisionName']}),_0x4d8933['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5b0286(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4d8933['show']({'id':'revisionSave','title':m(_0x54ef58,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x510071['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4d8933['hide']()},{'label':m(_0x510071['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x410df1){_0x410df1['bind']('isEnabled')['to'](_0x3d31c4,'isReady',_0x3d31c4,'isEnabled',_0x510071,'isReadOnly',(_0x3e1d46,_0x14f404,_0x324024)=>_0x3e1d46&&_0x14f404&&!_0x324024);},'onExecute':()=>_0x5b0286(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2b4fb1=this['editor'],_0x2d31f9=_0x2b4fb1['locale'];this['_saveRevisionFormView']=new hs(_0x2d31f9,_0x2b4fb1['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x646829{['changeId'];['_model'];constructor(_0x499235,_0x59e71f){super(_0x499235),this['_model']=_0x59e71f,this['changeId']=_0x59e71f['id'];const _0x240106=this['bindTemplate'],_0x1ca4c0=m(_0x499235,_0x59e71f['data']['isSuggestion']?'Suggested\x20by':'add'==_0x59e71f['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x59e71f['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x240106['to']('type',_0x1bc842=>'ck-revision-change__'+_0x1bc842)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x1ca4c0}]},{'text':'\x20'+_0x59e71f['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x122d77(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x536fe1){super(),this['id']=_0x536fe1['id']||_0x26ec69(),this['author']=_0x536fe1['author'],this['type']=_0x536fe1['type'],this['data']=_0x536fe1['data']||{},this['rootName']=_0x536fe1['rootName'],this['set']('createdAt',_0x536fe1['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x3e9619,_0x5c6cf2){this['newRevisionId']=_0x3e9619,this['oldRevisionId']=_0x5c6cf2,this['changes']=new _0x35d588();}['_setChanges'](_0x9e796){for(const _0x47a7ed of _0x9e796)this['changes']['add'](_0x47a7ed);}}const Y={'c':_0x5bd0fa,'a':_0x37234a,'e':_0xbcd520,'r':_0x50fc29,'u':_0x2e158c};class d extends _0x1b3b72{['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[_0x440b0a,_0xb68efe,j];}constructor(_0x520a58){super(_0x520a58),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',(_0x3180b9,_0x3da75f,_0x46be8a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x340cfb=>{for(const _0x1adedd of this['editor']['editing']['view']['document']['roots'])_0x46be8a?_0x340cfb['removeClass']('ck-editor__editable__overlay',_0x1adedd):_0x340cfb['addClass']('ck-editor__editable__overlay',_0x1adedd);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xabeb7=>null!==_0xabeb7),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1c9c8c,_0x4b88ae,_0x319e07)=>_0x1c9c8c&&_0x319e07?_0x4b88ae['changes']['getIndex'](_0x319e07):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3ffd41,_0x24d697)=>_0x3ffd41?_0x24d697['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0xb68efe);}['init'](){const _0x48ec3f=this['editor'],_0x35364f=new yt(_0x48ec3f,{'direction':'backward'}),_0x5c069b=new yt(_0x48ec3f,{'direction':'forward'});(_0x48ec3f['commands']['add']('showPreviousChange',_0x35364f),_0x48ec3f['commands']['add']('showNextChange',_0x5c069b),_0x48ec3f['commands']['add']('restoreRevision',new _t(_0x48ec3f)),this['on']('change:numberOfChanges',()=>{_0x35364f['refresh'](),_0x5c069b['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x48ec3f['enableReadOnlyMode']('revision-viewer'),_0x48ec3f['plugins']['has']('WidgetToolbarRepository'))&&_0x48ec3f['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0xa5b2a5){await this['loadRevisionData'](_0xa5b2a5);const _0x57125d={};for(const _0x3be2ac in _0xa5b2a5['diffData']){if(_0xa5b2a5['diffData'][_0x3be2ac]['attachChange']&&!_0xa5b2a5['diffData'][_0x3be2ac]['attachChange']['isAttached'])continue;const _0x3dc79d=this['_removeRevisionMarkers'](JSON['parse'](_0xa5b2a5['diffData'][_0x3be2ac]['insertions'])),_0x3efecd=this['editor']['editing']['view']['document'],_0x19b2ec=new _0x290c5e(_0x3efecd,_0x3dc79d['map'](_0x3805d6=>this['_getViewObj'](_0x3805d6)));this['editor']['data']['processor']['useFillerType']('marked'),_0x57125d[_0x3be2ac]=this['editor']['data']['processor']['toData'](_0x19b2ec),this['editor']['data']['processor']['useFillerType']('default');}return _0x57125d;}async['getRevisionRootsAttributes'](_0x7c7510){await this['loadRevisionData'](_0x7c7510);const _0x4299dd={};for(const _0x3d53f0 in _0x7c7510['diffData'])_0x7c7510['diffData'][_0x3d53f0]['attachChange']&&!_0x7c7510['diffData'][_0x3d53f0]['attachChange']['isAttached']||(_0x4299dd[_0x3d53f0]=_0x7c7510['diffData'][_0x3d53f0]['attributesAfter']||{});return _0x4299dd;}['_removeRevisionMarkers'](_0x267e1a){return(_0x267e1a=_0x267e1a['filter'](_0x45a776=>!_0x45a776['name']||'revision-start'!==_0x45a776['name']&&'revision-end'!==_0x45a776['name']))['forEach'](_0x58b44e=>{'string'!=typeof _0x58b44e&&(_0x58b44e['children']=this['_removeRevisionMarkers'](_0x58b44e['children']),_0x58b44e['attributes']=_0x58b44e['attributes']['filter'](_0x1e1527=>!_0x1e1527[0x0]['startsWith']('data-revision-')));}),_0x267e1a;}async['compare'](_0xe9d6e0,_0x5c3e34,_0x260c0c=!0x1){if(!this['isEnabled'])return;const _0x27409b=this['diff'],_0x40d6da=this['repository'],_0x415176='string'==typeof _0xe9d6e0?_0x40d6da['getRevision'](_0xe9d6e0):_0xe9d6e0,_0x5196c3='string'==typeof _0x5c3e34?_0x40d6da['getRevision'](_0x5c3e34):_0x5c3e34,_0x44e044=_0x415176['id'],_0x466cb6=_0x5196c3?_0x5196c3['id']:null;if(!_0x260c0c&&this['diff']&&this['diff']['newRevisionId']===_0x44e044&&this['diff']['oldRevisionId']===_0x466cb6)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x44e044,_0x466cb6);const _0x52ae19=this['_getRevisionsRange'](_0x415176,_0x5196c3,!0x0)['map'](_0x122b3f=>this['loadRevisionData'](_0x122b3f));return _0x52ae19['push'](new Promise(_0x9ac01c=>{setTimeout(_0x9ac01c,0x14);})),Promise['all'](_0x52ae19)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0xb7ac9d=this['_getDiff'](_0x44e044,_0x466cb6);for(const _0x1c5dc7 of _0xb7ac9d['changes'])this['_changeIdToChange']['set'](_0x1c5dc7['id'],_0x1c5dc7);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2920e9=>{for(const _0x3d5d18 of this['editor']['model']['document']['getRootNames']())_0x2920e9['detachRoot'](_0x3d5d18);for(const _0x4aef7c of Object['keys'](_0xb7ac9d['model'])){const _0x15fe64=_0x2920e9['addRoot'](_0x4aef7c);for(const _0x5a93b5 of Object['keys'](_0xb7ac9d['attributes'][_0x4aef7c]))_0x2920e9['setAttribute'](_0x5a93b5,_0xb7ac9d['attributes'][_0x4aef7c][_0x5a93b5],_0x15fe64);_0x2920e9['insert'](_0xb7ac9d['model'][_0x4aef7c],_0x15fe64,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0xb7ac9d['changes'])),this['isReady']=!0x0;})['catch'](_0x116bf7=>{console['error'](_0x116bf7),this['_cleanUp'](),_0x27409b&&(this['diff']=_0x27409b),this['isReady']=!0x0;});}['addRevisionData'](_0x361ea5,_0x1cb421){const _0x20e57b=this['repository']['createRevision'](_0x361ea5);return _0x20e57b['on']('_update',(_0x4f5f8a,_0x140db6,_0x490c97)=>_0x1cb421(_0x140db6,_0x490c97,_0x20e57b)),this['repository']['addRevision'](_0x20e57b),_0x20e57b;}['loadRevisionData'](_0x514816){if(!_0x514816||_0x514816['diffData'])return Promise['resolve']();{const _0x2d3d57=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x2d3d57,'revisionId':_0x514816['id']})['then'](_0x2e94c5=>{_0x514816['_update']({'diffData':_0x2e94c5['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},_0x4230ba=>{for(const _0x2e44f8 of this['editor']['model']['document']['getRootNames']())_0x4230ba['detachRoot'](_0x2e44f8);});}['_sortAndFilterDiffChanges'](_0x2c7d84){const _0x1afa23=[],_0x44351c=new Map();for(const _0x4d287c of this['editor']['model']['document']['getRootNames']()){const _0x1dfb9d=this['editor']['editing']['view']['getDomRoot'](_0x4d287c);if(!_0x1dfb9d)continue;const _0x169eb5=_0x1dfb9d['getClientRects']()['item'](0x0);_0x169eb5&&(_0x1afa23['push'](_0x4d287c),_0x44351c['set'](_0x4d287c,_0x169eb5));}return _0x1afa23['sort']((_0x260056,_0x35d221)=>{const _0x2e6cf5=_0x44351c['get'](_0x260056),_0x2385b5=_0x44351c['get'](_0x35d221);return _0x2e6cf5['y']-_0x2385b5['y']||_0x2e6cf5['x']-_0x2385b5['x'];}),(_0x2c7d84=_0x2c7d84['filter'](_0x950d3e=>_0x1afa23['includes'](_0x950d3e['rootName'])))['sort']((_0x1d0d14,_0xf2dca)=>_0x1afa23['indexOf'](_0x1d0d14['rootName'])-_0x1afa23['indexOf'](_0xf2dca['rootName'])),_0x2c7d84;}['_makeTape'](_0x5cdfd9){const _0x1a6270=Array['from'](_0x5cdfd9['markers'])['filter'](([_0x3889ec,_0x568ad7])=>_0x3889ec['startsWith']('revision:')&&!_0x568ad7['isCollapsed']),_0xf30d0c=Array['from'](this['editor']['model']['createRangeIn'](_0x5cdfd9)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1a6270['length'])for(const _0x2d44fb of _0xf30d0c){const [_0x18a496,_0x9ea13c]=_0x1a6270[0x0],[,_0x13b8c6,_0x84f498]=_0x18a496['split'](':');if(_0x9ea13c['end']['isEqual'](_0x2d44fb['nextPosition'])&&_0x1a6270['shift'](),(_0x2d44fb['previousPosition']['isEqual'](_0x9ea13c['start'])||_0x2d44fb['previousPosition']['isAfter'](_0x9ea13c['start']))&&('insertion'==_0x13b8c6?_0x2d44fb['isAdded']={'userId':_0x84f498}:'deletion'==_0x13b8c6&&(_0x2d44fb['isRemoved']={'userId':_0x84f498})),0x0==_0x1a6270['length'])break;}return _0xf30d0c;}['_refreshStartEndIndex'](_0x2c81a0){const _0x5c27c6=new Map();for(let _0x55b081=0x0;_0x55b081<_0x2c81a0['length'];_0x55b081++)'text'===_0x2c81a0[_0x55b081]['type']?(_0x2c81a0[_0x55b081]['item']['startIndex']=_0x55b081,_0x2c81a0[_0x55b081]['item']['endIndex']=_0x55b081):('elementStart'===_0x2c81a0[_0x55b081]['type']?_0x2c81a0[_0x55b081]['item']['startIndex']=_0x55b081:'elementEnd'===_0x2c81a0[_0x55b081]['type']&&(_0x2c81a0[_0x55b081]['item']['endIndex']=_0x55b081),_0x5c27c6['set'](_0x2c81a0[_0x55b081]['id'],_0x55b081));for(const _0x266980 of _0x5c27c6['values']())'elementStart'===_0x2c81a0[_0x266980]['type']?_0x2c81a0[_0x266980]['item']['endIndex']=_0x5c27c6['get'](_0x2c81a0[_0x266980]['pairId']):'elementEnd'===_0x2c81a0[_0x266980]['type']&&(_0x2c81a0[_0x266980]['item']['startIndex']=_0x5c27c6['get'](_0x2c81a0[_0x266980]['pairId']));}['_processTape'](_0x15fe1a){for(let _0x1d017c=0x0;_0x1d017c<_0x15fe1a['length'];_0x1d017c++){if('elementStart'===_0x15fe1a[_0x1d017c]['type'])_0x15fe1a[_0x1d017c]['item']['startIndex']=_0x1d017c;else{if('elementEnd'===_0x15fe1a[_0x1d017c]['type']){_0x15fe1a[_0x1d017c]['item']['endIndex']=_0x1d017c;const _0x2bd69d=_0x15fe1a[_0x1d017c]['item']['startIndex'];_0x15fe1a[_0x2bd69d]['pairId']=_0x15fe1a[_0x1d017c]['id'],_0x15fe1a[_0x1d017c]['pairId']=_0x15fe1a[_0x2bd69d]['id'];}else _0x15fe1a[_0x1d017c]['item']['startIndex']=_0x1d017c,_0x15fe1a[_0x1d017c]['item']['endIndex']=_0x1d017c,_0x15fe1a[_0x1d017c]['pairId']=null;}_0x15fe1a[_0x1d017c]['markersStart']||(_0x15fe1a[_0x1d017c]['markersStart']=[],_0x15fe1a[_0x1d017c]['markersEnd']=[]);}}['_markInsertions'](_0x254943,_0x38b5ce){const _0x1ccf0a=_0x254943['filter'](_0x11bd63=>!_0x11bd63['isAdded']);for(let _0x5cbe37=0x0;_0x5cbe37<_0x38b5ce['length'];_0x5cbe37++)_0x38b5ce[_0x5cbe37]['isAdded']&&(_0x1ccf0a[_0x5cbe37]['isAdded']=_0x38b5ce[_0x5cbe37]['isAdded']);}['_makeModelFromViewString'](_0x1bc243){const _0x2d8b13=JSON['parse'](_0x1bc243),_0x3a67bc=this['editor']['editing']['view']['document'],_0x27f7b0=new _0x290c5e(_0x3a67bc,_0x2d8b13['map'](_0x3e16b8=>this['_getViewObj'](_0x3e16b8)));return this['editor']['data']['toModel'](_0x27f7b0);}['_getViewObj'](_0x46bba5){const _0x41c612=this['editor']['editing']['view']['document'];if('string'==typeof _0x46bba5)return new _0x2c8453(_0x41c612,_0x46bba5);{const _0x1ae7a9=_0x46bba5['children']['map'](_0x3a0a18=>this['_getViewObj'](_0x3a0a18));return new(Y[_0x46bba5['type']]||_0x34046a)(_0x41c612,_0x46bba5['name'],_0x46bba5['attributes'],_0x1ae7a9);}}['_getDiff'](_0x5a5e34,_0x2f0172=null){const _0xf7186f=this['repository']['getRevision'](_0x5a5e34),_0x57b8ad=_0x2f0172?this['repository']['getRevision'](_0x2f0172):null,_0x473e76=this['_getRevisionsRange'](_0xf7186f,_0x57b8ad),_0x3d2544=_0x473e76[_0x473e76['length']-0x1],_0x56ce2a=new Map(),_0x1345e5={'model':{},'attributes':{},'changes':[]},_0x9bd9d=new Set(),_0x117d35=new Map();for(let _0x4f7f60=_0x473e76['length']-0x1;_0x4f7f60>=0x0;_0x4f7f60--){const _0x5b0326=_0x473e76[_0x4f7f60];for(const _0x38d22d of Object['keys'](_0x5b0326['diffData']))if(_0x5b0326['diffData'][_0x38d22d]['attachChange']){const _0x20ad33=_0x5b0326['diffData'][_0x38d22d]['attachChange'];_0x20ad33['isAttached']?(_0x9bd9d['add'](_0x38d22d),_0x117d35['has'](_0x38d22d)&&_0x117d35['get'](_0x38d22d)['userId']==_0x20ad33['userId']?_0x117d35['delete'](_0x38d22d):_0x117d35['set'](_0x38d22d,_0x20ad33)):_0x117d35['has'](_0x38d22d)?(_0x9bd9d['delete'](_0x38d22d),_0x117d35['delete'](_0x38d22d)):(_0x9bd9d['add'](_0x38d22d),_0x117d35['set'](_0x38d22d,_0x20ad33));}else _0x9bd9d['add'](_0x38d22d);}for(const _0x32b258 of _0x9bd9d){const _0x2a1901=_0x117d35['has'](_0x32b258)&&!_0x117d35['get'](_0x32b258)['isAttached'];let _0x1ac8f5=_0x2a1901?_0x473e76['length']-0x1:0x0;const _0x2082ec=_0x2a1901?-0x1:0x1;for(;_0x473e76[_0x1ac8f5];){const _0x1579dc=_0x473e76[_0x1ac8f5];if(_0x1579dc['diffData'][_0x32b258]){const _0x121e7e=_0x2a1901?_0x1579dc['diffData'][_0x32b258]['attributesBefore']:_0x1579dc['diffData'][_0x32b258]['attributesAfter'];_0x1345e5['attributes'][_0x32b258]=_0x121e7e?_0x4c51a9(_0x121e7e):{};break;}_0x1ac8f5+=_0x2082ec;}}for(const _0x57e78e of _0x473e76){_0x57e78e['model']={};for(const _0x580f6a of _0x57e78e['authors'])_0x56ce2a['set'](_0x580f6a['id'],_0x580f6a);for(const _0x176846 of _0x9bd9d){const _0x47910e=_0x57e78e['diffData'][_0x176846]?_0x57e78e['diffData'][_0x176846]['insertions']:'[]',_0xd24045=_0x57e78e['diffData'][_0x176846]?_0x57e78e['diffData'][_0x176846]['deletions']:'[]';_0x57e78e['model'][_0x176846]={'insertions':this['_makeModelFromViewString'](_0x47910e),'deletions':this['_makeModelFromViewString'](_0xd24045)};}}for(const _0x433f36 of _0x9bd9d){let _0x120464=null,_0x4ea95d=0x0;const _0x5cf1a3=new Map(Array['from'](_0xf7186f['model'][_0x433f36]['insertions']['markers'])['filter'](([_0x290221])=>!_0x290221['startsWith']('revision:')));let _0x5ac53c=0x0;for(const _0x3d0619 of _0x473e76){const _0x4551a0=this['_makeTape'](_0x3d0619['model'][_0x433f36]['insertions']);_0x3d0619==_0xf7186f?(_0x120464=_0x4551a0,_0x4ea95d=_0x120464['length'],_0x120464['forEach'](_0x46e03b=>{_0x46e03b['id']=_0x5ac53c++;}),this['_processTape'](_0x120464)):this['_markInsertions'](_0x120464,_0x4551a0);const _0x3eb4db=_0x120464['filter'](_0x261177=>!_0x261177['isAdded'])['map'](_0x2a2ac9=>_0x2a2ac9['id']);let _0x5cd227=0x0;const _0x4b56d6=this['_makeTape'](_0x3d0619['model'][_0x433f36]['deletions']);_0x4b56d6['forEach'](_0x4009f7=>{_0x4009f7['isRemoved']?_0x4009f7['id']=_0x4ea95d++:_0x4009f7['id']=_0x3eb4db[_0x5cd227++];}),this['_processTape'](_0x4b56d6),this['_setDistance'](_0x120464,'isAdded'),this['_setDistance'](_0x4b56d6,'isRemoved'),_0x3d0619==_0xf7186f&&this['_markMarkers'](_0x120464,_0x5cf1a3),_0x120464=this['_joinTapes'](_0x120464,_0x4b56d6),this['_refreshStartEndIndex'](_0x120464),this['_setDistance'](_0x120464,'isRemoved');}_0x120464=_0x120464['filter'](_0x4c13ba=>!(_0x4c13ba['isAdded']&&_0x4c13ba['isRemoved']));const _0x4eedd7=new Map(_0x3d2544['model'][_0x433f36]['deletions']['markers']),_0x1dd4b4=new Set(_0x5cf1a3['keys']());for(const _0x2bd9e1 of _0x4eedd7['keys']())_0x1dd4b4['delete'](_0x2bd9e1);this['_markSuggestions'](_0x120464,_0x1dd4b4),this['_fixObsoleteTags'](_0x120464),_0x120464=this['_removeMissingPairs'](_0x120464),_0x120464=this['_markMismatchedRemovedTags'](_0x120464),_0x120464=this['_removeUnsupportedChanges'](_0x120464);const {root:_0x48b417,changes:_0x5e955f}=this['_makeModelFromTape'](_0x120464,_0x56ce2a,_0x433f36);_0x1345e5['model'][_0x433f36]=_0x48b417;const _0xad8c25=_0x117d35['get'](_0x433f36);if(_0xad8c25){const _0x4e8ffd=_0x56ce2a['get'](_0xad8c25['userId']),_0xc8e500=new r({'author':_0x4e8ffd,'type':_0xad8c25['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x433f36});_0x5e955f['unshift'](_0xc8e500),_0x1345e5['attributes'][_0x433f36]['revisionHistoryAttachChange']=_0xc8e500['id'];}_0x1345e5['changes']=_0x1345e5['changes']['concat'](_0x5e955f);}return _0x1345e5;}['_markMarkers'](_0x4482ba,_0x5a9ef3){for(let _0x1dae79=0x0;_0x1dae79<_0x4482ba['length'];_0x1dae79++)for(const [_0x2b3fa7,_0x2a86c9]of _0x5a9ef3)_0x2a86c9['start']['isEqual'](_0x4482ba[_0x1dae79]['previousPosition'])&&_0x4482ba[_0x1dae79]['markersStart']['push'](_0x2b3fa7),_0x2a86c9['end']['isEqual'](_0x4482ba[_0x1dae79]['nextPosition'])&&_0x4482ba[_0x1dae79]['markersEnd']['push'](_0x2b3fa7);}['_joinTapes'](_0x48a3ba,_0x46ea30){let _0x16de0b=[],_0x3aba2e=0x0,_0x3eb100=0x0;for(;_0x3aba2e<_0x48a3ba['length']||_0x3eb100<_0x46ea30['length'];){const _0xb84e9e=_0x48a3ba[_0x3aba2e]||{},_0x1dd735=_0x46ea30[_0x3eb100]||{};if(_0xb84e9e['id']==_0x1dd735['id'])_0x3aba2e++,_0x3eb100++,_0x16de0b['push'](_0xb84e9e);else{if(_0x1dd735['isRemoved']&&_0xb84e9e['isAdded']){const {commonTape:_0x2fedcc,iEnd:_0x25af27,jEnd:_0x4b653e}=this['_threeWayMerge'](_0x48a3ba,_0x3aba2e,_0x46ea30,_0x3eb100);_0x16de0b=_0x16de0b['concat'](_0x2fedcc),_0x3aba2e=_0x25af27,_0x3eb100=_0x4b653e;}else _0x1dd735['isRemoved']?(_0x3eb100++,_0x16de0b['push'](_0x1dd735)):(_0x3aba2e++,_0x16de0b['push'](_0xb84e9e));}}return _0x16de0b;}['_markSuggestions'](_0x370437,_0x3e394b){const _0x88bd68=[];for(let _0x33ab3a=0x0;_0x33ab3a<_0x370437['length'];_0x33ab3a++){for(let _0x43d268=0x0;_0x43d268<_0x370437[_0x33ab3a]['markersStart']['length'];_0x43d268++){const _0x2bd633=_0x370437[_0x33ab3a]['markersStart'][_0x43d268];if(!_0x3e394b['has'](_0x2bd633))continue;const {group:_0xf87f5,type:_0x418a1a,authorId:_0x1d171e}=_0x39db0f(_0x2bd633);'revision-suggestion'!=_0xf87f5||'insertion'!=_0x418a1a&&'deletion'!=_0x418a1a||(_0x88bd68['unshift']({'type':_0x418a1a,'name':_0x2bd633,'userId':_0x1d171e}),_0x370437[_0x33ab3a]['markersStart']['splice'](_0x43d268,0x1),_0x43d268--);}_0x2f39ac(_0x370437[_0x33ab3a]);for(let _0x3a29d2=0x0;_0x3a29d2<_0x370437[_0x33ab3a]['markersEnd']['length'];_0x3a29d2++){const _0x2b9aef=_0x370437[_0x33ab3a]['markersEnd'][_0x3a29d2];if(!_0x3e394b['has'](_0x2b9aef))continue;const {group:_0x47b12b,type:_0x426641}=_0x39db0f(_0x2b9aef);if('revision-suggestion'!=_0x47b12b||'insertion'!=_0x426641&&'deletion'!=_0x426641)continue;_0x370437[_0x33ab3a]['markersEnd']['splice'](_0x3a29d2,0x1),_0x3a29d2--;const _0x12dad3=_0x88bd68['findIndex'](_0x229eed=>_0x229eed['name']==_0x2b9aef);_0x12dad3>-0x1&&_0x88bd68['splice'](_0x12dad3,0x1);}}function _0x39db0f(_0x244f7f){const _0x30b75e=_0x244f7f['split'](':');return{'group':_0x30b75e[0x0],'type':_0x30b75e[0x1],'subType':_0x30b75e['length']>=0x5?_0x30b75e[0x2]:null,'id':_0x30b75e['length']<0x5?_0x30b75e[0x2]:_0x30b75e[0x3],'authorId':_0x30b75e['length']<0x5?_0x30b75e[0x3]:_0x30b75e[0x4],'markerCount':0x6==_0x30b75e['length']?_0x30b75e[0x5]:null};}function _0x2f39ac(_0x585f96){for(let _0x1194be=0x0;_0x1194be<_0x88bd68['length'];_0x1194be++){if(_0x585f96['isAdded']&&'insertion'==_0x88bd68[_0x1194be]['type'])return _0x585f96['isAddSuggestion']=_0x88bd68[_0x1194be],void delete _0x585f96['isAdded'];if(!_0x585f96['isAdded']&&!_0x585f96['isRemoved']&&'deletion'==_0x88bd68[_0x1194be]['type'])return void(_0x585f96['isRemoveSuggestion']=_0x88bd68[_0x1194be]);}}}['_setDistance'](_0x546d15,_0x4568db){let _0x4abf1f=0x0,_0x4dc37a=!0x1;const _0x3bde2d=new Map();for(const _0x58d497 of _0x546d15)_0x58d497[_0x4568db]?_0x4dc37a&&(_0x4abf1f++,_0x4dc37a=!0x1):(_0x4abf1f++,_0x4dc37a=!0x0),_0x3bde2d['set'](_0x58d497['id'],_0x4abf1f);for(let _0x3925cf=0x0;_0x3925cf<_0x546d15['length'];_0x3925cf++){if('isRemoved'==_0x4568db&&_0x546d15[_0x3925cf]['isAdded']||'isAdded'==_0x4568db&&_0x546d15[_0x3925cf]['isRemoved'])continue;if('text'==_0x546d15[_0x3925cf]['type']){_0x546d15[_0x3925cf]['distance']=0x0;continue;}const _0x4925b5=_0x3bde2d['get'](_0x546d15[_0x3925cf]['pairId']),_0x36ffbc=_0x3bde2d['get'](_0x546d15[_0x3925cf]['id']);_0x546d15[_0x3925cf]['distance']=_0x4925b5-_0x36ffbc;}}['_getRevisionsRange'](_0x438f9d,_0x2ad29e,_0x4d415d=!0x1){const _0x808334=[];let _0x107848=this['repository']['getIndex'](_0x438f9d),_0x179561=this['repository']['getIndex'](_0x2ad29e);for(-0x1==_0x179561&&(_0x179561=this['repository']['_revisions']['length'],_0x4d415d=!0x1);_0x107848<_0x179561;)_0x808334['push'](this['repository']['getRevision'](_0x107848)),_0x107848++;return _0x4d415d&&_0x808334['push'](this['repository']['getRevision'](_0x107848)),_0x808334;}['_threeWayMerge'](_0x3c6391,_0x25398f,_0x424ef2,_0x25ed39){const _0x5e4328=this['editor']['model']['schema'];let _0x43f921=_0x25398f;for(;_0x3c6391[_0x43f921]&&_0x3c6391[_0x43f921]['isAdded'];)_0x43f921++;let _0xc2347d=_0x25ed39;for(;_0x424ef2[_0xc2347d]&&_0x424ef2[_0xc2347d]['isRemoved'];)_0xc2347d++;_0x472979(_0x3c6391,_0x25398f,_0x43f921),_0x472979(_0x424ef2,_0x25ed39,_0xc2347d);const _0x54715d=_0x424ef2['slice'](_0x25ed39,_0xc2347d)['concat'](_0x3c6391['slice'](_0x25398f,_0x43f921));return _0x54715d['sort']((_0x40f088,_0x5ca793)=>_0x40f088['side']!=_0x5ca793['side']?_0x40f088['side']-_0x5ca793['side']:_0x40f088['level']!=_0x5ca793['level']?_0x40f088['level']-_0x5ca793['level']:_0x40f088['distance']!=_0x5ca793['distance']?_0x5ca793['distance']-_0x40f088['distance']:!!_0x40f088['isAdded']!=!!_0x5ca793['isAdded']?-0x1==_0x40f088['side']||0x0==_0x40f088['side']?_0x40f088['isAdded']?-0x1:0x1:_0x40f088['isAdded']?0x1:-0x1:_0x40f088['index']-_0x5ca793['index']),{'commonTape':_0x54715d,'iEnd':_0x43f921,'jEnd':_0xc2347d};function _0x472979(_0x32572d,_0x16c79c,_0x1535e7){let _0x507f16=-0x1,_0x3c8e1e=Number['POSITIVE_INFINITY'],_0x5c52e4=!0x0;for(let _0x29cd2e=_0x16c79c;_0x29cd2e<_0x1535e7;_0x29cd2e++)if(_0x5e4328['isInline'](_0x32572d[_0x29cd2e]['item'])||(_0x5c52e4=!0x1),_0x32572d[_0x29cd2e]['item']['startIndex']<_0x16c79c&&(_0x507f16=_0x29cd2e),_0x32572d[_0x29cd2e]['item']['endIndex']>=_0x1535e7){_0x3c8e1e=_0x29cd2e;break;}_0x5c52e4&&(_0x507f16=_0x1535e7-0x1);for(let _0x2fd2b1=_0x16c79c;_0x2fd2b1<_0x1535e7;_0x2fd2b1++)_0x32572d[_0x2fd2b1]['side']=_0x2fd2b1<=_0x507f16?-0x1:_0x2fd2b1<_0x3c8e1e?0x0:0x1,_0x32572d[_0x2fd2b1]['index']=_0x2fd2b1;let _0x3255e2=0x0;for(let _0x4dd9cf=_0x16c79c;_0x4dd9cf<=_0x507f16;_0x4dd9cf++)0x0==_0x32572d[_0x4dd9cf]['distance']?_0x32572d[_0x4dd9cf]['level']=_0x3255e2:(_0x3255e2++,_0x32572d[_0x4dd9cf]['level']=_0x3255e2,_0x3255e2++);for(let _0x2dac1b=_0x16c79c;_0x2dac1b<_0x1535e7;_0x2dac1b++)0x0==_0x32572d[_0x2dac1b]['side']&&(_0x32572d[_0x2dac1b]['level']=_0x3255e2);_0x3255e2=0x0;for(let _0xaa0069=_0x1535e7-0x1;_0xaa0069>=_0x3c8e1e;_0xaa0069--)0x0==_0x32572d[_0xaa0069]['distance']?_0x32572d[_0xaa0069]['level']=_0x3255e2:(_0x3255e2--,_0x32572d[_0xaa0069]['level']=_0x3255e2,_0x3255e2--);}}['_fixObsoleteTags'](_0x521aff){const _0x5a25d4=new Map(),_0x3c9b27=this['editor']['model']['schema'];for(let _0x4d8e4a=0x1;_0x4d8e4a<_0x521aff['length'];_0x4d8e4a++){let _0x2920d7,_0x3dec1e,_0x3d8f53;const _0xbf149d=_0x521aff[_0x4d8e4a],_0x174660=_0x521aff[_0x4d8e4a-0x1];if('text'==_0xbf149d['type'])continue;if(_0xbf149d['type']!=_0x174660['type'])continue;if(!_0x3c9b27['isBlock'](_0x174660['item'])||_0x3c9b27['isLimit'](_0x174660['item']))continue;if(!_0x3c9b27['isBlock'](_0xbf149d['item'])||_0x3c9b27['isLimit'](_0xbf149d['item']))continue;if((_0x521aff[_0x4d8e4a]['isAdded']||_0x521aff[_0x4d8e4a]['isAddSuggestion'])&&_0x521aff[_0x4d8e4a-0x1]['isRemoved'])_0x2920d7=_0x521aff[_0x4d8e4a],_0x3dec1e=_0x521aff[_0x4d8e4a-0x1],_0x3d8f53=_0x4d8e4a-0x1;else{if(!_0x521aff[_0x4d8e4a]['isRemoved']||!_0x521aff[_0x4d8e4a-0x1]['isAdded']&&!_0x521aff[_0x4d8e4a-0x1]['isAddSuggestion'])continue;_0x2920d7=_0x521aff[_0x4d8e4a-0x1],_0x3dec1e=_0x521aff[_0x4d8e4a],_0x3d8f53=_0x4d8e4a;}const _0x21f105=_0x2920d7['level']==_0x3dec1e['level'],_0x1f5afe=Math['abs'](_0x2920d7['level'])<Math['abs'](_0x3dec1e['level'])&&0x0==_0x3dec1e['distance'];(_0x21f105||_0x1f5afe)&&(_0x5a25d4['set'](_0x3dec1e['id'],_0x2920d7['id']),_0x521aff['splice'](_0x3d8f53,0x1),_0x4d8e4a--,_0x2920d7['isAdded']=!0x1);}for(let _0x581277=0x0;_0x581277<_0x521aff['length'];_0x581277++)_0x5a25d4['has'](_0x521aff[_0x581277]['pairId'])&&(_0x521aff[_0x581277]['pairId']=_0x5a25d4['get'](_0x521aff[_0x581277]['pairId']));}['_removeMissingPairs'](_0x42cba7){const _0x5c08d9=new Set(_0x42cba7['map'](_0x15dbab=>_0x15dbab['id']));for(let _0x249851=0x0;_0x249851<_0x42cba7['length'];_0x249851++)_0x5c08d9['has'](_0x42cba7[_0x249851]['pairId'])||0x0==_0x42cba7[_0x249851]['distance']||(_0x42cba7[_0x249851]['isIncorrect']=!0x0);return _0x42cba7['filter'](_0x21e83e=>!_0x21e83e['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2c2292){const _0x3a4ba2=new Set();for(let _0x45a694=0x0;_0x45a694<_0x2c2292['length'];_0x45a694++){if(_0x3a4ba2['has'](_0x2c2292[_0x45a694]['id'])&&_0x2c2292[_0x45a694]['isRemoved']&&(_0x2c2292[_0x45a694]['isIncorrect']=!0x0),_0x2c2292[_0x45a694]['isIncorrect'])continue;if(0x0==_0x2c2292[_0x45a694]['distance'])continue;if('elementStart'!=_0x2c2292[_0x45a694]['type'])continue;if(null==_0x2c2292[_0x45a694]['pairId'])continue;let _0xd1b61a=_0x45a694+0x1,_0x25bc03=0x0;for(;_0x2c2292[_0xd1b61a]['id']!=_0x2c2292[_0x45a694]['pairId'];)'elementStart'==_0x2c2292[_0xd1b61a]['type']?_0x25bc03++:'elementEnd'==_0x2c2292[_0xd1b61a]['type']&&_0x25bc03--,_0xd1b61a++;if(0x0!=_0x25bc03){if(_0x2c2292[_0x45a694]['isRemoved'])_0x2c2292[_0x45a694]['isIncorrect']=!0x0;else{for(;_0xd1b61a!=_0x45a694;)_0x2c2292[_0xd1b61a]['isRemoved']&&0x0!=_0x2c2292[_0xd1b61a]['distance']&&(_0x2c2292[_0xd1b61a]['isIncorrect']=!0x0,_0x3a4ba2['add'](_0x2c2292[_0xd1b61a]['pairId'])),_0xd1b61a--;}}}return _0x2c2292['filter'](_0x2c2193=>!_0x2c2193['isIncorrect']);}['_removeUnsupportedChanges'](_0x43fe59){const _0x7981f1=this['editor']['model']['schema'];for(let _0x512c14=0x0;_0x512c14<_0x43fe59['length'];_0x512c14++){if(!(_0x43fe59[_0x512c14]['isAdded']||_0x43fe59[_0x512c14]['isAddSuggestion']||_0x43fe59[_0x512c14]['isRemoved']||_0x43fe59[_0x512c14]['isRemoveSuggestion']))continue;if(0x0==_0x43fe59[_0x512c14]['distance'])continue;const _0x3185d7=_0x43fe59[_0x512c14]['item'];_0x7981f1['isBlock'](_0x3185d7)||_0x7981f1['isLimit'](_0x3185d7)||(_0x43fe59[_0x512c14]['isAdded']&&delete _0x43fe59[_0x512c14]['isAdded'],_0x43fe59[_0x512c14]['isAddSuggestion']&&delete _0x43fe59[_0x512c14]['isAddSuggestion'],_0x43fe59[_0x512c14]['isRemoveSuggestion']&&delete _0x43fe59[_0x512c14]['isRemoveSuggestion'],_0x43fe59[_0x512c14]['isRemoved']&&(_0x43fe59[_0x512c14]['isIncorrect']=!0x0));}return _0x43fe59['filter'](_0x14012b=>!_0x14012b['isIncorrect']);}['_makeModelFromTape'](_0x407acb,_0x2b5799,_0x320466){const _0x3655ac=new gt(),_0x14757a=[],_0xacd5f=new Map(),_0x1d6948=this['editor']['model'],_0x3ab943=_0x1d6948['schema'],_0x5d9cc0=[_0x3655ac],_0x5069ff={},_0x4fb1f5={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0xda9a2f=null;const _0x9a50d4=[0x0];for(let _0x2a1967=0x0;_0x2a1967<_0x407acb['length'];_0x2a1967++)if('elementStart'===_0x407acb[_0x2a1967]['type']){_0x407acb[_0x2a1967]['previousPosition']=_0x1d6948['createPositionFromPath'](_0x3655ac,_0x9a50d4);const _0x40a8cb=new ut(_0x407acb[_0x2a1967]['item']['name'],_0x407acb[_0x2a1967]['item']['getAttributes']());_0x5d9cc0[0x0]['_appendChild'](_0x40a8cb),_0x9a50d4['push'](0x0),_0x5d9cc0['unshift'](_0x40a8cb),_0x407acb[_0x2a1967]['nextPosition']=_0x1d6948['createPositionFromPath'](_0x3655ac,_0x9a50d4);}else'elementEnd'===_0x407acb[_0x2a1967]['type']?(_0x5d9cc0['shift'](),_0x407acb[_0x2a1967]['previousPosition']=_0x1d6948['createPositionFromPath'](_0x3655ac,_0x9a50d4),_0x9a50d4['pop'](),_0x9a50d4[_0x9a50d4['length']-0x1]++,_0x407acb[_0x2a1967]['nextPosition']=_0x1d6948['createPositionFromPath'](_0x3655ac,_0x9a50d4)):(_0x407acb[_0x2a1967]['previousPosition']=_0x1d6948['createPositionFromPath'](_0x3655ac,_0x9a50d4),_0xda9a2f?_0xda9a2f['_data']+=_0x407acb[_0x2a1967]['item']['data']:_0xda9a2f=new wt(_0x407acb[_0x2a1967]['item']['data'],_0x407acb[_0x2a1967]['item']['getAttributes']()),_0x407acb[_0x2a1967+0x1]&&'text'===_0x407acb[_0x2a1967+0x1]['type']&&_0xca07bd(_0xda9a2f,_0x407acb[_0x2a1967+0x1]['item'])||(_0x5d9cc0[0x0]['_appendChild'](_0xda9a2f),_0xda9a2f=null),_0x9a50d4[_0x9a50d4['length']-0x1]+=_0x407acb[_0x2a1967]['item']['offsetSize'],_0x407acb[_0x2a1967]['nextPosition']=_0x1d6948['createPositionFromPath'](_0x3655ac,_0x9a50d4));for(let _0x18f58b=0x0;_0x18f58b<_0x407acb['length'];_0x18f58b++){const _0x133f63=_0x407acb[_0x18f58b]['previousPosition'],_0x448428=_0x407acb[_0x18f58b]['nextPosition'];for(const _0x597e4a of _0x407acb[_0x18f58b]['markersStart'])_0xacd5f['set'](_0x597e4a,{'start':_0x133f63,'end':null});_0xdcdb6d('isRemoveSuggestion',_0x18f58b,_0x133f63,_0x448428),_0xdcdb6d('isAddSuggestion',_0x18f58b,_0x133f63,_0x448428),_0xdcdb6d('isRemoved',_0x18f58b,_0x133f63,_0x448428),_0xdcdb6d('isAdded',_0x18f58b,_0x133f63,_0x448428);for(const _0x580616 of _0x407acb[_0x18f58b]['markersEnd']){_0xacd5f['get'](_0x580616)['end']=_0x448428;}}for(const [_0x5642c0,_0x598614]of _0xacd5f){const _0x3787b3=this['editor']['model']['createRange'](_0x598614['start'],_0x598614['end']);_0x3655ac['markers']['set'](_0x5642c0,_0x3787b3);}return _0x14757a['sort']((_0x40c415,_0x401819)=>{const _0x48981d=_0x3655ac['markers']['get']('revision:'+_0x40c415['id']),_0x1d93c3=_0x3655ac['markers']['get']('revision:'+_0x401819['id']);return _0x48981d['start']['isBefore'](_0x1d93c3['start'])?-0x1:_0x48981d['start']['isAfter'](_0x1d93c3['start'])?0x1:_0x48981d['end']['isBefore'](_0x1d93c3['end'])?-0x1:_0x48981d['end']['isAfter'](_0x1d93c3['end'])?0x1:'add'===_0x40c415['type']?-0x1:0x1;}),{'root':_0x3655ac,'changes':_0x14757a};function _0xdcdb6d(_0x35d327,_0x44a70d,_0x55b9c4,_0x5ed0b4){const _0x8ae12f=!!_0x407acb[_0x44a70d][_0x35d327],_0x331ea4=_0x8ae12f?_0x407acb[_0x44a70d][_0x35d327]['userId']:null,_0x2ea31d=_0x44a70d===_0x407acb['length']-0x1,_0x2868d8=_0x4fb1f5[_0x35d327][0x0],_0x187fc0=_0x3ab943['isObject'](_0x407acb[_0x44a70d]['item']);!_0x5069ff[_0x35d327]&&_0x8ae12f?_0x5069ff[_0x35d327]={'start':_0x55b9c4,'tapeItem':_0x407acb[_0x44a70d],'userId':_0x331ea4,'type':_0x35d327}:_0x5069ff[_0x35d327]&&!_0x8ae12f?(_0x5069ff[_0x35d327]['end']=_0x55b9c4,_0x5d37aa(_0x5069ff[_0x35d327]),_0x5069ff[_0x35d327]=null):_0x5069ff[_0x35d327]&&_0x8ae12f&&_0x5069ff[_0x35d327]['userId']!==_0x331ea4&&(_0x5069ff[_0x35d327]['end']=_0x55b9c4,_0x2868d8&&_0x2868d8['userId']===_0x5069ff[_0x35d327]['userId']||_0x5d37aa(_0x5069ff[_0x35d327]),_0x5069ff[_0x35d327]={'start':_0x55b9c4,'tapeItem':_0x407acb[_0x44a70d],'userId':_0x331ea4,'type':_0x35d327}),_0x5069ff[_0x35d327]&&_0x187fc0&&('elementStart'!==_0x407acb[_0x44a70d]['type']||_0x2868d8&&_0x2868d8['userId']===_0x331ea4||_0x4fb1f5[_0x35d327]['unshift']({'userId':_0x331ea4,'object':_0x407acb[_0x44a70d]['item'],'change':_0x5069ff[_0x35d327]}),'elementEnd'===_0x407acb[_0x44a70d]['type']&&_0x2868d8&&_0x2868d8['object']===_0x407acb[_0x44a70d]['item']&&(_0x4fb1f5[_0x35d327]['shift'](),_0x5069ff[_0x35d327]=_0x2868d8['change'])),_0x5069ff[_0x35d327]&&_0x2ea31d&&(_0x5069ff[_0x35d327]['end']=_0x5ed0b4,_0x5d37aa(_0x5069ff[_0x35d327]),_0x5069ff[_0x35d327]=null);}function _0x5d37aa({start:_0x25bd37,end:_0x588b71,tapeItem:_0x4e604c,userId:_0xfbd1fd,type:_0x4182be}){const _0x10bf3f=_0x4e604c['item'],_0x47a736=_0x1d6948['schema']['isBlock'](_0x10bf3f)&&!_0x1d6948['schema']['isLimit'](_0x10bf3f),_0x40835d=_0x25bd37['nodeAfter']==_0x588b71['parent']&&_0x588b71['isAtStart'];if(_0x47a736&&_0x40835d)return;const _0x9a13d3=_0x1d6948['createRange'](_0x25bd37,_0x588b71),_0x3563b2=_0x2b5799['get'](_0xfbd1fd),_0x597949=new r({'author':_0x3563b2,'type':'isAdded'==_0x4182be||'isAddSuggestion'==_0x4182be?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4182be||'isRemoveSuggestion'==_0x4182be},'createdAt':new Date(),'rootName':_0x320466});_0x14757a['push'](_0x597949),_0x3655ac['markers']['set']('revision:'+_0x597949['id'],_0x9a13d3);}function _0xca07bd(_0x20a4f9,_0x3ba9b6){const _0x251bbe=_0x20a4f9['getAttributes'](),_0x3cc730=_0x3ba9b6['getAttributes']();for(const _0x2ebd59 of _0x251bbe){if(_0x2ebd59[0x1]!==_0x3ba9b6['getAttribute'](_0x2ebd59[0x0]))return!0x1;_0x3cc730['next']();}return _0x3cc730['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x559ed2=>{const _0x33d9ac=_0x559ed2['markerName']['split'](':')[0x1],_0xb4363f=this['_getChangeFromId'](_0x33d9ac);if(!_0xb4363f)return null;const _0x549fb1='add'==_0xb4363f['type']?'insertion':'deletion',_0xf1684d=['ck-suggestion-marker','ck-suggestion-marker-'+_0x549fb1];return _0xb4363f['data']['isSuggestion']&&_0xf1684d['push']('ck-suggestion-marker-'+_0x549fb1+'-new'),this['activeChange']==_0xb4363f&&_0xf1684d['push']('ck-suggestion-marker--active'),{'classes':_0xf1684d,'attributes':{'data-change-id':_0x33d9ac}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1adfc2=>{_0x1adfc2['on']('element:pre',(_0x2decb4,_0x421ff1,_0x8987e0)=>{const _0xd78c02=_0x421ff1['viewItem']['getChild'](0x0);if(!_0xd78c02||!_0xd78c02['is']('element','code'))return;if(!_0x8987e0['consumable']['consume'](_0xd78c02,{'attributes':['vid_start','vid_end']}))return;const _0x3f760e=_0x421ff1['modelRange']['start']['nodeAfter'];_0x8987e0['writer']['setAttribute']('vid_start',_0xd78c02['getAttribute']('vid_start'),_0x3f760e),_0x8987e0['writer']['setAttribute']('vid_end',_0xd78c02['getAttribute']('vid_end'),_0x3f760e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x578f58=>{_0x578f58['on']('element',(_0x3ecc0a,_0x2b9de1,_0x52cfd4)=>{if(!_0x52cfd4['consumable']['consume'](_0x2b9de1['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2b9de1['modelRange']['isCollapsed'])return;const _0x3e274e=_0x2b9de1['modelRange']['start']['nodeAfter'];_0x3e274e['hasAttribute']('vid_start')||_0x3e274e['hasAttribute']('vid')||(_0x52cfd4['writer']['setAttribute']('vid_start',_0x2b9de1['viewItem']['getAttribute']('vid_start'),_0x3e274e),_0x52cfd4['writer']['setAttribute']('vid_end',_0x2b9de1['viewItem']['getAttribute']('vid_end'),_0x3e274e));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2d659b=>_0x2d659b['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x5c7aa3,[,_0x3f3221])=>{['vid_start','vid_end','vid']['includes'](_0x3f3221)&&(_0x5c7aa3['return']=!0x0,_0x5c7aa3['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x58bab9=>{_0x58bab9['on']('attribute:vid',(_0x4906dd,_0x11c0c4,_0x371f69)=>{if('\x20'!=_0x11c0c4['item']['data']||_0x11c0c4['item']['parent']['maxOffset']>0x1)return;if(!_0x371f69['consumable']['consume'](_0x11c0c4['item'],_0x4906dd['name']))return;const _0x103611=_0x371f69['writer'],_0x321594=_0x371f69['mapper']['toViewRange'](_0x11c0c4['range']);_0x103611['wrap'](_0x321594,_0x103611['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x18c1bb){const _0x1881a8=_0x18c1bb['plugins']['get']('RevisionViewer');return(_0x5c6860,_0x58d53f,_0x38661e)=>{const _0x4bf7f3=_0x58d53f['markerName']['split'](':')[0x1],_0x1dca66=_0x1881a8['_getChangeFromId'](_0x4bf7f3);if(!_0x1dca66)return null;const _0x463150='add'==_0x1dca66['type']?'split':'merge';if(!_0x38661e['consumable']['test'](_0x58d53f['markerRange'],_0x5c6860['name']))return;const _0x79a1f0=_0x58d53f['markerRange']['getWalker'](),_0x1f0be7=_0x58d53f['markerRange']['start'],_0x570617=_0x18c1bb['model']['schema'];let _0x55b4cc=null,_0x35238a=null,_0xe5b5f9=!0x1,_0xfeee28=!0x1;for(const _0x378883 of _0x79a1f0){const _0x34ec8d=_0x378883['item'];_0xe5b5f9=_0xe5b5f9||_0x570617['isContent'](_0x34ec8d);const _0x5dbaa8=_0x38661e['mapper']['toViewElement'](_0x34ec8d);if(_0x5dbaa8&&_0x5dbaa8['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x378883['type']&&(_0x570617['isBlock'](_0x34ec8d)&&!_0x570617['isLimit'](_0x34ec8d)&&(_0x34ec8d['nextSibling']||_0x1f0be7['isAtEnd']?_0x55b4cc&&_0x55b4cc['parent']==_0x34ec8d||(_0x55b4cc=_0x34ec8d,_0x5f048c(_0x378883['previousPosition']),_0xfeee28=!0x0):_0x35238a=_0x35238a||_0x378883['previousPosition']));}function _0x5f048c(_0x1d5f24){const _0x2aea21=_0x38661e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x463150}),_0x46aa88=_0x38661e['mapper']['toViewPosition'](_0x1d5f24);_0x1dca66['data']['isSuggestion']&&_0x38661e['writer']['addClass']('ck-suggestion-marker-'+_0x463150+'-new',_0x2aea21),_0x1881a8['activeChange']==_0x1dca66&&_0x38661e['writer']['addClass']('ck-suggestion-marker--active',_0x2aea21),_0x38661e['writer']['insert'](_0x46aa88,_0x2aea21),_0x38661e['mapper']['bindElementToMarker'](_0x2aea21,_0x58d53f['markerName']);}_0xe5b5f9||_0xfeee28||!_0x35238a||_0x5f048c(_0x35238a);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x37d7b0,_0x2422a5,_0x59c760)=>{const _0x51ceba=_0x59c760['mapper']['markerNameToElements'](_0x2422a5['markerName']);if(_0x51ceba){for(const _0x5c32d7 of _0x51ceba)(_0x5c32d7['hasClass']('ck-suggestion-marker-split')||_0x5c32d7['hasClass']('ck-suggestion-marker-merge'))&&(_0x59c760['mapper']['unbindElementFromMarkerName'](_0x5c32d7,_0x2422a5['markerName']),_0x59c760['writer']['remove'](_0x5c32d7));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x17983e,_0x5db2e4,_0x3c3b4f)=>{const _0x19c0f8=_0x5db2e4['markerName']['split'](':')[0x1],_0x29a9ac=this['_getChangeFromId'](_0x19c0f8);if(!_0x29a9ac)return null;const _0x601d77='add'==_0x29a9ac['type']?'split':'merge';if(_0x3c3b4f['consumable']['test'](_0x5db2e4['markerRange'],_0x17983e['name']))for(const _0x4f97ad of _0x5db2e4['markerRange']['getItems']()){if(!_0x4f97ad['is']('element','softBreak'))continue;const _0x3b51a4=_0x3c3b4f['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x601d77}),_0x183304=_0x3c3b4f['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4f97ad));_0x29a9ac['data']['isSuggestion']&&_0x3c3b4f['writer']['addClass']('ck-suggestion-marker-'+_0x601d77+'-new',_0x3b51a4),this['activeChange']==_0x29a9ac&&_0x3c3b4f['writer']['addClass']('ck-suggestion-marker--active',_0x3b51a4),_0x3c3b4f['writer']['insert'](_0x183304,_0x3b51a4),_0x3c3b4f['mapper']['bindElementToMarker'](_0x3b51a4,_0x5db2e4['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x516a60=>{for(const _0x2708bf of this['editor']['model']['document']['getRootNames']()){const _0x485b8b=this['editor']['model']['document']['getRoot'](_0x2708bf),_0x333a88=this['editor']['editing']['view']['document']['getRoot'](_0x2708bf);if(_0x333a88){const _0x1330b5=_0x485b8b['getAttribute']('revisionHistoryAttachChange');if(_0x516a60['removeAttribute']('data-change-id',_0x333a88),_0x516a60['removeClass']('ck-revision-history-root-add',_0x333a88),_0x516a60['removeClass']('ck-revision-history-root-remove',_0x333a88),_0x516a60['removeClass']('ck-revision-history-root--active',_0x333a88),_0x1330b5){const _0x4e2090=this['_getChangeFromId'](_0x1330b5);if(!_0x4e2090)return null;_0x516a60['setAttribute']('data-change-id',_0x1330b5,_0x333a88),_0x516a60['addClass']('ck-revision-history-root-'+_0x4e2090['type'],_0x333a88),this['activeChange']==_0x4e2090&&_0x516a60['addClass']('ck-revision-history-root--active',_0x333a88);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x549efb=>'revision-comment:'+_0x549efb,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5eb955=>'revision-suggestion:'+_0x5eb955,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x310588=>({'name':'suggestion:'+_0x310588,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x18ae94=>{const _0x353954=_0x18ae94['markerName']['split'](':')[0x1];return'insertion'!=_0x353954&&'deletion'!=_0x353954?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x353954]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x44ffc4,_0x5605c6,_0x18a284)=>{const _0x66cd9d=_0x18a284['mapper']['markerNameToElements'](_0x5605c6['markerName']);if(_0x66cd9d){for(const _0x37e1b6 of _0x66cd9d)_0x37e1b6['is']('uiElement')&&(_0x18a284['mapper']['unbindElementFromMarkerName'](_0x37e1b6,_0x5605c6['markerName']),_0x18a284['writer']['remove'](_0x37e1b6));}},{'priority':'high'});}['_getChangeFromId'](_0x12f78a){return this['_changeIdToChange']['get'](_0x12f78a);}['_getViewForChange'](_0x39bfa1){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x39bfa1),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2ecf69,_0x47afa4,_0x5e3968,_0x1afbee)=>{_0x1afbee&&this['_balloon']['remove'](_0x1afbee),_0x5e3968&&(this['_balloon']['add']({'view':_0x5e3968,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1a7f1d=this['editor']['editing'],_0x3ebed5=this['_getChangeFromId'](_0x5e3968['changeId']);let _0x40a80f;if(_0x3ebed5['data']['isOnRoot']){const _0x1160e4=_0x1a7f1d['view']['getDomRoot'](_0x3ebed5['rootName']);_0x40a80f=Array['from'](_0x1160e4['getClientRects']());}else{const _0x3fa7a7=this['editor']['model']['markers']['get']('revision:'+_0x5e3968['changeId']);_0x40a80f=Array['from'](_0x1a7f1d['mapper']['markerNameToElements'](_0x3fa7a7['name']))['map'](_0x7d9b88=>_0x1a7f1d['view']['domConverter']['mapViewToDom'](_0x7d9b88))['map'](_0x1742d7=>Array['from'](_0x1742d7['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x40a80f[0x0];return _0x40a80f['find'](_0x4409fa=>_0x4409fa['top']-0x3<=this['_activeViewTarget']['y']&&_0x4409fa['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4409fa['left']-0x3<=this['_activeViewTarget']['x']&&_0x4409fa['right']+0x3>=this['_activeViewTarget']['x'])||_0x40a80f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1479a3,_0xb303bb,_0xb63b88,_0x43e57b)=>{this['activeView']=_0xb63b88?this['_getViewForChange'](_0xb63b88):null,this['editor']['model']['change'](()=>{const _0x3bef5b=this['editor']['editing'];_0x43e57b&&(_0x43e57b['data']['isOnRoot']?_0x3bef5b['view']['change'](_0x11f1c0=>{_0x11f1c0['removeClass']('ck-revision-history-root--active',_0x3bef5b['view']['document']['getRoot'](_0x43e57b['rootName']));}):_0x3bef5b['reconvertMarker']('revision:'+_0x43e57b['id'])),_0xb63b88&&(_0xb63b88['data']['isOnRoot']?_0x3bef5b['view']['change'](_0x21a991=>{_0x21a991['addClass']('ck-revision-history-root--active',_0x3bef5b['view']['document']['getRoot'](_0xb63b88['rootName']));}):_0x3bef5b['reconvertMarker']('revision:'+_0xb63b88['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x209fde,_0x29a35a)=>{if(this['activeChange'])return;const _0x4b3824=this['_findChangeIdFromDomTarget'](_0x29a35a['target']),_0x418fa5=this['_changeIdToChange']['get'](_0x4b3824);_0x418fa5?(this['_activeViewTarget']={'x':_0x29a35a['domEvent']['x'],'y':_0x29a35a['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x418fa5)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3dc342,_0x5cf08f)=>{const _0x5928b6=this['_findChangeIdFromDomTarget'](_0x5cf08f['target']),_0x333b2e=this['_changeIdToChange']['get'](_0x5928b6);_0x333b2e?(this['_activeViewTarget']={'x':_0x5cf08f['domEvent']['x'],'y':_0x5cf08f['domEvent']['y']},_0x333b2e===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x333b2e):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x19df2a){do{const _0x3bf1cd=_0x19df2a['getAttribute']('data-change-id');if(_0x3bf1cd)return _0x3bf1cd;_0x19df2a=_0x19df2a['parent'];}while(_0x19df2a);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1457a0=>{for(const _0x1f6080 of this['editor']['model']['markers'])_0x1457a0['removeMarker'](_0x1f6080);});}}function Z(_0x11d398,_0x2ffa50){return(_0x702db9,_0x368191,_0x5c02be)=>{if(!_0x5c02be['consumable']['test'](_0x368191['markerRange'],_0x702db9['name']))return;const _0x497a94=_0x368191['markerRange']['getWalker'](),_0x457f1a=_0x368191['markerRange']['start'],_0x1e1c6a=_0x11d398['model']['schema'];let _0x49ac40=null,_0x2bad7b=null,_0x578f47=!0x1,_0x482e3e=!0x1;for(const _0x477d76 of _0x497a94){const _0x12d9dd=_0x477d76['item'];_0x578f47=_0x578f47||_0x1e1c6a['isContent'](_0x12d9dd);const _0x5d92d2=_0x5c02be['mapper']['toViewElement'](_0x12d9dd);if(_0x5d92d2&&_0x5d92d2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x477d76['type']&&(_0x1e1c6a['isBlock'](_0x12d9dd)&&!_0x1e1c6a['isLimit'](_0x12d9dd)&&(_0x12d9dd['nextSibling']||_0x457f1a['isAtEnd']?_0x49ac40&&_0x49ac40['parent']==_0x12d9dd||(_0x49ac40=_0x12d9dd,_0x3d3f03(_0x477d76['previousPosition']),_0x482e3e=!0x0):_0x2bad7b=_0x2bad7b||_0x477d76['previousPosition']));}function _0x3d3f03(_0x4524b3){const _0x1e5a68=_0x5c02be['mapper']['toViewPosition'](_0x4524b3),_0x1ad4b8=_0x5c02be['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2ffa50});_0x5c02be['writer']['insert'](_0x1e5a68,_0x1ad4b8),_0x5c02be['mapper']['bindElementToMarker'](_0x1ad4b8,_0x368191['markerName']);}_0x578f47||_0x482e3e||!_0x2bad7b||_0x3d3f03(_0x2bad7b);};}class _t extends _0x4f6e52{constructor(_0x270705){super(_0x270705);const _0x189d89=_0x270705['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x189d89,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x189d89,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x450030=this['editor'],_0x3a9da2=_0x450030['plugins']['get'](d),_0x2fc9a0=_0x3a9da2['isReady']?_0x3a9da2['diff']['newRevisionId']:null;_0x450030['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2fc9a0);}['refresh'](){const {isReady:_0x3c5e70,isEnabled:_0x4a28c1,repository:_0x5ab7d9,diff:_0x2bf13f}=this['editor']['plugins']['get'](d),_0x5707f5=_0x2bf13f&&_0x5ab7d9['getLaterVisibleRevision'](_0x2bf13f['newRevisionId']);this['isEnabled']=_0x3c5e70&&_0x4a28c1&&Boolean(_0x5707f5);}}class yt extends _0x4f6e52{['_step'];constructor(_0x2aec0f,{direction:_0xaf9542}){super(_0x2aec0f);const _0x1a3d9f=_0x2aec0f['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0xaf9542?0x1:-0x1,this['listenTo'](_0x1a3d9f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1a3d9f,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1a3d9f,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x172c48=this['editor'],_0x1660ba=_0x172c48['plugins']['get'](d),{isNavigationMode:_0x42b790,currentChangeNumber:_0x7f57db}=_0x1660ba;let _0x33625d;if(_0x1660ba['activeChange']=_0x42b790?_0x1660ba['diff']['changes']['get'](_0x7f57db+this['_step']):_0x1660ba['diff']['changes']['first'],_0x1660ba['activeChange']['data']['isOnRoot'])_0x33625d=_0x172c48['editing']['view']['getDomRoot'](_0x1660ba['activeChange']['rootName']);else{const _0x5a5916=_0x172c48['model']['markers']['get']('revision:'+_0x1660ba['activeChange']['id']);_0x33625d=_0x18151f(_0x172c48['editing'],_0x5a5916);}_0x248613({'target':_0x33625d,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x378fd2,currentChangeNumber:_0x288b16,numberOfChanges:_0x2cf13c,isReady:_0x2212bd,isEnabled:_0xac46fa}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0xac46fa&&_0x2212bd&&_0x2cf13c)&&(!_0x378fd2||(0x1===this['_step']?_0x288b16<_0x2cf13c-0x1:_0x288b16>0x0));}}class bi extends _0x646829{constructor(_0x4d9860){super(_0x4d9860);const _0x5357c6=this['bindTemplate'],_0x46fc3a=new _0x3e960e(_0x4d9860),_0x3c9e7d=new _0x3e960e(_0x4d9860);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',(_0x39809d,_0x1bf546)=>_0x39809d&&_0x1bf546>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x267cd8,_0x2b7ccd,_0x2d7914,_0x119bc2)=>{if(!_0x267cd8)return m(_0x4d9860,'Loading...');if(!_0x2d7914)return m(_0x4d9860,'No\x20changes');const _0x512f44=m(_0x4d9860,'NUMBER_OF_CHANGES',_0x2d7914);return _0x119bc2?m(_0x4d9860,'X_OF_Y_CHANGES',[_0x2b7ccd+0x1,_0x2d7914]):_0x512f44;}),_0x46fc3a['set']({'label':m(_0x4d9860,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1e14a0}),_0x3c9e7d['set']({'label':m(_0x4d9860,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5e5440}),_0x46fc3a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3c9e7d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x46fc3a['on']('execute',()=>this['fire']('execute','backward')),_0x3c9e7d['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',_0x5357c6['if']('_isStatusLabelVisible','ck-hidden',_0x2a3fbb=>!_0x2a3fbb)]},'children':[{'text':_0x5357c6['to']('isNavigationMode',_0x401d9e=>_0x401d9e?m(_0x4d9860,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x4d9860,'Total')+':\x20')}]},{'text':_0x5357c6['to']('_statusText')}]},new _0x1df1ed(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x46fc3a,_0x3c9e7d]}]});}}const ie='ck-editor__editable__loading-overlay';class te extends _0x1b3b72{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x39b6f2=this['editor']['editing']['view'];_0x39b6f2['change'](_0x2ab5d0=>{for(const _0x432fba of _0x39b6f2['document']['roots'])_0x2ab5d0['addClass'](ie,_0x432fba);});}['hide'](){const _0x5b1713=this['editor']['editing']['view'];_0x5b1713['change'](_0x5cf4dc=>{for(const _0x302c46 of _0x5b1713['document']['roots'])_0x5cf4dc['removeClass'](ie,_0x302c46);});}}class w extends _0x1b3b72{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,te];}['init'](){const _0x1118c8=this['editor'],_0x1d6898=_0x1118c8['plugins']['get'](d),_0x391c05=_0x1118c8['plugins']['get'](te);_0x1118c8['ui']['componentFactory']['add']('exitToEditing',_0x386941=>{const _0xe113de=new _0x3e960e(_0x386941);return _0xe113de['set']({'label':m(_0x386941,'Back\x20to\x20editing'),'icon':_0x422683,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xe113de,'execute',()=>{_0x1118c8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xe113de;}),_0x1118c8['ui']['componentFactory']['add']('restoreRevision',_0x47100b=>{const _0x28fccf=new _0x3e960e(_0x47100b);return _0x28fccf['set']({'label':m(_0x47100b,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x28fccf['bind']('isEnabled')['to'](_0x1118c8['commands']['get']('restoreRevision')),this['listenTo'](_0x28fccf,'execute',()=>_0x1118c8['execute']('restoreRevision')),_0x28fccf;}),_0x1118c8['ui']['componentFactory']['add']('changesNavigation',_0x49904b=>{const _0x569441=new bi(_0x49904b),_0x989b0f=_0x1118c8['commands']['get']('showPreviousChange'),_0x560944=_0x1118c8['commands']['get']('showNextChange');return _0x569441['bind']('isBackwardNavigationEnabled')['to'](_0x989b0f,'isEnabled'),_0x569441['bind']('isForwardNavigationEnabled')['to'](_0x560944,'isEnabled'),_0x569441['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1d6898),this['listenTo'](_0x569441,'execute',(_0x114fc9,_0xd4249d)=>{_0x1118c8['execute']('forward'===_0xd4249d?'showNextChange':'showPreviousChange');}),_0x569441;}),_0x391c05['show'](),_0x1d6898['on']('change:isReady',(_0x2a78e3,_0x212474,_0x37f14b)=>{_0x37f14b?_0x391c05['hide']():_0x391c05['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x1ffdea,_0x4aec7e){super(_0x1ffdea,_0x4aec7e);const _0x5e77ea=this['bindTemplate'];this['set']({'label':m(_0x1ffdea,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x1ffdea,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5e77ea['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 _0x3344a2=this['fieldView']['element'];this['_tooltipString']=_0x3344a2['scrollWidth']>_0x3344a2['clientWidth']&&_0x3344a2['value']||'';}}class oi extends _0x646829{constructor(_0x4a19e4,_0x13b5f9,_0x21d4b8){super(_0x4a19e4);const _0x5c6aac=new _0x1011e4();_0x5c6aac['set']({'content':_0x4b5c20,'viewBox':'0\x200\x2011\x2010'});const _0x4bc3f4=['ck','ck-revision-history-sidebar__revision-author'];_0x21d4b8&&_0x4bc3f4['push']('ck-revision-history-sidebar__revision-author_creator');const _0x259a4f=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x4a19e4,_0x21d4b8?'Revision\x20creator':'Revision\x20author')},'children':[_0x5c6aac,_0x13b5f9['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4bc3f4},'children':_0x259a4f});}}function ni(_0x2fa51c,_0x3e2bb4){const _0x1967e1=_0x2fa51c['bindTemplate'],_0x3e9c29=_0x2fa51c['locale'],_0x188a05=_0x2b8694(_0x3e9c29);_0x188a05['panelPosition']='sw';const _0xb907a4=function(_0xf979d1,_0x3bae79){const _0x5a4448=function(_0x557fb3,_0x4192ac){const _0x80ad89=_0x557fb3['locale'],_0xf7522c={'Compare\x20against\x20selected':m(_0x80ad89,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x80ad89,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x80ad89,'Restore\x20this\x20revision')};return _0x4192ac['map'](_0x4205a0=>{const _0x234295=_0xf7522c[_0x4205a0['name']];return _0x234295&&_0x234295!==_0x4205a0['name']&&(_0x4205a0['name']=_0x234295),_0x4205a0;});}(_0xf979d1,_0x3bae79),_0x1c138f=new _0x35d588();for(const _0x304099 of _0x5a4448){const _0x5d6e96={'type':'button','model':new to({'label':_0x304099['name'],'class':_0x304099['class'],'withText':!0x0,'role':'menuitem','_action':_0x304099['action']})};_0x5d6e96['model']['bind']('isEnabled')['to'](_0xf979d1,'isActionsDropdownOpen',_0x1a4da2=>'function'!=typeof _0x304099['isEnabled']||(!_0x1a4da2||_0x304099['isEnabled'](_0xf979d1))),_0x1c138f['add'](_0x5d6e96);}return _0x1c138f;}(_0x2fa51c,_0x3e2bb4);return _0x2fa51c['bind']('isActionsDropdownOpen')['to'](_0x188a05,'isOpen'),_0x188a05['buttonView']['set']({'label':m(_0x3e9c29,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1e6a30}),_0x188a05['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1967e1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1967e1['to'](_0x51fe68=>_0x51fe68['stopPropagation']())}}),_0x188a05['on']('execute',_0x20f1b0=>{_0x2fa51c['isReady']&&'function'==typeof _0x20f1b0['source']['_action']&&_0x20f1b0['source']['_action'](_0x2fa51c);}),_0x1338b3(_0x188a05,_0xb907a4,{'role':'menu'}),_0x188a05['listenTo'](_0x2fa51c,'change:isActionsDropdownOpen',(_0x16f73e,_0x39ec1e,_0x1c64a9)=>{if(_0x1c64a9)for(const _0x4898f6 of _0x188a05['listView']['items']){const _0xfd8f83=_0x4898f6['children']['first'],_0x14d4d9=_0x3e2bb4['find'](_0x2c6d18=>_0x2c6d18['action']===_0xfd8f83['_action'])['isVisible'];_0x4898f6['isVisible']=void 0x0===_0x14d4d9||_0x14d4d9(_0x2fa51c);}}),_0x188a05;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x1e0d94(_0x646829){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x3c9999,_0x40284a,_0x47ae36,_0xad8eed){super(_0x3c9999);const _0x35aab7=this['bindTemplate'],_0xc372bc=function(_0x31db2b,_0x543488){const _0x128755=Array['from'](_0x543488['authors'])['filter'](_0x4aa2af=>_0x4aa2af!=_0x543488['creator']);return _0x543488['creator']&&_0x128755['unshift'](_0x543488['creator']),_0x128755['map'](_0x33b7cf=>new oi(_0x31db2b,_0x33b7cf,_0x33b7cf==_0x543488['creator']));}(_0x3c9999,_0x40284a);this['id']=_0x40284a['id'],this['_revision']=_0x40284a,this['_requireRevisionName']=_0xad8eed,this['bind']('name','createdAt')['to'](_0x40284a),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x43e120=>{return _0x5dd061=_0x3c9999['uiLanguage'],(_0x18f09c=_0x43e120)['toLocaleDateString'](_0x5dd061,{'month':'long','day':'numeric'})+',\x20'+_0x18f09c['toLocaleTimeString'](_0x5dd061,{'hour':'numeric','minute':'numeric'});var _0x5dd061,_0x18f09c;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0x3c9999,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4c8d14=>_0x4c8d14||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x54f021,_0x6b74da)=>_0x54f021&&_0x6b74da),this['revisionActionsView']=_0x47ae36&&_0x47ae36['length']?ni(this,_0x47ae36):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x35aab7['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x35aab7['if']('isEnabled','ck-disabled',_0x29e3ea=>!_0x29e3ea),_0x35aab7['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x35aab7['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x35aab7['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':_0x35aab7['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':_0xc372bc}]},this['revisionActionsView']],'on':{'click':_0x35aab7['to'](_0x9dda62=>{_0x9dda62['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x342ed4=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x342ed4,'change',()=>{this['_requireRevisionName']&&!_0x342ed4['value']||this['fire']('setName',{'id':this['id'],'name':_0x342ed4['value']}),_0x342ed4['value']||(_0x342ed4['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function vi(_0x3bd3e1,_0x42ef08){const _0x5d7a55=_0xd95469['fromJSDate'](_0x3bd3e1)['setLocale'](_0x42ef08),_0x27587a=_0xd95469['local'](),_0x3995a7=_0x27587a['minus']({'days':0x1})['startOf']('day');let _0x179e7d,_0x29cb3e;return _0x5d7a55['hasSame'](_0x27587a,'day')?(_0x179e7d=_0x5d7a55['startOf']('day')['toJSDate'](),_0x29cb3e=_0x5d7a55['toRelativeCalendar']()):_0x5d7a55['hasSame'](_0x3995a7,'day')?(_0x179e7d=_0x3995a7['toJSDate'](),_0x29cb3e=_0x5d7a55['toRelativeCalendar']()):_0x5d7a55['hasSame'](_0x27587a,'week')?(_0x179e7d=_0x5d7a55['startOf']('week')['toJSDate'](),_0x29cb3e=_0x5d7a55['weekdayLong']||''):_0x5d7a55['hasSame'](_0x27587a,'year')?(_0x179e7d=_0x5d7a55['startOf']('month')['toJSDate'](),_0x29cb3e=_0x5d7a55['monthLong']||''):(_0x179e7d=_0x5d7a55['startOf']('year')['toJSDate'](),_0x29cb3e=String(_0x5d7a55['year'])),{'startDate':_0x179e7d,'localizedPeriodName':_0x29cb3e};}class mi extends _0x646829{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4cb55a,_0x18df61,_0x1fd897,_0x537bf4){super(_0x4cb55a);const _0x3380ae=vi(_0x18df61,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x18df61,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1fd897,this['_requireRevisionName']=_0x537bf4,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':_0x3380ae}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x699b52){const _0x319886=new ai(this['locale'],_0x699b52,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x319886);}['removeRevision'](_0x3257e9){const _0x228df5=this['revisionViews']['find'](_0x59a8d4=>_0x59a8d4['id']===_0x3257e9['id']);this['revisionViews']['remove'](_0x228df5);}}class is extends _0x646829{constructor(_0x3791cd){super(_0x3791cd);const _0x153461=new _0x1011e4();_0x153461['content']=_0x47b65b,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x153461,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x3791cd,'Revision\x20history')]}]});}}class di extends _0x646829{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x388d49,_0x4ce610,_0x4acd5c,_0x290b33){super(_0x388d49);const _0x10e777=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4ce610,this['_revisionActions']=_0x4acd5c,this['_requireRevisionName']=_0x290b33,this['on']('select',(_0x258123,_0x553c0d)=>{this['fire']('revisionSelected',_0x553c0d);}),this['on']('setName',(_0x40f851,_0x35eabc)=>{this['fire']('revisionSetName',_0x35eabc);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new is(_0x388d49),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x10e777['if']('isEnabled','ck-disabled',_0xec4a86=>!_0xec4a86)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x5504ec of this['_revisions'])this['_addRevision'](_0x5504ec);this['_revisions']['on']('add',(_0x322776,_0x253822)=>{this['_addRevision'](_0x253822);}),this['_revisions']['on']('remove',(_0x416585,_0x5a7468)=>{this['_removeRevision'](_0x5a7468);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x130a89=>_0x130a89['revisionViews']['map'](_0x27ed59=>_0x27ed59))['flat']();}['selectRevision'](_0xcf810d){for(const _0x18dd23 of this['revisionViews'])_0xcf810d&&_0xcf810d['id']===_0x18dd23['id']?_0x18dd23['select']():_0x18dd23['deselect']();}['highlightRevisions'](_0x1c6514){for(const _0x5943b5 of this['revisionViews'])_0x1c6514['some'](({id:_0x2f866b})=>_0x2f866b===_0x5943b5['id'])?_0x5943b5['highlight']():_0x5943b5['unhighlight']();}['_addRevision'](_0x2ef11e){const _0x5c457c=vi(_0x2ef11e['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x279a81=this['timePeriodViews']['get'](0x0);_0x279a81&&_0x279a81['startDate']['getTime']()===_0x5c457c['getTime']()||(_0x279a81=new mi(this['locale'],_0x5c457c,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x279a81)),_0x279a81['addRevision'](_0x2ef11e);}['_removeRevision'](_0x6f2855){const _0x460c45=vi(_0x6f2855['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x460c45)['removeRevision'](_0x6f2855);}['_getTimePeriodViewByStartDate'](_0xaaf9c9){return this['timePeriodViews']['find'](_0x479617=>_0x479617['startDate']['getTime']()===_0xaaf9c9['getTime']());}}class g extends _0x1b3b72{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
|
|
29
|
-
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x355609,_0x361b8e){super(_0x361b8e),this['sourceElement']=_0x355609,this['model']['document']['createRoot']();const _0x4faab4=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x4faab4);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x49e179,_0x2b8571){const _0x1c18da=new this(_0x49e179,_0x2b8571);return await _0x1c18da['initPlugins'](),await _0x1c18da['ui']['init'](_0x49e179),await _0x1c18da['data']['init'](_0x1c18da['config']['get']('initialData')||''),_0x1c18da['fire']('ready'),_0x1c18da;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class bt extends _0x3494fb{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f24db){function _0x4315ae(_0x464bde){return _0x464bde['map'](_0x597d90=>String['fromCharCode'](_0x597d90))['join']('');}super(_0x1f24db),this['result']='end',_0x1f24db[_0x4315ae([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4315ae([0x76,0x69,0x65,0x77])][_0x4315ae([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4315ae([0x61,0x75,0x74,0x6f]),_0x1f24db[_0x4315ae([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4315ae([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4315ae([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4315ae([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4315ae([0x6f,0x6b])});}}class k extends _0x3494fb{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x5d4dc2){if(super(_0x5d4dc2),!this['editor']['config']['get']('revisionHistory'))throw new _0x163bce('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x533150=>this['_showRevisionViewer']({..._0x533150,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4f8fb2=>this['_closeRevisionViewer'](_0x4f8fb2)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xc15a81=>this['_restoreRevision'](_0xc15a81)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2b3538){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2b3538;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x56b30){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x56b30);}['getRevision'](_0x51d5da){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x51d5da);}['getRevisions'](_0x421761){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x421761||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x423113=this['editor'],_0x125885=_0x333288(_0x423113,p),_0x34758f=_0x423113['plugins']['get']('RevisionTracker'),_0x54a9f7=_0x423113['plugins']['get']('Users')['users'];return _0x125885['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x125885['lazyRoots'],(_0x125885['plugins']['push'](bt,d,g,class extends _0x3494fb{static get['requires'](){return[d,'Users'];}['init'](){const _0xf798be=this['editor']['plugins']['get']('Users');for(const _0x5e00d5 of _0x54a9f7)_0x5e00d5['isAnonymous']||_0xf798be['getUser'](_0x5e00d5['id'])||_0xf798be['addUser'](_0x5e00d5);const _0x40b108=_0x34758f['repository']['getRevisions']();let _0x4768fc=null;const _0x1f2025=this['editor']['plugins']['get']('RevisionViewer');_0x1f2025['adapter']=_0x34758f['adapter'],_0x1f2025['bind']('isEnabled')['to'](_0x34758f),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x423113,'isReadOnly',_0x37624e=>!_0x37624e);for(const _0x5edb30 of _0x40b108){const _0x15c909=null===_0x5edb30['creator'];if(_0x15c909&&_0x5edb30['toVersion']===_0x5edb30['fromVersion'])continue;const _0x515f56=_0x5edb30['toJSON']();_0x1f2025['addRevisionData'](_0x515f56,(_0xcc3cd7,_0x294351,_0x2fa45b)=>{if(_0x15c909){if(_0x4768fc)_0x4768fc['_update'](_0xcc3cd7,_0x294351);else{if(!_0x294351){const _0x155069=_0x2fa45b['toJSON']();_0x155069['id']=_0x370f5b(),_0x34758f['saveRevision'](_0x155069,_0x2fa45b['toVersion'])['then'](_0x30150e=>{_0x4768fc=_0x30150e;});}}}else _0x5edb30['_update'](_0xcc3cd7,_0x294351);});}}},w),_0x125885);}['_enhanceShowRevisionViewerCallback'](){const _0x58d49a=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2b3b47=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x5a877c=this['editor']['plugins']['get']('Autosave');await _0x5a877c['save']();}else await _0x2b3b47['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x220cce=this['editor']['plugins']['get']('Dialog');_0x220cce['isOpen']&&_0x220cce['hide']();}const _0x3820a6=this['_getRevisionViewerEditorConfig']();return _0x58d49a(_0x3820a6)['then'](_0x14ea37=>{return(this['_viewerEditor']=_0x14ea37,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x14ea37;})['catch'](_0x3af452=>(console['error'](_0x3af452),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3d524d=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'](),_0x3d524d(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xd7c3f5=this['editor']['plugins']['get']('Annotations');_0xd7c3f5['refreshVisibility'](),_0xd7c3f5['refreshPositioning']();}})));}['_showRevisionViewer'](_0x54ef8f){const _0x1dfc68=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x218872=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3aedaa=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x3aedaa,_0x54ef8f)['then'](_0x2a80a9=>(_0x218872['style']['display']='block',_0x1dfc68['style']['display']='none',_0x2a80a9));}['_closeRevisionViewer'](_0x2f78b4){const _0x42e917=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x42e917['style']['display']='',_0x2f78b4['destroy']();}async['_restoreRevision'](_0x523de9){const _0x484906=this['editor'],_0x163345=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x25478d=_0x484906['plugins']['get']('RevisionTracker'),_0x64731d=_0x163345['repository']['getRevision'](_0x523de9);let _0x5b85eb,_0x186d4b,_0x45df5b;try{_0x5b85eb=await _0x163345['getRevisionData'](_0x64731d),_0x186d4b=await _0x163345['getRevisionRootsAttributes'](_0x64731d);}catch(_0x124e2d){return void console['error'](_0x124e2d);}_0x484906['model']['change'](_0x63fe3a=>{for(const _0x36b7a1 of Array['from'](_0x484906['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x63fe3a['removeMarker'](_0x36b7a1);}),_0x163345['isReady']=!0x1,_0x484906['model']['enqueueChange'](_0x1c93a2=>{_0x1c93a2['setSelection'](null),_0x1c93a2['removeSelectionAttribute'](_0x484906['model']['document']['selection']['getAttributeKeys']());const _0x3d3f48=Object['keys'](_0x5b85eb);for(const _0x44fef0 of _0x484906['model']['document']['roots'])'$graveyard'!=_0x44fef0['rootName']&&_0x44fef0['isAttached']()&&!_0x3d3f48['includes'](_0x44fef0['rootName'])&&_0x1c93a2['detachRoot'](_0x44fef0);for(const _0x12a7a0 of _0x3d3f48){let _0x31be49=_0x484906['model']['document']['getRoot'](_0x12a7a0);_0x31be49&&_0x31be49['isAttached']()||(_0x31be49=_0x1c93a2['addRoot'](_0x12a7a0));const _0xac4bd2=_0x186d4b[_0x12a7a0],_0x2a233f=Object['keys'](_0xac4bd2),_0x1dcb29=_0x5b85eb[_0x12a7a0];for(const _0x3e7549 of _0x31be49['getAttributeKeys']())_0x2a233f['includes'](_0x3e7549)||_0x1c93a2['removeAttribute'](_0x3e7549,_0x31be49);for(const _0x4d672b of _0x2a233f)_0x1c93a2['setAttribute'](_0x4d672b,_0x186d4b[_0x12a7a0][_0x4d672b],_0x31be49);_0x1c93a2['remove'](_0x1c93a2['createRangeIn'](_0x31be49)),_0x1c93a2['insert'](_0x484906['data']['parse'](_0x1dcb29,_0x31be49),_0x31be49,0x0);}});const _0x284cbc=m(_0x484906['locale'],'Restored');if(_0x64731d['name'])_0x45df5b=-0x1==_0x64731d['name']['indexOf'](_0x284cbc)?_0x284cbc+':\x20'+_0x64731d['name']:_0x64731d['name'];else _0x45df5b=_0x284cbc+':\x20'+(_0x64731d['createdAt']['toLocaleDateString'](_0x484906['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x64731d['createdAt']['toLocaleTimeString'](_0x484906['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x25478d['saveRevision']({'name':_0x45df5b}),_0x163345['isReady']=!0x0,_0x484906['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,ge as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};
|
|
28
|
+
bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x35c8e5){super(_0x35c8e5),this['_revisionViewer']=_0x35c8e5['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1387e1=this['_revisionsRepository']['_revisions'],_0x42a032=this['_createRevisionActions'](),_0x2e86d1=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x1387e1,_0x42a032,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',(_0x37afd8,_0x5980de)=>{_0x5980de['revisionViews']['on']('add',(_0x465a81,_0xfdb8a9)=>{_0xfdb8a9['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)),_0x2e86d1['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x138732=this['_revisionsRepository']['getRevision'](0x0);if(_0x138732){const _0x2f7cd1=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x138732['id']);this['_revisionViewer']['compare'](_0x138732,_0x2f7cd1);}}['_handleRevisionSelected'](_0x92b5c2,_0x3aa62b){const _0x304c1b=this['_revisionsRepository']['getRevision'](_0x3aa62b['id']),_0x358b48=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x304c1b['id']);this['_revisionViewer']['compare'](_0x304c1b,_0x358b48);}['_handleRevisionSetName'](_0x2c9d1e,_0x1fc57e){this['_revisionsRepository']['getRevision'](_0x1fc57e['id'])['setName'](_0x1fc57e['name']);}['_handleDiffChange'](_0x118d46,_0x146149,_0x508eaa){const _0x3bb7e5=this['_revisionsRepository']['getRevisionsInDiff'](_0x508eaa);_0x3bb7e5['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3bb7e5),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3bb7e5[0x0]));}['_createRevisionActions'](){const _0x330d76=this['editor'],_0x4ce874=g['availableRevisionActions'],_0x2c0147=_0x330d76['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x2c0147['length'])return _0x2c0147['map'](_0x3d75a1=>{const _0x35ed81='string'==typeof _0x3d75a1?Object['assign']({},_0x4ce874[_0x3d75a1]):_0x3d75a1;return _0x35ed81['action']=_0x35ed81['action']['bind'](this,_0x330d76),_0x35ed81['isVisible']&&(_0x35ed81['isVisible']=_0x35ed81['isVisible']['bind'](this,_0x330d76)),_0x35ed81;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4e457e},_0x2a2936)=>{const _0x33de44=_0x4e457e['get'](d),_0x105eb1=_0x33de44['repository'];let _0x12c594=_0x33de44['diff']['newRevisionId'],_0x535575=_0x2a2936['id'];_0x105eb1['getIndex'](_0x12c594)>_0x105eb1['getIndex'](_0x535575)&&([_0x12c594,_0x535575]=[_0x535575,_0x12c594]),_0x33de44['compare'](_0x12c594,_0x535575);},'isVisible':({plugins:_0x1dea1c},_0x41459f)=>{const _0x1cb056=_0x1dea1c['get'](d);return!(_0x1cb056['repository']['getRevisionsInDiff'](_0x1cb056['diff'])['length']>0x2)&&!_0x41459f['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4ff214,{id:_0x1e126c})=>{_0x4ff214['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1e126c);},'isVisible':({plugins:_0x544652},_0x551bd0)=>!!_0x544652['get'](d)['repository']['getLaterVisibleRevision'](_0x551bd0['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5b90d9},{id:_0x615085,revisionNameView:_0x2142d6})=>{const _0x2e32eb=_0x5b90d9['get'](d),_0x5a885b=_0x2e32eb['repository']['getEarlierVisibleRevision'](_0x615085);_0x2e32eb['compare'](_0x615085,_0x5a885b),_0x2142d6['focus'](),_0x2142d6['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x346513,_0x11196c){super(_0x346513),this['_view']=_0x11196c,this['_toolbarConfig']=ot(_0x346513['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x2eebc7){const _0x49d571=this['editor'],_0x4797d3=this['view'],_0x205d47=_0x49d571['editing']['view'],_0x4a9121=_0x4797d3['editable'],_0x29de3e=_0x205d47['document']['getRoot']();_0x4a9121['name']=_0x29de3e['rootName'],_0x4797d3['render']();const _0x2377a7=_0x4a9121['element'];this['setEditableElement'](_0x4a9121['name'],_0x2377a7),_0x4797d3['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x205d47['attachDomRoot'](_0x2377a7),this['_elementReplacer']['replace'](_0x2eebc7,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5b9ed5=this['view'],_0xd364e2=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0xd364e2['detachDomRoot'](_0x5b9ed5['editable']['name']),_0x5b9ed5['destroy']();}['_initToolbar'](){const _0x52dc4a=this['view'];_0x52dc4a['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x52dc4a['stickyPanel']['limiterElement']=_0x52dc4a['element'],_0x52dc4a['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x2d1a6d})=>_0x2d1a6d),_0x52dc4a['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x52dc4a['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x35cec1,_0x3df32f,_0x23741d={}){super(_0x35cec1),this['stickyPanel']=new lt(_0x35cec1),this['toolbar']=new nt(_0x35cec1,{'shouldGroupWhenFull':_0x23741d['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x35cec1,_0x3df32f);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
|
|
29
|
+
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4b102b,_0x9cc83d){super(_0x9cc83d),this['sourceElement']=_0x4b102b,this['model']['document']['createRoot']();const _0x20b034=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x20b034);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x48f7e4,_0x397dce){const _0x1160e3=new this(_0x48f7e4,_0x397dce);return await _0x1160e3['initPlugins'](),await _0x1160e3['ui']['init'](_0x48f7e4),await _0x1160e3['data']['init'](_0x1160e3['config']['get']('initialData')||''),_0x1160e3['fire']('ready'),_0x1160e3;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x1b3b72{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3580e0){function _0xa7dc01(_0x55c381){return _0x55c381['map'](_0x5cf97f=>String['fromCharCode'](_0x5cf97f))['join']('');}super(_0x3580e0),this['result']='end',_0x3580e0[_0xa7dc01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa7dc01([0x76,0x69,0x65,0x77])][_0xa7dc01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xa7dc01([0x61,0x75,0x74,0x6f]),_0x3580e0[_0xa7dc01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xa7dc01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xa7dc01([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xa7dc01([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xa7dc01([0x6f,0x6b])});}}class k extends _0x1b3b72{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x1e4095){if(super(_0x1e4095),!this['editor']['config']['get']('revisionHistory'))throw new _0x233041('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xee9ea=>this['_showRevisionViewer']({..._0xee9ea,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x3d8741=>this['_closeRevisionViewer'](_0x3d8741)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x17e108=>this['_restoreRevision'](_0x17e108)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x30bb31){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x30bb31;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x463fa1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x463fa1);}['getRevision'](_0x1d0d70){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1d0d70);}['getRevisions'](_0x1f8ce2){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1f8ce2||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x2b9ac3=this['editor'],_0x2adc59=_0x13be12(_0x2b9ac3,p),_0x1a8c01=_0x2b9ac3['plugins']['get']('RevisionTracker'),_0x11c988=_0x2b9ac3['plugins']['get']('Users')['users'];return _0x2adc59['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2adc59['lazyRoots'],(_0x2adc59['plugins']['push'](Rt,d,w,class extends _0x1b3b72{static get['requires'](){return[d,'Users'];}['init'](){const _0xfe7084=this['editor']['plugins']['get']('Users');for(const _0x1fcb5c of _0x11c988)_0x1fcb5c['isAnonymous']||_0xfe7084['getUser'](_0x1fcb5c['id'])||_0xfe7084['addUser'](_0x1fcb5c);const _0x3fec9a=_0x1a8c01['repository']['getRevisions']();let _0x22e5a8=null;const _0x400355=this['editor']['plugins']['get']('RevisionViewer');_0x400355['adapter']=_0x1a8c01['adapter'],_0x400355['bind']('isEnabled')['to'](_0x1a8c01),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2b9ac3,'isReadOnly',_0x50e25c=>!_0x50e25c);for(const _0x85147 of _0x3fec9a){const _0x3a1bd8=null===_0x85147['creator'];if(_0x3a1bd8&&_0x85147['toVersion']===_0x85147['fromVersion'])continue;const _0x141b39=_0x85147['toJSON']();_0x400355['addRevisionData'](_0x141b39,(_0xa1b55b,_0x122727,_0x379089)=>{if(_0x3a1bd8){if(_0x22e5a8)_0x22e5a8['_update'](_0xa1b55b,_0x122727);else{if(!_0x122727){const _0x209141=_0x379089['toJSON']();_0x209141['id']=_0x26ec69(),_0x1a8c01['saveRevision'](_0x209141,_0x379089['toVersion'])['then'](_0x17e93e=>{_0x22e5a8=_0x17e93e;});}}}else _0x85147['_update'](_0xa1b55b,_0x122727);});}}},g),_0x2adc59);}['_enhanceShowRevisionViewerCallback'](){const _0x4d750f=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x262a9d=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x3be746=this['editor']['plugins']['get']('Autosave');await _0x3be746['save']();}else await _0x262a9d['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1496ba=this['editor']['plugins']['get']('Dialog');_0x1496ba['isOpen']&&_0x1496ba['hide']();}const _0xa31b60=this['_getRevisionViewerEditorConfig']();return _0x4d750f(_0xa31b60)['then'](_0x3598fb=>{return(this['_viewerEditor']=_0x3598fb,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x3598fb;})['catch'](_0x3e7488=>(console['error'](_0x3e7488),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3c3b33=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'](),_0x3c3b33(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3fe28d=this['editor']['plugins']['get']('Annotations');_0x3fe28d['refreshVisibility'](),_0x3fe28d['refreshPositioning']();}})));}['_showRevisionViewer'](_0x5186b8){const _0x134ec1=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x156823=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x260963=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x260963,_0x5186b8)['then'](_0x48681b=>(_0x156823['style']['display']='block',_0x134ec1['style']['display']='none',_0x48681b));}['_closeRevisionViewer'](_0x19f9c7){const _0x216d64=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x216d64['style']['display']='',_0x19f9c7['destroy']();}async['_restoreRevision'](_0x3c56ee){const _0x1dffb2=this['editor'],_0x28dbef=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x42cec4=_0x1dffb2['plugins']['get']('RevisionTracker'),_0x273b4f=_0x28dbef['repository']['getRevision'](_0x3c56ee);let _0x2285b5,_0x172c4b,_0x312353;try{_0x2285b5=await _0x28dbef['getRevisionData'](_0x273b4f),_0x172c4b=await _0x28dbef['getRevisionRootsAttributes'](_0x273b4f);}catch(_0x605990){return void console['error'](_0x605990);}_0x1dffb2['model']['change'](_0x3cfd53=>{for(const _0x8eeffc of Array['from'](_0x1dffb2['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x3cfd53['removeMarker'](_0x8eeffc);}),_0x28dbef['isReady']=!0x1,_0x1dffb2['model']['enqueueChange'](_0x3c0a53=>{_0x3c0a53['setSelection'](null),_0x3c0a53['removeSelectionAttribute'](_0x1dffb2['model']['document']['selection']['getAttributeKeys']());const _0x1166c4=Object['keys'](_0x2285b5);for(const _0x55fa99 of _0x1dffb2['model']['document']['roots'])'$graveyard'!=_0x55fa99['rootName']&&_0x55fa99['isAttached']()&&!_0x1166c4['includes'](_0x55fa99['rootName'])&&_0x3c0a53['detachRoot'](_0x55fa99);for(const _0x5b1ffb of _0x1166c4){let _0x4a79c2=_0x1dffb2['model']['document']['getRoot'](_0x5b1ffb);_0x4a79c2&&_0x4a79c2['isAttached']()||(_0x4a79c2=_0x3c0a53['addRoot'](_0x5b1ffb));const _0x3f6b0b=_0x172c4b[_0x5b1ffb],_0x1c6ae1=Object['keys'](_0x3f6b0b),_0x615ff3=_0x2285b5[_0x5b1ffb];for(const _0x2e880e of _0x4a79c2['getAttributeKeys']())_0x1c6ae1['includes'](_0x2e880e)||_0x3c0a53['removeAttribute'](_0x2e880e,_0x4a79c2);for(const _0x30b43e of _0x1c6ae1)_0x3c0a53['setAttribute'](_0x30b43e,_0x172c4b[_0x5b1ffb][_0x30b43e],_0x4a79c2);_0x3c0a53['remove'](_0x3c0a53['createRangeIn'](_0x4a79c2)),_0x3c0a53['insert'](_0x1dffb2['data']['parse'](_0x615ff3,_0x4a79c2),_0x4a79c2,0x0);}});const _0xf8e931=m(_0x1dffb2['locale'],'Restored');if(_0x273b4f['name'])_0x312353=-0x1==_0x273b4f['name']['indexOf'](_0xf8e931)?_0xf8e931+':\x20'+_0x273b4f['name']:_0x273b4f['name'];else _0x312353=_0xf8e931+':\x20'+(_0x273b4f['createdAt']['toLocaleDateString'](_0x1dffb2['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x273b4f['createdAt']['toLocaleTimeString'](_0x1dffb2['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x42cec4['saveRevision']({'name':_0x312353}),_0x28dbef['isReady']=!0x0,_0x1dffb2['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,te as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
|