@ckeditor/ckeditor5-revision-history 49.0.0-alpha.8 → 49.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0x3de40c();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x26ab6b){super(),this['id']=_0x26ab6b['id']||_0x30d584(),this['creator']=_0x26ab6b['creator']||null,this['authors']=_0x26ab6b['authors']||[],this['diffData']=_0x26ab6b['diffData']||null,this['toVersion']=_0x26ab6b['toVersion']||0x0,this['fromVersion']=_0x26ab6b['fromVersion']||0x0,this['set']('name',_0x26ab6b['name']||''),this['set']('createdAt',_0x26ab6b['createdAt']||new Date()),this['set']('attributes',_0x26ab6b['attributes']||{});}setName(_0x13facd){this['_update']({'name':_0x13facd});}setAttribute(_0x425646,_0x1f4981){const _0x5c1f56=_0x5026b6(this['attributes']);_0x3b12fd(_0x5c1f56,_0x425646,_0x1f4981),this['_update']({'attributes':_0x5c1f56});}removeAttribute(_0x3beb79){const _0x4edf54=_0x5026b6(this['attributes']);_0x254ea2(_0x4edf54,_0x3beb79),this['_update']({'attributes':_0x4edf54});}_update(_0x4841b3,_0x4efffb=!0x1){let _0x518a73=!0x1;const _0x329f45={'id':this['id']};for(const _0x569044 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x3f88bb=_0x4841b3[_0x569044];void 0x0!==_0x3f88bb&&_0x3f88bb!==this[_0x569044]&&(this[_0x569044]=_0x3f88bb,_0x329f45[_0x569044]=_0x3f88bb,_0x518a73=!0x0);}_0x518a73&&(_0x329f45['authors']&&(_0x329f45['authorsIds']=_0x329f45['authors']['map'](_0x523146=>_0x523146['id']),delete _0x329f45['authors']),this['fire']('_update',_0x329f45,_0x4efffb));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4dfc6=>_0x4dfc6['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0xc8641b{['_revisions'];static get requires(){return[_0x1ee77a];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x1883c7){super(_0x1883c7),this['_revisions']=new _0x465b45();}afterInit(){!async function(_0x3d77b2){const _0x49eee9='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x4073fa=0xeb829,_0x3fe463=0x797b8,_0x15e62c={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0xfe612f(_0x4cbf0c){const _0x15423d=new window['Promise'](_0x5121fc=>{_0x4cbf0c['once']('ready',_0x5121fc);}),_0xa1a30c=window['Date']['now'](),_0xe52c01=_0x4cbf0c['config']['get']('licenseKey');async function _0x49150a(){let _0x4dcd02,_0x2f01f4=null,_0x5751dc=null;try{return'GPL'==_0xe52c01?'NotAllowed':(_0x4dcd02=_0x850fe0(),_0x4dcd02?(_0x4dcd02['usageEndpoint']&&(_0x5751dc=_0x3ba81c(_0x4dcd02['usageEndpoint'],_0x4dcd02['jti'])),await _0x44d192()?_0x23ca66()?_0x4c7d05()?'Expired':_0x193fc6()?('evaluation'==_0x4dcd02['licenseType']&&(_0x2f01f4=_0x2a1d21('EvaluationLimit')),await _0x3bedba()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4c7d05(){const _0x337ec7=['evaluation','trial']['includes'](_0x4dcd02['licenseType'])?_0xa1a30c/0x3e8:0xe10*_0x3fe463;return _0x4dcd02['exp']<_0x337ec7;}function _0x23ca66(){const _0x51bd5e=_0x4dcd02['features'];if(!_0x51bd5e)return!0x1;if(_0x51bd5e['includes']('*'))return!0x0;if(_0x51bd5e['includes']('RH'))return!0x0;if(_0x51bd5e['includes']('RRH')){if(_0x26261a())return!0x0;if(_0x153354()||_0x547893())return!0x0;}return!0x1;}function _0x193fc6(){const _0x12053d=_0x4dcd02['licensedHosts'];if(!_0x12053d||0x0==_0x12053d['length'])return!0x0;const {hostname:_0x2c2477}=new URL(window['location']['href']);if(_0x12053d['includes'](_0x2c2477))return!0x0;const _0x3267be=_0x2c2477['split']('.');return _0x12053d['filter'](_0x17cf75=>_0x17cf75['includes']('*'))['map'](_0x1b7052=>_0x1b7052['split']('.'))['filter'](_0xb0e024=>_0xb0e024['length']<=_0x3267be['length'])['map'](_0x2d895b=>Array(_0x3267be['length']-_0x2d895b['length'])['fill']('*'===_0x2d895b[0x0]?'*':'')['concat'](_0x2d895b))['some'](_0x3af42c=>_0x3267be['every']((_0x42a8e3,_0x48c9e8)=>_0x3af42c[_0x48c9e8]===_0x42a8e3||'*'===_0x3af42c[_0x48c9e8]));}function _0x3bedba(){return _0x2f01f4&&_0x5751dc?new window['Promise']((_0x5ef33d,_0x3a2c15)=>{_0x2f01f4['then'](_0x5ef33d,_0x3a2c15),_0x5751dc['then'](_0x3be1b3=>{'Valid'!=_0x3be1b3&&_0x5ef33d(_0x3be1b3);},_0x3a2c15);}):_0x2f01f4||_0x5751dc||'Valid';}}function _0x3ba81c(_0x434767,_0x1e426f){return new window['Promise'](_0x1d9d00=>{if(_0x3d185d())return _0x1d9d00('Valid');_0x31745a(),_0x4cbf0c['decorate']('_sendUsageRequest');let _0x321d75=!0x1;const _0x58cec9=_0x30d584();function _0x35dbab(_0x1b8495){return!!_0x1b8495&&('object'==typeof _0x1b8495||'function'==typeof _0x1b8495)&&'function'==typeof _0x1b8495['then']&&'function'==typeof _0x1b8495['catch'];}function _0x3cddf6(_0x10aa7c){_0x18263d(_0x10aa7c)['then'](_0x28ecef=>_0x28ecef&&'ok'==_0x28ecef['status']?_0x58358b(_0x259c73(_0x58cec9+_0x1e426f))!=_0x28ecef['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1c3729=>(_0x2b8d8c(),_0x1c3729),()=>{const _0x4d2264=_0xf00f81();return null==_0x4d2264?(_0x2b8d8c(),'Valid'):_0xa1a30c-_0x4d2264>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1d9d00)['catch'](()=>{_0x1d9d00('UsageLimit');});const _0x4e2651=0x36ee80;function _0x2b8d8c(){const _0x2e923f='llct-'+_0x58358b(_0x259c73(_0x434767)),_0x5ebfe1=_0xb5424(_0x58358b(window['Math']['ceil'](_0xa1a30c/_0x4e2651)));window['localStorage']['setItem'](_0x2e923f,_0x5ebfe1);}function _0xf00f81(){const _0x1110e9='llct-'+_0x58358b(_0x259c73(_0x434767)),_0xe592a0=window['localStorage']['getItem'](_0x1110e9);return _0xe592a0?window['parseInt'](_0xb5424(_0xe592a0),0x10)*_0x4e2651:null;}function _0x18263d(_0x11336d){return new window['Promise']((_0x5d0156,_0x3d72d9)=>{_0x11336d['then'](_0x5d0156,_0x3d72d9),window['setTimeout'](_0x3d72d9,0x1d4c0);});}}_0x4cbf0c['on']('_sendUsageRequest',(_0x8d1e39,_0xb6e08a)=>{if(_0xb6e08a[0x0]!=_0x434767)return _0x1d9d00('UsageLimit');_0xb6e08a[0x1]={..._0xb6e08a[0x1],'requestId':_0x58cec9};},{'priority':'high'}),_0x4cbf0c['on']('_sendUsageRequest',_0x55e5f7=>{_0x35dbab(_0x55e5f7['return'])&&(_0x321d75=!0x0,_0x3cddf6(_0x55e5f7['return']));},{'priority':'low'}),_0x15423d['then'](()=>{_0x321d75||_0x1d9d00('UsageLimit');});});function _0x3d185d(){return'auto'==_0x4cbf0c['editing']['view']['_overlayModeHint'];}function _0x31745a(){_0x4cbf0c['editing']['view']['_overlayModeHint']='auto';}}function _0x2a1d21(_0x505bbf){const _0x289ebe=[new window['Promise'](_0x3582f5=>setTimeout(_0x3582f5,0x93ecc)),_0x15423d['then'](()=>new window['Promise'](_0x1163fe=>{const _0x15c5f3=0x7,_0x2724b2=_0x3d77b2['_revisions'];function _0xf8f282(){_0x2724b2['length']>=_0x15c5f3&&_0x1163fe();}_0xf8f282(),_0x2724b2['on']('add',_0xf8f282);})),new window['Promise'](_0x223f27=>{function _0x1e505c(){for(const _0x1613bf in window)if(window['Number']['isNaN'](window['Number'](_0x1613bf))&&window[_0x1613bf]==_0x4073fa)return _0x223f27();'destroyed'!=_0x4cbf0c['state']&&window['setTimeout'](_0x1e505c,0x1388);}_0x53546e('RevisionViewer')&&_0x1e505c();})];return window['Promise']['race'](_0x289ebe)['then'](()=>_0x505bbf);}async function _0x57d8cb(){if(await _0x15423d,_0x53546e('RevisionViewer')){const _0x2c6788=_0x3d77b2['getRevision'](0x0),_0x2dc638=_0x3d77b2['getEarlierVisibleRevision'](_0x2c6788['id']),_0x10af56=_0x3060ab('RevisionViewer');return await _0x10af56['compare'](_0x2c6788['id'],_0x2dc638?_0x2dc638['id']:null,!0x0),_0x10af56['unbind']('isEnabled'),_0x10af56['isEnabled']=!0x1,_0x10af56['compare']=_0x5b8283,void(_0x10af56['_getDiff']=_0x5b8283);}if(_0x53546e('RevisionTracker')){const _0x27ff2a=_0x3060ab('RevisionTracker');_0x27ff2a['unbind']('isEnabled'),_0x27ff2a['isEnabled']=!0x1,_0x27ff2a['update']=_0x5b8283,_0x27ff2a['saveRevision']=_0x5b8283;}_0x4cbf0c['model']['change']=_0x5b8283,_0x4cbf0c['model']['enqueueChange']=_0x5b8283,_0x4cbf0c['enableReadOnlyMode']('model');}function _0x26261a(){return _0x53546e('WebSocketGateway')&&'connected'==_0x3060ab('WebSocketGateway')['state'];}function _0x153354(){return _0x53546e('RevisionViewerIntegration');}function _0x547893(){return _0x53546e('TrackChangesDataGetter');}function _0x339084(_0x318f3e){const _0x13a69c=_0x4c5538();_0x4cbf0c[_0x13a69c]='revisionHistoryLicenseKey'+_0x318f3e,_0x318f3e['endsWith']('Limit')&&(window[_0x4c5538()]=_0x4073fa),'Valid'!=_0x318f3e&&_0x57d8cb();}function _0x4c5538(){const _0x192a95=window['String'](window['performance']['now']())['replace']('.','');let _0x3fa434='N';for(let _0x1e5919=0x0;_0x1e5919<_0x192a95['length'];_0x1e5919+=0x2){let _0xd9b395=window['parseInt'](_0x192a95['substring'](_0x1e5919,_0x1e5919+0x2));_0xd9b395>=0x3e&&(_0xd9b395-=0x3e),_0x3fa434+=_0x49eee9[_0xd9b395];}return _0x3fa434;}function _0x850fe0(){const _0x4525db=_0xe52c01['split']('.');if(0x3!=_0x4525db['length'])return null;return _0x23fe36(_0x4525db[0x1]);function _0x23fe36(_0x386a49){const _0x364894=_0xa3cf72(_0x386a49);return _0x364894&&_0x574ce6()?_0x364894:null;function _0x574ce6(){const _0x4af07c=_0x364894['jti'],_0xe8155a=window['parseInt'](_0x4af07c['substring'](_0x4af07c['length']-0x8),0x10),_0x236257={..._0x364894,'jti':_0x4af07c['substring'](0x0,_0x4af07c['length']-0x8)};return delete _0x236257['vc'],_0x259c73(_0x236257)==_0xe8155a;}}}async function _0x44d192(){let _0x72ab54=!0x0;try{const [_0x2f48cc,_0x1fac07,_0x33e7ae]=_0xe52c01['split']('.');return _0x5ad64f(_0x2f48cc),await _0x4f7ecc(_0x2f48cc,_0x1fac07,_0x33e7ae),_0x72ab54;}catch{return!0x1;}function _0x5ad64f(_0x5bf83d){const _0x3cbe6c=_0xa3cf72(_0x5bf83d);_0x3cbe6c&&'ES256'==_0x3cbe6c['alg']||(_0x72ab54=!0x1);}async function _0x4f7ecc(_0x2f2381,_0x3f5b6b,_0x9dc275){const _0x32ac37=window['Uint8Array']['from'](_0x1dc1bf(_0x9dc275),_0x1e9026=>_0x1e9026['charCodeAt'](0x0)),_0x532534=new window['TextEncoder']()['encode'](_0x2f2381+'.'+_0x3f5b6b),_0x3175ad=window['crypto']['subtle'];if(!_0x3175ad)return;const _0x28272d=await _0x3175ad['importKey']('jwk',_0x15e62c,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3175ad['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x28272d,_0x32ac37,_0x532534)||(_0x72ab54=!0x1);}}function _0xa3cf72(_0x475128){return _0x475128['startsWith']('ey')?JSON['parse'](_0x1dc1bf(_0x475128)):null;}function _0x1dc1bf(_0x1cfef4){return window['atob'](_0x1cfef4['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x259c73(_0x342d36){let _0x3ce435=0x1505;function _0x532863(_0x325caa){for(let _0x34bfd7=0x0;_0x34bfd7<_0x325caa['length'];_0x34bfd7++){const _0x4815ec=_0x325caa['charCodeAt'](_0x34bfd7);_0x3ce435=(_0x3ce435<<0x5)+_0x3ce435+_0x4815ec,_0x3ce435&=_0x3ce435;}}function _0x49fe49(_0x2b51c3){Array['isArray'](_0x2b51c3)?_0x2b51c3['forEach'](_0x49fe49):_0x2b51c3&&'object'==typeof _0x2b51c3?Object['entries'](_0x2b51c3)['sort']()['forEach'](([_0xe9784c,_0x5a6b5b])=>{_0x532863(_0xe9784c),_0x49fe49(_0x5a6b5b);}):_0x532863(window['String'](_0x2b51c3));}return _0x49fe49(_0x342d36),_0x3ce435>>>0x0;}function _0x58358b(_0xace139){return _0xace139['toString'](0x10)['padStart'](0x8,'0');}function _0xb5424(_0x2eaf1c){return _0x2eaf1c['split']('')['reverse']()['join']('');}function _0x53546e(_0x344c5d){return _0x4cbf0c['plugins']['has'](_0x344c5d);}function _0x3060ab(_0x2a9b5a){return _0x4cbf0c['plugins']['get'](_0x2a9b5a);}function _0x5b8283(){}_0x339084(await _0x49150a());}_0xfe612f(_0x3d77b2['editor']);}(this);}createRevision(_0x1937dd){const _0x2731a7=this['editor']['plugins']['get']('Users');return new yt({'id':_0x1937dd['id'],'name':_0x1937dd['name'],'creator':_0x1937dd['creatorId']?_0x2731a7['getUser'](_0x1937dd['creatorId']):null,'diffData':_0x1937dd['diffData']||_0x1937dd['data'],'authors':_0x1937dd['authorsIds']['map'](_0x2454d3=>_0x2731a7['getUser'](_0x2454d3)),'createdAt':new Date(_0x1937dd['createdAt']),'attributes':_0x1937dd['attributes'],'fromVersion':_0x1937dd['fromVersion'],'toVersion':_0x1937dd['toVersion']});}['addRevision'](_0x1a3786,_0x29c893=0x0){this['_revisions']['add'](_0x1a3786,_0x29c893);}getRevision(_0x19ebd4){return this['_revisions']['get'](_0x19ebd4);}getRevisions(_0x12ba13={'toJSON':!0x1}){const _0x4416eb=Array['from'](this['_revisions']);return _0x4416eb['reverse'](),_0x12ba13['toJSON']?_0x4416eb['map'](_0x51ffeb=>_0x51ffeb['toJSON']()):_0x4416eb;}getIndex(_0x3f6386){return this['_revisions']['getIndex'](_0x3f6386);}getEarlierVisibleRevision(_0x3a2300){const [,_0x250bf8]=this['getRevisionsIterator'](_0x3a2300,{'direction':'earlier'});return _0x250bf8;}getLaterVisibleRevision(_0x27e603){const [,_0xe6954f]=this['getRevisionsIterator'](_0x27e603,{'direction':'later'});return _0xe6954f;}getRevisionsInDiff(_0x40e62a){const _0x414e51=[];for(const _0x112791 of this['getRevisionsIterator'](_0x40e62a['newRevisionId']))if(_0x414e51['push'](_0x112791),_0x112791['id']===_0x40e62a['oldRevisionId'])break;return _0x414e51;}*getRevisionsIterator(_0x25ef4f,{direction:_0x13e667='earlier',filter:_0x360b85=()=>!0x0}={}){const _0x23aeeb='earlier'===_0x13e667?0x1:-0x1;let _0x17d702=this['_revisions']['get'](_0x25ef4f),_0x36e70b=this['getIndex'](_0x17d702);for(yield _0x17d702;_0x17d702;){if(_0x36e70b+=_0x23aeeb,_0x17d702=this['getRevision'](_0x36e70b),!_0x17d702)return;_0x360b85(_0x17d702)&&(yield _0x17d702);}}},Rt=class extends _0xc8641b{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x45ab41,'c'],[_0x2fd0da,'a'],[_0x1aa111,'e'],[_0x3ace2e,'r'],[_0x319d44,'u']]);_typeCharToViewClass=new Map([['c',_0x45ab41],['a',_0x2fd0da],['e',_0x1aa111],['r',_0x3ace2e],['u',_0x319d44]]);async loadRevisionData(_0x2d2691,_0x1e2a57){if(_0x2d2691['diffData']||!_0x1e2a57)return;const _0x3d81b3=this['editor']['config']['get']('collaboration.channelId');_0x2d2691['diffData']=(await _0x1e2a57['getRevision']({'channelId':_0x3d81b3,'revisionId':_0x2d2691['id']}))['diffData'];}getRevisionDocumentData(_0xf517ef){const _0x38fb73={};for(const _0xb83875 in _0xf517ef['diffData']){if(_0xf517ef['diffData'][_0xb83875]['attachChange']&&!_0xf517ef['diffData'][_0xb83875]['attachChange']['isAttached'])continue;const _0x1a594f=this['_removeRevisionMarkers'](JSON['parse'](_0xf517ef['diffData'][_0xb83875]['insertions'])),_0x35662f=this['editor']['editing']['view']['document'],_0x51d933=new _0x281805(_0x35662f,_0x1a594f['map'](_0x5da751=>this['_getViewFromDiffObj'](_0x5da751,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x38fb73[_0xb83875]=this['editor']['data']['processor']['toData'](_0x51d933),this['editor']['data']['processor']['useFillerType']('default');}return _0x38fb73;}getRevisionRootsAttributes(_0x1eafe5){const _0x2c02fd={};for(const _0x2cd4c6 in _0x1eafe5['diffData'])_0x1eafe5['diffData'][_0x2cd4c6]['attachChange']&&!_0x1eafe5['diffData'][_0x2cd4c6]['attachChange']['isAttached']||(_0x2c02fd[_0x2cd4c6]=_0x1eafe5['diffData'][_0x2cd4c6]['attributesAfter']||{});return _0x2c02fd;}getRevisionRootsModelElements(_0x251f2d){const _0x365633={};for(const _0x8d1c7a in _0x251f2d['diffData']){if(_0x251f2d['diffData'][_0x8d1c7a]['attachChange']&&!_0x251f2d['diffData'][_0x8d1c7a]['attachChange']['isAttached'])continue;const _0x3e47dd=_0x251f2d['diffData'][_0x8d1c7a]['rootElementName'];_0x3e47dd&&(_0x365633[_0x8d1c7a]=_0x3e47dd);}return _0x365633;}_getTypeCharForViewElement(_0x2dd363){return this['_viewClassToTypeChar']['get'](_0x2dd363['constructor']);}_getViewFromDiffObj(_0x83635,_0x22cd90){const _0x4e0f29=this['editor']['editing']['view']['document'];if('string'==typeof _0x83635)return new _0x326d1c(_0x4e0f29,_0x83635);{let _0x1e6401,_0x9c082d;_0x9c082d='u'==_0x83635['type']||'r'==_0x83635['type']?[]:_0x83635['children']['map'](_0x257722=>this['_getViewFromDiffObj'](_0x257722,_0x22cd90));const _0x1f1b8b=this['_typeCharToViewClass']['get'](_0x83635['type'])||_0x3bf840,_0x5b6889=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1e6401=new _0x1f1b8b(_0x4e0f29,_0x83635['name'],_0x83635['attributes'],_0x9c082d),'u'==_0x83635['type']&&_0x83635['children'][0x0]){const _0x4b04de=_0x83635['children'][0x0];if(_0x1e6401['render']=function(_0x576e12){const _0x14fcba=_0x576e12['createElement']('div');return _0x14fcba['innerHTML']=_0x584809(_0x4b04de),_0x14fcba['childNodes'][0x0];},_0x22cd90){const _0x232879=new _0x281805(_0x4e0f29);_0x232879['_appendChild'](_0x1e6401);const _0x21c1a4=Array['from'](_0x5b6889['viewChildrenToDom'](_0x232879,{'bind':!0x1})),_0x49bebf=_0x5b6889['domDocument']['createElement']('div');_0x49bebf['append'](..._0x21c1a4),_0x1e6401=Array['from'](_0x5b6889['domChildrenToView'](_0x49bebf))[0x0];}}else{if('r'==_0x83635['type']&&_0x83635['children'][0x0]){const _0x477183=_0x83635['children'][0x0];if(_0x1e6401['render']=function(_0x20fda8){_0x20fda8['innerHTML']=_0x584809(_0x477183);},_0x22cd90){const _0x39da51=new _0x281805(_0x4e0f29);_0x39da51['_appendChild'](_0x1e6401);const _0x43d7bf=Array['from'](_0x5b6889['viewChildrenToDom'](_0x39da51,{'bind':!0x1})),_0x559b09=_0x5b6889['domDocument']['createElement']('div');_0x559b09['append'](..._0x43d7bf);const _0x44e61c=Array['from'](_0x5b6889['domChildrenToView'](_0x559b09));_0x44e61c['length']>0x1?_0x1e6401['_appendChild'](_0x44e61c):_0x1e6401=_0x44e61c[0x0];}}}if(_0x83635['customProperties']){for(const [_0x3d3b2d,_0x1862d8]of _0x83635['customProperties'])_0x1e6401['_setCustomProperty'](_0x3d3b2d,_0x1862d8);}const _0xd02ff1=void 0x0===_0x83635['fillerOffset']?null:_0x83635['fillerOffset'];return null!==_0xd02ff1&&(_0x1e6401['getFillerOffset']=()=>_0xd02ff1),_0x1e6401;}}_makeModelFromViewString(_0x14d0f6,_0x3cc7a0){const _0x5f477b=JSON['parse'](_0x14d0f6),_0x9da561=this['editor']['editing']['view']['document'],_0x34f2c7=new _0x281805(_0x9da561,_0x5f477b['map'](_0x47eb09=>this['_getViewFromDiffObj'](_0x47eb09,!0x0))),_0x358f76=this['editor']['data']['toModel'](_0x34f2c7,_0x3cc7a0);return _0x358f76['name']=_0x3cc7a0,_0x358f76;}['_removeRevisionMarkers'](_0x5bf2b1){return(_0x5bf2b1=_0x5bf2b1['filter'](_0x63c48d=>!_0x63c48d['name']||'revision-start'!==_0x63c48d['name']&&'revision-end'!==_0x63c48d['name']))['forEach'](_0x39f3ca=>{'string'!=typeof _0x39f3ca&&(_0x39f3ca['children']=this['_removeRevisionMarkers'](_0x39f3ca['children']),_0x39f3ca['attributes']=_0x39f3ca['attributes']['filter'](_0x181874=>!_0x181874[0x0]['startsWith']('data-revision-')));}),_0x5bf2b1;}};function kt(_0x29061a,_0x34c572,_0x5b2772){const t=_0x29061a['t'];switch(_0x34c572){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'},_0x5b2772);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5b2772);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');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x5b2772);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x5b2772);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x5b2772);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0xc8641b{['licenseKey'];_licenseKeyCheckInterval;currentRevision=null;repository;adapter=null;_revisionDataBuilder;['_source'];_initialRevisionId;_bufferedUpdates;_utils;_pendingAction;_continueCurrentRevision;_startingVersion;_loadedStateData;static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x1ee77a,bt,Rt,_0x1f7195];}constructor(_0x2559d9){super(_0x2559d9),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x20a675=_0x30d584();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x20a675},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}init(){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0xec8786=this['repository']['getRevision'](0x0),_0x2ca557=_0xec8786&&null===_0xec8786['creator']?_0xec8786:null;if(this['_continueCurrentRevision']=!!_0x2ca557&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1363ba=this['_source']['getCurrentRevisionId'](),_0x18bd44=this['repository']['getRevision'](_0x1363ba);if(_0x18bd44)this['_startingVersion']=_0x18bd44['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x14a64f=this['_source']['history']['_operations']['find'](_0x2dd22f=>!_0x2dd22f['_isInit']),_0x2dfff3=_0x14a64f?_0x14a64f['baseVersion']:this['_source']['history']['version'];_0xec8786?(_0xec8786['toVersion']<_0x2dfff3&&_0xec8786['_update']({'toVersion':_0x2dfff3}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2ca557['id'],this['_startingVersion']=_0x2ca557['fromVersion']):(this['_startingVersion']=_0xec8786['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2dfff3,this['_continueCurrentRevision']=!0x1);}}else _0x2ca557&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2ca557['toVersion'],this['editor']['model']['document']['history']['version']),_0x2ca557['fromVersion']===_0x2ca557['toVersion']?(0x0!==_0x2ca557['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ca557['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ca557['id'],this['_startingVersion']=_0x2ca557['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',_0x3804b3=>!_0x3804b3),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x159ded=[this['editor']];for(const _0x4a8909 of _0x159ded){let _0x4daca2;for(const _0x22e7a8 in _0x4a8909){const _0x122020=_0x22e7a8,_0x20934b=_0x4a8909[_0x122020];if('revisionHistoryLicenseKeyValid'==_0x20934b||'revisionHistoryLicenseKeyInvalid'==_0x20934b||'revisionHistoryLicenseKeyExpired'==_0x20934b||'revisionHistoryLicenseKeyDomainLimit'==_0x20934b||'revisionHistoryLicenseKeyNotAllowed'==_0x20934b||'revisionHistoryLicenseKeyEvaluationLimit'==_0x20934b||'revisionHistoryLicenseKeyUsageLimit'==_0x20934b){delete _0x4a8909[_0x122020],_0x4daca2=_0x20934b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4daca2&&_0x4a8909['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4daca2&&_0x4a8909['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4daca2&&_0x4a8909['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4daca2&&_0x4a8909['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4daca2&&_0x4a8909['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4daca2&&_0x4a8909['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x5340ed=this['repository']['getRevision'](0x0),_0x3e401c=await this['getRevisionDocumentData'](_0x5340ed),_0x26d905=await this['getRevisionRootsAttributes'](_0x5340ed),_0x58a47d=this['_utils']['getRevisionRootsModelElements'](_0x5340ed);this['_replaceEditorDataWithRevisionData'](_0x3e401c,_0x26d905,_0x58a47d);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x2c7551){this['_source']=_0x2c7551;}async update(){const _0x581ecb=await this['_source']['getLatestVersion']();if(_0x581ecb>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3a7554=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x581ecb});_0x3a7554['authors']=_0x3a7554['authorsIds']['map'](_0x3148f3=>this['editor']['plugins']['get']('Users')['getUser'](_0x3148f3)),this['currentRevision']['_update'](_0x3a7554);}}async['saveRevision'](_0x33aa72={},_0x2d1abf=null){const _0x40c41b=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2d1abf>this['currentRevision']['toVersion']&&(_0x2d1abf=null),null===_0x2d1abf&&(_0x2d1abf=await this['_source']['getLatestVersion']());const _0x715c7b=this['_getFromVersion'](_0x2d1abf),_0xab9758=this['buildRevisionData']({'from':_0x715c7b,'to':_0x2d1abf});if(this['currentRevision']['toVersion']<_0x2d1abf){const _0x4a9c45=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2d1abf,'to':_0x2d1abf});_0x4a9c45['authors']=[],_0x4a9c45['authorsIds']=[],_0x4a9c45['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4a9c45,!0x0),delete _0x4a9c45['authors'],_0x40c41b['push'](_0x4a9c45);}const _0x5636f9={..._0x33aa72,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x33aa72['name']||null,'id':_0x33aa72['id']||_0x30d584(),..._0xab9758,'attributes':{..._0x33aa72['attributes'],..._0xab9758['attributes']}},_0x4f5701=this['addRevisionData'](_0x5636f9);_0x40c41b['push'](_0x5636f9);const _0x30d848=this['repository']['getIndex'](_0x4f5701);if(0x0!==_0x30d848){const _0x57692d=this['repository']['getRevision'](_0x30d848-0x1);if(_0x57692d['fromVersion']!==_0x2d1abf){const _0x62a098=this['_revisionDataBuilder']['getData'](_0x2d1abf,_0x57692d['toVersion']),_0x2945ef={'id':_0x57692d['id'],'diffData':_0x62a098['diffData'],'authorsIds':_0x62a098['authorsIds'],'authors':_0x62a098['authorsIds']['map'](_0x1c10a2=>this['editor']['plugins']['get']('Users')['getUser'](_0x1c10a2)),'fromVersion':_0x2d1abf};this['_stampAiAttribute'](_0x2945ef,_0x57692d,!!_0x62a098['hasAIChanges']),_0x57692d===this['currentRevision']&&(_0x2945ef['createdAt']=new Date(_0x5636f9['createdAt']['getTime']()+0xa)),_0x57692d['_update'](_0x2945ef,!0x0),delete _0x2945ef['authors'],_0x40c41b['push'](_0x2945ef);}}if(this['adapter']){for(const _0x11296f of _0x40c41b)this['_bufferUpdate'](_0x11296f['id'],_0x11296f,!0x0);this['sendBufferedUpdates']();}return _0x4f5701;}addRevisionData(_0x15309c){const _0x2c50e6=this['repository']['createRevision'](_0x15309c);return this['adapter']&&_0x2c50e6['on']('_update',(_0x4faa4b,_0x1fb4b5,_0x25fd44)=>{_0x25fd44||(this['_bufferUpdate'](_0x1fb4b5['id'],_0x1fb4b5,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2c50e6,this['_findInsertionIndex'](_0x2c50e6)),_0x2c50e6;}async getRevisionDocumentData(_0x404f40){return await this['_utils']['loadRevisionData'](_0x404f40,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x404f40);}async getRevisionRootsAttributes(_0x14f7c3){return await this['_utils']['loadRevisionData'](_0x14f7c3,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x14f7c3);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x20efa6=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x35f7aa=0x0;_0x35f7aa<_0x20efa6['length'];_0x35f7aa++){const _0x1cbe28=_0x20efa6[_0x35f7aa];let _0x3f54e7=!0x1;for(const _0x1828a3 of Object['keys'](_0x1cbe28))void 0x0===_0x1cbe28[_0x1828a3]?delete _0x1cbe28[_0x1828a3]:'id'!==_0x1828a3&&(_0x3f54e7=!0x0);_0x3f54e7||(_0x20efa6[_0x35f7aa]=null);}if(_0x20efa6=_0x20efa6['filter'](_0x4cd0bf=>null!==_0x4cd0bf),!_0x20efa6['length'])return;for(let _0x3862ae=0x0;_0x3862ae<_0x20efa6['length'];_0x3862ae++){const _0x59f776=_0x20efa6[_0x3862ae];void 0x0!==_0x59f776['fromVersion']&&void 0x0===_0x59f776['toVersion']&&(_0x59f776['toVersion']=this['repository']['getRevision'](_0x59f776['id'])['toVersion']),void 0x0!==_0x59f776['toVersion']&&void 0x0===_0x59f776['fromVersion']&&(_0x59f776['fromVersion']=this['repository']['getRevision'](_0x59f776['id'])['fromVersion']);}const _0x11263a=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x20efa6,_0x11263a)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x243206=>{if(_0x243206){for(const _0x3f6dc3 of _0x243206)this['setRevisionData']({'id':_0x3f6dc3['id'],'createdAt':_0x3f6dc3['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x33c150,_0x56842e,_0x55f4fc){if(_0x55f4fc===(!!_0x56842e&&!!_0x56842e['attributes']['@ai']))return;const _0x28302f={..._0x56842e?_0x56842e['attributes']:{},..._0x33c150['attributes']};_0x55f4fc?_0x28302f['@ai']=!0x0:delete _0x28302f['@ai'],_0x33c150['attributes']=_0x28302f;}buildRevisionData({revision:_0x1eb24d=null,from:_0x393873=null,to:_0xdba5e2=null}){_0x393873=null!==_0x393873?_0x393873:_0x1eb24d['fromVersion'],_0xdba5e2=null!==_0xdba5e2?_0xdba5e2:_0x1eb24d['toVersion'];const _0x1b09e2=this['_revisionDataBuilder']['getData'](_0x393873,_0xdba5e2),_0x535c20={'diffData':_0x1b09e2['diffData'],'authorsIds':_0x1b09e2['authorsIds'],'fromVersion':_0x393873,'toVersion':_0xdba5e2};if(this['_stampAiAttribute'](_0x535c20,_0x1eb24d,!!_0x1b09e2['hasAIChanges']),!_0x1eb24d||_0xdba5e2!==_0x1eb24d['toVersion']){const _0x25c0ac=_0xdba5e2-0x1,_0x1151ad=this['_source']['history']['getOperation'](_0x25c0ac);_0x535c20['createdAt']=_0x1151ad&&_0x1151ad['createdAt']||new Date();}if(this['_loadedStateData']&&_0x393873===this['_loadedStateData']['fromVersion']){for(const _0x14924b of this['_loadedStateData']['authors'])_0x535c20['authorsIds']['includes'](_0x14924b['id'])||_0x535c20['authorsIds']['push'](_0x14924b['id']);}return _0x535c20;}_bufferUpdate(_0xacd789,_0xa6a4c7,_0x2ffd28){if(this['_bufferedUpdates']['has'](_0xacd789)){const _0x332d7b=this['_bufferedUpdates']['get'](_0xacd789);_0xa6a4c7=_0x2ffd28?{..._0x332d7b,..._0xa6a4c7}:{..._0xa6a4c7,..._0x332d7b};}this['_bufferedUpdates']['set'](_0xacd789,_0xa6a4c7);}setRevisionData(_0x5e566a){const _0x246b90=this['repository']['getRevision'](_0x5e566a['id']);if(_0x5e566a['createdAt']&&(_0x5e566a['createdAt']=new Date(_0x5e566a['createdAt'])),_0x5e566a['authorsIds']){const _0x20dbed=this['editor']['plugins']['get']('Users');_0x5e566a['authors']=_0x5e566a['authorsIds']['map'](_0x5e50ae=>_0x20dbed['getUser'](_0x5e50ae));}_0x246b90['_update'](_0x5e566a,!0x0);}_createInitialRevision(_0x39c562){const _0x5b1669=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5b1669)this['_initialRevisionId']=_0x5b1669['id'];else{const _0x52d2d0=!this['editor']['model']['document']['roots']['find'](_0x332088=>this['editor']['model']['hasContent'](_0x332088)),_0x37b999=this['editor']['plugins']['get']('Users')['me']['id'],_0x1c3a15=kt(this['editor']['locale'],_0x52d2d0?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x39c562,'to':_0x39c562,'id':this['_initialRevisionId'],'name':_0x1c3a15,'creatorId':_0x37b999});}}_createCurrentRevision(_0x413f7a){const _0x478c7e=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x478c7e),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x413f7a,'to':_0x413f7a,'id':_0x478c7e,'name':'','creatorId':null}));}async _loadState(){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}_replaceEditorDataWithRevisionData(_0x9251ae,_0x26aed8,_0x5569e4){const _0x118ca6={},_0x1dd4f5={},_0x584a55={},_0x2c5162=this['editor']['config']['get']('roots')||{};for(const [_0x5bf9bb,_0x416c9f]of Object['entries'](_0x2c5162))_0x416c9f['lazyLoad']||(_0x118ca6[_0x5bf9bb]=_0x416c9f['initialData']??'',_0x1dd4f5[_0x5bf9bb]=_0x416c9f['modelAttributes']||{},_0x416c9f['modelElement']&&(_0x584a55[_0x5bf9bb]=_0x416c9f['modelElement']));for(const _0x484f6c of this['editor']['model']['document']['getRootNames']())_0x118ca6[_0x484f6c]??='',_0x1dd4f5[_0x484f6c]??={};let _0x262a9f=!0x1;const _0x387c6a=Object['keys'](_0x118ca6),_0x32b7ba=Object['keys'](_0x9251ae);for(const _0x4175e3 of _0x387c6a){if(_0x118ca6[_0x4175e3]!==_0x9251ae[_0x4175e3]&&''!==_0x118ca6[_0x4175e3]['trim']()){_0x262a9f=!0x0;break;}if(!_0x56d9bf(_0x1dd4f5[_0x4175e3],_0x26aed8[_0x4175e3])&&Object['keys'](_0x1dd4f5[_0x4175e3])['length']>0x0){_0x262a9f=!0x0;break;}const _0x11b9c2=_0x584a55[_0x4175e3],_0x42c295=_0x5569e4[_0x4175e3];if(_0x11b9c2&&_0x42c295&&_0x11b9c2!==_0x42c295){_0x262a9f=!0x0;break;}}_0x262a9f||(_0x262a9f=_0x32b7ba['some'](_0x22efb3=>!this['editor']['model']['document']['getRoot'](_0x22efb3))),_0x262a9f&&_0x142e95('editor-initial-data-replaced-with-revision-data',{'editorData':_0x118ca6,'editorRootsAttributes':_0x1dd4f5,'editorRootsModelElements':_0x584a55,'revisionData':_0x9251ae,'revisionRootsAttributes':_0x26aed8,'revisionRootsModelElements':_0x5569e4});for(const [_0x2b8091,_0xf4286d]of Object['entries'](_0x9251ae))this['editor']['config']['set']('roots.'+_0x2b8091+'.initialData',_0xf4286d);for(const [_0x5f1859,_0x10b99b]of Object['entries'](_0x26aed8))this['editor']['config']['set']('roots.'+_0x5f1859+'.modelAttributes',_0x10b99b);const _0x4b233a=this['editor']['model']['document'];for(const [_0x3d019b,_0x1926a1]of Object['entries'](_0x5569e4)){this['editor']['config']['set']('roots.'+_0x3d019b+'.modelElement',_0x1926a1);const _0x9db2d3=_0x4b233a['getRoot'](_0x3d019b);_0x9db2d3&&_0x9db2d3['name']!==_0x1926a1&&(_0x4b233a['roots']['remove'](_0x3d019b),_0x4b233a['createRoot'](_0x1926a1,_0x3d019b));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2b65e8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2b65e8['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x3c62cd){const _0xd7a93=this['repository']['getRevisions']();_0xd7a93['reverse']();let _0x419c6f=0x0;for(;_0x419c6f<_0xd7a93['length'];){const _0x4d7720=_0xd7a93[_0x419c6f];if(_0x4d7720===this['currentRevision']){_0x419c6f++;continue;}if(_0x4d7720['id']===this['_initialRevisionId'])break;const _0x4d2ee7=_0x3c62cd['toVersion']-_0x4d7720['toVersion']||_0x3c62cd['fromVersion']-_0x4d7720['fromVersion'];if(_0x4d2ee7>0x0)break;if(_0x4d2ee7<0x0)_0x419c6f++;else{if(!_0x3c62cd['creator']&&_0x4d7720['creator'])break;if(_0x4d7720['creator']||!_0x3c62cd['creator']){if(_0x3c62cd['createdAt']>_0x4d7720['createdAt'])break;_0x419c6f++;}else _0x419c6f++;}}return _0x419c6f;}_getFromVersion(_0xddb096){const _0x4f2e90=this['repository']['getRevisions']();_0x4f2e90['reverse'](),_0x4f2e90['shift']();const _0x57b3b2=_0x4f2e90['find'](_0x4614f6=>_0x4614f6['toVersion']<=_0xddb096)['toVersion'];return _0x57b3b2<this['_startingVersion']?this['_startingVersion']:_0x57b3b2;}['_makeRevision']({name:_0x1193f5,from:_0x3b04b5,to:_0x19c923,creatorId:_0x4f0571,id:_0x3eaebb}){const _0x4bb21d=this['buildRevisionData']({'from':_0x3b04b5,'to':_0x19c923});_0x4bb21d['name']=_0x1193f5,_0x4bb21d['creatorId']=_0x4f0571,_0x4bb21d['id']=_0x3eaebb;const _0x3c488f=this['addRevisionData'](_0x4bb21d);return this['adapter']&&this['_bufferUpdate'](_0x4bb21d['id'],_0x4bb21d,!0x0),_0x3c488f;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x2b1f0b){this['editor']=_0x2b1f0b,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['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x2f84a1){this['source']=_0x2f84a1;const _0x35b5a1=new Map(),_0x291411=new Map(),_0x48e5dd=this['editor']['model']['document']['roots']['map'](_0x363510=>_0x363510['rootName']);for(const _0x41c340 of _0x48e5dd){const _0x46a8f6=this['editor']['model']['document']['getRoot'](_0x41c340),_0x586a60=St(_0x46a8f6);_0x35b5a1['set'](_0x41c340,_0x586a60),_0x291411['set'](_0x41c340,Object['fromEntries'](_0x46a8f6['getAttributes']()));}const _0x4f8a2f=Array['from'](this['editor']['model']['markers'])['map'](_0x3ca6d3=>[_0x3ca6d3['name'],_0x3ca6d3['getRange']()]),_0x291458=this['source']['version'];this['_saveMetaData'](_0x291458,_0x35b5a1,_0x4f8a2f,_0x291411),this['_startingRevisionId']=this['_revisionId'];const _0x46b903=new Map(),_0x302a27=new Map();for(const _0x3a6027 of _0x48e5dd){const _0x25df89=Et(_0x3a6027,this['editor']['model']['document']['getRoot'](_0x3a6027)['name']);_0x46b903['set'](_0x3a6027,_0x25df89),_0x302a27['set'](_0x3a6027,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x46b903,[],_0x302a27);}getData(_0x37d699,_0x35aee8){if(this['_lastFrom']===_0x37d699&&this['_lastTo']<=_0x35aee8)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x35aee8,!0x0);else{if(!this['_savedMetaData']['has'](_0x37d699)){const _0x46d7bf=this['_getPreviousFrom'](_0x37d699);this['_calculateMetaData'](_0x46d7bf,_0x37d699,!0x1);}this['_calculateMetaData'](_0x37d699,_0x35aee8,!0x0);}return this['_lastFrom']=_0x37d699,this['_lastTo']=_0x35aee8,this['_getState']();}loadState(_0x15fdda){if(!this['_savedMetaData']['has'](_0x15fdda['fromVersion'])){const _0x3ab8cc=this['_getPreviousFrom'](_0x15fdda['fromVersion']);this['_calculateMetaData'](_0x3ab8cc,_0x15fdda['fromVersion'],!0x1);}this['_calculateMetaData'](_0x15fdda['fromVersion'],_0x15fdda['toVersion'],!0x1);const _0x5a6e86=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x15fdda['fromVersion'],this['_lastTo']=_0x15fdda['toVersion'];for(const _0x30deeb in _0x15fdda['diffData']){const _0x3ae218=_0x15fdda['diffData'][_0x30deeb]['attachChange'],_0x1957fd=_0x5026b6(_0x15fdda['diffData'][_0x30deeb]['attributesBefore'])||{},_0x58e60f=_0x15fdda['diffData'][_0x30deeb],_0x34a0e3=_0x5a6e86['_makeModelFromViewString'](_0x58e60f['deletions'],_0x58e60f['rootElementName']||'$root');_0x34a0e3['rootName']=_0x30deeb,_0x34a0e3['_isAttached']=!_0x3ae218||!_0x3ae218['isAttached'],_0x34a0e3['isAttached']=()=>_0x34a0e3['_isAttached'],this['_baseRoots']['set'](_0x30deeb,_0x34a0e3),this['_baseRootsAttributes']['set'](_0x30deeb,_0x1957fd),_0x3ae218&&this['_touchedRoots']['set'](_0x30deeb,_0x3ae218);const _0x419953=this['_makeIdsRoot'](_0x34a0e3);this['_baseIdsRoots']['set'](_0x30deeb,_0x419953);for(const [_0x318308,_0x49c309]of _0x34a0e3['markers']){if(!_0x318308['startsWith']('revision:'))continue;const _0x2be411=_0x318308['split'](':')[0x2],_0x56100f=_0x58e60f['aiSources']?.[_0x318308]||null;for(const _0x6e7ba1 of _0x49c309['getWalker']({'singleCharacters':!0x0})){const _0x200b7d=this['_getVidAttributeName'](_0x6e7ba1),_0x4751e4='elementEnd'==_0x6e7ba1['type']?_0x6e7ba1['previousPosition']['path']['slice'](0x0,-0x1):_0x6e7ba1['previousPosition']['path'],_0x4916eb=_0x419953['getNodeByPath'](_0x4751e4)['getAttribute'](_0x200b7d);this['_touched']['set'](_0x4916eb,{'userId':_0x2be411,'aiSource':_0x56100f});}_0x34a0e3['markers']['delete'](_0x318308);}}this['_startingRevisionId']=this['_revisionId'];const _0xe84bb5=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x55edf5=>!this['_touched']['has'](_0x55edf5));let _0x48440a=0x0;const _0x5cdf8d=new Map();for(const _0x14b39b in _0x15fdda['diffData']){const _0x6010d4=_0x15fdda['diffData'][_0x14b39b]['attachChange'],_0x13e8fd=_0x5026b6(_0x15fdda['diffData'][_0x14b39b]['attributesAfter'])||{},_0x45c167=_0x15fdda['diffData'][_0x14b39b],_0x156804=_0x5a6e86['_makeModelFromViewString'](_0x45c167['insertions'],_0x45c167['rootElementName']||'$root');_0x156804['rootName']=_0x14b39b,_0x156804['_isAttached']=!_0x6010d4||_0x6010d4['isAttached'],_0x156804['isAttached']=()=>_0x156804['_isAttached'],this['_diffRoots']['set'](_0x14b39b,_0x156804),this['_diffRootsAttributes']['set'](_0x14b39b,_0x13e8fd);const _0x4b6575=this['_makeIdsRoot'](_0x156804,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x14b39b,_0x4b6575),_0x5cdf8d['set'](_0x14b39b,_0x156804['isAttached']()?_0x13e8fd:{});for(const [_0x14842e,_0x24d1c9]of _0x156804['markers']){if(!_0x14842e['startsWith']('revision:'))continue;const _0x915726=_0x14842e['split'](':')[0x2],_0xe616af=_0x45c167['aiSources']?.[_0x14842e]||null;for(const _0x4dd2d5 of _0x24d1c9['getWalker']({'singleCharacters':!0x0})){const _0x55a98f=this['_getVidAttributeName'](_0x4dd2d5),_0x1af382=this['_revisionId']++,_0x1082d4='elementEnd'==_0x4dd2d5['type']?_0x4dd2d5['previousPosition']['path']['slice'](0x0,-0x1):_0x4dd2d5['previousPosition']['path'];_0x4b6575['getNodeByPath'](_0x1082d4)['_setAttribute'](_0x55a98f,_0x1af382),this['_touched']['set'](_0x1af382,{'userId':_0x915726,'aiSource':_0xe616af});}_0x156804['markers']['delete'](_0x14842e);}for(const _0x43a4f5 of this['editor']['model']['createRangeIn'](_0x156804)['getWalker']({'singleCharacters':!0x0})){const _0x5c0f11=this['_getVidAttributeName'](_0x43a4f5),_0x5d5379='elementEnd'==_0x43a4f5['type']?_0x43a4f5['previousPosition']['path']['slice'](0x0,-0x1):_0x43a4f5['previousPosition']['path'],_0x53523b=_0x4b6575['getNodeByPath'](_0x5d5379);_0x53523b['getAttribute'](_0x5c0f11)>0x0||_0x53523b['_setAttribute'](_0x5c0f11,_0xe84bb5[_0x48440a++]);}for(const [_0x12b521,_0x3bf9a0]of _0x156804['markers'])_0x12b521['startsWith']('revision:')||this['_markers']['set'](_0x12b521,_0x3bf9a0);}const {roots:_0x4939ea}=this['_savedMetaData']['get'](_0x15fdda['fromVersion']),{roots:_0x19ad02}=this['_savedMetaData']['get'](_0x15fdda['toVersion']),_0x410487=St(_0x4939ea['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x410487),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x410487,Number['NEGATIVE_INFINITY']));const _0x1f3e66=St(_0x19ad02['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x1f3e66),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1f3e66));const _0x8cc235=Array['from'](this['_diffRoots'])['map'](([_0x31212b,_0x1fdf05])=>[_0x31212b,St(_0x1fdf05)]);this['_saveMetaData'](this['_lastTo'],_0x8cc235,this['_markers'],_0x5cdf8d);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x94023d,_0x5323ef,_0x182c25,_0x8d45c7){const _0x1dd6e9=new Map(_0x5323ef),_0xf4b6ff=new Map(_0x5026b6(_0x8d45c7)),_0x4fc7a5=new Map();for(const [_0x227d12,_0x452bbd]of _0x182c25)_0x4fc7a5['set'](_0x227d12,{'start':_0x452bbd['start']['clone'](),'end':_0x452bbd['end']['clone'](),'rootName':_0x452bbd['root']['rootName']});this['_savedMetaData']['set'](_0x94023d,{'roots':_0x1dd6e9,'markers':_0x4fc7a5,'rootsAttributes':_0xf4b6ff});}_removeMetaData(_0x588590){this['_savedMetaData']['delete'](_0x588590);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['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(_0x1a2af7,_0x4075ff=null){let _0x1ac37d=null;_0x1a2af7['is']('documentFragment')||(_0x1ac37d=new _0x784835(_0x1a2af7['name'],{'vid_start':null===_0x4075ff?this['_revisionId']++:_0x4075ff++}));const _0x2855f1=[];for(const _0x14b448 of _0x1a2af7['getChildren']())if(_0x14b448['is']('element')){_0x2855f1['push'](this['_makeIdsRoot'](_0x14b448,_0x4075ff));const _0x41230b=_0x2855f1[_0x2855f1['length']-0x1];null!==_0x4075ff&&(_0x4075ff=_0x41230b['is']('element','$text')?_0x41230b['getAttribute']('vid')+0x1:_0x41230b['getAttribute']('vid_end')+0x1);}else{for(let _0x405bee=0x0;_0x405bee<_0x14b448['offsetSize'];_0x405bee++)_0x2855f1['push'](new _0x784835('$text',{'vid':null===_0x4075ff?this['_revisionId']++:_0x4075ff++}));}if(_0x1a2af7['is']('documentFragment')){const _0x77acf1=Et(_0x1a2af7['rootName'],_0x1a2af7['name']);return _0x77acf1['_insertChild'](0x0,_0x2855f1),_0x77acf1;}return _0x1ac37d['_setAttribute']('vid_end',null===_0x4075ff?this['_revisionId']++:_0x4075ff),_0x1ac37d['_insertChild'](0x0,_0x2855f1),_0x1ac37d;}_calculateMetaData(_0x23f65b,_0x47d9f5,_0x1520ce){this['_reset']();const {roots:_0x6eb614,markers:_0x46d82a,rootsAttributes:_0x6f49ee}=this['_savedMetaData']['get'](_0x23f65b);this['_baseRoots']=new Map(_0x6eb614),this['_baseRootsAttributes']=new Map(_0x5026b6(_0x6f49ee));for(const [_0x27f560,_0x7002af]of this['_baseRoots'])if('$graveyard'!==_0x27f560&&(this['_diffRoots']['set'](_0x27f560,St(_0x7002af)),this['_diffRootsAttributes']=new Map(_0x5026b6(_0x6f49ee)),_0x1520ce)){const _0x38e47e=this['_revisionId'];this['_idsRoots']['set'](_0x27f560,this['_makeIdsRoot'](_0x7002af)),this['_baseIdsRoots']['set'](_0x27f560,this['_makeIdsRoot'](_0x7002af,_0x38e47e));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x1520ce&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4a018c,_0x45900e]of _0x46d82a){const _0x489be9=this['_baseRoots']['get'](_0x45900e['rootName']),_0x2cb886=this['_diffRoots']['get'](_0x45900e['rootName']),_0x31604a=new _0x5eaef2(_0x4ebc80(_0x45900e['start'],_0x489be9),_0x4ebc80(_0x45900e['end'],_0x489be9)),_0x1a1f60=_0x13a931(_0x31604a,_0x2cb886);_0x489be9['markers']['set'](_0x4a018c,_0x31604a),this['_markers']['set'](_0x4a018c,_0x1a1f60);}this['_applyOperations'](_0x23f65b,_0x47d9f5,_0x1520ce);}_applyOperations(_0xa6e85a,_0x53193a,_0x1c67aa){for(const _0x5402ef of this['source']['getOperations'](_0xa6e85a,_0x53193a))this['_handleOperation'](_0x5402ef,_0x1c67aa);for(const _0x4af486 of this['_diffRoots']['values']())_0x4af486['markers']['clear']();for(const [_0x111a1c,_0x33e44b]of this['_markers'])this['_diffRoots']['get'](_0x33e44b['root']['rootName'])['markers']['set'](_0x111a1c,_0x33e44b['clone']());const _0x1e9949=new Map(),_0x2ff6c2=new Map();for(const [_0x52f494,_0x3f4433]of this['_diffRoots'])_0x1e9949['set'](_0x52f494,St(_0x3f4433)),_0x2ff6c2['set'](_0x52f494,this['_diffRootsAttributes']['get'](_0x52f494));this['_saveMetaData'](_0x53193a,_0x1e9949,this['_markers'],_0x2ff6c2);}_getPreviousFrom(_0xdbb55e){const _0x35e68d=Array['from'](this['_savedMetaData']['keys']());_0x35e68d['sort']((_0x3830e7,_0x579224)=>_0x3830e7-_0x579224),_0x35e68d['reverse']();for(const _0x3358aa of _0x35e68d)if(_0x3358aa<_0xdbb55e)return _0x3358aa;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1d62ba,_0xf492fa){const _0x376f94=Array['from'](_0xf492fa['markers'])['map'](([_0x15b634,_0x44237a])=>[_0x15b634,_0x13a931(_0x44237a,_0x1d62ba)]);_0x1d62ba['markers']=new Map(_0x376f94);}_transformMarkers(_0x44319d){for(const _0x5c0ddb of this['_markers']['values']()){const _0x21851c=_0x5c0ddb['getTransformedByOperation'](_0x44319d),_0x368c6c=_0x5eaef2['_createFromRanges'](_0x21851c);_0x5c0ddb['start']=_0x368c6c['start'],_0x5c0ddb['end']=_0x368c6c['end'];}}_handleOperation(_0x393e3a,_0x24dd42){if('addRoot'!=_0x393e3a['type']&&'detachRoot'!=_0x393e3a['type']){if('insert'==_0x393e3a['type']){const _0x1c2139=_0x393e3a['position']['root'],_0x3ea3cb=_0x1c2139['rootName'],_0x53e37f=_0x1c2139['name'];this['_diffRoots']['has'](_0x3ea3cb)||(this['_diffRoots']['set'](_0x3ea3cb,Et(_0x3ea3cb,_0x53e37f,!0x0)),this['_diffRootsAttributes']['set'](_0x3ea3cb,{}),_0x24dd42&&this['_idsRoots']['set'](_0x3ea3cb,Et(_0x3ea3cb,_0x53e37f,!0x0)));}else{if('addRootAttribute'==_0x393e3a['type']||'removeRootAttribute'==_0x393e3a['type']||'changeRootAttribute'==_0x393e3a['type'])return void this['_handleRootAttributeOperation'](_0x393e3a);'marker'==_0x393e3a['type']&&this['_handleMarkerOperation'](_0x393e3a);}if('marker'!==_0x393e3a['type']){const _0x1bbd63=this['_cloneOperation'](_0x393e3a,this['_diffRoots']);_0x1bbd63['_execute'](),this['_transformMarkers'](_0x1bbd63);}if(_0x24dd42)switch(_0x393e3a['type']){case'insert':this['_handleInsertOperation'](_0x393e3a);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x393e3a);break;case'merge':this['_handleMergeOperation'](_0x393e3a);break;case'split':this['_handleSplitOperation'](_0x393e3a);}}else this['_handleRootOperation'](_0x393e3a,_0x24dd42);}_cloneOperation(_0x474b65,_0x46679e){const _0x3d4b48=_0x474b65['clone']();return _0x3d4b48['_authorId']=_0x474b65['_authorId'],_0x3d4b48['_aiSource']=_0x474b65['_aiSource'],_0x3d4b48['baseVersion']=null,_0x1879a6(_0x3d4b48,_0x46679e),_0x3d4b48;}_getBaseVids(_0x102fbe){return _0x102fbe['map'](_0x57bef4=>{const _0x21fde3=this['_getVidAttributeName'](_0x57bef4);return Number(_0x57bef4['item']['getAttribute'](_0x21fde3));});}_generateTape(_0x313ea6,_0x2edab0){if(_0x313ea6['is']('element','$text'))_0x2edab0['push']({'item':_0x313ea6,'type':'text'});else{_0x313ea6['is']('element')&&_0x2edab0['push']({'item':_0x313ea6,'type':'elementStart'});for(const _0x48e08d of _0x313ea6['getChildren']())this['_generateTape'](_0x48e08d,_0x2edab0);_0x313ea6['is']('element')&&_0x2edab0['push']({'item':_0x313ea6,'type':'elementEnd'});}return _0x2edab0;}_getState(){const _0x559e87=new Map(this['_touched']),_0x6cdcee=new Map(_0x559e87),_0x1ec3a5=new Map(),_0x1eaf45={'insertions':{},'deletions':{}},_0x56bfec={'insertions':{},'deletions':{}},_0x20e4e0=new Map(),_0xde3a2e=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x12fa88=new Map();_0xde3a2e['delete']('$graveyard');for(const _0x1475d1 of _0xde3a2e){const _0xc6a64a=(this['_diffRoots']['get'](_0x1475d1)??this['_baseRoots']['get'](_0x1475d1))['name'],_0x24eef1=this['_diffRoots']['get'](_0x1475d1)||Et(_0x1475d1,_0xc6a64a,!0x1),_0x2a3c81=this['_baseRoots']['get'](_0x1475d1)||Et(_0x1475d1,_0xc6a64a,!0x1);_0x24eef1['isAttached']()||_0x2a3c81['isAttached']()?(_0x12fa88['set'](_0x1475d1,_0xc6a64a),_0x1eaf45['insertions'][_0x1475d1]=St(_0x24eef1),_0x1eaf45['deletions'][_0x1475d1]=St(_0x2a3c81),this['_copyMarkers'](_0x1eaf45['deletions'][_0x1475d1],_0x2a3c81),this['_copyMarkers'](_0x1eaf45['insertions'][_0x1475d1],_0x24eef1),_0x56bfec['insertions'][_0x1475d1]=this['_generateTape'](this['_idsRoots']['get'](_0x1475d1),[]),_0x56bfec['deletions'][_0x1475d1]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1475d1)||Et(_0x1475d1,_0xc6a64a,!0x1),[])):_0xde3a2e['delete'](_0x1475d1);}for(const _0x118a1a of _0xde3a2e){const _0x1eabd1=_0x56bfec['insertions'][_0x118a1a];for(const _0x23a2ab of _0x1eabd1){const _0x1c2c24=this['_getVidAttributeName'](_0x23a2ab),_0x264393=_0x23a2ab['item']['getAttribute'](_0x1c2c24);_0x6cdcee['delete'](_0x264393),_0x264393>=this['_startingRevisionId']&&_0x1ec3a5['set'](_0x264393,_0x559e87['get'](_0x264393));}}for(const _0x2a9333 of _0xde3a2e){const _0x493724=_0x56bfec['insertions'][_0x2a9333],_0x5a2a27=this['_getBaseVids'](_0x56bfec['deletions'][_0x2a9333]);let _0x4afaf7=0x0;for(const _0x3f41de of _0x493724){const _0x44cc1e=this['_getVidAttributeName'](_0x3f41de),_0x3a50cf=_0x3f41de['item']['getAttribute'](_0x44cc1e);if(!_0x1ec3a5['has'](_0x3a50cf)&&!_0x20e4e0['has'](_0x3a50cf)){if(_0x6cdcee['has'](_0x3a50cf))_0x4afaf7++;else{if(_0x3a50cf!=_0x5a2a27[_0x4afaf7]){const _0x19a07e=_0x559e87['get'](_0x3a50cf)||_0x559e87['get'](_0x5a2a27[_0x4afaf7]);for(;_0x3a50cf!=_0x5a2a27[_0x4afaf7];)_0x6cdcee['has'](_0x5a2a27[_0x4afaf7])||(_0x20e4e0['set'](_0x5a2a27[_0x4afaf7],_0x19a07e),_0x559e87['set'](_0x5a2a27[_0x4afaf7],_0x19a07e)),_0x4afaf7++;}_0x4afaf7++;}}}}for(const _0x324f24 of _0xde3a2e){const _0x4e7d90=_0x56bfec['insertions'][_0x324f24];for(const _0x378e4a of _0x4e7d90){const _0x3cd009=this['_getVidAttributeName'](_0x378e4a),_0x3818ed=_0x378e4a['item']['getAttribute'](_0x3cd009);if(_0x20e4e0['has'](_0x3818ed)){const _0x10e62a=_0x20e4e0['get'](_0x3818ed);_0x6cdcee['has'](_0x3818ed)||_0x6cdcee['set'](_0x3818ed,{..._0x10e62a}),_0x1ec3a5['set'](_0x3818ed,{..._0x10e62a});}}}for(const _0x43befe of _0x6cdcee['keys']())_0x43befe>=this['_startingRevisionId']&&_0x6cdcee['delete'](_0x43befe);const _0x32bc69=new Map();for(const _0x5feb09 of _0xde3a2e){let _0x10ab4e=_0x56bfec['insertions'][_0x5feb09];for(const _0x5d0677 of _0x10ab4e)if(_0x5d0677['item']['is']('element','tableCell')){const _0x123fee=this['_getVidAttributeName'](_0x5d0677),_0x1562cc=_0x5d0677['item']['getAttribute'](_0x123fee);if(_0x1ec3a5['has'](_0x1562cc)){const _0x24c099=_0x5d0677['item']['parent']['parent']['getAttribute']('vid_start'),_0xa25c08=_0x1ec3a5['get'](_0x1562cc),_0x1f7a99=_0x32bc69['get'](_0x24c099)||{'users':new Set(),'aiSource':null};_0x1f7a99['users']['add'](_0xa25c08['userId']),_0x1f7a99['aiSource']=_0x1f7a99['aiSource']||_0xa25c08['aiSource']||null,_0x32bc69['set'](_0x24c099,_0x1f7a99);}}_0x10ab4e=_0x56bfec['deletions'][_0x5feb09];for(const _0x470e85 of _0x10ab4e)if(_0x470e85['item']['is']('element','tableCell')){const _0x5154c6=this['_getVidAttributeName'](_0x470e85),_0x132c03=_0x470e85['item']['getAttribute'](_0x5154c6);if(_0x6cdcee['has'](_0x132c03)){const _0x526f60=_0x470e85['item']['parent']['parent']['getAttribute']('vid_start'),_0x31c26f=_0x6cdcee['get'](_0x132c03),_0x4176bf=_0x32bc69['get'](_0x526f60)||{'users':new Set(),'aiSource':null};_0x4176bf['users']['add'](_0x31c26f['userId']),_0x4176bf['aiSource']=_0x4176bf['aiSource']||_0x31c26f['aiSource']||null,_0x32bc69['set'](_0x526f60,_0x4176bf);}}for(const _0x5655f3 of _0x32bc69['keys']())(_0x1ec3a5['has'](_0x5655f3)||_0x6cdcee['has'](_0x5655f3))&&_0x32bc69['delete'](_0x5655f3);}for(const _0xab6805 of _0xde3a2e){const _0x9c882c=_0x56bfec['insertions'][_0xab6805];let _0xa538f8=null,_0x157fa3=null,_0x168d4c=null;for(const _0x4ac166 of _0x9c882c){const _0x573a7d=this['_getVidAttributeName'](_0x4ac166),_0x53f66a=_0x4ac166['item']['getAttribute'](_0x573a7d),_0x34ccdc=_0x32bc69['get'](_0x53f66a);if(_0x34ccdc&&'elementStart'==_0x4ac166['type']&&(_0xa538f8=Array['from'](_0x34ccdc['users'])[0x0],_0x157fa3=_0x34ccdc['aiSource'],_0x168d4c=_0x4ac166['item']['getAttribute']('vid_end')),_0xa538f8){const _0x527882=_0x157fa3||_0x6cdcee['get'](_0x53f66a)?.['aiSource']||null,_0x5cc678=_0x157fa3||_0x1ec3a5['get'](_0x53f66a)?.['aiSource']||null;_0x6cdcee['set'](_0x53f66a,{'userId':_0xa538f8,'aiSource':_0x527882}),_0x1ec3a5['set'](_0x53f66a,{'userId':_0xa538f8,'aiSource':_0x5cc678});}_0x53f66a==_0x168d4c&&(_0xa538f8=null,_0x168d4c=null);}}const _0x156834={},_0x42c471=new Set();for(const _0x460c4d of _0xde3a2e){const _0x45a5ec=_0x1eaf45['deletions'][_0x460c4d],_0x13a110=_0x1eaf45['insertions'][_0x460c4d];for(const {userId:_0x4d2d93}of this['_touchedMarkers']['values']())null!==_0x4d2d93&&_0x42c471['add'](_0x4d2d93);for(const {userId:_0xfe7793}of this['_touchedRoots']['values']())null!==_0xfe7793&&_0x42c471['add'](_0xfe7793);const _0x324e35={};this['_markChanges'](_0x13a110,_0x56bfec['insertions'][_0x460c4d],_0x1ec3a5,'insertion',_0x42c471,_0x324e35),this['_markChanges'](_0x45a5ec,_0x56bfec['deletions'][_0x460c4d],_0x6cdcee,'deletion',_0x42c471,_0x324e35),this['_collectSuggestionAiSources'](_0x13a110,_0x324e35),this['_collectSuggestionAiSources'](_0x45a5ec,_0x324e35),_0x156834[_0x460c4d]={'insertions':this['_prepareViewToSave'](_0x13a110),'deletions':this['_prepareViewToSave'](_0x45a5ec),'attachChange':this['_touchedRoots']['get'](_0x460c4d)||null,'attributesBefore':_0x5026b6(this['_baseRootsAttributes']['get'](_0x460c4d))||{},'attributesAfter':_0x5026b6(this['_diffRootsAttributes']['get'](_0x460c4d)),'rootElementName':_0x12fa88['get'](_0x460c4d),'aiSources':_0x324e35};}const _0x1ef3cf=Array['from'](_0x1ec3a5['values']())['some'](_0x52c816=>!(!_0x52c816||!_0x52c816['aiSource']))||Array['from'](_0x6cdcee['values']())['some'](_0x554319=>!(!_0x554319||!_0x554319['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x4ebeb0=>this['_aiTouchedMarkers']['has'](_0x4ebeb0));return{'diffData':_0x156834,'authorsIds':Array['from'](_0x42c471),'hasAIChanges':_0x1ef3cf};}_collectSuggestionAiSources(_0x21fce9,_0x5696b5){const _0x2fd766=_0x21fce9['markers'];for(const _0x5215dd of _0x2fd766['keys']()){if(!_0x5215dd['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x5215dd))continue;const _0x28f8fe=this['_aiTouchedMarkers']['get'](_0x5215dd);_0x28f8fe&&(_0x5696b5[_0x5215dd]=_0x28f8fe);}}_processRootBeforeSave(_0x3741c8){for(const [,_0x12944b]of _0x3741c8['markers']){const _0x4b70fc=_0x12944b['start']['getAncestors']()['filter'](_0x5c7df5=>'tableCell'==_0x5c7df5['name']);for(const _0x504f9f of _0x4b70fc)0x1==_0x504f9f['childCount']&&_0x504f9f['getChild'](0x0)['is']('element','paragraph')&&_0x504f9f['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4e1c1a){this['_processRootBeforeSave'](_0x4e1c1a);const _0x2a9666=this['editor']['data']['toView'](_0x4e1c1a,{}),_0x1bcb9c=Array['from'](_0x2a9666['getChildren']())['map'](_0x309bfb=>this['_getViewJson'](_0x309bfb));return JSON['stringify'](_0x1bcb9c);}_getViewJson(_0x2febf4){if(_0x2febf4['is']('$text'))return _0x2febf4['data'];{const _0x3d48a4=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x33f03b=_0x2febf4,_0x386e37=this['editor']['data']['htmlProcessor']['domConverter'],_0x253ac3={'type':_0x3d48a4['_getTypeCharForViewElement'](_0x33f03b),'name':_0x33f03b['name'],'attributes':Array['from'](_0x33f03b['getAttributes']()),'children':Array['from'](_0x33f03b['getChildren']())['map'](_0x3d2147=>this['_getViewJson'](_0x3d2147))};if(_0x2febf4['is']('uiElement')&&'$comment'!=_0x2febf4['name']){const _0x1562f9=_0x2febf4['render'](_0x386e37['domDocument'],_0x386e37);_0x253ac3['children']['push'](_0x1562f9['outerHTML']);}else{if(_0x2febf4['is']('rawElement')){const _0x5011e7=_0x386e37['domDocument']['createElement'](_0x33f03b['name']);_0x2febf4['render'](_0x5011e7,_0x386e37),_0x253ac3['children']['push'](_0x5011e7['innerHTML']);}}const _0x3f61ab=Array['from'](_0x33f03b['getCustomProperties']());_0x3f61ab['length']>0x0&&(_0x253ac3['customProperties']=_0x3f61ab);const _0x2d863a=_0x33f03b['getFillerOffset']();return null!==_0x2d863a&&(_0x253ac3['fillerOffset']=_0x2d863a),_0x253ac3;}}['_markChanges'](_0x4293a0,_0x117e8e,_0x41474c,_0xb6b8f0,_0x1d0ced,_0x1d17eb){let _0x6a5494=null,_0x4368a0=null,_0x3a3b32=0x0;const _0xa42e37=this['editor']['model'];for(let _0x20ee12=0x0;_0x20ee12<_0x117e8e['length'];_0x20ee12++){const _0x490144=this['_getVidAttributeName'](_0x117e8e[_0x20ee12]),_0x5f352a=_0x117e8e[_0x20ee12]['item']['getAttribute'](_0x490144),_0x5be16c=_0x41474c['get'](_0x5f352a),_0x591271=_0x20ee12==_0x117e8e['length']-0x1;!_0x6a5494&&_0x5be16c&&(_0x6a5494=_0x5be16c,_0x4368a0=_0x117e8e[_0x20ee12]);const _0x39cfba=!!_0x6a5494&&!!_0x5be16c&&_0x5be16c['userId']!=_0x6a5494['userId'],_0x3d08d4=!!_0x6a5494&&!!_0x5be16c&&_0x5be16c['aiSource']!=_0x6a5494['aiSource'];_0x6a5494&&(!_0x5be16c||_0x39cfba||_0x3d08d4)&&(_0x979ff9(_0x5be16c,Ot(_0x4368a0,_0x4293a0,_0xa42e37),Ot(_0x117e8e[_0x20ee12],_0x4293a0,_0xa42e37)),_0x6a5494=_0x5be16c||null,_0x4368a0=_0x5be16c?_0x117e8e[_0x20ee12]:null),_0x6a5494&&_0x591271&&_0x979ff9(_0x5be16c,Ot(_0x4368a0,_0x4293a0,_0xa42e37),Ct(_0x117e8e[_0x20ee12],_0x4293a0,_0xa42e37));}function _0x979ff9(_0x27aba2,_0x1a3495,_0x440f5c){const _0x3c5412=_0x6a5494['userId'],_0xd38bbd=_0x6a5494['aiSource'],_0x1a5330='revision:'+_0xb6b8f0+':'+_0x3c5412+':'+_0x3a3b32++,_0x2fafdb=_0xa42e37['createRange'](_0x1a3495,_0x440f5c);_0x4293a0['markers']['set'](_0x1a5330,_0x2fafdb),_0xd38bbd&&(_0x1d17eb[_0x1a5330]=_0xd38bbd),null!==_0x3c5412&&_0x1d0ced['add'](_0x3c5412);}}_getVidAttributeName(_0x2d553f){switch(_0x2d553f['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x4f6044){const _0x1d4357=this['_idsRoots']['get'](_0x4f6044['position']['root']['rootName']),_0x2cd13f=_0x4ebc80(_0x4f6044['position'],_0x1d4357),_0x39af27=null===_0x4f6044['_authorId']?null:_0x4f6044['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2a3e1f=_0x4f6044['_aiSource']||null,_0x5929a7=_0x2cd13f['parent'],_0x40917f=this['_revisionId'],_0x166026=[];for(const _0x144ddf of _0x4f6044['nodes'])if(_0x144ddf['is']('element'))_0x166026['push'](this['_makeIdsRoot'](_0x144ddf));else{for(let _0x5199fc=0x0;_0x5199fc<_0x144ddf['offsetSize'];_0x5199fc++)_0x166026['push'](new _0x784835('$text',{'vid':this['_revisionId']++}));}const _0x3a7a0a=this['_revisionId'];for(let _0x404954=_0x40917f;_0x404954<_0x3a7a0a;_0x404954++)this['_touched']['set'](_0x404954,{'userId':_0x39af27,'aiSource':_0x2a3e1f});_0x5929a7['_insertChild'](_0x2cd13f['offset'],_0x166026);}_setTouched(_0x30320d,_0x3c9b22,_0x10cc63){this['_touched']['set'](_0x30320d,{'userId':_0x3c9b22,'aiSource':_0x10cc63||this['_touched']['get'](_0x30320d)?.['aiSource']||null});}_handleMoveOperation(_0xb9809c){(_0xb9809c=this['_cloneOperation'](_0xb9809c,this['_idsRoots']))['_execute']();const _0x40131e=null===_0xb9809c['_authorId']?null:_0xb9809c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x17d4bf=_0xb9809c['_aiSource']||null,_0x468f3d=_0xb9809c['getMovedRangeStart'](),_0x333828=_0x468f3d['parent'],_0x54d4d3=_0x468f3d['offset'],_0x835a2a=(_0x3571af,_0x3236ba,_0x3ed37a)=>{for(let _0x3608a7=_0x3236ba;_0x3608a7<_0x3ed37a;_0x3608a7++){const _0x4d2a25=_0x3571af['getChild'](_0x3608a7);_0x4d2a25['is']('element','$text')?this['_setTouched'](_0x4d2a25['getAttribute']('vid'),_0x40131e,_0x17d4bf):(this['_setTouched'](_0x4d2a25['getAttribute']('vid_start'),_0x40131e,_0x17d4bf),_0x835a2a(_0x4d2a25,0x0,_0x4d2a25['childCount']),this['_setTouched'](_0x4d2a25['getAttribute']('vid_end'),_0x40131e,_0x17d4bf));}};_0x835a2a(_0x333828,_0x54d4d3,_0x54d4d3+_0xb9809c['howMany']);}_handleMergeOperation(_0xf8e071){const _0x76e455=null===(_0xf8e071=this['_cloneOperation'](_0xf8e071,this['_idsRoots']))['_authorId']?null:_0xf8e071['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cabcb=_0xf8e071['_aiSource']||null,_0x41407c=_0xf8e071['targetPosition']['parent'],_0x2adbb4=_0xf8e071['sourcePosition']['parent'],_0x59d96e=_0x41407c['getAttribute']('vid_end'),_0x1d4d2c=_0x2adbb4['getAttribute']('vid_start');_0x41407c['_setAttribute']('vid_end',_0x2adbb4['getAttribute']('vid_end')),_0x2adbb4['_setAttribute']('vid_end',_0x59d96e),this['_setTouched'](_0x1d4d2c,_0x76e455,_0x1cabcb),this['_setTouched'](_0x59d96e,_0x76e455,_0x1cabcb),_0xf8e071['_execute']();}_handleSplitOperation(_0x200b7a){const _0x4604e5=null===(_0x200b7a=this['_cloneOperation'](_0x200b7a,this['_idsRoots']))['_authorId']?null:_0x200b7a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xcc1590=_0x200b7a['_aiSource']||null,_0x2e93bc=_0x200b7a['graveyardPosition'],_0x3904da=_0x200b7a['splitPosition']['parent'];_0x200b7a['_execute']();const _0x317be7=_0x3904da['getAttribute']('vid_end'),_0x282e06=_0x200b7a['insertionPosition']['nodeAfter'];if(_0x2e93bc){const _0x2a9c69=_0x282e06['getAttribute']('vid_end'),_0xf1895e=_0x3904da['getAttribute']('vid_end');_0x3904da['_setAttribute']('vid_end',_0x2a9c69),_0x282e06['_setAttribute']('vid_end',_0xf1895e),this['_setTouched'](_0x3904da['getAttribute']('vid_end'),_0x4604e5,_0xcc1590),this['_setTouched'](_0x282e06['getAttribute']('vid_start'),_0x4604e5,_0xcc1590);}else{const _0x4cb80d=this['_revisionId']++,_0xcb6bfe=this['_revisionId']++;_0x3904da['_setAttribute']('vid_end',_0x4cb80d),_0x282e06['_setAttribute']('vid_start',_0xcb6bfe),_0x282e06['_setAttribute']('vid_end',_0x317be7),this['_setTouched'](_0x4cb80d,_0x4604e5,_0xcc1590),this['_setTouched'](_0xcb6bfe,_0x4604e5,_0xcc1590);}}_handleMarkerOperation(_0x2012fb){if(!_0x2012fb['affectsData'])return;const _0x135b4e=(_0x2012fb=this['_cloneOperation'](_0x2012fb,this['_diffRoots']))['oldRange']?_0x2012fb['oldRange']['root']:null,_0x1dc1ea=_0x2012fb['newRange']?_0x2012fb['newRange']['root']:null;_0x135b4e&&this['_markers']['delete'](_0x2012fb['name']),_0x1dc1ea&&this['_markers']['set'](_0x2012fb['name'],_0x2012fb['newRange']['clone']());const _0x34cca8=null===_0x2012fb['_authorId']?null:_0x2012fb['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4215f8=_0x2012fb['name'];if(_0x2012fb['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x4215f8,_0x2012fb['_aiSource']),!this['_touchedMarkers']['has'](_0x4215f8))return void this['_touchedMarkers']['set'](_0x4215f8,{'range':_0x2012fb['oldRange'],'userId':_0x34cca8});const _0x21d8f2=this['_touchedMarkers']['get'](_0x4215f8),_0x495b61=_0x21d8f2['range'],_0x3b2315=_0x2012fb['newRange'];null==_0x495b61&&null==_0x3b2315||_0x495b61&&_0x3b2315&&_0x495b61['isEqual'](_0x3b2315)?this['_touchedMarkers']['delete'](_0x2012fb['name']):_0x21d8f2['userId']=_0x34cca8;}_handleRootOperation(_0x59d9df,_0x50a841){this['_diffRoots']['has'](_0x59d9df['rootName'])?this['_diffRoots']['get'](_0x59d9df['rootName'])['_isAttached']=_0x59d9df['isAdd']:(this['_diffRoots']['set'](_0x59d9df['rootName'],Et(_0x59d9df['rootName'],_0x59d9df['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x59d9df['rootName'],{}),_0x50a841&&this['_idsRoots']['set'](_0x59d9df['rootName'],Et(_0x59d9df['rootName'],_0x59d9df['elementName'],!0x0)));const _0x148ff2=null===_0x59d9df['_authorId']?null:_0x59d9df['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xce5597=this['_touchedRoots']['get'](_0x59d9df['rootName']);_0xce5597&&_0xce5597['userId']===_0x148ff2?this['_touchedRoots']['delete'](_0x59d9df['rootName']):this['_touchedRoots']['set'](_0x59d9df['rootName'],{'userId':_0x148ff2,'isAttached':_0x59d9df['isAdd']});}_handleRootAttributeOperation(_0x283442){const _0x5f10df=this['_diffRootsAttributes']['get'](_0x283442['root']['rootName']);null===_0x283442['newValue']?delete _0x5f10df[_0x283442['key']]:_0x5f10df[_0x283442['key']]=_0x283442['newValue'];}};function St(_0x555c5e){const _0x47adc6=Et(_0x555c5e['rootName'],_0x555c5e['name'],_0x555c5e['isAttached']());for(const _0x54b80f of _0x555c5e['getChildren']()){const _0x329fcb=_0x54b80f['_clone'](!0x0);_0x47adc6['_appendChild'](_0x329fcb);}return _0x47adc6;}function Et(_0x1687bc,_0xd269b6,_0x47623b=!0x0){const _0x5a7bda=new _0x3bf08d();return _0x5a7bda['rootName']=_0x1687bc,_0x5a7bda['name']=_0xd269b6,_0x5a7bda['_isAttached']=_0x47623b,_0x5a7bda['isAttached']=()=>_0x5a7bda['_isAttached'],_0x5a7bda;}function Ot(_0x16af0b,_0x2a4dc2,_0x38c244){const _0x5808b2='elementEnd'==_0x16af0b['type']?_0x38c244['createPositionAt'](_0x16af0b['item'],'end'):_0x38c244['createPositionBefore'](_0x16af0b['item']);return _0x38c244['createPositionFromPath'](_0x2a4dc2,_0x5808b2['path'],_0x5808b2['stickiness']);}function Ct(_0x294baf,_0x2e4e8b,_0x448f6d){const _0x5947ff='elementStart'==_0x294baf['type']?_0x448f6d['createPositionAt'](_0x294baf['item'],0x0):_0x448f6d['createPositionAfter'](_0x294baf['item']);return _0x448f6d['createPositionFromPath'](_0x2e4e8b,_0x5947ff['path'],_0x5947ff['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x3de40c();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x56438a){super(),this['id']=_0x56438a['id']||_0x30d584(),this['author']=_0x56438a['author'],this['type']=_0x56438a['type'],this['data']=_0x56438a['data']||{},this['rootName']=_0x56438a['rootName'],this['set']('createdAt',_0x56438a['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x4a8775,_0x1ff767){this['newRevisionId']=_0x4a8775,this['oldRevisionId']=_0x1ff767,this['changes']=new _0x465b45();}_setChanges(_0x3b5cb1){for(const _0x5b24d5 of _0x3b5cb1)this['changes']['add'](_0x5b24d5);}},Pt=class extends _0xc8641b{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x1ee77a,_0x6c1757,bt,Rt];}constructor(_0x4b2fcc){super(_0x4b2fcc),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x4e0bd0,_0x2b5459,_0x5e90a1)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x10d82e=>{for(const _0x1293b9 of this['editor']['editing']['view']['document']['roots'])_0x5e90a1?_0x10d82e['removeClass']('ck-editor__editable__overlay',_0x1293b9):_0x10d82e['addClass']('ck-editor__editable__overlay',_0x1293b9);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1dc78d=>null!==_0x1dc78d),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1350a6,_0x49e5e6,_0x1c26f5)=>_0x1350a6&&_0x1c26f5?_0x49e5e6['changes']['getIndex'](_0x1c26f5):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3f1652,_0x52d711)=>_0x3f1652?_0x52d711['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x6c1757),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x18f7be=this['editor'],_0x409e20=new $t(_0x18f7be,{'direction':'backward'}),_0x3d1d46=new $t(_0x18f7be,{'direction':'forward'});_0x18f7be['commands']['add']('showPreviousChange',_0x409e20),_0x18f7be['commands']['add']('showNextChange',_0x3d1d46),_0x18f7be['commands']['add']('restoreRevision',new Ft(_0x18f7be)),this['on']('change:numberOfChanges',()=>{_0x409e20['refresh'](),_0x3d1d46['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x18f7be['enableReadOnlyMode']('revision-viewer'),_0x18f7be['plugins']['has']('WidgetToolbarRepository')&&_0x18f7be['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0xa8d9e6){return await this['_utils']['loadRevisionData'](_0xa8d9e6,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xa8d9e6);}async getRevisionRootsAttributes(_0x1252c2){return await this['_utils']['loadRevisionData'](_0x1252c2,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1252c2);}async['compare'](_0x21786a,_0x306f0a,_0x23e11b=!0x1){if(!this['isEnabled'])return;const _0x290bca=this['diff'],_0x515c0c=this['repository'],_0xcf49b7='string'==typeof _0x21786a?_0x515c0c['getRevision'](_0x21786a):_0x21786a,_0x353fe5='string'==typeof _0x306f0a?_0x515c0c['getRevision'](_0x306f0a):_0x306f0a,_0x58f024=_0xcf49b7['id'],_0xfa2744=_0x353fe5?_0x353fe5['id']:null;if(!_0x23e11b&&this['diff']&&this['diff']['newRevisionId']===_0x58f024&&this['diff']['oldRevisionId']===_0xfa2744)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x58f024,_0xfa2744);const _0x3002e0=this['_getRevisionsRange'](_0xcf49b7,_0x353fe5,!0x0)['map'](_0x44776e=>this['_utils']['loadRevisionData'](_0x44776e,this['adapter']));return _0x3002e0['push'](new Promise(_0x5c8757=>{setTimeout(_0x5c8757,0x14);})),Promise['all'](_0x3002e0)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x430b40=this['_getDiff'](_0x58f024,_0xfa2744);this['_cleanUpCommentMarkers'](_0x430b40);for(const _0x190fcd of _0x430b40['changes'])this['_changeIdToChange']['set'](_0x190fcd['id'],_0x190fcd);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xae692a=>{for(const _0x54c18c of this['editor']['model']['document']['getRootNames']())_0xae692a['detachRoot'](_0x54c18c);for(const _0x5cb364 of Object['keys'](_0x430b40['model'])){const _0x203416=_0x430b40['model'][_0x5cb364]['name'],_0x1256ee=_0xae692a['addRoot'](_0x5cb364,_0x203416);for(const _0xa4c313 of Object['keys'](_0x430b40['attributes'][_0x5cb364]))_0xae692a['setAttribute'](_0xa4c313,_0x430b40['attributes'][_0x5cb364][_0xa4c313],_0x1256ee);_0xae692a['insert'](_0x430b40['model'][_0x5cb364],_0x1256ee,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x430b40['changes'])),this['isReady']=!0x0;})['catch'](_0x3380cc=>{console['error'](_0x3380cc),this['_cleanUp'](),_0x290bca&&(this['diff']=_0x290bca),this['isReady']=!0x0;});}addRevisionData(_0x418989,_0x53597e){const _0x4fa28d=this['repository']['createRevision'](_0x418989);return _0x4fa28d['on']('_update',(_0x3fa7f8,_0x95ee7e,_0x5492c0)=>_0x53597e(_0x95ee7e,_0x5492c0,_0x4fa28d)),this['repository']['addRevision'](_0x4fa28d),_0x4fa28d;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x148975=>{for(const _0x1decf7 of this['editor']['model']['document']['getRootNames']())_0x148975['detachRoot'](_0x1decf7);});}_cleanUpCommentMarkers(_0x238b67){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0xbe62c4=this['_getVisibleCommentThreadIds']();for(const _0x2a76f9 of Object['values'](_0x238b67['model']))for(const _0x3e8899 of Array['from'](_0x2a76f9['markers']['keys']()))_0x3e8899['startsWith']('revision-comment:')&&!_0xbe62c4['has'](Ut(_0x3e8899))&&_0x2a76f9['markers']['delete'](_0x3e8899);}_sortAndFilterDiffChanges(_0x1b2d6e){const _0x440123=[],_0x1431e8=new Map();for(const _0x5f4a7f of this['editor']['model']['document']['getRootNames']()){const _0x338e3b=this['editor']['editing']['view']['getDomRoot'](_0x5f4a7f);if(!_0x338e3b)continue;const _0x288a90=_0x338e3b['getClientRects']()['item'](0x0);_0x288a90&&(_0x440123['push'](_0x5f4a7f),_0x1431e8['set'](_0x5f4a7f,_0x288a90));}return _0x440123['sort']((_0x2738f0,_0x4bab41)=>{const _0x465644=_0x1431e8['get'](_0x2738f0),_0x305096=_0x1431e8['get'](_0x4bab41);return _0x465644['y']-_0x305096['y']||_0x465644['x']-_0x305096['x'];}),(_0x1b2d6e=_0x1b2d6e['filter'](_0x497e35=>_0x440123['includes'](_0x497e35['rootName'])))['sort']((_0x5e3bd2,_0x18fb26)=>_0x440123['indexOf'](_0x5e3bd2['rootName'])-_0x440123['indexOf'](_0x18fb26['rootName'])),_0x1b2d6e;}['_makeTape'](_0x19133e,_0x399e7f={}){const _0xa62ea6=Array['from'](_0x19133e['markers'])['filter'](([_0x2ee81b,_0xe4b710])=>_0x2ee81b['startsWith']('revision:')&&!_0xe4b710['isCollapsed']),_0xbd62eb=Array['from'](this['editor']['model']['createRangeIn'](_0x19133e)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0xa62ea6['length'])for(const _0x3f6504 of _0xbd62eb){const [_0x3c4067,_0x44c581]=_0xa62ea6[0x0],[,_0x58434f,_0x14d27e]=_0x3c4067['split'](':'),_0x2d6a7f=_0x399e7f[_0x3c4067]||null;if(_0x44c581['end']['isEqual'](_0x3f6504['nextPosition'])&&_0xa62ea6['shift'](),(_0x3f6504['previousPosition']['isEqual'](_0x44c581['start'])||_0x3f6504['previousPosition']['isAfter'](_0x44c581['start']))&&('insertion'==_0x58434f?_0x3f6504['isAdded']={'userId':_0x14d27e,'aiSource':_0x2d6a7f}:'deletion'==_0x58434f&&(_0x3f6504['isRemoved']={'userId':_0x14d27e,'aiSource':_0x2d6a7f})),0x0==_0xa62ea6['length'])break;}return _0xbd62eb;}_refreshStartEndIndex(_0x376689){const _0x4fe3c8=new Map();for(let _0x31bf5b=0x0;_0x31bf5b<_0x376689['length'];_0x31bf5b++)'text'===_0x376689[_0x31bf5b]['type']?(_0x376689[_0x31bf5b]['item']['startIndex']=_0x31bf5b,_0x376689[_0x31bf5b]['item']['endIndex']=_0x31bf5b):('elementStart'===_0x376689[_0x31bf5b]['type']?_0x376689[_0x31bf5b]['item']['startIndex']=_0x31bf5b:'elementEnd'===_0x376689[_0x31bf5b]['type']&&(_0x376689[_0x31bf5b]['item']['endIndex']=_0x31bf5b),_0x4fe3c8['set'](_0x376689[_0x31bf5b]['id'],_0x31bf5b));for(const _0xc909a2 of _0x4fe3c8['values']())'elementStart'===_0x376689[_0xc909a2]['type']?_0x376689[_0xc909a2]['item']['endIndex']=_0x4fe3c8['get'](_0x376689[_0xc909a2]['pairId']):'elementEnd'===_0x376689[_0xc909a2]['type']&&(_0x376689[_0xc909a2]['item']['startIndex']=_0x4fe3c8['get'](_0x376689[_0xc909a2]['pairId']));}['_processTape'](_0xc96708){for(let _0x5eb614=0x0;_0x5eb614<_0xc96708['length'];_0x5eb614++){if('elementStart'===_0xc96708[_0x5eb614]['type'])_0xc96708[_0x5eb614]['item']['startIndex']=_0x5eb614;else{if('elementEnd'===_0xc96708[_0x5eb614]['type']){_0xc96708[_0x5eb614]['item']['endIndex']=_0x5eb614;const _0xfe5741=_0xc96708[_0x5eb614]['item']['startIndex'];_0xc96708[_0xfe5741]['pairId']=_0xc96708[_0x5eb614]['id'],_0xc96708[_0x5eb614]['pairId']=_0xc96708[_0xfe5741]['id'];}else _0xc96708[_0x5eb614]['item']['startIndex']=_0x5eb614,_0xc96708[_0x5eb614]['item']['endIndex']=_0x5eb614,_0xc96708[_0x5eb614]['pairId']=null;}_0xc96708[_0x5eb614]['markersStart']||(_0xc96708[_0x5eb614]['markersStart']=[],_0xc96708[_0x5eb614]['markersEnd']=[]);}}_markInsertions(_0x231a21,_0x4cbaf9){const _0x1c6eca=_0x231a21['filter'](_0x45432e=>!_0x45432e['isAdded']);for(let _0x3ee548=0x0;_0x3ee548<_0x4cbaf9['length'];_0x3ee548++)_0x4cbaf9[_0x3ee548]['isAdded']&&(_0x1c6eca[_0x3ee548]['isAdded']=_0x4cbaf9[_0x3ee548]['isAdded']);}_getDiff(_0x2c7efc,_0x32bc40=null){const _0x3bf193=this['repository']['getRevision'](_0x2c7efc),_0x542fb0=_0x32bc40?this['repository']['getRevision'](_0x32bc40):null,_0x345baa=this['_getRevisionsRange'](_0x3bf193,_0x542fb0),_0x4e3e89=_0x345baa[_0x345baa['length']-0x1],_0x10dc1a=new Map(),_0x3df12e={'model':{},'attributes':{},'changes':[]},_0x4d7849=new Set(),_0x1cc255=new Map();for(let _0x1a6cef=_0x345baa['length']-0x1;_0x1a6cef>=0x0;_0x1a6cef--){const _0x1584fc=_0x345baa[_0x1a6cef];for(const _0x322866 of Object['keys'](_0x1584fc['diffData']))if(_0x1584fc['diffData'][_0x322866]['attachChange']){const _0x48d36e=_0x1584fc['diffData'][_0x322866]['attachChange'];_0x48d36e['isAttached']?(_0x4d7849['add'](_0x322866),_0x1cc255['has'](_0x322866)&&_0x1cc255['get'](_0x322866)['userId']==_0x48d36e['userId']?_0x1cc255['delete'](_0x322866):_0x1cc255['set'](_0x322866,_0x48d36e)):_0x1cc255['has'](_0x322866)?(_0x4d7849['delete'](_0x322866),_0x1cc255['delete'](_0x322866)):(_0x4d7849['add'](_0x322866),_0x1cc255['set'](_0x322866,_0x48d36e));}else _0x4d7849['add'](_0x322866);}for(const _0x10a8ab of _0x4d7849){const _0x4cb504=_0x1cc255['has'](_0x10a8ab)&&!_0x1cc255['get'](_0x10a8ab)['isAttached'];let _0x3654f8=_0x4cb504?_0x345baa['length']-0x1:0x0;const _0x430621=_0x4cb504?-0x1:0x1;for(;_0x345baa[_0x3654f8];){const _0x2167f7=_0x345baa[_0x3654f8];if(_0x2167f7['diffData'][_0x10a8ab]){const _0x33e538=_0x4cb504?_0x2167f7['diffData'][_0x10a8ab]['attributesBefore']:_0x2167f7['diffData'][_0x10a8ab]['attributesAfter'];_0x3df12e['attributes'][_0x10a8ab]=_0x33e538?_0x5026b6(_0x33e538):{};break;}_0x3654f8+=_0x430621;}}for(const _0x3ab1fc of _0x345baa){_0x3ab1fc['model']={};for(const _0x51bac8 of _0x3ab1fc['authors'])_0x10dc1a['set'](_0x51bac8['id'],_0x51bac8);for(const _0xc32a11 of _0x4d7849){const _0x294384=_0x3ab1fc['diffData'][_0xc32a11]?_0x3ab1fc['diffData'][_0xc32a11]['insertions']:'[]',_0x1178b1=_0x3ab1fc['diffData'][_0xc32a11]?_0x3ab1fc['diffData'][_0xc32a11]['deletions']:'[]',_0x4e356d=_0x3ab1fc['diffData'][_0xc32a11]?.['rootElementName']||'$root';_0x3ab1fc['model'][_0xc32a11]={'insertions':this['_utils']['_makeModelFromViewString'](_0x294384,_0x4e356d),'deletions':this['_utils']['_makeModelFromViewString'](_0x1178b1,_0x4e356d)};}}for(const _0x484c67 of _0x4d7849){let _0x10c2f7=null,_0x17f727=0x0;const _0x3f87b4=_0x345baa['map'](_0x51dbe3=>_0x51dbe3['diffData'][_0x484c67]?.['rootElementName'])['find'](_0x4beac8=>void 0x0!==_0x4beac8)||'$root',_0x5e0edb=new Map(Array['from'](_0x3bf193['model'][_0x484c67]['insertions']['markers'])['filter'](([_0x151bb0])=>!_0x151bb0['startsWith']('revision:')));let _0x5c0362=0x0;for(const _0x1fe950 of _0x345baa){const _0x53827b=_0x1fe950['diffData'][_0x484c67]?.['aiSources']||{},_0x40e0d5=this['_makeTape'](_0x1fe950['model'][_0x484c67]['insertions'],_0x53827b);_0x1fe950==_0x3bf193?(_0x10c2f7=_0x40e0d5,_0x17f727=_0x10c2f7['length'],_0x10c2f7['forEach'](_0x56e97d=>{_0x56e97d['id']=_0x5c0362++;}),this['_processTape'](_0x10c2f7)):this['_markInsertions'](_0x10c2f7,_0x40e0d5);const _0x159e7a=_0x10c2f7['filter'](_0x32ab34=>!_0x32ab34['isAdded'])['map'](_0x14c538=>_0x14c538['id']);let _0xc8d8a7=0x0;const _0x21bad1=this['_makeTape'](_0x1fe950['model'][_0x484c67]['deletions'],_0x53827b);_0x21bad1['forEach'](_0x1d54d6=>{_0x1d54d6['isRemoved']?_0x1d54d6['id']=_0x17f727++:_0x1d54d6['id']=_0x159e7a[_0xc8d8a7++];}),this['_processTape'](_0x21bad1),this['_setDistance'](_0x10c2f7,'isAdded'),this['_setDistance'](_0x21bad1,'isRemoved'),_0x1fe950==_0x3bf193&&this['_markMarkers'](_0x10c2f7,_0x5e0edb),_0x10c2f7=this['_joinTapes'](_0x10c2f7,_0x21bad1),this['_refreshStartEndIndex'](_0x10c2f7),this['_setDistance'](_0x10c2f7,'isRemoved');}_0x10c2f7=_0x10c2f7['filter'](_0x5bd60a=>!(_0x5bd60a['isAdded']&&_0x5bd60a['isRemoved']));const _0x553554=new Map(_0x4e3e89['model'][_0x484c67]['deletions']['markers']),_0x2c095e=new Set(_0x5e0edb['keys']());for(const _0x523863 of _0x553554['keys']())_0x2c095e['delete'](_0x523863);const _0x1b068b=Object['assign']({},..._0x345baa['map'](_0x4c65b0=>_0x4c65b0['diffData'][_0x484c67]?.['aiSources']));this['_markSuggestions'](_0x10c2f7,_0x2c095e,_0x1b068b),this['_fixObsoleteTags'](_0x10c2f7),_0x10c2f7=this['_removeMissingPairs'](_0x10c2f7),_0x10c2f7=this['_markMismatchedRemovedTags'](_0x10c2f7),_0x10c2f7=this['_removeUnsupportedChanges'](_0x10c2f7);const {root:_0x29bca2,changes:_0x46ca3b}=this['_makeModelFromTape'](_0x10c2f7,_0x10dc1a,_0x484c67,_0x3f87b4);_0x3df12e['model'][_0x484c67]=_0x29bca2;const _0x1573f0=_0x1cc255['get'](_0x484c67);if(_0x1573f0){const _0x5d2fd8=_0x10dc1a['get'](_0x1573f0['userId']),_0xe8faa9=new Mt({'author':_0x5d2fd8,'type':_0x1573f0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x484c67});_0x46ca3b['unshift'](_0xe8faa9),_0x3df12e['attributes'][_0x484c67]['revisionHistoryAttachChange']=_0xe8faa9['id'];}_0x3df12e['changes']=_0x3df12e['changes']['concat'](_0x46ca3b);}return _0x3df12e;}['_markMarkers'](_0x4f7985,_0x2f200e){for(let _0xe10b24=0x0;_0xe10b24<_0x4f7985['length'];_0xe10b24++)for(const [_0x3368a7,_0x11b727]of _0x2f200e)!_0x11b727['isCollapsed']&&_0x11b727['start']['isEqual'](_0x4f7985[_0xe10b24]['previousPosition'])&&_0x4f7985[_0xe10b24]['markersStart']['push'](_0x3368a7),_0x11b727['end']['isEqual'](_0x4f7985[_0xe10b24]['nextPosition'])&&_0x4f7985[_0xe10b24]['markersEnd']['push'](_0x3368a7);}['_joinTapes'](_0x2392d0,_0x1ccd77){let _0x1a6462=[],_0x238ea3=0x0,_0x17b975=0x0;for(;_0x238ea3<_0x2392d0['length']||_0x17b975<_0x1ccd77['length'];){const _0x5c1f30=_0x2392d0[_0x238ea3]||{},_0x2e00e0=_0x1ccd77[_0x17b975]||{};if(_0x5c1f30['id']==_0x2e00e0['id'])_0x238ea3++,_0x17b975++,_0x1a6462['push'](_0x5c1f30);else{if(_0x2e00e0['isRemoved']&&_0x5c1f30['isAdded']){const {commonTape:_0x49edbd,iEnd:_0x1cbf65,jEnd:_0x46c8db}=this['_threeWayMerge'](_0x2392d0,_0x238ea3,_0x1ccd77,_0x17b975);_0x1a6462=_0x1a6462['concat'](_0x49edbd),_0x238ea3=_0x1cbf65,_0x17b975=_0x46c8db;}else _0x2e00e0['isRemoved']?(_0x17b975++,_0x1a6462['push'](_0x2e00e0)):(_0x238ea3++,_0x1a6462['push'](_0x5c1f30));}}return _0x1a6462;}_markSuggestions(_0x1e72ac,_0x1f4094,_0x2168d3){const _0x48d25c=[];for(let _0x469914=0x0;_0x469914<_0x1e72ac['length'];_0x469914++){for(let _0x1054ca=0x0;_0x1054ca<_0x1e72ac[_0x469914]['markersStart']['length'];_0x1054ca++){const _0x225e24=_0x1e72ac[_0x469914]['markersStart'][_0x1054ca];if(!_0x1f4094['has'](_0x225e24))continue;const {group:_0x7a5618,type:_0x58e25b,authorId:_0x50bfa9}=_0x190d09(_0x225e24);if('revision-suggestion'!=_0x7a5618||'insertion'!=_0x58e25b&&'deletion'!=_0x58e25b)continue;const _0x347818=_0x2168d3['suggestion:'+_0x225e24['slice'](0x14)]||null;_0x48d25c['unshift']({'type':_0x58e25b,'name':_0x225e24,'userId':_0x50bfa9,'aiSource':_0x347818}),_0x1e72ac[_0x469914]['markersStart']['splice'](_0x1054ca,0x1),_0x1054ca--;}_0x10080a(_0x1e72ac[_0x469914]);for(let _0x2ec662=0x0;_0x2ec662<_0x1e72ac[_0x469914]['markersEnd']['length'];_0x2ec662++){const _0x18572b=_0x1e72ac[_0x469914]['markersEnd'][_0x2ec662];if(!_0x1f4094['has'](_0x18572b))continue;const {group:_0x1a7885,type:_0x337e4c}=_0x190d09(_0x18572b);if('revision-suggestion'!=_0x1a7885||'insertion'!=_0x337e4c&&'deletion'!=_0x337e4c)continue;_0x1e72ac[_0x469914]['markersEnd']['splice'](_0x2ec662,0x1),_0x2ec662--;const _0x4c8f75=_0x48d25c['findIndex'](_0x429b07=>_0x429b07['name']==_0x18572b);_0x4c8f75>-0x1&&_0x48d25c['splice'](_0x4c8f75,0x1);}}function _0x190d09(_0x398f58){const _0x4bae17=_0x398f58['split'](':');return{'group':_0x4bae17[0x0],'type':_0x4bae17[0x1],'subType':_0x4bae17['length']>=0x5?_0x4bae17[0x2]:null,'id':_0x4bae17['length']<0x5?_0x4bae17[0x2]:_0x4bae17[0x3],'authorId':_0x4bae17['length']<0x5?_0x4bae17[0x3]:_0x4bae17[0x4],'markerCount':0x6==_0x4bae17['length']?_0x4bae17[0x5]:null};}function _0x10080a(_0x54804d){for(let _0x566d03=0x0;_0x566d03<_0x48d25c['length'];_0x566d03++){if(_0x54804d['isAdded']&&'insertion'==_0x48d25c[_0x566d03]['type']&&_0x54804d['isAdded']['userId']==_0x48d25c[_0x566d03]['userId'])return _0x54804d['isAddSuggestion']={..._0x48d25c[_0x566d03],'aiSource':_0x54804d['isAdded']['aiSource']||_0x48d25c[_0x566d03]['aiSource']},void delete _0x54804d['isAdded'];if(!_0x54804d['isAdded']&&!_0x54804d['isRemoved']&&'deletion'==_0x48d25c[_0x566d03]['type'])return void(_0x54804d['isRemoveSuggestion']=_0x48d25c[_0x566d03]);}}}_setDistance(_0x450e1a,_0xc3033c){let _0x2d9e84=0x0,_0x5dcbf8=!0x1;const _0x45b0b8=new Map();for(const _0x1f1d8f of _0x450e1a)_0x1f1d8f[_0xc3033c]?_0x5dcbf8&&(_0x2d9e84++,_0x5dcbf8=!0x1):(_0x2d9e84++,_0x5dcbf8=!0x0),_0x45b0b8['set'](_0x1f1d8f['id'],_0x2d9e84);for(let _0x17d08a=0x0;_0x17d08a<_0x450e1a['length'];_0x17d08a++){if('isRemoved'==_0xc3033c&&_0x450e1a[_0x17d08a]['isAdded']||'isAdded'==_0xc3033c&&_0x450e1a[_0x17d08a]['isRemoved'])continue;if('text'==_0x450e1a[_0x17d08a]['type']){_0x450e1a[_0x17d08a]['distance']=0x0;continue;}const _0x633098=_0x45b0b8['get'](_0x450e1a[_0x17d08a]['pairId']),_0x43e5d0=_0x45b0b8['get'](_0x450e1a[_0x17d08a]['id']);_0x450e1a[_0x17d08a]['distance']=_0x633098-_0x43e5d0;}}_getRevisionsRange(_0x55f3b5,_0x46d531,_0x464d45=!0x1){const _0x1c4bad=[];let _0xcac296=this['repository']['getIndex'](_0x55f3b5),_0x6f3fa8=this['repository']['getIndex'](_0x46d531);for(-0x1==_0x6f3fa8&&(_0x6f3fa8=this['repository']['_revisions']['length'],_0x464d45=!0x1);_0xcac296<_0x6f3fa8;)_0x1c4bad['push'](this['repository']['getRevision'](_0xcac296)),_0xcac296++;return _0x464d45&&_0x1c4bad['push'](this['repository']['getRevision'](_0xcac296)),_0x1c4bad;}_threeWayMerge(_0x5a75ce,_0x51aeb2,_0x4ccbb9,_0x45534c){const _0x506501=this['editor']['model']['schema'];let _0x1b8712=_0x51aeb2;for(;_0x5a75ce[_0x1b8712]&&_0x5a75ce[_0x1b8712]['isAdded'];)_0x1b8712++;let _0x2487d3=_0x45534c;for(;_0x4ccbb9[_0x2487d3]&&_0x4ccbb9[_0x2487d3]['isRemoved'];)_0x2487d3++;_0x2592e4(_0x5a75ce,_0x51aeb2,_0x1b8712),_0x2592e4(_0x4ccbb9,_0x45534c,_0x2487d3);const _0x15f3a3=_0x4ccbb9['slice'](_0x45534c,_0x2487d3)['concat'](_0x5a75ce['slice'](_0x51aeb2,_0x1b8712));return _0x15f3a3['sort']((_0x3846ec,_0x33c386)=>_0x3846ec['side']!=_0x33c386['side']?_0x3846ec['side']-_0x33c386['side']:_0x3846ec['level']!=_0x33c386['level']?_0x3846ec['level']-_0x33c386['level']:_0x3846ec['distance']!=_0x33c386['distance']?_0x33c386['distance']-_0x3846ec['distance']:!!_0x3846ec['isAdded']!=!!_0x33c386['isAdded']?-0x1==_0x3846ec['side']||0x0==_0x3846ec['side']?_0x3846ec['isAdded']?-0x1:0x1:_0x3846ec['isAdded']?0x1:-0x1:_0x3846ec['index']-_0x33c386['index']),{'commonTape':_0x15f3a3,'iEnd':_0x1b8712,'jEnd':_0x2487d3};function _0x2592e4(_0x1e6162,_0x3dc61e,_0x18be9e){let _0x1dad78=-0x1,_0x17b064=Number['POSITIVE_INFINITY'],_0x94ce4=!0x0;for(let _0x36adfb=_0x3dc61e;_0x36adfb<_0x18be9e;_0x36adfb++)if(_0x506501['isInline'](_0x1e6162[_0x36adfb]['item'])||(_0x94ce4=!0x1),_0x1e6162[_0x36adfb]['item']['startIndex']<_0x3dc61e&&(_0x1dad78=_0x36adfb),_0x1e6162[_0x36adfb]['item']['endIndex']>=_0x18be9e){_0x17b064=_0x36adfb;break;}_0x94ce4&&(_0x1dad78=_0x18be9e-0x1);for(let _0x39671a=_0x3dc61e;_0x39671a<_0x18be9e;_0x39671a++)_0x1e6162[_0x39671a]['side']=_0x39671a<=_0x1dad78?-0x1:_0x39671a<_0x17b064?0x0:0x1,_0x1e6162[_0x39671a]['index']=_0x39671a;let _0x37595f=0x0;for(let _0x2870a6=_0x3dc61e;_0x2870a6<=_0x1dad78;_0x2870a6++)0x0==_0x1e6162[_0x2870a6]['distance']?_0x1e6162[_0x2870a6]['level']=_0x37595f:(_0x37595f++,_0x1e6162[_0x2870a6]['level']=_0x37595f,_0x37595f++);for(let _0x9014ff=_0x3dc61e;_0x9014ff<_0x18be9e;_0x9014ff++)0x0==_0x1e6162[_0x9014ff]['side']&&(_0x1e6162[_0x9014ff]['level']=_0x37595f);_0x37595f=0x0;for(let _0x35727a=_0x18be9e-0x1;_0x35727a>=_0x17b064;_0x35727a--)0x0==_0x1e6162[_0x35727a]['distance']?_0x1e6162[_0x35727a]['level']=_0x37595f:(_0x37595f--,_0x1e6162[_0x35727a]['level']=_0x37595f,_0x37595f--);}}_fixObsoleteTags(_0x69762e){const _0x411863=new Map(),_0x2de382=this['editor']['model']['schema'];for(let _0x4240fc=0x1;_0x4240fc<_0x69762e['length'];_0x4240fc++){let _0x24c492,_0x3c7f28,_0x46e58f;const _0x43b582=_0x69762e[_0x4240fc],_0x50c2de=_0x69762e[_0x4240fc-0x1];if('text'==_0x43b582['type'])continue;if(_0x43b582['type']!=_0x50c2de['type'])continue;if(!_0x2de382['isBlock'](_0x50c2de['item'])||_0x2de382['isLimit'](_0x50c2de['item']))continue;if(!_0x2de382['isBlock'](_0x43b582['item'])||_0x2de382['isLimit'](_0x43b582['item']))continue;if((_0x69762e[_0x4240fc]['isAdded']||_0x69762e[_0x4240fc]['isAddSuggestion'])&&_0x69762e[_0x4240fc-0x1]['isRemoved'])_0x24c492=_0x69762e[_0x4240fc],_0x3c7f28=_0x69762e[_0x4240fc-0x1],_0x46e58f=_0x4240fc-0x1;else{if(!_0x69762e[_0x4240fc]['isRemoved']||!_0x69762e[_0x4240fc-0x1]['isAdded']&&!_0x69762e[_0x4240fc-0x1]['isAddSuggestion'])continue;_0x24c492=_0x69762e[_0x4240fc-0x1],_0x3c7f28=_0x69762e[_0x4240fc],_0x46e58f=_0x4240fc;}const _0x508adb=_0x24c492['level']==_0x3c7f28['level'],_0x4dffb9=Math['abs'](_0x24c492['level'])<Math['abs'](_0x3c7f28['level'])&&0x0==_0x3c7f28['distance'];(_0x508adb||_0x4dffb9)&&(_0x411863['set'](_0x3c7f28['id'],_0x24c492['id']),_0x69762e['splice'](_0x46e58f,0x1),_0x4240fc--,_0x24c492['isAdded']=!0x1);}for(let _0x155ea9=0x0;_0x155ea9<_0x69762e['length'];_0x155ea9++)_0x411863['has'](_0x69762e[_0x155ea9]['pairId'])&&(_0x69762e[_0x155ea9]['pairId']=_0x411863['get'](_0x69762e[_0x155ea9]['pairId']));}['_removeMissingPairs'](_0x1ba6b2){const _0x1a584d=new Set(_0x1ba6b2['map'](_0x1f397c=>_0x1f397c['id']));for(let _0x5e678e=0x0;_0x5e678e<_0x1ba6b2['length'];_0x5e678e++)_0x1a584d['has'](_0x1ba6b2[_0x5e678e]['pairId'])||0x0==_0x1ba6b2[_0x5e678e]['distance']||(_0x1ba6b2[_0x5e678e]['isIncorrect']=!0x0);return _0x1ba6b2['filter'](_0x57a8e4=>!_0x57a8e4['isIncorrect']);}_markMismatchedRemovedTags(_0x297f69){const _0x2d7d12=new Set();for(let _0x397122=0x0;_0x397122<_0x297f69['length'];_0x397122++){if(_0x2d7d12['has'](_0x297f69[_0x397122]['id'])&&_0x297f69[_0x397122]['isRemoved']&&(_0x297f69[_0x397122]['isIncorrect']=!0x0),_0x297f69[_0x397122]['isIncorrect'])continue;if(0x0==_0x297f69[_0x397122]['distance'])continue;if('elementStart'!=_0x297f69[_0x397122]['type'])continue;if(null==_0x297f69[_0x397122]['pairId'])continue;let _0x315a65=_0x397122+0x1,_0x1c632b=0x0;for(;_0x297f69[_0x315a65]['id']!=_0x297f69[_0x397122]['pairId'];)'elementStart'==_0x297f69[_0x315a65]['type']?_0x1c632b++:'elementEnd'==_0x297f69[_0x315a65]['type']&&_0x1c632b--,_0x315a65++;if(0x0!=_0x1c632b){if(_0x297f69[_0x397122]['isRemoved'])_0x297f69[_0x397122]['isIncorrect']=!0x0;else{for(;_0x315a65!=_0x397122;)_0x297f69[_0x315a65]['isRemoved']&&0x0!=_0x297f69[_0x315a65]['distance']&&(_0x297f69[_0x315a65]['isIncorrect']=!0x0,_0x2d7d12['add'](_0x297f69[_0x315a65]['pairId'])),_0x315a65--;}}}return _0x297f69['filter'](_0x9381cf=>!_0x9381cf['isIncorrect']);}_removeUnsupportedChanges(_0x454d14){const _0x1f6af7=this['editor']['model']['schema'];for(let _0x5f1bb1=0x0;_0x5f1bb1<_0x454d14['length'];_0x5f1bb1++){if(!(_0x454d14[_0x5f1bb1]['isAdded']||_0x454d14[_0x5f1bb1]['isAddSuggestion']||_0x454d14[_0x5f1bb1]['isRemoved']||_0x454d14[_0x5f1bb1]['isRemoveSuggestion']))continue;if(0x0==_0x454d14[_0x5f1bb1]['distance'])continue;const _0x4335f2=_0x454d14[_0x5f1bb1]['item'];_0x1f6af7['isBlock'](_0x4335f2)||_0x1f6af7['isLimit'](_0x4335f2)||(_0x454d14[_0x5f1bb1]['isAdded']&&delete _0x454d14[_0x5f1bb1]['isAdded'],_0x454d14[_0x5f1bb1]['isAddSuggestion']&&delete _0x454d14[_0x5f1bb1]['isAddSuggestion'],_0x454d14[_0x5f1bb1]['isRemoveSuggestion']&&delete _0x454d14[_0x5f1bb1]['isRemoveSuggestion'],_0x454d14[_0x5f1bb1]['isRemoved']&&(_0x454d14[_0x5f1bb1]['isIncorrect']=!0x0));}return _0x454d14['filter'](_0x1537a8=>!_0x1537a8['isIncorrect']);}['_makeModelFromTape'](_0x4dcb7f,_0xa3b87a,_0x341bdd,_0x2ebce2){const _0x4cc43e=new _0x3bf08d(),_0x1c0842=[],_0x43d6d8=new Map(),_0x481464=this['editor']['model'],_0xf844b4=_0x481464['schema'],_0x4d6caf=[_0x4cc43e],_0x4dc030={},_0x2f3fc7={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x4cc43e['name']=_0x2ebce2;let _0x30e791=null;const _0x3f7892=[0x0];for(let _0xe0be52=0x0;_0xe0be52<_0x4dcb7f['length'];_0xe0be52++)if('elementStart'===_0x4dcb7f[_0xe0be52]['type']){_0x4dcb7f[_0xe0be52]['previousPosition']=_0x481464['createPositionFromPath'](_0x4cc43e,_0x3f7892);const _0x3abb09=new _0x784835(_0x4dcb7f[_0xe0be52]['item']['name'],_0x4dcb7f[_0xe0be52]['item']['getAttributes']());_0x4d6caf[0x0]['_appendChild'](_0x3abb09),_0x3f7892['push'](0x0),_0x4d6caf['unshift'](_0x3abb09),_0x4dcb7f[_0xe0be52]['nextPosition']=_0x481464['createPositionFromPath'](_0x4cc43e,_0x3f7892);}else'elementEnd'===_0x4dcb7f[_0xe0be52]['type']?(_0x4d6caf['shift'](),_0x4dcb7f[_0xe0be52]['previousPosition']=_0x481464['createPositionFromPath'](_0x4cc43e,_0x3f7892),_0x3f7892['pop'](),_0x3f7892[_0x3f7892['length']-0x1]++,_0x4dcb7f[_0xe0be52]['nextPosition']=_0x481464['createPositionFromPath'](_0x4cc43e,_0x3f7892)):(_0x4dcb7f[_0xe0be52]['previousPosition']=_0x481464['createPositionFromPath'](_0x4cc43e,_0x3f7892),_0x30e791?_0x30e791['_data']+=_0x4dcb7f[_0xe0be52]['item']['data']:_0x30e791=new _0x35947c(_0x4dcb7f[_0xe0be52]['item']['data'],_0x4dcb7f[_0xe0be52]['item']['getAttributes']()),_0x4dcb7f[_0xe0be52+0x1]&&'text'===_0x4dcb7f[_0xe0be52+0x1]['type']&&_0x1e5ec5(_0x30e791,_0x4dcb7f[_0xe0be52+0x1]['item'])||(_0x4d6caf[0x0]['_appendChild'](_0x30e791),_0x30e791=null),_0x3f7892[_0x3f7892['length']-0x1]+=_0x4dcb7f[_0xe0be52]['item']['offsetSize'],_0x4dcb7f[_0xe0be52]['nextPosition']=_0x481464['createPositionFromPath'](_0x4cc43e,_0x3f7892));for(let _0x131167=0x0;_0x131167<_0x4dcb7f['length'];_0x131167++){const _0x3728eb=_0x4dcb7f[_0x131167]['previousPosition'],_0x41b544=_0x4dcb7f[_0x131167]['nextPosition'];for(const _0x59c860 of _0x4dcb7f[_0x131167]['markersStart'])_0x43d6d8['set'](_0x59c860,{'start':_0x3728eb,'end':null});_0x586d72('isRemoveSuggestion',_0x131167,_0x3728eb,_0x41b544),_0x586d72('isAddSuggestion',_0x131167,_0x3728eb,_0x41b544),_0x586d72('isRemoved',_0x131167,_0x3728eb,_0x41b544),_0x586d72('isAdded',_0x131167,_0x3728eb,_0x41b544);for(const _0x58d688 of _0x4dcb7f[_0x131167]['markersEnd']){const _0x380c26=_0x43d6d8['get'](_0x58d688);_0x380c26?_0x380c26['end']=_0x41b544:_0x43d6d8['set'](_0x58d688,{'start':_0x41b544,'end':_0x41b544});}}for(const [_0x1d7c62,_0x59e790]of _0x43d6d8){const _0x4a052d=this['editor']['model']['createRange'](_0x59e790['start'],_0x59e790['end']);_0x4cc43e['markers']['set'](_0x1d7c62,_0x4a052d);}return _0x1c0842['sort']((_0x5de55d,_0x3c71b6)=>{const _0x4bc2ba=_0x4cc43e['markers']['get']('revision:'+_0x5de55d['id']),_0xdc6cb6=_0x4cc43e['markers']['get']('revision:'+_0x3c71b6['id']);return _0x4bc2ba['start']['isBefore'](_0xdc6cb6['start'])?-0x1:_0x4bc2ba['start']['isAfter'](_0xdc6cb6['start'])?0x1:_0x4bc2ba['end']['isBefore'](_0xdc6cb6['end'])?-0x1:_0x4bc2ba['end']['isAfter'](_0xdc6cb6['end'])?0x1:'add'===_0x5de55d['type']?-0x1:0x1;}),{'root':_0x4cc43e,'changes':_0x1c0842};function _0x586d72(_0x41d61b,_0x1ec697,_0x2eddf5,_0x374d6f){const _0x128a66=!!_0x4dcb7f[_0x1ec697][_0x41d61b],_0x507774=_0x128a66?_0x4dcb7f[_0x1ec697][_0x41d61b]['userId']:null,_0x261d58=_0x128a66&&_0x4dcb7f[_0x1ec697][_0x41d61b]['aiSource']||null,_0x2a136a=_0x1ec697===_0x4dcb7f['length']-0x1,_0xaa6b05=_0x2f3fc7[_0x41d61b][0x0],_0xda8a64=_0xf844b4['isObject'](_0x4dcb7f[_0x1ec697]['item']);!_0x4dc030[_0x41d61b]&&_0x128a66?_0x4dc030[_0x41d61b]={'start':_0x2eddf5,'tapeItem':_0x4dcb7f[_0x1ec697],'userId':_0x507774,'aiSource':_0x261d58,'type':_0x41d61b}:_0x4dc030[_0x41d61b]&&!_0x128a66?(_0x4dc030[_0x41d61b]['end']=_0x2eddf5,_0x2ef956(_0x4dc030[_0x41d61b]),_0x4dc030[_0x41d61b]=null):_0x4dc030[_0x41d61b]&&_0x128a66&&(_0x4dc030[_0x41d61b]['userId']!==_0x507774||_0x4dc030[_0x41d61b]['aiSource']!==_0x261d58)&&(_0x4dc030[_0x41d61b]['end']=_0x2eddf5,_0xaa6b05&&_0xaa6b05['userId']===_0x4dc030[_0x41d61b]['userId']?_0xaa6b05['change']['aiSource']=_0xaa6b05['change']['aiSource']||_0x4dc030[_0x41d61b]['aiSource']:_0x2ef956(_0x4dc030[_0x41d61b]),_0x4dc030[_0x41d61b]={'start':_0x2eddf5,'tapeItem':_0x4dcb7f[_0x1ec697],'userId':_0x507774,'aiSource':_0x261d58,'type':_0x41d61b}),_0x4dc030[_0x41d61b]&&_0xda8a64&&('elementStart'!==_0x4dcb7f[_0x1ec697]['type']||_0xaa6b05&&_0xaa6b05['userId']===_0x507774||_0x2f3fc7[_0x41d61b]['unshift']({'userId':_0x507774,'object':_0x4dcb7f[_0x1ec697]['item'],'change':_0x4dc030[_0x41d61b]}),'elementEnd'===_0x4dcb7f[_0x1ec697]['type']&&_0xaa6b05&&_0xaa6b05['object']===_0x4dcb7f[_0x1ec697]['item']&&(_0x2f3fc7[_0x41d61b]['shift'](),_0x4dc030[_0x41d61b]=_0xaa6b05['change'])),_0x4dc030[_0x41d61b]&&_0x2a136a&&(_0x4dc030[_0x41d61b]['end']=_0x374d6f,_0x2ef956(_0x4dc030[_0x41d61b]),_0x4dc030[_0x41d61b]=null);}function _0x2ef956({start:_0x1871b2,end:_0x1bec26,tapeItem:_0xe2f3a0,userId:_0x3d5438,aiSource:_0x3b765f,type:_0x3e236a}){const _0x4d6507=_0xe2f3a0['item'],_0x307347=_0x481464['schema']['isBlock'](_0x4d6507)&&!_0x481464['schema']['isLimit'](_0x4d6507),_0x162555=_0x1871b2['nodeAfter']==_0x1bec26['parent']&&_0x1bec26['isAtStart'];if(_0x307347&&_0x162555)return;const _0x5c2289=_0x481464['createRange'](_0x1871b2,_0x1bec26),_0x4e3e54=_0xa3b87a['get'](_0x3d5438),_0x3da4d8=new Mt({'author':_0x4e3e54,'type':'isAdded'==_0x3e236a||'isAddSuggestion'==_0x3e236a?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3e236a||'isRemoveSuggestion'==_0x3e236a,'aiSource':_0x3b765f||null},'createdAt':new Date(),'rootName':_0x341bdd});_0x1c0842['push'](_0x3da4d8),_0x4cc43e['markers']['set']('revision:'+_0x3da4d8['id'],_0x5c2289);}function _0x1e5ec5(_0x731982,_0x438393){const _0x2f5bc2=_0x731982['getAttributes'](),_0x50483a=_0x438393['getAttributes']();for(const _0x27168f of _0x2f5bc2){if(_0x27168f[0x1]!==_0x438393['getAttribute'](_0x27168f[0x0]))return!0x1;_0x50483a['next']();}return _0x50483a['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4a2f43=>{const _0x532fc6=_0x4a2f43['markerName']['split'](':')[0x1],_0x35fefe=this['_getChangeFromId'](_0x532fc6);if(!_0x35fefe)return null;const _0x16fe88='add'==_0x35fefe['type']?'insertion':'deletion',_0x16b34e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x16fe88];return _0x35fefe['data']['isSuggestion']&&_0x16b34e['push']('ck-suggestion-marker-'+_0x16fe88+'-new'),this['activeChange']==_0x35fefe&&_0x16b34e['push']('ck-suggestion-marker--active'),{'classes':_0x16b34e,'attributes':{'data-change-id':_0x532fc6}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4b9058=>{_0x4b9058['on']('element:pre',(_0x23b252,_0x3438d8,_0x5a7c31)=>{const _0x3b7087=_0x3438d8['viewItem']['getChild'](0x0);if(!_0x3b7087||!_0x3b7087['is']('element','code'))return;if(!_0x5a7c31['consumable']['consume'](_0x3b7087,{'attributes':['vid_start','vid_end']}))return;const _0x3e22ea=_0x3438d8['modelRange']['start']['nodeAfter'];_0x5a7c31['writer']['setAttribute']('vid_start',_0x3b7087['getAttribute']('vid_start'),_0x3e22ea),_0x5a7c31['writer']['setAttribute']('vid_end',_0x3b7087['getAttribute']('vid_end'),_0x3e22ea);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x580dd8=>{_0x580dd8['on']('element',(_0x82483a,_0x321bad,_0x170872)=>{if(!_0x170872['consumable']['consume'](_0x321bad['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x321bad['modelRange']['isCollapsed'])return;const _0x66065d=_0x321bad['modelRange']['start']['nodeAfter'];_0x66065d['hasAttribute']('vid_start')||_0x66065d['hasAttribute']('vid')||(_0x170872['writer']['setAttribute']('vid_start',_0x321bad['viewItem']['getAttribute']('vid_start'),_0x66065d),_0x170872['writer']['setAttribute']('vid_end',_0x321bad['viewItem']['getAttribute']('vid_end'),_0x66065d));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1efd48=>_0x1efd48['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x33e1c3,[,_0x1f6bd9])=>{['vid_start','vid_end','vid']['includes'](_0x1f6bd9)&&(_0x33e1c3['return']=!0x0,_0x33e1c3['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x8d7b0f=>{_0x8d7b0f['on']('attribute:vid',(_0x36c968,_0x30ccc4,_0x3d4900)=>{if('\x20'!=_0x30ccc4['item']['data']||_0x30ccc4['item']['parent']['maxOffset']>0x1)return;if(!_0x3d4900['consumable']['consume'](_0x30ccc4['item'],_0x36c968['name']))return;const _0x1bffe6=_0x3d4900['writer'],_0x58a9e7=_0x3d4900['mapper']['toViewRange'](_0x30ccc4['range']);_0x1bffe6['wrap'](_0x58a9e7,_0x1bffe6['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5771ca){const _0x9e10a8=_0x5771ca['plugins']['get']('RevisionViewer');return(_0x3a899b,_0x35fe34,_0x202b2a)=>{const _0x42c202=_0x35fe34['markerName']['split'](':')[0x1],_0x101552=_0x9e10a8['_getChangeFromId'](_0x42c202);if(!_0x101552)return null;const _0x4c39c7='add'==_0x101552['type']?'split':'merge';if(!_0x202b2a['consumable']['test'](_0x35fe34['markerRange'],_0x3a899b['name']))return;const _0x5bd0e8=_0x35fe34['markerRange']['getWalker'](),_0x52a707=_0x35fe34['markerRange']['start'],_0x2bb155=_0x5771ca['model']['schema'];let _0x47270c=null,_0x17c27c=null,_0xdc2bc1=!0x1,_0x1b2ac1=!0x1;for(const _0x46ac9a of _0x5bd0e8){const _0x7b57a=_0x46ac9a['item'];_0xdc2bc1=_0xdc2bc1||_0x2bb155['isContent'](_0x7b57a);const _0x224adf=_0x202b2a['mapper']['toViewElement'](_0x7b57a);if(_0x224adf&&_0x224adf['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x46ac9a['type']&&(_0x2bb155['isBlock'](_0x7b57a)&&!_0x2bb155['isLimit'](_0x7b57a)&&(_0x7b57a['nextSibling']||_0x52a707['isAtEnd']?_0x47270c&&_0x47270c['parent']==_0x7b57a||(_0x47270c=_0x7b57a,_0x149833(_0x46ac9a['previousPosition']),_0x1b2ac1=!0x0):_0x17c27c=_0x17c27c||_0x46ac9a['previousPosition']));}function _0x149833(_0x191f6e){const _0x1f469a=_0x202b2a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4c39c7}),_0x51d4cd=_0x202b2a['mapper']['toViewPosition'](_0x191f6e);_0x101552['data']['isSuggestion']&&_0x202b2a['writer']['addClass']('ck-suggestion-marker-'+_0x4c39c7+'-new',_0x1f469a),_0x9e10a8['activeChange']==_0x101552&&_0x202b2a['writer']['addClass']('ck-suggestion-marker--active',_0x1f469a),_0x202b2a['writer']['insert'](_0x51d4cd,_0x1f469a),_0x202b2a['mapper']['bindElementToMarker'](_0x1f469a,_0x35fe34['markerName']);}_0xdc2bc1||_0x1b2ac1||!_0x17c27c||_0x149833(_0x17c27c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x54f5a5,_0x571f70,_0x23893e)=>{const _0x434f91=_0x23893e['mapper']['markerNameToElements'](_0x571f70['markerName']);if(_0x434f91){for(const _0x2efdc6 of _0x434f91)(_0x2efdc6['hasClass']('ck-suggestion-marker-split')||_0x2efdc6['hasClass']('ck-suggestion-marker-merge'))&&(_0x23893e['mapper']['unbindElementFromMarkerName'](_0x2efdc6,_0x571f70['markerName']),_0x23893e['writer']['remove'](_0x2efdc6));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x52b907,_0x573e84,_0x16c5d1)=>{const _0x3631ba=_0x573e84['markerName']['split'](':')[0x1],_0x11a069=this['_getChangeFromId'](_0x3631ba);if(!_0x11a069)return null;const _0x40f53d='add'==_0x11a069['type']?'split':'merge';if(_0x16c5d1['consumable']['test'](_0x573e84['markerRange'],_0x52b907['name']))for(const _0x45fbbd of _0x573e84['markerRange']['getItems']()){if(!_0x45fbbd['is']('element','softBreak'))continue;const _0x4723ab=_0x16c5d1['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x40f53d}),_0x2691b9=_0x16c5d1['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x45fbbd));_0x11a069['data']['isSuggestion']&&_0x16c5d1['writer']['addClass']('ck-suggestion-marker-'+_0x40f53d+'-new',_0x4723ab),this['activeChange']==_0x11a069&&_0x16c5d1['writer']['addClass']('ck-suggestion-marker--active',_0x4723ab),_0x16c5d1['writer']['insert'](_0x2691b9,_0x4723ab),_0x16c5d1['mapper']['bindElementToMarker'](_0x4723ab,_0x573e84['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x33061f=>{for(const _0x104d3a of this['editor']['model']['document']['getRootNames']()){const _0x9ea8d0=this['editor']['model']['document']['getRoot'](_0x104d3a),_0x116ebd=this['editor']['editing']['view']['document']['getRoot'](_0x104d3a);if(_0x116ebd){const _0x365971=_0x9ea8d0['getAttribute']('revisionHistoryAttachChange');if(_0x33061f['removeAttribute']('data-change-id',_0x116ebd),_0x33061f['removeClass']('ck-revision-history-root-add',_0x116ebd),_0x33061f['removeClass']('ck-revision-history-root-remove',_0x116ebd),_0x33061f['removeClass']('ck-revision-history-root--active',_0x116ebd),_0x365971){const _0x218192=this['_getChangeFromId'](_0x365971);if(!_0x218192)return null;_0x33061f['setAttribute']('data-change-id',_0x365971,_0x116ebd),_0x33061f['addClass']('ck-revision-history-root-'+_0x218192['type'],_0x116ebd),this['activeChange']==_0x218192&&_0x33061f['addClass']('ck-revision-history-root--active',_0x116ebd);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4ee36b=>'revision-comment:'+_0x4ee36b,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x2ab8f6=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x2ab8f6['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x973271=>'revision-suggestion:'+_0x973271,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4aa302=>({'name':'suggestion:'+_0x4aa302,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1c0073=>{const _0x3f808c=_0x1c0073['markerName']['split'](':')[0x1];return'insertion'!=_0x3f808c&&'deletion'!=_0x3f808c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3f808c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x324e92,_0x333b5d,_0x5e6f5e)=>{const _0x48075f=_0x5e6f5e['mapper']['markerNameToElements'](_0x333b5d['markerName']);if(_0x48075f){for(const _0x28586d of _0x48075f)_0x28586d['is']('uiElement')&&(_0x5e6f5e['mapper']['unbindElementFromMarkerName'](_0x28586d,_0x333b5d['markerName']),_0x5e6f5e['writer']['remove'](_0x28586d));}},{'priority':'high'});}_getChangeFromId(_0x1a8184){return this['_changeIdToChange']['get'](_0x1a8184);}_getViewForChange(_0x152019){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x152019,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5e0474,_0x3e68b6,_0x18f801,_0x51b1c5)=>{_0x51b1c5&&this['_balloon']['remove'](_0x51b1c5),_0x18f801&&(this['_balloon']['add']({'view':_0x18f801,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x3038f7=this['editor']['editing'],_0x1c257f=this['_getChangeFromId'](_0x18f801['changeId']);let _0x20dda2;if(_0x1c257f['data']['isOnRoot']){const _0xce7ebd=_0x3038f7['view']['getDomRoot'](_0x1c257f['rootName']);_0x20dda2=Array['from'](_0xce7ebd['getClientRects']());}else{const _0x14a04a=this['editor']['model']['markers']['get']('revision:'+_0x18f801['changeId']);_0x20dda2=Array['from'](_0x3038f7['mapper']['markerNameToElements'](_0x14a04a['name']))['map'](_0x4ce085=>_0x3038f7['view']['domConverter']['mapViewToDom'](_0x4ce085))['map'](_0x54f1a4=>Array['from'](_0x54f1a4['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x20dda2['find'](_0x14de9a=>_0x14de9a['top']-0x3<=this['_activeViewTarget']['y']&&_0x14de9a['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x14de9a['left']-0x3<=this['_activeViewTarget']['x']&&_0x14de9a['right']+0x3>=this['_activeViewTarget']['x'])||_0x20dda2[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x30040c,_0x4179a2,_0x322915,_0x2923a8)=>{this['activeView']=_0x322915?this['_getViewForChange'](_0x322915):null,this['editor']['model']['change'](()=>{const _0x342616=this['editor']['editing'];_0x2923a8&&(_0x2923a8['data']['isOnRoot']?_0x342616['view']['change'](_0x31fe92=>{_0x31fe92['removeClass']('ck-revision-history-root--active',_0x342616['view']['document']['getRoot'](_0x2923a8['rootName']));}):_0x342616['reconvertMarker']('revision:'+_0x2923a8['id'])),_0x322915&&(_0x322915['data']['isOnRoot']?_0x342616['view']['change'](_0x16cf41=>{_0x16cf41['addClass']('ck-revision-history-root--active',_0x342616['view']['document']['getRoot'](_0x322915['rootName']));}):_0x342616['reconvertMarker']('revision:'+_0x322915['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x111f16,_0x450c85)=>{if(this['activeChange'])return;const _0x232f20=this['_findChangeIdFromDomTarget'](_0x450c85['target']),_0x4eb382=this['_changeIdToChange']['get'](_0x232f20);_0x4eb382?(this['_activeViewTarget']={'x':_0x450c85['domEvent']['x'],'y':_0x450c85['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x4eb382)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x324643,_0x57caab)=>{const _0x1fa5ce=this['_findChangeIdFromDomTarget'](_0x57caab['target']),_0x16bd18=this['_changeIdToChange']['get'](_0x1fa5ce);_0x16bd18?(this['_activeViewTarget']={'x':_0x57caab['domEvent']['x'],'y':_0x57caab['domEvent']['y']},_0x16bd18===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x16bd18):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x52a599){do{const _0x22754e=_0x52a599['getAttribute']('data-change-id');if(_0x22754e)return _0x22754e;_0x52a599=_0x52a599['parent'];}while(_0x52a599);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x289c0b=>{for(const _0x5a6dde of this['editor']['model']['markers'])_0x289c0b['removeMarker'](_0x5a6dde);});}};function Ut(_0x1cf1d1){return _0x1cf1d1['split'](':')[0x1];}function Lt(_0x17980e,_0x1e4f9b){return(_0x1d3444,_0x3d449f,_0xb7b14f)=>{if(!_0xb7b14f['consumable']['test'](_0x3d449f['markerRange'],_0x1d3444['name']))return;const _0x2f4454=_0x3d449f['markerRange']['getWalker'](),_0x33308a=_0x3d449f['markerRange']['start'],_0x230555=_0x17980e['model']['schema'];let _0x5f03a0=null,_0x5f56a7=null,_0x4e34d9=!0x1,_0x273d88=!0x1;for(const _0x3e3470 of _0x2f4454){const _0x4d5985=_0x3e3470['item'];_0x4e34d9=_0x4e34d9||_0x230555['isContent'](_0x4d5985);const _0x3c8b62=_0xb7b14f['mapper']['toViewElement'](_0x4d5985);if(_0x3c8b62&&_0x3c8b62['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3e3470['type']&&(_0x230555['isBlock'](_0x4d5985)&&!_0x230555['isLimit'](_0x4d5985)&&(_0x4d5985['nextSibling']||_0x33308a['isAtEnd']?_0x5f03a0&&_0x5f03a0['parent']==_0x4d5985||(_0x5f03a0=_0x4d5985,_0x2c6c72(_0x3e3470['previousPosition']),_0x273d88=!0x0):_0x5f56a7=_0x5f56a7||_0x3e3470['previousPosition']));}function _0x2c6c72(_0x5f1cbb){const _0x13d73f=_0xb7b14f['mapper']['toViewPosition'](_0x5f1cbb),_0x4f3024=_0xb7b14f['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1e4f9b});_0xb7b14f['writer']['insert'](_0x13d73f,_0x4f3024),_0xb7b14f['mapper']['bindElementToMarker'](_0x4f3024,_0x3d449f['markerName']);}_0x4e34d9||_0x273d88||!_0x5f56a7||_0x2c6c72(_0x5f56a7);};}var Ft=class extends _0x299289{constructor(_0x66ab2e){super(_0x66ab2e);const _0x5e1e05=_0x66ab2e['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x5e1e05,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5e1e05,'change:isEnabled',()=>this['refresh']());}execute(){const _0x2e6e89=this['editor'],_0xba479f=_0x2e6e89['plugins']['get'](Pt),_0x59c59f=_0xba479f['isReady']?_0xba479f['diff']['newRevisionId']:null;_0x2e6e89['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x59c59f);}['refresh'](){const {isReady:_0x9d16be,isEnabled:_0x24f2ef,repository:_0x450654,diff:_0x1a2920}=this['editor']['plugins']['get'](Pt),_0x7471e5=_0x1a2920&&_0x450654['getLaterVisibleRevision'](_0x1a2920['newRevisionId']);this['isEnabled']=_0x9d16be&&_0x24f2ef&&Boolean(_0x7471e5);}},$t=class extends _0x299289{_step;constructor(_0x384832,{direction:_0x3b3b74}){super(_0x384832);const _0x353279=_0x384832['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x3b3b74?0x1:-0x1,this['listenTo'](_0x353279,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x353279,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x353279,'change:activeChange',()=>this['refresh']());}execute(){const _0x4208f2=this['editor'],_0x537b0a=_0x4208f2['plugins']['get'](Pt),{isNavigationMode:_0x55e1f5,currentChangeNumber:_0xb8bec4}=_0x537b0a;let _0x1c20f9;if(_0x537b0a['activeChange']=_0x55e1f5?_0x537b0a['diff']['changes']['get'](_0xb8bec4+this['_step']):_0x537b0a['diff']['changes']['first'],_0x537b0a['activeChange']['data']['isOnRoot'])_0x1c20f9=_0x4208f2['editing']['view']['getDomRoot'](_0x537b0a['activeChange']['rootName']);else{const _0x157ee4=_0x4208f2['model']['markers']['get']('revision:'+_0x537b0a['activeChange']['id']);_0x1c20f9=_0x317404(_0x4208f2['editing'],_0x157ee4);}_0x3df991({'target':_0x1c20f9,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4f063d,currentChangeNumber:_0x498518,numberOfChanges:_0xeb0721,isReady:_0xe0c267,isEnabled:_0x4ba372}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x4ba372&&_0xe0c267&&_0xeb0721)&&(!_0x4f063d||(0x1===this['_step']?_0x498518<_0xeb0721-0x1:_0x498518>0x0));}},Bt=class extends dt{constructor(_0x5d5f80){super(_0x5d5f80);const _0x559751=this['bindTemplate'],_0x14a119=new _0x38f053(_0x5d5f80),_0x1854f0=new _0x38f053(_0x5d5f80);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',(_0x59a4a3,_0x45c4ac)=>_0x59a4a3&&_0x45c4ac>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x49ebec,_0x1ce7e9,_0xe144f0,_0x3563b6)=>{if(!_0x49ebec)return kt(_0x5d5f80,'Loading...');if(!_0xe144f0)return kt(_0x5d5f80,'No\x20changes');const _0x4082a6=kt(_0x5d5f80,'NUMBER_OF_CHANGES',_0xe144f0);return _0x3563b6?kt(_0x5d5f80,'X_OF_Y_CHANGES',[_0x1ce7e9+0x1,_0xe144f0]):_0x4082a6;}),_0x14a119['set']({'label':kt(_0x5d5f80,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0xfe4f10}),_0x1854f0['set']({'label':kt(_0x5d5f80,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xbe7fe1}),_0x14a119['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1854f0['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x14a119['on']('execute',()=>this['fire']('execute','backward')),_0x1854f0['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',_0x559751['if']('_isStatusLabelVisible','ck-hidden',_0x1cab96=>!_0x1cab96)]},'children':[{'text':_0x559751['to']('isNavigationMode',_0x2f49a8=>_0x2f49a8?kt(_0x5d5f80,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x5d5f80,'Total')+':\x20')}]},{'text':_0x559751['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x14a119,_0x1854f0]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0xc8641b{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4365c2=this['editor']['editing']['view'];_0x4365c2['change'](_0x5b6fff=>{for(const _0x4a962a of _0x4365c2['document']['roots'])_0x5b6fff['addClass'](jt,_0x4a962a);});}['hide'](){const _0xf02934=this['editor']['editing']['view'];_0xf02934['change'](_0x38efc2=>{for(const _0x4ad464 of _0xf02934['document']['roots'])_0x38efc2['removeClass'](jt,_0x4ad464);});}},Kt=class extends _0xc8641b{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x2512cf=this['editor'],_0x333ee0=_0x2512cf['plugins']['get'](Pt),_0x57214b=_0x2512cf['plugins']['get'](Gt);_0x2512cf['ui']['componentFactory']['add']('exitToEditing',_0x57ca00=>{const _0x131b42=new _0x38f053(_0x57ca00);return _0x131b42['set']({'label':kt(_0x57ca00,'Back\x20to\x20editing'),'icon':_0x492213,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x131b42,'execute',()=>{_0x2512cf['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x131b42;}),_0x2512cf['ui']['componentFactory']['add']('restoreRevision',_0x225463=>{const _0x5c066e=new _0x38f053(_0x225463);return _0x5c066e['set']({'label':kt(_0x225463,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5c066e['bind']('isEnabled')['to'](_0x2512cf['commands']['get']('restoreRevision')),this['listenTo'](_0x5c066e,'execute',()=>_0x2512cf['execute']('restoreRevision')),_0x5c066e;}),_0x2512cf['ui']['componentFactory']['add']('changesNavigation',_0x4e890a=>{const _0x17c226=new Bt(_0x4e890a),_0x528f09=_0x2512cf['commands']['get']('showPreviousChange'),_0x578585=_0x2512cf['commands']['get']('showNextChange');return _0x17c226['bind']('isBackwardNavigationEnabled')['to'](_0x528f09,'isEnabled'),_0x17c226['bind']('isForwardNavigationEnabled')['to'](_0x578585,'isEnabled'),_0x17c226['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x333ee0),this['listenTo'](_0x17c226,'execute',(_0x4abb5,_0x263f9f)=>{_0x2512cf['execute']('forward'===_0x263f9f?'showNextChange':'showPreviousChange');}),_0x17c226;}),_0x57214b['show'](),_0x333ee0['on']('change:isReady',(_0x4e9c90,_0x4ce378,_0x1c350f)=>{_0x1c350f?_0x57214b['hide']():_0x57214b['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x36af8a,_0x4cb1e7){super(_0x36af8a,_0x4cb1e7);const _0x4b302e=this['bindTemplate'];this['set']({'label':kt(_0x36af8a,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x36af8a,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x4b302e['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1c4e44(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x4665d8=this['fieldView']['element'];this['_tooltipString']=_0x4665d8['scrollWidth']>_0x4665d8['clientWidth']&&_0x4665d8['value']||'';}},Yt=class extends dt{constructor(_0x4726d7,_0x5e6315,_0x40179a){super(_0x4726d7);const _0x39874f=new _0x9832c();_0x39874f['set']({'content':_0x43403f,'viewBox':'0\x200\x2011\x2010'});const _0xbf8d63=['ck','ck-revision-history-sidebar__revision-author'];_0x40179a&&_0xbf8d63['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3c9cc3=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x4726d7,_0x40179a?'Revision\x20creator':'Revision\x20author')},'children':[_0x39874f,_0x5e6315['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xbf8d63},'children':_0x3c9cc3});}};function Jt(_0x22c323,_0x414fc8){const _0x2d3eac=_0x22c323['bindTemplate'],_0x4aebbd=_0x22c323['locale'],_0x3e1cd5=vt(_0x4aebbd);_0x3e1cd5['panelPosition']='sw';const _0x14b8df=function(_0x5a7930,_0x10c4ec){const _0x47f134=function(_0x361c38,_0x54b29a){const _0x34408f=_0x361c38['locale'],_0x160ae8={'Compare\x20against\x20selected':kt(_0x34408f,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x34408f,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x34408f,'Restore\x20this\x20revision')};return _0x54b29a['map'](_0x242b13=>{const _0x48aa2c=_0x160ae8[_0x242b13['name']];return _0x48aa2c&&_0x48aa2c!==_0x242b13['name']&&(_0x242b13['name']=_0x48aa2c),_0x242b13;});}(_0x5a7930,_0x10c4ec),_0x46801f=new _0x465b45();for(const _0x9254dd of _0x47f134){const _0x32e900={'type':'button','model':new ut({'label':_0x9254dd['name'],'class':_0x9254dd['class'],'withText':!0x0,'role':'menuitem','_action':_0x9254dd['action']})};_0x32e900['model']['bind']('isEnabled')['to'](_0x5a7930,'isActionsDropdownOpen',_0x103301=>'function'!=typeof _0x9254dd['isEnabled']||(!_0x103301||_0x9254dd['isEnabled'](_0x5a7930))),_0x46801f['add'](_0x32e900);}return _0x46801f;}(_0x22c323,_0x414fc8);return _0x22c323['bind']('isActionsDropdownOpen')['to'](_0x3e1cd5,'isOpen'),_0x3e1cd5['buttonView']['set']({'label':kt(_0x4aebbd,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x35f8f0}),_0x3e1cd5['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2d3eac['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2d3eac['to'](_0x28cc3d=>_0x28cc3d['stopPropagation']())}}),_0x3e1cd5['on']('execute',_0x5ab385=>{_0x22c323['isReady']&&'function'==typeof _0x5ab385['source']['_action']&&_0x5ab385['source']['_action'](_0x22c323);}),ft(_0x3e1cd5,_0x14b8df,{'role':'menu'}),_0x3e1cd5['listenTo'](_0x22c323,'change:isActionsDropdownOpen',(_0x839470,_0x473442,_0x457bfe)=>{if(_0x457bfe)for(const _0x14bef3 of _0x3e1cd5['listView']['items']){const _0x12532c=_0x14bef3['children']['first'],_0x110bc6=_0x414fc8['find'](_0x597a0c=>_0x597a0c['action']===_0x12532c['_action'])['isVisible'];_0x14bef3['isVisible']=void 0x0===_0x110bc6||_0x110bc6(_0x22c323);}}),_0x3e1cd5;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x24e679,Collection as _0x520f62,ElementReplacer as _0x2e3fd6,FocusTracker as _0xa64bfb,KeystrokeHandler as _0x2d0e3c,ObservableMixin as _0x57c0bb,ResizeObserver as _0x354550,logWarning as _0x3905c1,scrollViewportToShowTarget as _0x98e9d6,trustedHtml as _0xe4f10,uid as _0x5289a7}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x144f08,isEqual as _0x538fa0,set as _0x4968aa,unset as _0xc0e3c}from'es-toolkit/compat';import{Command as _0x1ddd1c,Editor as _0x3a29f8,ElementApiMixin as _0x4c30f1,PendingActions as _0x55fafd,Plugin as _0x3ccb16}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x43ed20,PillView as _0x1d0883,Users as _0x312567,getMarkerDomElement as _0x3ec3b7,reRootOperation as _0x51ed69,reRootPosition as _0x289722,reRootRange as _0x3c9bdd,sanitizeEditorConfig as _0x1d9224}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x4acbd6,ModelElement as _0x28c730,ModelRange as _0x390c0d,ModelText as _0x42becd,ViewAttributeElement as _0x28d884,ViewContainerElement as _0x524a1a,ViewDocumentFragment as _0xabc291,ViewElement as _0x2d3953,ViewEmptyElement as _0x5569aa,ViewRawElement as _0x17020d,ViewText as _0x383b5e,ViewUIElement as _0x26f24c}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x4a149a,IconChevronUp as _0x343c90,IconHistory as _0x1f6913,IconSparkle as _0x2d837c,IconThreeVerticalDots as _0x467e7d,IconUndo as _0x2a5c35,IconUser as _0xac3ad6}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x268072,ButtonView as _0xfa6b1,ContextualBalloon as _0x300371,CssTransitionDisablerMixin as _0xe40d6,EditorUI as _0x598841,IconView as _0x4c1208,InlineEditableUIView as tt,LabeledFieldView as it,ListItemView as et,ListView as st,MenuBarMenuListItemButtonView as nt,MenuBarMenuListItemView as ot,MenuBarMenuListView as rt,MenuBarMenuView as at,StickyPanelView as ht,ToolbarSeparatorView as ct,ToolbarView as lt,UIModel as ut,View as dt,addListToDropdown as ft,createDropdown as vt,createLabeledInputText as gt,normalizeToolbarConfig as mt,submitHandler as _t}from'@ckeditor/ckeditor5-ui';import{DateTime as wt}from'luxon';const pt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x57c0bb();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x2d881c){super(),this['id']=_0x2d881c['id']||_0x5289a7(),this['creator']=_0x2d881c['creator']||null,this['authors']=_0x2d881c['authors']||[],this['diffData']=_0x2d881c['diffData']||null,this['toVersion']=_0x2d881c['toVersion']||0x0,this['fromVersion']=_0x2d881c['fromVersion']||0x0,this['set']('name',_0x2d881c['name']||''),this['set']('createdAt',_0x2d881c['createdAt']||new Date()),this['set']('attributes',_0x2d881c['attributes']||{});}setName(_0x2e7d63){this['_update']({'name':_0x2e7d63});}setAttribute(_0x536a23,_0x342934){const _0xf3bc6d=_0x144f08(this['attributes']);_0x4968aa(_0xf3bc6d,_0x536a23,_0x342934),this['_update']({'attributes':_0xf3bc6d});}removeAttribute(_0x59e59b){const _0x194d9f=_0x144f08(this['attributes']);_0xc0e3c(_0x194d9f,_0x59e59b),this['_update']({'attributes':_0x194d9f});}_update(_0x5c2d36,_0x5a95f3=!0x1){let _0x5812e7=!0x1;const _0x4795fa={'id':this['id']};for(const _0x1d16b4 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1d7ecc=_0x5c2d36[_0x1d16b4];void 0x0!==_0x1d7ecc&&_0x1d7ecc!==this[_0x1d16b4]&&(this[_0x1d16b4]=_0x1d7ecc,_0x4795fa[_0x1d16b4]=_0x1d7ecc,_0x5812e7=!0x0);}_0x5812e7&&(_0x4795fa['authors']&&(_0x4795fa['authorsIds']=_0x4795fa['authors']['map'](_0x32fa42=>_0x32fa42['id']),delete _0x4795fa['authors']),this['fire']('_update',_0x4795fa,_0x5a95f3));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4f3c33=>_0x4f3c33['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x3ccb16{['_revisions'];static get requires(){return[_0x312567];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x405b1f){super(_0x405b1f),this['_revisions']=new _0x520f62();}afterInit(){!async function(_0x5d3103){const _0x44eba8='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x49574b=0xeb829,_0x3d9cb3=0x797b8,_0x23fdc4={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2fc968(_0x55c3da){const _0x5effa8=new window['Promise'](_0x4e2494=>{_0x55c3da['once']('ready',_0x4e2494);}),_0x46dead=window['Date']['now'](),_0x3e3791=_0x55c3da['config']['get']('licenseKey');async function _0x23d7b6(){let _0x205ac9,_0x340a20=null,_0x3e0dd1=null;try{return'GPL'==_0x3e3791?'NotAllowed':(_0x205ac9=_0x459193(),_0x205ac9?(_0x205ac9['usageEndpoint']&&(_0x3e0dd1=_0x4bc903(_0x205ac9['usageEndpoint'],_0x205ac9['jti'])),await _0x3cb8bd()?_0x5a3096()?_0x4648df()?'Expired':_0x1e202b()?('evaluation'==_0x205ac9['licenseType']&&(_0x340a20=_0x3fcae4('EvaluationLimit')),await _0x5c54a9()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4648df(){const _0x2f56f7=['evaluation','trial']['includes'](_0x205ac9['licenseType'])?_0x46dead/0x3e8:0xe10*_0x3d9cb3;return _0x205ac9['exp']<_0x2f56f7;}function _0x5a3096(){const _0x21a57=_0x205ac9['features'];if(!_0x21a57)return!0x1;if(_0x21a57['includes']('*'))return!0x0;if(_0x21a57['includes']('RH'))return!0x0;if(_0x21a57['includes']('RRH')){if(_0x188ec7())return!0x0;if(_0x20125b()||_0x17e957())return!0x0;}return!0x1;}function _0x1e202b(){const _0x570773=_0x205ac9['licensedHosts'];if(!_0x570773||0x0==_0x570773['length'])return!0x0;const {hostname:_0x306ddd}=new URL(window['location']['href']);if(_0x570773['includes'](_0x306ddd))return!0x0;const _0x111790=_0x306ddd['split']('.');return _0x570773['filter'](_0x4cf020=>_0x4cf020['includes']('*'))['map'](_0x3e7676=>_0x3e7676['split']('.'))['filter'](_0x301826=>_0x301826['length']<=_0x111790['length'])['map'](_0x36576a=>Array(_0x111790['length']-_0x36576a['length'])['fill']('*'===_0x36576a[0x0]?'*':'')['concat'](_0x36576a))['some'](_0x5ebccc=>_0x111790['every']((_0x32a90e,_0x922d0)=>_0x5ebccc[_0x922d0]===_0x32a90e||'*'===_0x5ebccc[_0x922d0]));}function _0x5c54a9(){return _0x340a20&&_0x3e0dd1?new window['Promise']((_0x49343f,_0x333cdd)=>{_0x340a20['then'](_0x49343f,_0x333cdd),_0x3e0dd1['then'](_0x498b66=>{'Valid'!=_0x498b66&&_0x49343f(_0x498b66);},_0x333cdd);}):_0x340a20||_0x3e0dd1||'Valid';}}function _0x4bc903(_0x5edd18,_0x320b15){return new window['Promise'](_0x426553=>{if(_0x22258a())return _0x426553('Valid');_0x16761d(),_0x55c3da['decorate']('_sendUsageRequest');let _0x22e731=!0x1;const _0x78fb9b=_0x5289a7();function _0x103109(_0x1637f3){return!!_0x1637f3&&('object'==typeof _0x1637f3||'function'==typeof _0x1637f3)&&'function'==typeof _0x1637f3['then']&&'function'==typeof _0x1637f3['catch'];}function _0x565a8c(_0x492f2c){_0x57c7f1(_0x492f2c)['then'](_0x1ef500=>_0x1ef500&&'ok'==_0x1ef500['status']?_0x36bac0(_0x411190(_0x78fb9b+_0x320b15))!=_0x1ef500['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4b8b96=>(_0x15db3b(),_0x4b8b96),()=>{const _0x353dd9=_0x1f81b5();return null==_0x353dd9?(_0x15db3b(),'Valid'):_0x46dead-_0x353dd9>0x240c8400?'UsageLimit':'Valid';})['then'](_0x426553)['catch'](()=>{_0x426553('UsageLimit');});const _0xd5d92f=0x36ee80;function _0x15db3b(){const _0x141f70='llct-'+_0x36bac0(_0x411190(_0x5edd18)),_0x210bcf=_0x10d043(_0x36bac0(window['Math']['ceil'](_0x46dead/_0xd5d92f)));window['localStorage']['setItem'](_0x141f70,_0x210bcf);}function _0x1f81b5(){const _0x661d06='llct-'+_0x36bac0(_0x411190(_0x5edd18)),_0x1e44af=window['localStorage']['getItem'](_0x661d06);return _0x1e44af?window['parseInt'](_0x10d043(_0x1e44af),0x10)*_0xd5d92f:null;}function _0x57c7f1(_0x452e66){return new window['Promise']((_0x307b5f,_0x26cb78)=>{_0x452e66['then'](_0x307b5f,_0x26cb78),window['setTimeout'](_0x26cb78,0x1d4c0);});}}_0x55c3da['on']('_sendUsageRequest',(_0x2ec327,_0x4ca0c6)=>{if(_0x4ca0c6[0x0]!=_0x5edd18)return _0x426553('UsageLimit');_0x4ca0c6[0x1]={..._0x4ca0c6[0x1],'requestId':_0x78fb9b};},{'priority':'high'}),_0x55c3da['on']('_sendUsageRequest',_0x3c9c41=>{_0x103109(_0x3c9c41['return'])&&(_0x22e731=!0x0,_0x565a8c(_0x3c9c41['return']));},{'priority':'low'}),_0x5effa8['then'](()=>{_0x22e731||_0x426553('UsageLimit');});});function _0x22258a(){return'auto'==_0x55c3da['editing']['view']['_overlayModeHint'];}function _0x16761d(){_0x55c3da['editing']['view']['_overlayModeHint']='auto';}}function _0x3fcae4(_0xd17412){const _0x33c371=[new window['Promise'](_0x3e0cee=>setTimeout(_0x3e0cee,0x93ecc)),_0x5effa8['then'](()=>new window['Promise'](_0x35de56=>{const _0x4cb35e=0x7,_0x52b708=_0x5d3103['_revisions'];function _0x3d0d53(){_0x52b708['length']>=_0x4cb35e&&_0x35de56();}_0x3d0d53(),_0x52b708['on']('add',_0x3d0d53);})),new window['Promise'](_0x5854c3=>{function _0x5eab0b(){for(const _0x4a5bec in window)if(window['Number']['isNaN'](window['Number'](_0x4a5bec))&&window[_0x4a5bec]==_0x49574b)return _0x5854c3();'destroyed'!=_0x55c3da['state']&&window['setTimeout'](_0x5eab0b,0x1388);}_0x169a2a('RevisionViewer')&&_0x5eab0b();})];return window['Promise']['race'](_0x33c371)['then'](()=>_0xd17412);}async function _0x52d941(){if(await _0x5effa8,_0x169a2a('RevisionViewer')){const _0x13c7c2=_0x5d3103['getRevision'](0x0),_0x3a54f8=_0x5d3103['getEarlierVisibleRevision'](_0x13c7c2['id']),_0x4dcaa1=_0x3658c1('RevisionViewer');return await _0x4dcaa1['compare'](_0x13c7c2['id'],_0x3a54f8?_0x3a54f8['id']:null,!0x0),_0x4dcaa1['unbind']('isEnabled'),_0x4dcaa1['isEnabled']=!0x1,_0x4dcaa1['compare']=_0x21df41,void(_0x4dcaa1['_getDiff']=_0x21df41);}if(_0x169a2a('RevisionTracker')){const _0x24baf2=_0x3658c1('RevisionTracker');_0x24baf2['unbind']('isEnabled'),_0x24baf2['isEnabled']=!0x1,_0x24baf2['update']=_0x21df41,_0x24baf2['saveRevision']=_0x21df41;}_0x55c3da['model']['change']=_0x21df41,_0x55c3da['model']['enqueueChange']=_0x21df41,_0x55c3da['enableReadOnlyMode']('model');}function _0x188ec7(){return _0x169a2a('WebSocketGateway')&&'connected'==_0x3658c1('WebSocketGateway')['state'];}function _0x20125b(){return _0x169a2a('RevisionViewerIntegration');}function _0x17e957(){return _0x169a2a('TrackChangesDataGetter');}function _0x26bc3c(_0x142915){const _0x42918d=_0x5c6ceb();_0x55c3da[_0x42918d]='revisionHistoryLicenseKey'+_0x142915,_0x142915['endsWith']('Limit')&&(window[_0x5c6ceb()]=_0x49574b),'Valid'!=_0x142915&&_0x52d941();}function _0x5c6ceb(){const _0x4fdaab=window['String'](window['performance']['now']())['replace']('.','');let _0x47720b='N';for(let _0x9a7332=0x0;_0x9a7332<_0x4fdaab['length'];_0x9a7332+=0x2){let _0x13eaf6=window['parseInt'](_0x4fdaab['substring'](_0x9a7332,_0x9a7332+0x2));_0x13eaf6>=0x3e&&(_0x13eaf6-=0x3e),_0x47720b+=_0x44eba8[_0x13eaf6];}return _0x47720b;}function _0x459193(){const _0x194edf=_0x3e3791['split']('.');if(0x3!=_0x194edf['length'])return null;return _0x161df1(_0x194edf[0x1]);function _0x161df1(_0x1394ea){const _0x4765d2=_0x5e0779(_0x1394ea);return _0x4765d2&&_0x4e9675()?_0x4765d2:null;function _0x4e9675(){const _0xcf4676=_0x4765d2['jti'],_0x52c9eb=window['parseInt'](_0xcf4676['substring'](_0xcf4676['length']-0x8),0x10),_0x1a3d8e={..._0x4765d2,'jti':_0xcf4676['substring'](0x0,_0xcf4676['length']-0x8)};return delete _0x1a3d8e['vc'],_0x411190(_0x1a3d8e)==_0x52c9eb;}}}async function _0x3cb8bd(){let _0x5468f3=!0x0;try{const [_0x2821b6,_0x1cc77c,_0x5521ac]=_0x3e3791['split']('.');return _0x2c1693(_0x2821b6),await _0x22448c(_0x2821b6,_0x1cc77c,_0x5521ac),_0x5468f3;}catch{return!0x1;}function _0x2c1693(_0x39f86a){const _0x1e2304=_0x5e0779(_0x39f86a);_0x1e2304&&'ES256'==_0x1e2304['alg']||(_0x5468f3=!0x1);}async function _0x22448c(_0x5cb688,_0x1cab3c,_0x1121d2){const _0x1139a4=window['Uint8Array']['from'](_0x1b6d3c(_0x1121d2),_0x102006=>_0x102006['charCodeAt'](0x0)),_0x6dc372=new window['TextEncoder']()['encode'](_0x5cb688+'.'+_0x1cab3c),_0x24d049=window['crypto']['subtle'];if(!_0x24d049)return;const _0x50ec3e=await _0x24d049['importKey']('jwk',_0x23fdc4,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x24d049['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x50ec3e,_0x1139a4,_0x6dc372)||(_0x5468f3=!0x1);}}function _0x5e0779(_0x55157c){return _0x55157c['startsWith']('ey')?JSON['parse'](_0x1b6d3c(_0x55157c)):null;}function _0x1b6d3c(_0x526731){return window['atob'](_0x526731['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x411190(_0x4e1585){let _0x5462fc=0x1505;function _0x18ff81(_0x27ea9f){for(let _0x5724bc=0x0;_0x5724bc<_0x27ea9f['length'];_0x5724bc++){const _0x188268=_0x27ea9f['charCodeAt'](_0x5724bc);_0x5462fc=(_0x5462fc<<0x5)+_0x5462fc+_0x188268,_0x5462fc&=_0x5462fc;}}function _0x19c06f(_0x407db5){Array['isArray'](_0x407db5)?_0x407db5['forEach'](_0x19c06f):_0x407db5&&'object'==typeof _0x407db5?Object['entries'](_0x407db5)['sort']()['forEach'](([_0x5659ff,_0x569fd0])=>{_0x18ff81(_0x5659ff),_0x19c06f(_0x569fd0);}):_0x18ff81(window['String'](_0x407db5));}return _0x19c06f(_0x4e1585),_0x5462fc>>>0x0;}function _0x36bac0(_0x4471ed){return _0x4471ed['toString'](0x10)['padStart'](0x8,'0');}function _0x10d043(_0x1dadd6){return _0x1dadd6['split']('')['reverse']()['join']('');}function _0x169a2a(_0x26e35f){return _0x55c3da['plugins']['has'](_0x26e35f);}function _0x3658c1(_0x469e33){return _0x55c3da['plugins']['get'](_0x469e33);}function _0x21df41(){}_0x26bc3c(await _0x23d7b6());}_0x2fc968(_0x5d3103['editor']);}(this);}createRevision(_0x2a0f82){const _0x1ac7a7=this['editor']['plugins']['get']('Users');return new yt({'id':_0x2a0f82['id'],'name':_0x2a0f82['name'],'creator':_0x2a0f82['creatorId']?_0x1ac7a7['getUser'](_0x2a0f82['creatorId']):null,'diffData':_0x2a0f82['diffData']||_0x2a0f82['data'],'authors':_0x2a0f82['authorsIds']['map'](_0x902fac=>_0x1ac7a7['getUser'](_0x902fac)),'createdAt':new Date(_0x2a0f82['createdAt']),'attributes':_0x2a0f82['attributes'],'fromVersion':_0x2a0f82['fromVersion'],'toVersion':_0x2a0f82['toVersion']});}['addRevision'](_0x162eb2,_0x1090cf=0x0){this['_revisions']['add'](_0x162eb2,_0x1090cf);}getRevision(_0x4ae708){return this['_revisions']['get'](_0x4ae708);}getRevisions(_0x19f9d7={'toJSON':!0x1}){const _0x125b02=Array['from'](this['_revisions']);return _0x125b02['reverse'](),_0x19f9d7['toJSON']?_0x125b02['map'](_0x4ceef8=>_0x4ceef8['toJSON']()):_0x125b02;}getIndex(_0x1be798){return this['_revisions']['getIndex'](_0x1be798);}getEarlierVisibleRevision(_0x3d5fe7){const [,_0x1f7d3d]=this['getRevisionsIterator'](_0x3d5fe7,{'direction':'earlier'});return _0x1f7d3d;}getLaterVisibleRevision(_0x5be0cf){const [,_0x57a562]=this['getRevisionsIterator'](_0x5be0cf,{'direction':'later'});return _0x57a562;}getRevisionsInDiff(_0xf435d2){const _0x457ebf=[];for(const _0x5a1610 of this['getRevisionsIterator'](_0xf435d2['newRevisionId']))if(_0x457ebf['push'](_0x5a1610),_0x5a1610['id']===_0xf435d2['oldRevisionId'])break;return _0x457ebf;}*getRevisionsIterator(_0x48da3e,{direction:_0x50239d='earlier',filter:_0x51e20e=()=>!0x0}={}){const _0x50a11f='earlier'===_0x50239d?0x1:-0x1;let _0x43e68e=this['_revisions']['get'](_0x48da3e),_0x15b221=this['getIndex'](_0x43e68e);for(yield _0x43e68e;_0x43e68e;){if(_0x15b221+=_0x50a11f,_0x43e68e=this['getRevision'](_0x15b221),!_0x43e68e)return;_0x51e20e(_0x43e68e)&&(yield _0x43e68e);}}},Rt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x524a1a,'c'],[_0x28d884,'a'],[_0x5569aa,'e'],[_0x17020d,'r'],[_0x26f24c,'u']]);_typeCharToViewClass=new Map([['c',_0x524a1a],['a',_0x28d884],['e',_0x5569aa],['r',_0x17020d],['u',_0x26f24c]]);async loadRevisionData(_0x223a1d,_0x17dffa){if(_0x223a1d['diffData']||!_0x17dffa)return;const _0x599b43=this['editor']['config']['get']('collaboration.channelId');_0x223a1d['diffData']=(await _0x17dffa['getRevision']({'channelId':_0x599b43,'revisionId':_0x223a1d['id']}))['diffData'];}getRevisionDocumentData(_0x44fe6f){const _0x4af8d6={};for(const _0x990803 in _0x44fe6f['diffData']){if(_0x44fe6f['diffData'][_0x990803]['attachChange']&&!_0x44fe6f['diffData'][_0x990803]['attachChange']['isAttached'])continue;const _0x2eebce=this['_removeRevisionMarkers'](JSON['parse'](_0x44fe6f['diffData'][_0x990803]['insertions'])),_0x1a879a=this['editor']['editing']['view']['document'],_0x1e8274=new _0xabc291(_0x1a879a,_0x2eebce['map'](_0x145ac8=>this['_getViewFromDiffObj'](_0x145ac8,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4af8d6[_0x990803]=this['editor']['data']['processor']['toData'](_0x1e8274),this['editor']['data']['processor']['useFillerType']('default');}return _0x4af8d6;}getRevisionRootsAttributes(_0x279c42){const _0x4d0d82={};for(const _0x16282f in _0x279c42['diffData'])_0x279c42['diffData'][_0x16282f]['attachChange']&&!_0x279c42['diffData'][_0x16282f]['attachChange']['isAttached']||(_0x4d0d82[_0x16282f]=_0x279c42['diffData'][_0x16282f]['attributesAfter']||{});return _0x4d0d82;}getRevisionRootsModelElements(_0x4e2b1b){const _0x1481c0={};for(const _0x3a9c9c in _0x4e2b1b['diffData']){if(_0x4e2b1b['diffData'][_0x3a9c9c]['attachChange']&&!_0x4e2b1b['diffData'][_0x3a9c9c]['attachChange']['isAttached'])continue;const _0xa93616=_0x4e2b1b['diffData'][_0x3a9c9c]['rootElementName'];_0xa93616&&(_0x1481c0[_0x3a9c9c]=_0xa93616);}return _0x1481c0;}_getTypeCharForViewElement(_0x3ea5b6){return this['_viewClassToTypeChar']['get'](_0x3ea5b6['constructor']);}_getViewFromDiffObj(_0x539e0f,_0x52fca2){const _0x1b1e70=this['editor']['editing']['view']['document'];if('string'==typeof _0x539e0f)return new _0x383b5e(_0x1b1e70,_0x539e0f);{let _0x5f1837,_0x565bab;_0x565bab='u'==_0x539e0f['type']||'r'==_0x539e0f['type']?[]:_0x539e0f['children']['map'](_0x4c2e0b=>this['_getViewFromDiffObj'](_0x4c2e0b,_0x52fca2));const _0x364963=this['_typeCharToViewClass']['get'](_0x539e0f['type'])||_0x2d3953,_0x3e6808=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5f1837=new _0x364963(_0x1b1e70,_0x539e0f['name'],_0x539e0f['attributes'],_0x565bab),'u'==_0x539e0f['type']&&_0x539e0f['children'][0x0]){const _0x331e0b=_0x539e0f['children'][0x0];if(_0x5f1837['render']=function(_0xbb05e1){const _0x189dab=_0xbb05e1['createElement']('div');return _0x189dab['innerHTML']=_0xe4f10(_0x331e0b),_0x189dab['childNodes'][0x0];},_0x52fca2){const _0x2b5cca=new _0xabc291(_0x1b1e70);_0x2b5cca['_appendChild'](_0x5f1837);const _0x5e650d=Array['from'](_0x3e6808['viewChildrenToDom'](_0x2b5cca,{'bind':!0x1})),_0x1747d0=_0x3e6808['domDocument']['createElement']('div');_0x1747d0['append'](..._0x5e650d),_0x5f1837=Array['from'](_0x3e6808['domChildrenToView'](_0x1747d0))[0x0];}}else{if('r'==_0x539e0f['type']&&_0x539e0f['children'][0x0]){const _0x1ded38=_0x539e0f['children'][0x0];if(_0x5f1837['render']=function(_0x3c016f){_0x3c016f['innerHTML']=_0xe4f10(_0x1ded38);},_0x52fca2){const _0x7be2b9=new _0xabc291(_0x1b1e70);_0x7be2b9['_appendChild'](_0x5f1837);const _0x4cae31=Array['from'](_0x3e6808['viewChildrenToDom'](_0x7be2b9,{'bind':!0x1})),_0x48930c=_0x3e6808['domDocument']['createElement']('div');_0x48930c['append'](..._0x4cae31);const _0x1e2783=Array['from'](_0x3e6808['domChildrenToView'](_0x48930c));_0x1e2783['length']>0x1?_0x5f1837['_appendChild'](_0x1e2783):_0x5f1837=_0x1e2783[0x0];}}}if(_0x539e0f['customProperties']){for(const [_0x1ae583,_0x417084]of _0x539e0f['customProperties'])_0x5f1837['_setCustomProperty'](_0x1ae583,_0x417084);}const _0x54ba6a=void 0x0===_0x539e0f['fillerOffset']?null:_0x539e0f['fillerOffset'];return null!==_0x54ba6a&&(_0x5f1837['getFillerOffset']=()=>_0x54ba6a),_0x5f1837;}}_makeModelFromViewString(_0x45bde7,_0xfb0c99){const _0xc020e7=JSON['parse'](_0x45bde7),_0x1cd224=this['editor']['editing']['view']['document'],_0x135430=new _0xabc291(_0x1cd224,_0xc020e7['map'](_0x2fddf1=>this['_getViewFromDiffObj'](_0x2fddf1,!0x0))),_0xfc96c5=this['editor']['data']['toModel'](_0x135430,_0xfb0c99);return _0xfc96c5['name']=_0xfb0c99,_0xfc96c5;}['_removeRevisionMarkers'](_0x2954f5){return(_0x2954f5=_0x2954f5['filter'](_0x65f21f=>!_0x65f21f['name']||'revision-start'!==_0x65f21f['name']&&'revision-end'!==_0x65f21f['name']))['forEach'](_0x50b327=>{'string'!=typeof _0x50b327&&(_0x50b327['children']=this['_removeRevisionMarkers'](_0x50b327['children']),_0x50b327['attributes']=_0x50b327['attributes']['filter'](_0x1c85c8=>!_0x1c85c8[0x0]['startsWith']('data-revision-')));}),_0x2954f5;}};function kt(_0x3e6fd7,_0x2ed7f8,_0x1722ec){const t=_0x3e6fd7['t'];switch(_0x2ed7f8){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'},_0x1722ec);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1722ec);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');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x1722ec);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x1722ec);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x1722ec);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x3ccb16{['licenseKey'];_licenseKeyCheckInterval;currentRevision=null;repository;adapter=null;_revisionDataBuilder;['_source'];_initialRevisionId;_bufferedUpdates;_utils;_pendingAction;_continueCurrentRevision;_startingVersion;_loadedStateData;static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x312567,bt,Rt,_0x55fafd];}constructor(_0x4bc2a9){super(_0x4bc2a9),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2e1c5d=_0x5289a7();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2e1c5d},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}init(){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x400e6a=this['repository']['getRevision'](0x0),_0xe84c79=_0x400e6a&&null===_0x400e6a['creator']?_0x400e6a:null;if(this['_continueCurrentRevision']=!!_0xe84c79&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1ada1e=this['_source']['getCurrentRevisionId'](),_0x4f7561=this['repository']['getRevision'](_0x1ada1e);if(_0x4f7561)this['_startingVersion']=_0x4f7561['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x54ff83=this['_source']['history']['_operations']['find'](_0x8bff9f=>!_0x8bff9f['_isInit']),_0x2b2ec5=_0x54ff83?_0x54ff83['baseVersion']:this['_source']['history']['version'];_0x400e6a?(_0x400e6a['toVersion']<_0x2b2ec5&&_0x400e6a['_update']({'toVersion':_0x2b2ec5}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id'],this['_startingVersion']=_0xe84c79['fromVersion']):(this['_startingVersion']=_0x400e6a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2b2ec5,this['_continueCurrentRevision']=!0x1);}}else _0xe84c79&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xe84c79['toVersion'],this['editor']['model']['document']['history']['version']),_0xe84c79['fromVersion']===_0xe84c79['toVersion']?(0x0!==_0xe84c79['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id'],this['_startingVersion']=_0xe84c79['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',_0x4d3b46=>!_0x4d3b46),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x178ea0=[this['editor']];for(const _0x287368 of _0x178ea0){let _0x327ea7;for(const _0x3a0298 in _0x287368){const _0x490647=_0x3a0298,_0x272f9c=_0x287368[_0x490647];if('revisionHistoryLicenseKeyValid'==_0x272f9c||'revisionHistoryLicenseKeyInvalid'==_0x272f9c||'revisionHistoryLicenseKeyExpired'==_0x272f9c||'revisionHistoryLicenseKeyDomainLimit'==_0x272f9c||'revisionHistoryLicenseKeyNotAllowed'==_0x272f9c||'revisionHistoryLicenseKeyEvaluationLimit'==_0x272f9c||'revisionHistoryLicenseKeyUsageLimit'==_0x272f9c){delete _0x287368[_0x490647],_0x327ea7=_0x272f9c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x327ea7&&_0x287368['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x327ea7&&_0x287368['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x327ea7&&_0x287368['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x327ea7&&_0x287368['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x327ea7&&_0x287368['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x327ea7&&_0x287368['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x4e250c=this['repository']['getRevision'](0x0),_0x47c924=await this['getRevisionDocumentData'](_0x4e250c),_0x2a9da8=await this['getRevisionRootsAttributes'](_0x4e250c),_0x351da7=this['_utils']['getRevisionRootsModelElements'](_0x4e250c);this['_replaceEditorDataWithRevisionData'](_0x47c924,_0x2a9da8,_0x351da7);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x22db48){this['_source']=_0x22db48;}async update(){const _0x65957c=await this['_source']['getLatestVersion']();if(_0x65957c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x31b567=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x65957c});_0x31b567['authors']=_0x31b567['authorsIds']['map'](_0x1262d1=>this['editor']['plugins']['get']('Users')['getUser'](_0x1262d1)),this['currentRevision']['_update'](_0x31b567);}}async['saveRevision'](_0x1b9b59={},_0x19f076=null){const _0x3a67dd=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x19f076>this['currentRevision']['toVersion']&&(_0x19f076=null),null===_0x19f076&&(_0x19f076=await this['_source']['getLatestVersion']());const _0x361398=this['_getFromVersion'](_0x19f076),_0x4a9d3a=this['buildRevisionData']({'from':_0x361398,'to':_0x19f076});if(this['currentRevision']['toVersion']<_0x19f076){const _0x226f52=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x19f076,'to':_0x19f076});_0x226f52['authors']=[],_0x226f52['authorsIds']=[],_0x226f52['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x226f52,!0x0),delete _0x226f52['authors'],_0x3a67dd['push'](_0x226f52);}const _0x2adbf5={..._0x1b9b59,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1b9b59['name']||null,'id':_0x1b9b59['id']||_0x5289a7(),..._0x4a9d3a,'attributes':{..._0x1b9b59['attributes'],..._0x4a9d3a['attributes']}},_0x1a3e6e=this['addRevisionData'](_0x2adbf5);_0x3a67dd['push'](_0x2adbf5);const _0xae41d=this['repository']['getIndex'](_0x1a3e6e);if(0x0!==_0xae41d){const _0x627b85=this['repository']['getRevision'](_0xae41d-0x1);if(_0x627b85['fromVersion']!==_0x19f076){const _0x31425b=this['_revisionDataBuilder']['getData'](_0x19f076,_0x627b85['toVersion']),_0x5de086={'id':_0x627b85['id'],'diffData':_0x31425b['diffData'],'authorsIds':_0x31425b['authorsIds'],'authors':_0x31425b['authorsIds']['map'](_0x4eb8b2=>this['editor']['plugins']['get']('Users')['getUser'](_0x4eb8b2)),'fromVersion':_0x19f076};this['_stampAiAttribute'](_0x5de086,_0x627b85,!!_0x31425b['hasAIChanges']),_0x627b85===this['currentRevision']&&(_0x5de086['createdAt']=new Date(_0x2adbf5['createdAt']['getTime']()+0xa)),_0x627b85['_update'](_0x5de086,!0x0),delete _0x5de086['authors'],_0x3a67dd['push'](_0x5de086);}}if(this['adapter']){for(const _0x194bb1 of _0x3a67dd)this['_bufferUpdate'](_0x194bb1['id'],_0x194bb1,!0x0);this['sendBufferedUpdates']();}return _0x1a3e6e;}addRevisionData(_0xc87ba6){const _0x1a3328=this['repository']['createRevision'](_0xc87ba6);return this['adapter']&&_0x1a3328['on']('_update',(_0x4144a4,_0x1c44d7,_0x5082ad)=>{_0x5082ad||(this['_bufferUpdate'](_0x1c44d7['id'],_0x1c44d7,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1a3328,this['_findInsertionIndex'](_0x1a3328)),_0x1a3328;}async getRevisionDocumentData(_0xae8512){return await this['_utils']['loadRevisionData'](_0xae8512,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xae8512);}async getRevisionRootsAttributes(_0x1112c8){return await this['_utils']['loadRevisionData'](_0x1112c8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1112c8);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x40fa55=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4c0eb6=0x0;_0x4c0eb6<_0x40fa55['length'];_0x4c0eb6++){const _0x5852ad=_0x40fa55[_0x4c0eb6];let _0x4f3078=!0x1;for(const _0x25e1d3 of Object['keys'](_0x5852ad))void 0x0===_0x5852ad[_0x25e1d3]?delete _0x5852ad[_0x25e1d3]:'id'!==_0x25e1d3&&(_0x4f3078=!0x0);_0x4f3078||(_0x40fa55[_0x4c0eb6]=null);}if(_0x40fa55=_0x40fa55['filter'](_0x480734=>null!==_0x480734),!_0x40fa55['length'])return;for(let _0x26b7a2=0x0;_0x26b7a2<_0x40fa55['length'];_0x26b7a2++){const _0xe8a914=_0x40fa55[_0x26b7a2];void 0x0!==_0xe8a914['fromVersion']&&void 0x0===_0xe8a914['toVersion']&&(_0xe8a914['toVersion']=this['repository']['getRevision'](_0xe8a914['id'])['toVersion']),void 0x0!==_0xe8a914['toVersion']&&void 0x0===_0xe8a914['fromVersion']&&(_0xe8a914['fromVersion']=this['repository']['getRevision'](_0xe8a914['id'])['fromVersion']);}const _0x4366de=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x40fa55,_0x4366de)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x14825f=>{if(_0x14825f){for(const _0x41ef84 of _0x14825f)this['setRevisionData']({'id':_0x41ef84['id'],'createdAt':_0x41ef84['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x237111,_0x239349,_0x37fce1){if(_0x37fce1===(!!_0x239349&&!!_0x239349['attributes']['@ai']))return;const _0x4130bb={..._0x239349?_0x239349['attributes']:{},..._0x237111['attributes']};_0x37fce1?_0x4130bb['@ai']=!0x0:delete _0x4130bb['@ai'],_0x237111['attributes']=_0x4130bb;}buildRevisionData({revision:_0x58e20a=null,from:_0xe51299=null,to:_0x3355fe=null}){_0xe51299=null!==_0xe51299?_0xe51299:_0x58e20a['fromVersion'],_0x3355fe=null!==_0x3355fe?_0x3355fe:_0x58e20a['toVersion'];const _0x41aeb5=this['_revisionDataBuilder']['getData'](_0xe51299,_0x3355fe),_0x2fa54f={'diffData':_0x41aeb5['diffData'],'authorsIds':_0x41aeb5['authorsIds'],'fromVersion':_0xe51299,'toVersion':_0x3355fe};if(this['_stampAiAttribute'](_0x2fa54f,_0x58e20a,!!_0x41aeb5['hasAIChanges']),!_0x58e20a||_0x3355fe!==_0x58e20a['toVersion']){const _0x12a42b=_0x3355fe-0x1,_0x526f17=this['_source']['history']['getOperation'](_0x12a42b);_0x2fa54f['createdAt']=_0x526f17&&_0x526f17['createdAt']||new Date();}if(this['_loadedStateData']&&_0xe51299===this['_loadedStateData']['fromVersion']){for(const _0x4907d6 of this['_loadedStateData']['authors'])_0x2fa54f['authorsIds']['includes'](_0x4907d6['id'])||_0x2fa54f['authorsIds']['push'](_0x4907d6['id']);}return _0x2fa54f;}_bufferUpdate(_0x2eebe9,_0xf5d722,_0x5861f9){if(this['_bufferedUpdates']['has'](_0x2eebe9)){const _0x3525b3=this['_bufferedUpdates']['get'](_0x2eebe9);_0xf5d722=_0x5861f9?{..._0x3525b3,..._0xf5d722}:{..._0xf5d722,..._0x3525b3};}this['_bufferedUpdates']['set'](_0x2eebe9,_0xf5d722);}setRevisionData(_0x55acfa){const _0x297f96=this['repository']['getRevision'](_0x55acfa['id']);if(_0x55acfa['createdAt']&&(_0x55acfa['createdAt']=new Date(_0x55acfa['createdAt'])),_0x55acfa['authorsIds']){const _0x468bba=this['editor']['plugins']['get']('Users');_0x55acfa['authors']=_0x55acfa['authorsIds']['map'](_0x375b0d=>_0x468bba['getUser'](_0x375b0d));}_0x297f96['_update'](_0x55acfa,!0x0);}_createInitialRevision(_0x5b6afc){const _0x4d3133=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4d3133)this['_initialRevisionId']=_0x4d3133['id'];else{const _0x27d171=!this['editor']['model']['document']['roots']['find'](_0x1836db=>this['editor']['model']['hasContent'](_0x1836db)),_0x3c986a=this['editor']['plugins']['get']('Users')['me']['id'],_0xd41ce9=kt(this['editor']['locale'],_0x27d171?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5b6afc,'to':_0x5b6afc,'id':this['_initialRevisionId'],'name':_0xd41ce9,'creatorId':_0x3c986a});}}_createCurrentRevision(_0x10fbf3){const _0x2b4e7c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2b4e7c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x10fbf3,'to':_0x10fbf3,'id':_0x2b4e7c,'name':'','creatorId':null}));}async _loadState(){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}_replaceEditorDataWithRevisionData(_0x4465df,_0x163c17,_0x1d25a8){const _0x15be32={},_0x181ad1={},_0x1bb0cd={},_0xa18adf=this['editor']['config']['get']('roots')||{};for(const [_0x3f70b0,_0x5dfdea]of Object['entries'](_0xa18adf))_0x5dfdea['lazyLoad']||(_0x15be32[_0x3f70b0]=_0x5dfdea['initialData']??'',_0x181ad1[_0x3f70b0]=_0x5dfdea['modelAttributes']||{},_0x5dfdea['modelElement']&&(_0x1bb0cd[_0x3f70b0]=_0x5dfdea['modelElement']));for(const _0x496a3a of this['editor']['model']['document']['getRootNames']())_0x15be32[_0x496a3a]??='',_0x181ad1[_0x496a3a]??={};let _0x4b5374=!0x1;const _0x1180aa=Object['keys'](_0x15be32),_0x11daf4=Object['keys'](_0x4465df);for(const _0x12385e of _0x1180aa){if(_0x15be32[_0x12385e]!==_0x4465df[_0x12385e]&&''!==_0x15be32[_0x12385e]['trim']()){_0x4b5374=!0x0;break;}if(!_0x538fa0(_0x181ad1[_0x12385e],_0x163c17[_0x12385e])&&Object['keys'](_0x181ad1[_0x12385e])['length']>0x0){_0x4b5374=!0x0;break;}const _0x2ee8a8=_0x1bb0cd[_0x12385e],_0x21c663=_0x1d25a8[_0x12385e];if(_0x2ee8a8&&_0x21c663&&_0x2ee8a8!==_0x21c663){_0x4b5374=!0x0;break;}}_0x4b5374||(_0x4b5374=_0x11daf4['some'](_0x293388=>!this['editor']['model']['document']['getRoot'](_0x293388))),_0x4b5374&&_0x3905c1('editor-initial-data-replaced-with-revision-data',{'editorData':_0x15be32,'editorRootsAttributes':_0x181ad1,'editorRootsModelElements':_0x1bb0cd,'revisionData':_0x4465df,'revisionRootsAttributes':_0x163c17,'revisionRootsModelElements':_0x1d25a8});for(const [_0x3ccd87,_0x28836d]of Object['entries'](_0x4465df))this['editor']['config']['set']('roots.'+_0x3ccd87+'.initialData',_0x28836d);for(const [_0x30d8ea,_0xd46164]of Object['entries'](_0x163c17))this['editor']['config']['set']('roots.'+_0x30d8ea+'.modelAttributes',_0xd46164);const _0x2076fd=this['editor']['model']['document'];for(const [_0x41bc24,_0x396c15]of Object['entries'](_0x1d25a8)){this['editor']['config']['set']('roots.'+_0x41bc24+'.modelElement',_0x396c15);const _0x23556c=_0x2076fd['getRoot'](_0x41bc24);_0x23556c&&_0x23556c['name']!==_0x396c15&&(_0x2076fd['roots']['remove'](_0x41bc24),_0x2076fd['createRoot'](_0x396c15,_0x41bc24));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2e6af2=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2e6af2['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x1d542a){const _0x4fb1ad=this['repository']['getRevisions']();_0x4fb1ad['reverse']();let _0x26e3e9=0x0;for(;_0x26e3e9<_0x4fb1ad['length'];){const _0x207da7=_0x4fb1ad[_0x26e3e9];if(_0x207da7===this['currentRevision']){_0x26e3e9++;continue;}if(_0x207da7['id']===this['_initialRevisionId'])break;const _0x709ac8=_0x1d542a['toVersion']-_0x207da7['toVersion']||_0x1d542a['fromVersion']-_0x207da7['fromVersion'];if(_0x709ac8>0x0)break;if(_0x709ac8<0x0)_0x26e3e9++;else{if(!_0x1d542a['creator']&&_0x207da7['creator'])break;if(_0x207da7['creator']||!_0x1d542a['creator']){if(_0x1d542a['createdAt']>_0x207da7['createdAt'])break;_0x26e3e9++;}else _0x26e3e9++;}}return _0x26e3e9;}_getFromVersion(_0x1e97ca){const _0x2f2c3f=this['repository']['getRevisions']();_0x2f2c3f['reverse'](),_0x2f2c3f['shift']();const _0x328672=_0x2f2c3f['find'](_0x3adffa=>_0x3adffa['toVersion']<=_0x1e97ca)['toVersion'];return _0x328672<this['_startingVersion']?this['_startingVersion']:_0x328672;}['_makeRevision']({name:_0x219496,from:_0x1a2910,to:_0x53a2e1,creatorId:_0x49f438,id:_0x55bdc6}){const _0x139d0f=this['buildRevisionData']({'from':_0x1a2910,'to':_0x53a2e1});_0x139d0f['name']=_0x219496,_0x139d0f['creatorId']=_0x49f438,_0x139d0f['id']=_0x55bdc6;const _0x9c9a34=this['addRevisionData'](_0x139d0f);return this['adapter']&&this['_bufferUpdate'](_0x139d0f['id'],_0x139d0f,!0x0),_0x9c9a34;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x561d0d){this['editor']=_0x561d0d,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['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x34936f){this['source']=_0x34936f;const _0x34e79f=new Map(),_0x1af8d6=new Map(),_0xbad2c0=this['editor']['model']['document']['roots']['map'](_0x2b65f0=>_0x2b65f0['rootName']);for(const _0x4f7481 of _0xbad2c0){const _0x28cf2d=this['editor']['model']['document']['getRoot'](_0x4f7481),_0x32a344=St(_0x28cf2d);_0x34e79f['set'](_0x4f7481,_0x32a344),_0x1af8d6['set'](_0x4f7481,Object['fromEntries'](_0x28cf2d['getAttributes']()));}const _0x247873=Array['from'](this['editor']['model']['markers'])['map'](_0x5a82b9=>[_0x5a82b9['name'],_0x5a82b9['getRange']()]),_0x1bef46=this['source']['version'];this['_saveMetaData'](_0x1bef46,_0x34e79f,_0x247873,_0x1af8d6),this['_startingRevisionId']=this['_revisionId'];const _0x3c94a1=new Map(),_0x407c60=new Map();for(const _0x2fa461 of _0xbad2c0){const _0x58a453=Et(_0x2fa461,this['editor']['model']['document']['getRoot'](_0x2fa461)['name']);_0x3c94a1['set'](_0x2fa461,_0x58a453),_0x407c60['set'](_0x2fa461,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3c94a1,[],_0x407c60);}getData(_0x35f582,_0x4fe200){if(this['_lastFrom']===_0x35f582&&this['_lastTo']<=_0x4fe200)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4fe200,!0x0);else{if(!this['_savedMetaData']['has'](_0x35f582)){const _0x2e5084=this['_getPreviousFrom'](_0x35f582);this['_calculateMetaData'](_0x2e5084,_0x35f582,!0x1);}this['_calculateMetaData'](_0x35f582,_0x4fe200,!0x0);}return this['_lastFrom']=_0x35f582,this['_lastTo']=_0x4fe200,this['_getState']();}loadState(_0x3af0b9){if(!this['_savedMetaData']['has'](_0x3af0b9['fromVersion'])){const _0x239c29=this['_getPreviousFrom'](_0x3af0b9['fromVersion']);this['_calculateMetaData'](_0x239c29,_0x3af0b9['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3af0b9['fromVersion'],_0x3af0b9['toVersion'],!0x1);const _0xf41104=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3af0b9['fromVersion'],this['_lastTo']=_0x3af0b9['toVersion'];for(const _0x2d3840 in _0x3af0b9['diffData']){const _0x3dbc43=_0x3af0b9['diffData'][_0x2d3840]['attachChange'],_0x5e956d=_0x144f08(_0x3af0b9['diffData'][_0x2d3840]['attributesBefore'])||{},_0x4a19ea=_0x3af0b9['diffData'][_0x2d3840],_0x37532f=_0xf41104['_makeModelFromViewString'](_0x4a19ea['deletions'],_0x4a19ea['rootElementName']||'$root');_0x37532f['rootName']=_0x2d3840,_0x37532f['_isAttached']=!_0x3dbc43||!_0x3dbc43['isAttached'],_0x37532f['isAttached']=()=>_0x37532f['_isAttached'],this['_baseRoots']['set'](_0x2d3840,_0x37532f),this['_baseRootsAttributes']['set'](_0x2d3840,_0x5e956d),_0x3dbc43&&this['_touchedRoots']['set'](_0x2d3840,_0x3dbc43);const _0x183ac9=this['_makeIdsRoot'](_0x37532f);this['_baseIdsRoots']['set'](_0x2d3840,_0x183ac9);for(const [_0x204a26,_0x1b6245]of _0x37532f['markers']){if(!_0x204a26['startsWith']('revision:'))continue;const _0x19d3ba=_0x204a26['split'](':')[0x2],_0x2fcd5e=_0x4a19ea['aiSources']?.[_0x204a26]||null;for(const _0xe8d32d of _0x1b6245['getWalker']({'singleCharacters':!0x0})){const _0x2c517b=this['_getVidAttributeName'](_0xe8d32d),_0x437281='elementEnd'==_0xe8d32d['type']?_0xe8d32d['previousPosition']['path']['slice'](0x0,-0x1):_0xe8d32d['previousPosition']['path'],_0x49fbcd=_0x183ac9['getNodeByPath'](_0x437281)['getAttribute'](_0x2c517b);this['_touched']['set'](_0x49fbcd,{'userId':_0x19d3ba,'aiSource':_0x2fcd5e});}_0x37532f['markers']['delete'](_0x204a26);}}this['_startingRevisionId']=this['_revisionId'];const _0x2eb5dd=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x35cdff=>!this['_touched']['has'](_0x35cdff));let _0x3bc09c=0x0;const _0x30555e=new Map();for(const _0x23e6c2 in _0x3af0b9['diffData']){const _0x3af82e=_0x3af0b9['diffData'][_0x23e6c2]['attachChange'],_0x1c9df5=_0x144f08(_0x3af0b9['diffData'][_0x23e6c2]['attributesAfter'])||{},_0x285ebc=_0x3af0b9['diffData'][_0x23e6c2],_0x5f170b=_0xf41104['_makeModelFromViewString'](_0x285ebc['insertions'],_0x285ebc['rootElementName']||'$root');_0x5f170b['rootName']=_0x23e6c2,_0x5f170b['_isAttached']=!_0x3af82e||_0x3af82e['isAttached'],_0x5f170b['isAttached']=()=>_0x5f170b['_isAttached'],this['_diffRoots']['set'](_0x23e6c2,_0x5f170b),this['_diffRootsAttributes']['set'](_0x23e6c2,_0x1c9df5);const _0x1daaf4=this['_makeIdsRoot'](_0x5f170b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x23e6c2,_0x1daaf4),_0x30555e['set'](_0x23e6c2,_0x5f170b['isAttached']()?_0x1c9df5:{});for(const [_0x1c916c,_0xc8202f]of _0x5f170b['markers']){if(!_0x1c916c['startsWith']('revision:'))continue;const _0x2d6832=_0x1c916c['split'](':')[0x2],_0x3cbe93=_0x285ebc['aiSources']?.[_0x1c916c]||null;for(const _0x181cab of _0xc8202f['getWalker']({'singleCharacters':!0x0})){const _0x580345=this['_getVidAttributeName'](_0x181cab),_0x1dbdf9=this['_revisionId']++,_0x3ce121='elementEnd'==_0x181cab['type']?_0x181cab['previousPosition']['path']['slice'](0x0,-0x1):_0x181cab['previousPosition']['path'];_0x1daaf4['getNodeByPath'](_0x3ce121)['_setAttribute'](_0x580345,_0x1dbdf9),this['_touched']['set'](_0x1dbdf9,{'userId':_0x2d6832,'aiSource':_0x3cbe93});}_0x5f170b['markers']['delete'](_0x1c916c);}for(const _0xfe0ddb of this['editor']['model']['createRangeIn'](_0x5f170b)['getWalker']({'singleCharacters':!0x0})){const _0xdd2aa4=this['_getVidAttributeName'](_0xfe0ddb),_0x33fc89='elementEnd'==_0xfe0ddb['type']?_0xfe0ddb['previousPosition']['path']['slice'](0x0,-0x1):_0xfe0ddb['previousPosition']['path'],_0x45e32e=_0x1daaf4['getNodeByPath'](_0x33fc89);_0x45e32e['getAttribute'](_0xdd2aa4)>0x0||_0x45e32e['_setAttribute'](_0xdd2aa4,_0x2eb5dd[_0x3bc09c++]);}for(const [_0x3ae353,_0x4e1ffb]of _0x5f170b['markers'])_0x3ae353['startsWith']('revision:')||this['_markers']['set'](_0x3ae353,_0x4e1ffb);}const {roots:_0xa94598}=this['_savedMetaData']['get'](_0x3af0b9['fromVersion']),{roots:_0xeaa17f}=this['_savedMetaData']['get'](_0x3af0b9['toVersion']),_0x182b13=St(_0xa94598['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x182b13),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x182b13,Number['NEGATIVE_INFINITY']));const _0x630beb=St(_0xeaa17f['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x630beb),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x630beb));const _0xa302df=Array['from'](this['_diffRoots'])['map'](([_0x2941e5,_0x47813f])=>[_0x2941e5,St(_0x47813f)]);this['_saveMetaData'](this['_lastTo'],_0xa302df,this['_markers'],_0x30555e);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x456754,_0x3cd7de,_0x5cee19,_0x237280){const _0x2edc73=new Map(_0x3cd7de),_0x11eeda=new Map(_0x144f08(_0x237280)),_0x3a73e3=new Map();for(const [_0x5290be,_0x536c11]of _0x5cee19)_0x3a73e3['set'](_0x5290be,{'start':_0x536c11['start']['clone'](),'end':_0x536c11['end']['clone'](),'rootName':_0x536c11['root']['rootName']});this['_savedMetaData']['set'](_0x456754,{'roots':_0x2edc73,'markers':_0x3a73e3,'rootsAttributes':_0x11eeda});}_removeMetaData(_0x2e53fe){this['_savedMetaData']['delete'](_0x2e53fe);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['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(_0x20e88e,_0x114afd=null){let _0x2bf4de=null;_0x20e88e['is']('documentFragment')||(_0x2bf4de=new _0x28c730(_0x20e88e['name'],{'vid_start':null===_0x114afd?this['_revisionId']++:_0x114afd++}));const _0x15fd67=[];for(const _0x43cabb of _0x20e88e['getChildren']())if(_0x43cabb['is']('element')){_0x15fd67['push'](this['_makeIdsRoot'](_0x43cabb,_0x114afd));const _0x36c422=_0x15fd67[_0x15fd67['length']-0x1];null!==_0x114afd&&(_0x114afd=_0x36c422['is']('element','$text')?_0x36c422['getAttribute']('vid')+0x1:_0x36c422['getAttribute']('vid_end')+0x1);}else{for(let _0x48e7fc=0x0;_0x48e7fc<_0x43cabb['offsetSize'];_0x48e7fc++)_0x15fd67['push'](new _0x28c730('$text',{'vid':null===_0x114afd?this['_revisionId']++:_0x114afd++}));}if(_0x20e88e['is']('documentFragment')){const _0x717f95=Et(_0x20e88e['rootName'],_0x20e88e['name']);return _0x717f95['_insertChild'](0x0,_0x15fd67),_0x717f95;}return _0x2bf4de['_setAttribute']('vid_end',null===_0x114afd?this['_revisionId']++:_0x114afd),_0x2bf4de['_insertChild'](0x0,_0x15fd67),_0x2bf4de;}_calculateMetaData(_0x5e32fc,_0x150401,_0x113ee1){this['_reset']();const {roots:_0xef9b73,markers:_0x87ea9c,rootsAttributes:_0x274651}=this['_savedMetaData']['get'](_0x5e32fc);this['_baseRoots']=new Map(_0xef9b73),this['_baseRootsAttributes']=new Map(_0x144f08(_0x274651));for(const [_0x41f08b,_0x5d7aa8]of this['_baseRoots'])if('$graveyard'!==_0x41f08b&&(this['_diffRoots']['set'](_0x41f08b,St(_0x5d7aa8)),this['_diffRootsAttributes']=new Map(_0x144f08(_0x274651)),_0x113ee1)){const _0x5f3a06=this['_revisionId'];this['_idsRoots']['set'](_0x41f08b,this['_makeIdsRoot'](_0x5d7aa8)),this['_baseIdsRoots']['set'](_0x41f08b,this['_makeIdsRoot'](_0x5d7aa8,_0x5f3a06));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x113ee1&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1cdb26,_0xe73eb7]of _0x87ea9c){const _0x502fa7=this['_baseRoots']['get'](_0xe73eb7['rootName']),_0x4f899d=this['_diffRoots']['get'](_0xe73eb7['rootName']),_0x230775=new _0x390c0d(_0x289722(_0xe73eb7['start'],_0x502fa7),_0x289722(_0xe73eb7['end'],_0x502fa7)),_0xa049a4=_0x3c9bdd(_0x230775,_0x4f899d);_0x502fa7['markers']['set'](_0x1cdb26,_0x230775),this['_markers']['set'](_0x1cdb26,_0xa049a4);}this['_applyOperations'](_0x5e32fc,_0x150401,_0x113ee1);}_applyOperations(_0x198742,_0x3558ee,_0x29cf44){for(const _0x5a8b3d of this['source']['getOperations'](_0x198742,_0x3558ee))this['_handleOperation'](_0x5a8b3d,_0x29cf44);for(const _0x576e86 of this['_diffRoots']['values']())_0x576e86['markers']['clear']();for(const [_0x36e3af,_0x165e4e]of this['_markers'])this['_diffRoots']['get'](_0x165e4e['root']['rootName'])['markers']['set'](_0x36e3af,_0x165e4e['clone']());const _0x22f97a=new Map(),_0x427185=new Map();for(const [_0xc9c66d,_0x5a5611]of this['_diffRoots'])_0x22f97a['set'](_0xc9c66d,St(_0x5a5611)),_0x427185['set'](_0xc9c66d,this['_diffRootsAttributes']['get'](_0xc9c66d));this['_saveMetaData'](_0x3558ee,_0x22f97a,this['_markers'],_0x427185);}_getPreviousFrom(_0x5ab4d4){const _0x27990c=Array['from'](this['_savedMetaData']['keys']());_0x27990c['sort']((_0x5de164,_0x3ee46c)=>_0x5de164-_0x3ee46c),_0x27990c['reverse']();for(const _0x31be91 of _0x27990c)if(_0x31be91<_0x5ab4d4)return _0x31be91;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4b278f,_0x2bbe05){const _0x436362=Array['from'](_0x2bbe05['markers'])['map'](([_0x63b139,_0x5e037c])=>[_0x63b139,_0x3c9bdd(_0x5e037c,_0x4b278f)]);_0x4b278f['markers']=new Map(_0x436362);}_transformMarkers(_0x2bb28a){for(const _0x5c094f of this['_markers']['values']()){const _0xd4af9b=_0x5c094f['getTransformedByOperation'](_0x2bb28a),_0x54eeca=_0x390c0d['_createFromRanges'](_0xd4af9b);_0x5c094f['start']=_0x54eeca['start'],_0x5c094f['end']=_0x54eeca['end'];}}_handleOperation(_0x4028a2,_0x58252e){if('addRoot'!=_0x4028a2['type']&&'detachRoot'!=_0x4028a2['type']){if('insert'==_0x4028a2['type']){const _0x3b7085=_0x4028a2['position']['root'],_0x71f2b=_0x3b7085['rootName'],_0x230ba3=_0x3b7085['name'];this['_diffRoots']['has'](_0x71f2b)||(this['_diffRoots']['set'](_0x71f2b,Et(_0x71f2b,_0x230ba3,!0x0)),this['_diffRootsAttributes']['set'](_0x71f2b,{}),_0x58252e&&this['_idsRoots']['set'](_0x71f2b,Et(_0x71f2b,_0x230ba3,!0x0)));}else{if('addRootAttribute'==_0x4028a2['type']||'removeRootAttribute'==_0x4028a2['type']||'changeRootAttribute'==_0x4028a2['type'])return void this['_handleRootAttributeOperation'](_0x4028a2);'marker'==_0x4028a2['type']&&this['_handleMarkerOperation'](_0x4028a2);}if('marker'!==_0x4028a2['type']){const _0x4b720a=this['_cloneOperation'](_0x4028a2,this['_diffRoots']);_0x4b720a['_execute'](),this['_transformMarkers'](_0x4b720a);}if(_0x58252e)switch(_0x4028a2['type']){case'insert':this['_handleInsertOperation'](_0x4028a2);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4028a2);break;case'merge':this['_handleMergeOperation'](_0x4028a2);break;case'split':this['_handleSplitOperation'](_0x4028a2);}}else this['_handleRootOperation'](_0x4028a2,_0x58252e);}_cloneOperation(_0x464461,_0x1b8e59){const _0x359bbf=_0x464461['clone']();return _0x359bbf['_authorId']=_0x464461['_authorId'],_0x359bbf['_aiSource']=_0x464461['_aiSource'],_0x359bbf['baseVersion']=null,_0x51ed69(_0x359bbf,_0x1b8e59),_0x359bbf;}_getBaseVids(_0xbe4dbc){return _0xbe4dbc['map'](_0x28a8b2=>{const _0x306ae2=this['_getVidAttributeName'](_0x28a8b2);return Number(_0x28a8b2['item']['getAttribute'](_0x306ae2));});}_generateTape(_0x5159a9,_0x38b1ee){if(_0x5159a9['is']('element','$text'))_0x38b1ee['push']({'item':_0x5159a9,'type':'text'});else{_0x5159a9['is']('element')&&_0x38b1ee['push']({'item':_0x5159a9,'type':'elementStart'});for(const _0x11282b of _0x5159a9['getChildren']())this['_generateTape'](_0x11282b,_0x38b1ee);_0x5159a9['is']('element')&&_0x38b1ee['push']({'item':_0x5159a9,'type':'elementEnd'});}return _0x38b1ee;}_getState(){const _0x4e9f4f=new Map(this['_touched']),_0x24023c=new Map(_0x4e9f4f),_0x40ee3e=new Map(),_0x5a1178={'insertions':{},'deletions':{}},_0x1bd158={'insertions':{},'deletions':{}},_0x36d154=new Map(),_0x518d67=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x5e64c6=new Map();_0x518d67['delete']('$graveyard');for(const _0xc60760 of _0x518d67){const _0x4df9e6=(this['_diffRoots']['get'](_0xc60760)??this['_baseRoots']['get'](_0xc60760))['name'],_0x59fe49=this['_diffRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1),_0x2fe637=this['_baseRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1);_0x59fe49['isAttached']()||_0x2fe637['isAttached']()?(_0x5e64c6['set'](_0xc60760,_0x4df9e6),_0x5a1178['insertions'][_0xc60760]=St(_0x59fe49),_0x5a1178['deletions'][_0xc60760]=St(_0x2fe637),this['_copyMarkers'](_0x5a1178['deletions'][_0xc60760],_0x2fe637),this['_copyMarkers'](_0x5a1178['insertions'][_0xc60760],_0x59fe49),_0x1bd158['insertions'][_0xc60760]=this['_generateTape'](this['_idsRoots']['get'](_0xc60760),[]),_0x1bd158['deletions'][_0xc60760]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1),[])):_0x518d67['delete'](_0xc60760);}for(const _0x44277f of _0x518d67){const _0x11eda5=_0x1bd158['insertions'][_0x44277f];for(const _0x11fa81 of _0x11eda5){const _0x14a6b9=this['_getVidAttributeName'](_0x11fa81),_0x502fe0=_0x11fa81['item']['getAttribute'](_0x14a6b9);_0x24023c['delete'](_0x502fe0),_0x502fe0>=this['_startingRevisionId']&&_0x40ee3e['set'](_0x502fe0,_0x4e9f4f['get'](_0x502fe0));}}for(const _0x455de7 of _0x518d67){const _0x5a6b37=_0x1bd158['insertions'][_0x455de7],_0x2d98a3=this['_getBaseVids'](_0x1bd158['deletions'][_0x455de7]);let _0x15e2a3=0x0;for(const _0x2ee9e0 of _0x5a6b37){const _0x3e4d7d=this['_getVidAttributeName'](_0x2ee9e0),_0x13b357=_0x2ee9e0['item']['getAttribute'](_0x3e4d7d);if(!_0x40ee3e['has'](_0x13b357)&&!_0x36d154['has'](_0x13b357)){if(_0x24023c['has'](_0x13b357))_0x15e2a3++;else{if(_0x13b357!=_0x2d98a3[_0x15e2a3]){const _0x9deba1=_0x4e9f4f['get'](_0x13b357)||_0x4e9f4f['get'](_0x2d98a3[_0x15e2a3]);for(;_0x13b357!=_0x2d98a3[_0x15e2a3];)_0x24023c['has'](_0x2d98a3[_0x15e2a3])||(_0x36d154['set'](_0x2d98a3[_0x15e2a3],_0x9deba1),_0x4e9f4f['set'](_0x2d98a3[_0x15e2a3],_0x9deba1)),_0x15e2a3++;}_0x15e2a3++;}}}}for(const _0x2d503b of _0x518d67){const _0x1fbcf7=_0x1bd158['insertions'][_0x2d503b];for(const _0x568996 of _0x1fbcf7){const _0x24a9f2=this['_getVidAttributeName'](_0x568996),_0x1d442f=_0x568996['item']['getAttribute'](_0x24a9f2);if(_0x36d154['has'](_0x1d442f)){const _0x28cd17=_0x36d154['get'](_0x1d442f);_0x24023c['has'](_0x1d442f)||_0x24023c['set'](_0x1d442f,{..._0x28cd17}),_0x40ee3e['set'](_0x1d442f,{..._0x28cd17});}}}for(const _0x3c78da of _0x24023c['keys']())_0x3c78da>=this['_startingRevisionId']&&_0x24023c['delete'](_0x3c78da);const _0x5389fe=new Map();for(const _0x30a782 of _0x518d67){let _0x3c1eaa=_0x1bd158['insertions'][_0x30a782];for(const _0x1addb3 of _0x3c1eaa)if(_0x1addb3['item']['is']('element','tableCell')){const _0x300b6a=this['_getVidAttributeName'](_0x1addb3),_0x19f6b1=_0x1addb3['item']['getAttribute'](_0x300b6a);if(_0x40ee3e['has'](_0x19f6b1)){const _0x4384be=_0x1addb3['item']['parent']['parent']['getAttribute']('vid_start'),_0x4b93d1=_0x40ee3e['get'](_0x19f6b1),_0x496ec6=_0x5389fe['get'](_0x4384be)||{'users':new Set(),'aiSource':null};_0x496ec6['users']['add'](_0x4b93d1['userId']),_0x496ec6['aiSource']=_0x496ec6['aiSource']||_0x4b93d1['aiSource']||null,_0x5389fe['set'](_0x4384be,_0x496ec6);}}_0x3c1eaa=_0x1bd158['deletions'][_0x30a782];for(const _0x501d92 of _0x3c1eaa)if(_0x501d92['item']['is']('element','tableCell')){const _0x16ea4a=this['_getVidAttributeName'](_0x501d92),_0x17afc0=_0x501d92['item']['getAttribute'](_0x16ea4a);if(_0x24023c['has'](_0x17afc0)){const _0x2cdd0d=_0x501d92['item']['parent']['parent']['getAttribute']('vid_start'),_0x46a7bc=_0x24023c['get'](_0x17afc0),_0x414de0=_0x5389fe['get'](_0x2cdd0d)||{'users':new Set(),'aiSource':null};_0x414de0['users']['add'](_0x46a7bc['userId']),_0x414de0['aiSource']=_0x414de0['aiSource']||_0x46a7bc['aiSource']||null,_0x5389fe['set'](_0x2cdd0d,_0x414de0);}}for(const _0x391faf of _0x5389fe['keys']())(_0x40ee3e['has'](_0x391faf)||_0x24023c['has'](_0x391faf))&&_0x5389fe['delete'](_0x391faf);}for(const _0x114c4e of _0x518d67){const _0x47e259=_0x1bd158['insertions'][_0x114c4e];let _0x51cb5a=null,_0x2d21c7=null,_0x4c46a5=null;for(const _0x170342 of _0x47e259){const _0x1c5e24=this['_getVidAttributeName'](_0x170342),_0x35d51f=_0x170342['item']['getAttribute'](_0x1c5e24),_0x275e89=_0x5389fe['get'](_0x35d51f);if(_0x275e89&&'elementStart'==_0x170342['type']&&(_0x51cb5a=Array['from'](_0x275e89['users'])[0x0],_0x2d21c7=_0x275e89['aiSource'],_0x4c46a5=_0x170342['item']['getAttribute']('vid_end')),_0x51cb5a){const _0x4fe191=_0x2d21c7||_0x24023c['get'](_0x35d51f)?.['aiSource']||null,_0x100791=_0x2d21c7||_0x40ee3e['get'](_0x35d51f)?.['aiSource']||null;_0x24023c['set'](_0x35d51f,{'userId':_0x51cb5a,'aiSource':_0x4fe191}),_0x40ee3e['set'](_0x35d51f,{'userId':_0x51cb5a,'aiSource':_0x100791});}_0x35d51f==_0x4c46a5&&(_0x51cb5a=null,_0x4c46a5=null);}}const _0x16ba18={},_0x3aceab=new Set();for(const _0x501865 of _0x518d67){const _0x163e43=_0x5a1178['deletions'][_0x501865],_0x708316=_0x5a1178['insertions'][_0x501865];for(const {userId:_0x2f861c}of this['_touchedMarkers']['values']())null!==_0x2f861c&&_0x3aceab['add'](_0x2f861c);for(const {userId:_0x24757d}of this['_touchedRoots']['values']())null!==_0x24757d&&_0x3aceab['add'](_0x24757d);const _0x3578c0={};this['_markChanges'](_0x708316,_0x1bd158['insertions'][_0x501865],_0x40ee3e,'insertion',_0x3aceab,_0x3578c0),this['_markChanges'](_0x163e43,_0x1bd158['deletions'][_0x501865],_0x24023c,'deletion',_0x3aceab,_0x3578c0),this['_collectSuggestionAiSources'](_0x708316,_0x3578c0),this['_collectSuggestionAiSources'](_0x163e43,_0x3578c0),_0x16ba18[_0x501865]={'insertions':this['_prepareViewToSave'](_0x708316),'deletions':this['_prepareViewToSave'](_0x163e43),'attachChange':this['_touchedRoots']['get'](_0x501865)||null,'attributesBefore':_0x144f08(this['_baseRootsAttributes']['get'](_0x501865))||{},'attributesAfter':_0x144f08(this['_diffRootsAttributes']['get'](_0x501865)),'rootElementName':_0x5e64c6['get'](_0x501865),'aiSources':_0x3578c0};}const _0x20146b=Array['from'](_0x40ee3e['values']())['some'](_0x1e5429=>!(!_0x1e5429||!_0x1e5429['aiSource']))||Array['from'](_0x24023c['values']())['some'](_0x13a76f=>!(!_0x13a76f||!_0x13a76f['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x273210=>this['_aiTouchedMarkers']['has'](_0x273210));return{'diffData':_0x16ba18,'authorsIds':Array['from'](_0x3aceab),'hasAIChanges':_0x20146b};}_collectSuggestionAiSources(_0x1ad9fa,_0x2fffef){const _0x222ee4=_0x1ad9fa['markers'];for(const _0x1b5968 of _0x222ee4['keys']()){if(!_0x1b5968['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x1b5968))continue;const _0x13c1ba=this['_aiTouchedMarkers']['get'](_0x1b5968);_0x13c1ba&&(_0x2fffef[_0x1b5968]=_0x13c1ba);}}_processRootBeforeSave(_0x21c2df){for(const [,_0x172d6b]of _0x21c2df['markers']){const _0x402a07=_0x172d6b['start']['getAncestors']()['filter'](_0x49b13e=>'tableCell'==_0x49b13e['name']);for(const _0x5c21c0 of _0x402a07)0x1==_0x5c21c0['childCount']&&_0x5c21c0['getChild'](0x0)['is']('element','paragraph')&&_0x5c21c0['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x34b23f){this['_processRootBeforeSave'](_0x34b23f);const _0x420399=this['editor']['data']['toView'](_0x34b23f,{}),_0x314e8b=Array['from'](_0x420399['getChildren']())['map'](_0xfc2f8d=>this['_getViewJson'](_0xfc2f8d));return JSON['stringify'](_0x314e8b);}_getViewJson(_0x3db8c1){if(_0x3db8c1['is']('$text'))return _0x3db8c1['data'];{const _0x1e0d0c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5691a0=_0x3db8c1,_0x3fc017=this['editor']['data']['htmlProcessor']['domConverter'],_0x4b3b9e={'type':_0x1e0d0c['_getTypeCharForViewElement'](_0x5691a0),'name':_0x5691a0['name'],'attributes':Array['from'](_0x5691a0['getAttributes']()),'children':Array['from'](_0x5691a0['getChildren']())['map'](_0x58b8c3=>this['_getViewJson'](_0x58b8c3))};if(_0x3db8c1['is']('uiElement')&&'$comment'!=_0x3db8c1['name']){const _0x2bead4=_0x3db8c1['render'](_0x3fc017['domDocument'],_0x3fc017);_0x4b3b9e['children']['push'](_0x2bead4['outerHTML']);}else{if(_0x3db8c1['is']('rawElement')){const _0x5ae06d=_0x3fc017['domDocument']['createElement'](_0x5691a0['name']);_0x3db8c1['render'](_0x5ae06d,_0x3fc017),_0x4b3b9e['children']['push'](_0x5ae06d['innerHTML']);}}const _0x23d490=Array['from'](_0x5691a0['getCustomProperties']());_0x23d490['length']>0x0&&(_0x4b3b9e['customProperties']=_0x23d490);const _0x315294=_0x5691a0['getFillerOffset']();return null!==_0x315294&&(_0x4b3b9e['fillerOffset']=_0x315294),_0x4b3b9e;}}['_markChanges'](_0x5e8e46,_0x237007,_0x31a179,_0x6de0f8,_0x48875f,_0x3863bf){let _0x3f8558=null,_0x23baaa=null,_0x5cccca=0x0;const _0x84e60b=this['editor']['model'];for(let _0x143651=0x0;_0x143651<_0x237007['length'];_0x143651++){const _0x485e5b=this['_getVidAttributeName'](_0x237007[_0x143651]),_0x137fd3=_0x237007[_0x143651]['item']['getAttribute'](_0x485e5b),_0x448ec3=_0x31a179['get'](_0x137fd3),_0x21fb0f=_0x143651==_0x237007['length']-0x1;!_0x3f8558&&_0x448ec3&&(_0x3f8558=_0x448ec3,_0x23baaa=_0x237007[_0x143651]);const _0x45e9de=!!_0x3f8558&&!!_0x448ec3&&_0x448ec3['userId']!=_0x3f8558['userId'],_0x5c5d07=!!_0x3f8558&&!!_0x448ec3&&_0x448ec3['aiSource']!=_0x3f8558['aiSource'];_0x3f8558&&(!_0x448ec3||_0x45e9de||_0x5c5d07)&&(_0x138ff5(_0x448ec3,Ot(_0x23baaa,_0x5e8e46,_0x84e60b),Ot(_0x237007[_0x143651],_0x5e8e46,_0x84e60b)),_0x3f8558=_0x448ec3||null,_0x23baaa=_0x448ec3?_0x237007[_0x143651]:null),_0x3f8558&&_0x21fb0f&&_0x138ff5(_0x448ec3,Ot(_0x23baaa,_0x5e8e46,_0x84e60b),Ct(_0x237007[_0x143651],_0x5e8e46,_0x84e60b));}function _0x138ff5(_0x10b518,_0x2ee86f,_0x5d54e8){const _0x42c349=_0x3f8558['userId'],_0x4c8d8a=_0x3f8558['aiSource'],_0x3ecfb3='revision:'+_0x6de0f8+':'+_0x42c349+':'+_0x5cccca++,_0xd56f84=_0x84e60b['createRange'](_0x2ee86f,_0x5d54e8);_0x5e8e46['markers']['set'](_0x3ecfb3,_0xd56f84),_0x4c8d8a&&(_0x3863bf[_0x3ecfb3]=_0x4c8d8a),null!==_0x42c349&&_0x48875f['add'](_0x42c349);}}_getVidAttributeName(_0x5ca80b){switch(_0x5ca80b['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x44c101){const _0x86551a=this['_idsRoots']['get'](_0x44c101['position']['root']['rootName']),_0x5918d8=_0x289722(_0x44c101['position'],_0x86551a),_0x767c79=null===_0x44c101['_authorId']?null:_0x44c101['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d3b68=_0x44c101['_aiSource']||null,_0x183946=_0x5918d8['parent'],_0x5a5f74=this['_revisionId'],_0x3a33a6=[];for(const _0x3b9c47 of _0x44c101['nodes'])if(_0x3b9c47['is']('element'))_0x3a33a6['push'](this['_makeIdsRoot'](_0x3b9c47));else{for(let _0x13dadd=0x0;_0x13dadd<_0x3b9c47['offsetSize'];_0x13dadd++)_0x3a33a6['push'](new _0x28c730('$text',{'vid':this['_revisionId']++}));}const _0xb3c3f8=this['_revisionId'];for(let _0x52387e=_0x5a5f74;_0x52387e<_0xb3c3f8;_0x52387e++)this['_touched']['set'](_0x52387e,{'userId':_0x767c79,'aiSource':_0x4d3b68});_0x183946['_insertChild'](_0x5918d8['offset'],_0x3a33a6);}_setTouched(_0x2ee003,_0x209544,_0x39ac0f){this['_touched']['set'](_0x2ee003,{'userId':_0x209544,'aiSource':_0x39ac0f||this['_touched']['get'](_0x2ee003)?.['aiSource']||null});}_handleMoveOperation(_0x2b49f0){(_0x2b49f0=this['_cloneOperation'](_0x2b49f0,this['_idsRoots']))['_execute']();const _0x16a2d6=null===_0x2b49f0['_authorId']?null:_0x2b49f0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x116a01=_0x2b49f0['_aiSource']||null,_0x1e8b83=_0x2b49f0['getMovedRangeStart'](),_0x4f7b4c=_0x1e8b83['parent'],_0x46c142=_0x1e8b83['offset'],_0xbf0a88=(_0x1a8488,_0x109f9e,_0x5a8760)=>{for(let _0x2065d5=_0x109f9e;_0x2065d5<_0x5a8760;_0x2065d5++){const _0x1040c1=_0x1a8488['getChild'](_0x2065d5);_0x1040c1['is']('element','$text')?this['_setTouched'](_0x1040c1['getAttribute']('vid'),_0x16a2d6,_0x116a01):(this['_setTouched'](_0x1040c1['getAttribute']('vid_start'),_0x16a2d6,_0x116a01),_0xbf0a88(_0x1040c1,0x0,_0x1040c1['childCount']),this['_setTouched'](_0x1040c1['getAttribute']('vid_end'),_0x16a2d6,_0x116a01));}};_0xbf0a88(_0x4f7b4c,_0x46c142,_0x46c142+_0x2b49f0['howMany']);}_handleMergeOperation(_0x4e5647){const _0x5c4ec2=null===(_0x4e5647=this['_cloneOperation'](_0x4e5647,this['_idsRoots']))['_authorId']?null:_0x4e5647['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a8bbf=_0x4e5647['_aiSource']||null,_0x65a552=_0x4e5647['targetPosition']['parent'],_0x854fe5=_0x4e5647['sourcePosition']['parent'],_0x4e3b6f=_0x65a552['getAttribute']('vid_end'),_0x4dee27=_0x854fe5['getAttribute']('vid_start');_0x65a552['_setAttribute']('vid_end',_0x854fe5['getAttribute']('vid_end')),_0x854fe5['_setAttribute']('vid_end',_0x4e3b6f),this['_setTouched'](_0x4dee27,_0x5c4ec2,_0x4a8bbf),this['_setTouched'](_0x4e3b6f,_0x5c4ec2,_0x4a8bbf),_0x4e5647['_execute']();}_handleSplitOperation(_0x26eda0){const _0x249258=null===(_0x26eda0=this['_cloneOperation'](_0x26eda0,this['_idsRoots']))['_authorId']?null:_0x26eda0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x48a760=_0x26eda0['_aiSource']||null,_0x242121=_0x26eda0['graveyardPosition'],_0x45f6d2=_0x26eda0['splitPosition']['parent'];_0x26eda0['_execute']();const _0x4a74cf=_0x45f6d2['getAttribute']('vid_end'),_0x371e07=_0x26eda0['insertionPosition']['nodeAfter'];if(_0x242121){const _0x299327=_0x371e07['getAttribute']('vid_end'),_0x548501=_0x45f6d2['getAttribute']('vid_end');_0x45f6d2['_setAttribute']('vid_end',_0x299327),_0x371e07['_setAttribute']('vid_end',_0x548501),this['_setTouched'](_0x45f6d2['getAttribute']('vid_end'),_0x249258,_0x48a760),this['_setTouched'](_0x371e07['getAttribute']('vid_start'),_0x249258,_0x48a760);}else{const _0x177831=this['_revisionId']++,_0x583e05=this['_revisionId']++;_0x45f6d2['_setAttribute']('vid_end',_0x177831),_0x371e07['_setAttribute']('vid_start',_0x583e05),_0x371e07['_setAttribute']('vid_end',_0x4a74cf),this['_setTouched'](_0x177831,_0x249258,_0x48a760),this['_setTouched'](_0x583e05,_0x249258,_0x48a760);}}_handleMarkerOperation(_0x5e4bad){if(!_0x5e4bad['affectsData'])return;const _0x255efd=(_0x5e4bad=this['_cloneOperation'](_0x5e4bad,this['_diffRoots']))['oldRange']?_0x5e4bad['oldRange']['root']:null,_0x65a1aa=_0x5e4bad['newRange']?_0x5e4bad['newRange']['root']:null;_0x255efd&&this['_markers']['delete'](_0x5e4bad['name']),_0x65a1aa&&this['_markers']['set'](_0x5e4bad['name'],_0x5e4bad['newRange']['clone']());const _0x1c5236=null===_0x5e4bad['_authorId']?null:_0x5e4bad['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x396d98=_0x5e4bad['name'];if(_0x5e4bad['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x396d98,_0x5e4bad['_aiSource']),!this['_touchedMarkers']['has'](_0x396d98))return void this['_touchedMarkers']['set'](_0x396d98,{'range':_0x5e4bad['oldRange'],'userId':_0x1c5236});const _0x3f9c74=this['_touchedMarkers']['get'](_0x396d98),_0x1d78b6=_0x3f9c74['range'],_0x3aec5b=_0x5e4bad['newRange'];null==_0x1d78b6&&null==_0x3aec5b||_0x1d78b6&&_0x3aec5b&&_0x1d78b6['isEqual'](_0x3aec5b)?this['_touchedMarkers']['delete'](_0x5e4bad['name']):_0x3f9c74['userId']=_0x1c5236;}_handleRootOperation(_0x30befd,_0x38e144){this['_diffRoots']['has'](_0x30befd['rootName'])?this['_diffRoots']['get'](_0x30befd['rootName'])['_isAttached']=_0x30befd['isAdd']:(this['_diffRoots']['set'](_0x30befd['rootName'],Et(_0x30befd['rootName'],_0x30befd['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x30befd['rootName'],{}),_0x38e144&&this['_idsRoots']['set'](_0x30befd['rootName'],Et(_0x30befd['rootName'],_0x30befd['elementName'],!0x0)));const _0x2cd72a=null===_0x30befd['_authorId']?null:_0x30befd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2772bb=this['_touchedRoots']['get'](_0x30befd['rootName']);_0x2772bb&&_0x2772bb['userId']===_0x2cd72a?this['_touchedRoots']['delete'](_0x30befd['rootName']):this['_touchedRoots']['set'](_0x30befd['rootName'],{'userId':_0x2cd72a,'isAttached':_0x30befd['isAdd']});}_handleRootAttributeOperation(_0x14a676){const _0x2f7e6d=this['_diffRootsAttributes']['get'](_0x14a676['root']['rootName']);null===_0x14a676['newValue']?delete _0x2f7e6d[_0x14a676['key']]:_0x2f7e6d[_0x14a676['key']]=_0x14a676['newValue'];}};function St(_0x5990bc){const _0x1f9605=Et(_0x5990bc['rootName'],_0x5990bc['name'],_0x5990bc['isAttached']());for(const _0x5521a2 of _0x5990bc['getChildren']()){const _0x4da94c=_0x5521a2['_clone'](!0x0);_0x1f9605['_appendChild'](_0x4da94c);}return _0x1f9605;}function Et(_0x2b6500,_0x1f8ddf,_0x52b115=!0x0){const _0x402f05=new _0x4acbd6();return _0x402f05['rootName']=_0x2b6500,_0x402f05['name']=_0x1f8ddf,_0x402f05['_isAttached']=_0x52b115,_0x402f05['isAttached']=()=>_0x402f05['_isAttached'],_0x402f05;}function Ot(_0x1a7667,_0x517b5b,_0x58e493){const _0x116357='elementEnd'==_0x1a7667['type']?_0x58e493['createPositionAt'](_0x1a7667['item'],'end'):_0x58e493['createPositionBefore'](_0x1a7667['item']);return _0x58e493['createPositionFromPath'](_0x517b5b,_0x116357['path'],_0x116357['stickiness']);}function Ct(_0x575c94,_0x10db76,_0x36944a){const _0x57008b='elementStart'==_0x575c94['type']?_0x36944a['createPositionAt'](_0x575c94['item'],0x0):_0x36944a['createPositionAfter'](_0x575c94['item']);return _0x36944a['createPositionFromPath'](_0x10db76,_0x57008b['path'],_0x57008b['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xe40d6(dt);var xt=class extends Nt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x48e27c,_0x42479c){super(_0x48e27c),this['focusTracker']=new _0xa64bfb(),this['keystrokes']=new _0x2d0e3c(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x42479c),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_t({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5e8922=_0xc65730=>_0xc65730['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5e8922),this['keystrokes']['set']('arrowleft',_0x5e8922),this['keystrokes']['set']('arrowup',_0x5e8922),this['keystrokes']['set']('arrowdown',_0x5e8922);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2b3953){this['revisionNameInputView']['fieldView']['element']['value']=_0x2b3953['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x53e080){const _0x12494c=new it(this['locale'],gt),_0x64c3d3=_0x12494c['fieldView'];_0x64c3d3['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1c6630=kt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x53e080&&(_0x1c6630+='\x20('+kt(this['locale'],'optional')+')'),(_0x12494c['label']=_0x1c6630,_0x64c3d3['on']('input',()=>{this['revisionNameInputValue']=_0x64c3d3['element']['value']['trim']();}),_0x12494c);}},Dt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At];}['_saveRevisionFormView'];init(){const _0x28dd22=this['editor'],_0x58c956=_0x28dd22['plugins']['get']('RevisionTracker');_0x28dd22['ui']['componentFactory']['add']('revisionHistory',_0x2b1ae8=>{const _0x50a31d=vt(_0x2b1ae8),_0x46b497=_0x50a31d['panelView']['children'],_0x2ec094=new st(_0x2b1ae8),_0x3095f1=new et(_0x2b1ae8),_0x1f34a0=this['_createSaveRevisionButton'](_0xfa6b1),_0x19bb17=new et(_0x2b1ae8),_0x4abb93=this['_createOpenRevisionButton'](_0xfa6b1);return _0x50a31d['bind']('isEnabled')['to'](_0x58c956,'isReady',_0x58c956,'isEnabled',_0x28dd22,'isReadOnly',(_0x170d25,_0x2fab05,_0x11a6e0)=>_0x170d25&&_0x2fab05&&!_0x11a6e0),_0x50a31d['buttonView']['set']({'icon':_0x1f6913,'label':kt(_0x2b1ae8,'Revision\x20history'),'tooltip':!0x0}),_0x1f34a0['set']({'withText':!0x0,'role':'menuitem'}),_0x4abb93['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x4abb93,'execute',()=>{_0x50a31d['isOpen']=!0x1,_0x28dd22['editing']['view']['focus']();},{'priority':'low'}),_0x3095f1['children']['add'](_0x1f34a0),_0x19bb17['children']['add'](_0x4abb93),_0x2ec094['role']='menu',_0x2ec094['items']['addMany']([_0x3095f1,_0x19bb17]),_0x46b497['add'](_0x2ec094),_0x50a31d;}),_0x28dd22['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x595fd2=this['editor'],_0x4f6144=_0x595fd2['locale'],_0x1b5841=_0x595fd2['plugins']['get']('RevisionTracker'),_0xea95c7=new at(_0x4f6144),_0xebc3e0=new rt(_0x4f6144);_0xea95c7['bind']('isEnabled')['to'](_0x1b5841,'isReady',_0x1b5841,'isEnabled',_0x595fd2,'isReadOnly',(_0x1333fb,_0x3aaa5d,_0x3688fc)=>_0x1333fb&&_0x3aaa5d&&!_0x3688fc),_0xea95c7['buttonView']['set']({'icon':_0x1f6913,'label':kt(_0x4f6144,'Revision\x20history')});const _0x1f7a1f=new ot(_0x4f6144,_0xea95c7),_0x260dbb=this['_createSaveRevisionButton'](nt);_0x260dbb['delegate']('execute')['to'](_0xea95c7),_0x1f7a1f['children']['add'](_0x260dbb),_0xebc3e0['items']['add'](_0x1f7a1f);const _0x15031e=new ot(_0x4f6144,_0xea95c7),_0x50ca60=this['_createOpenRevisionButton'](nt);return _0x50ca60['delegate']('execute')['to'](_0xea95c7),_0x15031e['children']['add'](_0x50ca60),_0xebc3e0['items']['add'](_0x15031e),_0xea95c7['panelView']['children']['add'](_0xebc3e0),_0xea95c7;}_createSaveRevisionButton(_0xbd3b75){const _0x16504e=this['editor'],_0x36c686=_0x16504e['plugins']['get']('RevisionTracker'),_0x5053e6=new _0xbd3b75(_0x16504e['locale']);return _0x5053e6['set']({'label':kt(_0x16504e['locale'],'Save\x20current\x20revision')}),_0x5053e6['bind']('isEnabled')['to'](_0x36c686,'isReady',_0x36c686,'isEnabled',_0x16504e,'isReadOnly',(_0x278d8e,_0x1d44cd,_0x321189)=>_0x278d8e&&_0x1d44cd&&!_0x321189),this['listenTo'](_0x5053e6,'execute',()=>{this['_showDialog']();}),_0x5053e6;}_createOpenRevisionButton(_0x569e47){const _0x17b560=this['editor'],_0x488efd=_0x17b560['plugins']['get']('RevisionTracker'),_0x16ef7a=new _0x569e47(_0x17b560['locale']);return _0x16ef7a['set']({'label':kt(_0x17b560['locale'],'Open\x20revision\x20history')}),_0x16ef7a['bind']('isEnabled')['to'](_0x488efd,'isReady',_0x17b560,'isReadOnly',(_0x4091ee,_0x547f27)=>_0x4091ee&&!_0x547f27),this['listenTo'](_0x16ef7a,'execute',()=>{_0x17b560['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x16ef7a;}['_showDialog'](){const _0x9ff3e0=this['editor'],_0x218e28=_0x9ff3e0['locale'],_0x4626d4=_0x9ff3e0['plugins']['get']('Dialog'),_0x54b65a=_0x9ff3e0['plugins']['get']('RevisionTracker');function _0x76851d(_0x2f43c0){_0x9ff3e0['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2f43c0['revisionName']?_0x2f43c0['revisionNameInputView']['errorText']=kt(_0x218e28,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x9ff3e0['plugins']['get'](At)['saveRevision']({'name':_0x2f43c0['revisionName']}),_0x4626d4['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x76851d(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4626d4['show']({'id':'revisionSave','title':kt(_0x218e28,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':kt(_0x9ff3e0['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4626d4['hide']()},{'label':kt(_0x9ff3e0['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4c8ab4){_0x4c8ab4['bind']('isEnabled')['to'](_0x54b65a,'isReady',_0x54b65a,'isEnabled',_0x9ff3e0,'isReadOnly',(_0xe68325,_0x276723,_0x324379)=>_0xe68325&&_0x276723&&!_0x324379);},'onExecute':()=>_0x76851d(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x204204=this['editor'],_0x6b4c82=_0x204204['locale'];this['_saveRevisionFormView']=new xt(_0x6b4c82,_0x204204['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Vt=class extends dt{['changeId'];['_model'];constructor(_0x3b78d1,_0x2942db,_0x310a23=!0x1){super(_0x3b78d1),this['_model']=_0x2942db,this['changeId']=_0x2942db['id'];const _0x322c11=this['bindTemplate'],_0x156d3a=_0x310a23&&!!_0x2942db['data']['aiSource'],_0x5ee6b0=_0x156d3a?this['_createAiIconView'](_0x3b78d1):null;this['set']('type',_0x2942db['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x322c11['to']('type',_0x54399f=>'ck-revision-change__'+_0x54399f),..._0x156d3a?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x156d3a?[this['_createAiDescriptionView'](_0x3b78d1,_0x2942db),_0x5ee6b0]:this['_getDescriptionChildren'](_0x3b78d1,_0x2942db)}]});}_getDescriptionChildren(_0x4947d7,_0x3e6953){let _0x865813='Removed\x20by';return _0x3e6953['data']['isSuggestion']?_0x865813='Suggested\x20by':'add'==_0x3e6953['type']&&(_0x865813='Added\x20by'),[this['_createLabel'](kt(_0x4947d7,_0x865813)),{'text':'\x20'+_0x3e6953['author']['name']}];}_createAiDescriptionView(_0x2507d7,_0x22d18b){let _0x51e069='AI_SOURCE_REMOVED_BY';_0x22d18b['data']['isSuggestion']?_0x51e069='AI_SOURCE_SUGGESTED_BY':'add'==_0x22d18b['type']&&(_0x51e069='AI_SOURCE_ADDED_BY');const _0x42f54b=new dt(_0x2507d7);return _0x42f54b['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0x42f54b['render'](),_0x42f54b['element']['innerHTML']=_0xe4f10(kt(_0x2507d7,_0x51e069,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+kt(_0x2507d7,'AI_SOURCE_AI')+'</span>'])),_0x42f54b['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x22d18b['author']['name'],_0x42f54b;}_createLabel(_0x2d6dec){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2d6dec}]};}_createAiIconView(_0x1d4422){const _0x9c8f18=new _0x4c1208();return _0x9c8f18['content']=_0x2d837c,_0x9c8f18['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':kt(_0x1d4422,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x9c8f18;}['focus'](){this['element']['focus']();}};const Tt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x57c0bb();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x5bbf4d){super(),this['id']=_0x5bbf4d['id']||_0x5289a7(),this['author']=_0x5bbf4d['author'],this['type']=_0x5bbf4d['type'],this['data']=_0x5bbf4d['data']||{},this['rootName']=_0x5bbf4d['rootName'],this['set']('createdAt',_0x5bbf4d['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1354ab,_0x330bd8){this['newRevisionId']=_0x1354ab,this['oldRevisionId']=_0x330bd8,this['changes']=new _0x520f62();}_setChanges(_0xd948e7){for(const _0x2e1c23 of _0xd948e7)this['changes']['add'](_0x2e1c23);}},Pt=class extends _0x3ccb16{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x312567,_0x300371,bt,Rt];}constructor(_0x4f7b14){super(_0x4f7b14),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x6ab1ff,_0x393d7a,_0x181072)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x45c23b=>{for(const _0x4d611f of this['editor']['editing']['view']['document']['roots'])_0x181072?_0x45c23b['removeClass']('ck-editor__editable__overlay',_0x4d611f):_0x45c23b['addClass']('ck-editor__editable__overlay',_0x4d611f);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x57b56f=>null!==_0x57b56f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x42ade3,_0x1e2a59,_0x4bb0c2)=>_0x42ade3&&_0x4bb0c2?_0x1e2a59['changes']['getIndex'](_0x4bb0c2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x44d005,_0x599bcf)=>_0x44d005?_0x599bcf['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x300371),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x416e0d=this['editor'],_0x2b8094=new $t(_0x416e0d,{'direction':'backward'}),_0x466b55=new $t(_0x416e0d,{'direction':'forward'});_0x416e0d['commands']['add']('showPreviousChange',_0x2b8094),_0x416e0d['commands']['add']('showNextChange',_0x466b55),_0x416e0d['commands']['add']('restoreRevision',new Ft(_0x416e0d)),this['on']('change:numberOfChanges',()=>{_0x2b8094['refresh'](),_0x466b55['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x416e0d['enableReadOnlyMode']('revision-viewer'),_0x416e0d['plugins']['has']('WidgetToolbarRepository')&&_0x416e0d['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x12b329){return await this['_utils']['loadRevisionData'](_0x12b329,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x12b329);}async getRevisionRootsAttributes(_0x39eed8){return await this['_utils']['loadRevisionData'](_0x39eed8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x39eed8);}async['compare'](_0x3545d5,_0x3632c8,_0x3eb166=!0x1){if(!this['isEnabled'])return;const _0x377f51=this['diff'],_0x5eae7d=this['repository'],_0x14340f='string'==typeof _0x3545d5?_0x5eae7d['getRevision'](_0x3545d5):_0x3545d5,_0x5a1b31='string'==typeof _0x3632c8?_0x5eae7d['getRevision'](_0x3632c8):_0x3632c8,_0x1c6f4f=_0x14340f['id'],_0x79667b=_0x5a1b31?_0x5a1b31['id']:null;if(!_0x3eb166&&this['diff']&&this['diff']['newRevisionId']===_0x1c6f4f&&this['diff']['oldRevisionId']===_0x79667b)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x1c6f4f,_0x79667b);const _0x3bdfbf=this['_getRevisionsRange'](_0x14340f,_0x5a1b31,!0x0)['map'](_0x2a51b7=>this['_utils']['loadRevisionData'](_0x2a51b7,this['adapter']));return _0x3bdfbf['push'](new Promise(_0x2b36af=>{setTimeout(_0x2b36af,0x14);})),Promise['all'](_0x3bdfbf)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2191a0=this['_getDiff'](_0x1c6f4f,_0x79667b);this['_cleanUpCommentMarkers'](_0x2191a0);for(const _0x2097c4 of _0x2191a0['changes'])this['_changeIdToChange']['set'](_0x2097c4['id'],_0x2097c4);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5cf956=>{for(const _0x135b9b of this['editor']['model']['document']['getRootNames']())_0x5cf956['detachRoot'](_0x135b9b);for(const _0x10d770 of Object['keys'](_0x2191a0['model'])){const _0xa1893a=_0x2191a0['model'][_0x10d770]['name'],_0x478667=_0x5cf956['addRoot'](_0x10d770,_0xa1893a);for(const _0x4f0107 of Object['keys'](_0x2191a0['attributes'][_0x10d770]))_0x5cf956['setAttribute'](_0x4f0107,_0x2191a0['attributes'][_0x10d770][_0x4f0107],_0x478667);_0x5cf956['insert'](_0x2191a0['model'][_0x10d770],_0x478667,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2191a0['changes'])),this['isReady']=!0x0;})['catch'](_0x1598f6=>{console['error'](_0x1598f6),this['_cleanUp'](),_0x377f51&&(this['diff']=_0x377f51),this['isReady']=!0x0;});}addRevisionData(_0x579f5e,_0xaca35a){const _0x350fb9=this['repository']['createRevision'](_0x579f5e);return _0x350fb9['on']('_update',(_0x33cd96,_0x39fae6,_0x3db29e)=>_0xaca35a(_0x39fae6,_0x3db29e,_0x350fb9)),this['repository']['addRevision'](_0x350fb9),_0x350fb9;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3f4478=>{for(const _0x426053 of this['editor']['model']['document']['getRootNames']())_0x3f4478['detachRoot'](_0x426053);});}_cleanUpCommentMarkers(_0x7c73f7){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x5ddc77=this['_getVisibleCommentThreadIds']();for(const _0xa78cf9 of Object['values'](_0x7c73f7['model']))for(const _0x1ce0a7 of Array['from'](_0xa78cf9['markers']['keys']()))_0x1ce0a7['startsWith']('revision-comment:')&&!_0x5ddc77['has'](Ut(_0x1ce0a7))&&_0xa78cf9['markers']['delete'](_0x1ce0a7);}_sortAndFilterDiffChanges(_0x9bc8d9){const _0x3ed016=[],_0xa2c906=new Map();for(const _0x279104 of this['editor']['model']['document']['getRootNames']()){const _0x271991=this['editor']['editing']['view']['getDomRoot'](_0x279104);if(!_0x271991)continue;const _0x17c5df=_0x271991['getClientRects']()['item'](0x0);_0x17c5df&&(_0x3ed016['push'](_0x279104),_0xa2c906['set'](_0x279104,_0x17c5df));}return _0x3ed016['sort']((_0x3eece9,_0x3bdfd0)=>{const _0x1e843d=_0xa2c906['get'](_0x3eece9),_0x13c10e=_0xa2c906['get'](_0x3bdfd0);return _0x1e843d['y']-_0x13c10e['y']||_0x1e843d['x']-_0x13c10e['x'];}),(_0x9bc8d9=_0x9bc8d9['filter'](_0xe9ffa1=>_0x3ed016['includes'](_0xe9ffa1['rootName'])))['sort']((_0x53c7f0,_0x2c0f2a)=>_0x3ed016['indexOf'](_0x53c7f0['rootName'])-_0x3ed016['indexOf'](_0x2c0f2a['rootName'])),_0x9bc8d9;}['_makeTape'](_0x5b387b,_0x197dc2={}){const _0x4224f5=Array['from'](_0x5b387b['markers'])['filter'](([_0x1831bb,_0x1c1bbc])=>_0x1831bb['startsWith']('revision:')&&!_0x1c1bbc['isCollapsed']),_0x53fb94=Array['from'](this['editor']['model']['createRangeIn'](_0x5b387b)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x4224f5['length'])for(const _0x540970 of _0x53fb94){const [_0xae4fe8,_0x2d22f9]=_0x4224f5[0x0],[,_0x941cba,_0x226aa8]=_0xae4fe8['split'](':'),_0x34aa19=_0x197dc2[_0xae4fe8]||null;if(_0x2d22f9['end']['isEqual'](_0x540970['nextPosition'])&&_0x4224f5['shift'](),(_0x540970['previousPosition']['isEqual'](_0x2d22f9['start'])||_0x540970['previousPosition']['isAfter'](_0x2d22f9['start']))&&('insertion'==_0x941cba?_0x540970['isAdded']={'userId':_0x226aa8,'aiSource':_0x34aa19}:'deletion'==_0x941cba&&(_0x540970['isRemoved']={'userId':_0x226aa8,'aiSource':_0x34aa19})),0x0==_0x4224f5['length'])break;}return _0x53fb94;}_refreshStartEndIndex(_0xd88482){const _0x30bbd6=new Map();for(let _0x3d5c81=0x0;_0x3d5c81<_0xd88482['length'];_0x3d5c81++)'text'===_0xd88482[_0x3d5c81]['type']?(_0xd88482[_0x3d5c81]['item']['startIndex']=_0x3d5c81,_0xd88482[_0x3d5c81]['item']['endIndex']=_0x3d5c81):('elementStart'===_0xd88482[_0x3d5c81]['type']?_0xd88482[_0x3d5c81]['item']['startIndex']=_0x3d5c81:'elementEnd'===_0xd88482[_0x3d5c81]['type']&&(_0xd88482[_0x3d5c81]['item']['endIndex']=_0x3d5c81),_0x30bbd6['set'](_0xd88482[_0x3d5c81]['id'],_0x3d5c81));for(const _0xa25a3e of _0x30bbd6['values']())'elementStart'===_0xd88482[_0xa25a3e]['type']?_0xd88482[_0xa25a3e]['item']['endIndex']=_0x30bbd6['get'](_0xd88482[_0xa25a3e]['pairId']):'elementEnd'===_0xd88482[_0xa25a3e]['type']&&(_0xd88482[_0xa25a3e]['item']['startIndex']=_0x30bbd6['get'](_0xd88482[_0xa25a3e]['pairId']));}['_processTape'](_0x2b9983){for(let _0x15bbd2=0x0;_0x15bbd2<_0x2b9983['length'];_0x15bbd2++){if('elementStart'===_0x2b9983[_0x15bbd2]['type'])_0x2b9983[_0x15bbd2]['item']['startIndex']=_0x15bbd2;else{if('elementEnd'===_0x2b9983[_0x15bbd2]['type']){_0x2b9983[_0x15bbd2]['item']['endIndex']=_0x15bbd2;const _0x7282a=_0x2b9983[_0x15bbd2]['item']['startIndex'];_0x2b9983[_0x7282a]['pairId']=_0x2b9983[_0x15bbd2]['id'],_0x2b9983[_0x15bbd2]['pairId']=_0x2b9983[_0x7282a]['id'];}else _0x2b9983[_0x15bbd2]['item']['startIndex']=_0x15bbd2,_0x2b9983[_0x15bbd2]['item']['endIndex']=_0x15bbd2,_0x2b9983[_0x15bbd2]['pairId']=null;}_0x2b9983[_0x15bbd2]['markersStart']||(_0x2b9983[_0x15bbd2]['markersStart']=[],_0x2b9983[_0x15bbd2]['markersEnd']=[]);}}_markInsertions(_0x4a92e7,_0x4f4162){const _0x214c30=_0x4a92e7['filter'](_0x40834f=>!_0x40834f['isAdded']);for(let _0x81d4b7=0x0;_0x81d4b7<_0x4f4162['length'];_0x81d4b7++)_0x4f4162[_0x81d4b7]['isAdded']&&(_0x214c30[_0x81d4b7]['isAdded']=_0x4f4162[_0x81d4b7]['isAdded']);}_getDiff(_0x1e8c3c,_0x28586d=null){const _0x200fa7=this['repository']['getRevision'](_0x1e8c3c),_0x21a9b2=_0x28586d?this['repository']['getRevision'](_0x28586d):null,_0xf84dbd=this['_getRevisionsRange'](_0x200fa7,_0x21a9b2),_0x4d59fa=_0xf84dbd[_0xf84dbd['length']-0x1],_0x15c9b4=new Map(),_0x1b4bc4={'model':{},'attributes':{},'changes':[]},_0x5304a4=new Set(),_0x1cadd5=new Map();for(let _0x2f967f=_0xf84dbd['length']-0x1;_0x2f967f>=0x0;_0x2f967f--){const _0x5181ec=_0xf84dbd[_0x2f967f];for(const _0x102f0f of Object['keys'](_0x5181ec['diffData']))if(_0x5181ec['diffData'][_0x102f0f]['attachChange']){const _0x29473f=_0x5181ec['diffData'][_0x102f0f]['attachChange'];_0x29473f['isAttached']?(_0x5304a4['add'](_0x102f0f),_0x1cadd5['has'](_0x102f0f)&&_0x1cadd5['get'](_0x102f0f)['userId']==_0x29473f['userId']?_0x1cadd5['delete'](_0x102f0f):_0x1cadd5['set'](_0x102f0f,_0x29473f)):_0x1cadd5['has'](_0x102f0f)?(_0x5304a4['delete'](_0x102f0f),_0x1cadd5['delete'](_0x102f0f)):(_0x5304a4['add'](_0x102f0f),_0x1cadd5['set'](_0x102f0f,_0x29473f));}else _0x5304a4['add'](_0x102f0f);}for(const _0x1edd16 of _0x5304a4){const _0x3a2cc1=_0x1cadd5['has'](_0x1edd16)&&!_0x1cadd5['get'](_0x1edd16)['isAttached'];let _0x21d8ef=_0x3a2cc1?_0xf84dbd['length']-0x1:0x0;const _0x5dcafd=_0x3a2cc1?-0x1:0x1;for(;_0xf84dbd[_0x21d8ef];){const _0x582105=_0xf84dbd[_0x21d8ef];if(_0x582105['diffData'][_0x1edd16]){const _0x51720b=_0x3a2cc1?_0x582105['diffData'][_0x1edd16]['attributesBefore']:_0x582105['diffData'][_0x1edd16]['attributesAfter'];_0x1b4bc4['attributes'][_0x1edd16]=_0x51720b?_0x144f08(_0x51720b):{};break;}_0x21d8ef+=_0x5dcafd;}}for(const _0x9a5fd9 of _0xf84dbd){_0x9a5fd9['model']={};for(const _0x566785 of _0x9a5fd9['authors'])_0x15c9b4['set'](_0x566785['id'],_0x566785);for(const _0x1c1475 of _0x5304a4){const _0x32958b=_0x9a5fd9['diffData'][_0x1c1475]?_0x9a5fd9['diffData'][_0x1c1475]['insertions']:'[]',_0x47fc86=_0x9a5fd9['diffData'][_0x1c1475]?_0x9a5fd9['diffData'][_0x1c1475]['deletions']:'[]',_0x4000a1=_0x9a5fd9['diffData'][_0x1c1475]?.['rootElementName']||'$root';_0x9a5fd9['model'][_0x1c1475]={'insertions':this['_utils']['_makeModelFromViewString'](_0x32958b,_0x4000a1),'deletions':this['_utils']['_makeModelFromViewString'](_0x47fc86,_0x4000a1)};}}for(const _0x56ccbd of _0x5304a4){let _0x3f7bd9=null,_0x155a94=0x0;const _0x3622fc=_0xf84dbd['map'](_0x1d54ac=>_0x1d54ac['diffData'][_0x56ccbd]?.['rootElementName'])['find'](_0x479b9b=>void 0x0!==_0x479b9b)||'$root',_0x5ed84b=new Map(Array['from'](_0x200fa7['model'][_0x56ccbd]['insertions']['markers'])['filter'](([_0x9c8357])=>!_0x9c8357['startsWith']('revision:')));let _0x5ea7a5=0x0;for(const _0x3426d7 of _0xf84dbd){const _0x501988=_0x3426d7['diffData'][_0x56ccbd]?.['aiSources']||{},_0x1e2d70=this['_makeTape'](_0x3426d7['model'][_0x56ccbd]['insertions'],_0x501988);_0x3426d7==_0x200fa7?(_0x3f7bd9=_0x1e2d70,_0x155a94=_0x3f7bd9['length'],_0x3f7bd9['forEach'](_0x236a70=>{_0x236a70['id']=_0x5ea7a5++;}),this['_processTape'](_0x3f7bd9)):this['_markInsertions'](_0x3f7bd9,_0x1e2d70);const _0x463080=_0x3f7bd9['filter'](_0x167a61=>!_0x167a61['isAdded'])['map'](_0x42d54e=>_0x42d54e['id']);let _0x1ac205=0x0;const _0x10ea08=this['_makeTape'](_0x3426d7['model'][_0x56ccbd]['deletions'],_0x501988);_0x10ea08['forEach'](_0x30aedb=>{_0x30aedb['isRemoved']?_0x30aedb['id']=_0x155a94++:_0x30aedb['id']=_0x463080[_0x1ac205++];}),this['_processTape'](_0x10ea08),this['_setDistance'](_0x3f7bd9,'isAdded'),this['_setDistance'](_0x10ea08,'isRemoved'),_0x3426d7==_0x200fa7&&this['_markMarkers'](_0x3f7bd9,_0x5ed84b),_0x3f7bd9=this['_joinTapes'](_0x3f7bd9,_0x10ea08),this['_refreshStartEndIndex'](_0x3f7bd9),this['_setDistance'](_0x3f7bd9,'isRemoved');}_0x3f7bd9=_0x3f7bd9['filter'](_0x1c3de0=>!(_0x1c3de0['isAdded']&&_0x1c3de0['isRemoved']));const _0x4868c6=new Map(_0x4d59fa['model'][_0x56ccbd]['deletions']['markers']),_0xb15a55=new Set(_0x5ed84b['keys']());for(const _0x37e0f3 of _0x4868c6['keys']())_0xb15a55['delete'](_0x37e0f3);const _0x4ae334=Object['assign']({},..._0xf84dbd['map'](_0x4ed3c1=>_0x4ed3c1['diffData'][_0x56ccbd]?.['aiSources']));this['_markSuggestions'](_0x3f7bd9,_0xb15a55,_0x4ae334),this['_fixObsoleteTags'](_0x3f7bd9),_0x3f7bd9=this['_removeMissingPairs'](_0x3f7bd9),_0x3f7bd9=this['_markMismatchedRemovedTags'](_0x3f7bd9),_0x3f7bd9=this['_removeUnsupportedChanges'](_0x3f7bd9);const {root:_0x2cd3d1,changes:_0x1ce5c5}=this['_makeModelFromTape'](_0x3f7bd9,_0x15c9b4,_0x56ccbd,_0x3622fc);_0x1b4bc4['model'][_0x56ccbd]=_0x2cd3d1;const _0x5b3f2d=_0x1cadd5['get'](_0x56ccbd);if(_0x5b3f2d){const _0x370741=_0x15c9b4['get'](_0x5b3f2d['userId']),_0x5c8b70=new Mt({'author':_0x370741,'type':_0x5b3f2d['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x56ccbd});_0x1ce5c5['unshift'](_0x5c8b70),_0x1b4bc4['attributes'][_0x56ccbd]['revisionHistoryAttachChange']=_0x5c8b70['id'];}_0x1b4bc4['changes']=_0x1b4bc4['changes']['concat'](_0x1ce5c5);}return _0x1b4bc4;}['_markMarkers'](_0x4652ef,_0x166f1e){for(let _0x39af44=0x0;_0x39af44<_0x4652ef['length'];_0x39af44++)for(const [_0x4b179d,_0x2ce0db]of _0x166f1e)!_0x2ce0db['isCollapsed']&&_0x2ce0db['start']['isEqual'](_0x4652ef[_0x39af44]['previousPosition'])&&_0x4652ef[_0x39af44]['markersStart']['push'](_0x4b179d),_0x2ce0db['end']['isEqual'](_0x4652ef[_0x39af44]['nextPosition'])&&_0x4652ef[_0x39af44]['markersEnd']['push'](_0x4b179d);}['_joinTapes'](_0x36d53c,_0x1197ea){let _0x44219e=[],_0x2f1097=0x0,_0x1eb919=0x0;for(;_0x2f1097<_0x36d53c['length']||_0x1eb919<_0x1197ea['length'];){const _0x1c241a=_0x36d53c[_0x2f1097]||{},_0x4f5803=_0x1197ea[_0x1eb919]||{};if(_0x1c241a['id']==_0x4f5803['id'])_0x2f1097++,_0x1eb919++,_0x44219e['push'](_0x1c241a);else{if(_0x4f5803['isRemoved']&&_0x1c241a['isAdded']){const {commonTape:_0x4292e9,iEnd:_0x3956f2,jEnd:_0x59bb49}=this['_threeWayMerge'](_0x36d53c,_0x2f1097,_0x1197ea,_0x1eb919);_0x44219e=_0x44219e['concat'](_0x4292e9),_0x2f1097=_0x3956f2,_0x1eb919=_0x59bb49;}else _0x4f5803['isRemoved']?(_0x1eb919++,_0x44219e['push'](_0x4f5803)):(_0x2f1097++,_0x44219e['push'](_0x1c241a));}}return _0x44219e;}_markSuggestions(_0x1e5a79,_0x400174,_0x3281aa){const _0x2237f6=[];for(let _0x19e952=0x0;_0x19e952<_0x1e5a79['length'];_0x19e952++){for(let _0x3bbbca=0x0;_0x3bbbca<_0x1e5a79[_0x19e952]['markersStart']['length'];_0x3bbbca++){const _0x3e674e=_0x1e5a79[_0x19e952]['markersStart'][_0x3bbbca];if(!_0x400174['has'](_0x3e674e))continue;const {group:_0x3795ae,type:_0x28e8d2,authorId:_0x4d17e2}=_0x58c95b(_0x3e674e);if('revision-suggestion'!=_0x3795ae||'insertion'!=_0x28e8d2&&'deletion'!=_0x28e8d2)continue;const _0x34da04=_0x3281aa['suggestion:'+_0x3e674e['slice'](0x14)]||null;_0x2237f6['unshift']({'type':_0x28e8d2,'name':_0x3e674e,'userId':_0x4d17e2,'aiSource':_0x34da04}),_0x1e5a79[_0x19e952]['markersStart']['splice'](_0x3bbbca,0x1),_0x3bbbca--;}_0x99fa64(_0x1e5a79[_0x19e952]);for(let _0x18349a=0x0;_0x18349a<_0x1e5a79[_0x19e952]['markersEnd']['length'];_0x18349a++){const _0x480691=_0x1e5a79[_0x19e952]['markersEnd'][_0x18349a];if(!_0x400174['has'](_0x480691))continue;const {group:_0x243841,type:_0x13facc}=_0x58c95b(_0x480691);if('revision-suggestion'!=_0x243841||'insertion'!=_0x13facc&&'deletion'!=_0x13facc)continue;_0x1e5a79[_0x19e952]['markersEnd']['splice'](_0x18349a,0x1),_0x18349a--;const _0x2336a9=_0x2237f6['findIndex'](_0x3940c7=>_0x3940c7['name']==_0x480691);_0x2336a9>-0x1&&_0x2237f6['splice'](_0x2336a9,0x1);}}function _0x58c95b(_0x5c669d){const _0x3036e5=_0x5c669d['split'](':');return{'group':_0x3036e5[0x0],'type':_0x3036e5[0x1],'subType':_0x3036e5['length']>=0x5?_0x3036e5[0x2]:null,'id':_0x3036e5['length']<0x5?_0x3036e5[0x2]:_0x3036e5[0x3],'authorId':_0x3036e5['length']<0x5?_0x3036e5[0x3]:_0x3036e5[0x4],'markerCount':0x6==_0x3036e5['length']?_0x3036e5[0x5]:null};}function _0x99fa64(_0x2c67d3){for(let _0x467f5b=0x0;_0x467f5b<_0x2237f6['length'];_0x467f5b++){if(_0x2c67d3['isAdded']&&'insertion'==_0x2237f6[_0x467f5b]['type']&&_0x2c67d3['isAdded']['userId']==_0x2237f6[_0x467f5b]['userId'])return _0x2c67d3['isAddSuggestion']={..._0x2237f6[_0x467f5b],'aiSource':_0x2c67d3['isAdded']['aiSource']||_0x2237f6[_0x467f5b]['aiSource']},void delete _0x2c67d3['isAdded'];if(!_0x2c67d3['isAdded']&&!_0x2c67d3['isRemoved']&&'deletion'==_0x2237f6[_0x467f5b]['type'])return void(_0x2c67d3['isRemoveSuggestion']=_0x2237f6[_0x467f5b]);}}}_setDistance(_0x4f5e5b,_0x5916bb){let _0xdffdb3=0x0,_0x12bdf0=!0x1;const _0x3e62fc=new Map();for(const _0x8a48a8 of _0x4f5e5b)_0x8a48a8[_0x5916bb]?_0x12bdf0&&(_0xdffdb3++,_0x12bdf0=!0x1):(_0xdffdb3++,_0x12bdf0=!0x0),_0x3e62fc['set'](_0x8a48a8['id'],_0xdffdb3);for(let _0x482adf=0x0;_0x482adf<_0x4f5e5b['length'];_0x482adf++){if('isRemoved'==_0x5916bb&&_0x4f5e5b[_0x482adf]['isAdded']||'isAdded'==_0x5916bb&&_0x4f5e5b[_0x482adf]['isRemoved'])continue;if('text'==_0x4f5e5b[_0x482adf]['type']){_0x4f5e5b[_0x482adf]['distance']=0x0;continue;}const _0x3f49a0=_0x3e62fc['get'](_0x4f5e5b[_0x482adf]['pairId']),_0x510b98=_0x3e62fc['get'](_0x4f5e5b[_0x482adf]['id']);_0x4f5e5b[_0x482adf]['distance']=_0x3f49a0-_0x510b98;}}_getRevisionsRange(_0x5ac608,_0xf4c226,_0x4e3afd=!0x1){const _0x38c875=[];let _0x25b2c7=this['repository']['getIndex'](_0x5ac608),_0x11dc95=this['repository']['getIndex'](_0xf4c226);for(-0x1==_0x11dc95&&(_0x11dc95=this['repository']['_revisions']['length'],_0x4e3afd=!0x1);_0x25b2c7<_0x11dc95;)_0x38c875['push'](this['repository']['getRevision'](_0x25b2c7)),_0x25b2c7++;return _0x4e3afd&&_0x38c875['push'](this['repository']['getRevision'](_0x25b2c7)),_0x38c875;}_threeWayMerge(_0x19dfcd,_0x516759,_0xa27330,_0x44504a){const _0x1f09d8=this['editor']['model']['schema'];let _0x3a610d=_0x516759;for(;_0x19dfcd[_0x3a610d]&&_0x19dfcd[_0x3a610d]['isAdded'];)_0x3a610d++;let _0x1f8682=_0x44504a;for(;_0xa27330[_0x1f8682]&&_0xa27330[_0x1f8682]['isRemoved'];)_0x1f8682++;_0x336cf3(_0x19dfcd,_0x516759,_0x3a610d),_0x336cf3(_0xa27330,_0x44504a,_0x1f8682);const _0x1c30f6=_0xa27330['slice'](_0x44504a,_0x1f8682)['concat'](_0x19dfcd['slice'](_0x516759,_0x3a610d));return _0x1c30f6['sort']((_0x202cb5,_0x5f27fc)=>_0x202cb5['side']!=_0x5f27fc['side']?_0x202cb5['side']-_0x5f27fc['side']:_0x202cb5['level']!=_0x5f27fc['level']?_0x202cb5['level']-_0x5f27fc['level']:_0x202cb5['distance']!=_0x5f27fc['distance']?_0x5f27fc['distance']-_0x202cb5['distance']:!!_0x202cb5['isAdded']!=!!_0x5f27fc['isAdded']?-0x1==_0x202cb5['side']||0x0==_0x202cb5['side']?_0x202cb5['isAdded']?-0x1:0x1:_0x202cb5['isAdded']?0x1:-0x1:_0x202cb5['index']-_0x5f27fc['index']),{'commonTape':_0x1c30f6,'iEnd':_0x3a610d,'jEnd':_0x1f8682};function _0x336cf3(_0x2b13a8,_0x272c45,_0x311b6e){let _0x4d0ef1=-0x1,_0x59d63b=Number['POSITIVE_INFINITY'],_0x5502cb=!0x0;for(let _0x2e0cbc=_0x272c45;_0x2e0cbc<_0x311b6e;_0x2e0cbc++)if(_0x1f09d8['isInline'](_0x2b13a8[_0x2e0cbc]['item'])||(_0x5502cb=!0x1),_0x2b13a8[_0x2e0cbc]['item']['startIndex']<_0x272c45&&(_0x4d0ef1=_0x2e0cbc),_0x2b13a8[_0x2e0cbc]['item']['endIndex']>=_0x311b6e){_0x59d63b=_0x2e0cbc;break;}_0x5502cb&&(_0x4d0ef1=_0x311b6e-0x1);for(let _0x57f09d=_0x272c45;_0x57f09d<_0x311b6e;_0x57f09d++)_0x2b13a8[_0x57f09d]['side']=_0x57f09d<=_0x4d0ef1?-0x1:_0x57f09d<_0x59d63b?0x0:0x1,_0x2b13a8[_0x57f09d]['index']=_0x57f09d;let _0xf11629=0x0;for(let _0x3823e0=_0x272c45;_0x3823e0<=_0x4d0ef1;_0x3823e0++)0x0==_0x2b13a8[_0x3823e0]['distance']?_0x2b13a8[_0x3823e0]['level']=_0xf11629:(_0xf11629++,_0x2b13a8[_0x3823e0]['level']=_0xf11629,_0xf11629++);for(let _0x33cd7a=_0x272c45;_0x33cd7a<_0x311b6e;_0x33cd7a++)0x0==_0x2b13a8[_0x33cd7a]['side']&&(_0x2b13a8[_0x33cd7a]['level']=_0xf11629);_0xf11629=0x0;for(let _0x142b37=_0x311b6e-0x1;_0x142b37>=_0x59d63b;_0x142b37--)0x0==_0x2b13a8[_0x142b37]['distance']?_0x2b13a8[_0x142b37]['level']=_0xf11629:(_0xf11629--,_0x2b13a8[_0x142b37]['level']=_0xf11629,_0xf11629--);}}_fixObsoleteTags(_0x3ed486){const _0x107cea=new Map(),_0xa35022=this['editor']['model']['schema'];for(let _0x50ec15=0x1;_0x50ec15<_0x3ed486['length'];_0x50ec15++){let _0x118ddb,_0x144373,_0x2d0f43;const _0x3168e3=_0x3ed486[_0x50ec15],_0x21fc21=_0x3ed486[_0x50ec15-0x1];if('text'==_0x3168e3['type'])continue;if(_0x3168e3['type']!=_0x21fc21['type'])continue;if(!_0xa35022['isBlock'](_0x21fc21['item'])||_0xa35022['isLimit'](_0x21fc21['item']))continue;if(!_0xa35022['isBlock'](_0x3168e3['item'])||_0xa35022['isLimit'](_0x3168e3['item']))continue;if((_0x3ed486[_0x50ec15]['isAdded']||_0x3ed486[_0x50ec15]['isAddSuggestion'])&&_0x3ed486[_0x50ec15-0x1]['isRemoved'])_0x118ddb=_0x3ed486[_0x50ec15],_0x144373=_0x3ed486[_0x50ec15-0x1],_0x2d0f43=_0x50ec15-0x1;else{if(!_0x3ed486[_0x50ec15]['isRemoved']||!_0x3ed486[_0x50ec15-0x1]['isAdded']&&!_0x3ed486[_0x50ec15-0x1]['isAddSuggestion'])continue;_0x118ddb=_0x3ed486[_0x50ec15-0x1],_0x144373=_0x3ed486[_0x50ec15],_0x2d0f43=_0x50ec15;}const _0x1fedec=_0x118ddb['level']==_0x144373['level'],_0x1189cd=Math['abs'](_0x118ddb['level'])<Math['abs'](_0x144373['level'])&&0x0==_0x144373['distance'];(_0x1fedec||_0x1189cd)&&(_0x107cea['set'](_0x144373['id'],_0x118ddb['id']),_0x3ed486['splice'](_0x2d0f43,0x1),_0x50ec15--,_0x118ddb['isAdded']=!0x1);}for(let _0x88044e=0x0;_0x88044e<_0x3ed486['length'];_0x88044e++)_0x107cea['has'](_0x3ed486[_0x88044e]['pairId'])&&(_0x3ed486[_0x88044e]['pairId']=_0x107cea['get'](_0x3ed486[_0x88044e]['pairId']));}['_removeMissingPairs'](_0xa03661){const _0x4940a0=new Set(_0xa03661['map'](_0x598c8d=>_0x598c8d['id']));for(let _0x5c95e3=0x0;_0x5c95e3<_0xa03661['length'];_0x5c95e3++)_0x4940a0['has'](_0xa03661[_0x5c95e3]['pairId'])||0x0==_0xa03661[_0x5c95e3]['distance']||(_0xa03661[_0x5c95e3]['isIncorrect']=!0x0);return _0xa03661['filter'](_0x2b7538=>!_0x2b7538['isIncorrect']);}_markMismatchedRemovedTags(_0x378936){const _0x5c09b3=new Set();for(let _0x39c81a=0x0;_0x39c81a<_0x378936['length'];_0x39c81a++){if(_0x5c09b3['has'](_0x378936[_0x39c81a]['id'])&&_0x378936[_0x39c81a]['isRemoved']&&(_0x378936[_0x39c81a]['isIncorrect']=!0x0),_0x378936[_0x39c81a]['isIncorrect'])continue;if(0x0==_0x378936[_0x39c81a]['distance'])continue;if('elementStart'!=_0x378936[_0x39c81a]['type'])continue;if(null==_0x378936[_0x39c81a]['pairId'])continue;let _0x3270ef=_0x39c81a+0x1,_0x22e99e=0x0;for(;_0x378936[_0x3270ef]['id']!=_0x378936[_0x39c81a]['pairId'];)'elementStart'==_0x378936[_0x3270ef]['type']?_0x22e99e++:'elementEnd'==_0x378936[_0x3270ef]['type']&&_0x22e99e--,_0x3270ef++;if(0x0!=_0x22e99e){if(_0x378936[_0x39c81a]['isRemoved'])_0x378936[_0x39c81a]['isIncorrect']=!0x0;else{for(;_0x3270ef!=_0x39c81a;)_0x378936[_0x3270ef]['isRemoved']&&0x0!=_0x378936[_0x3270ef]['distance']&&(_0x378936[_0x3270ef]['isIncorrect']=!0x0,_0x5c09b3['add'](_0x378936[_0x3270ef]['pairId'])),_0x3270ef--;}}}return _0x378936['filter'](_0x266ff6=>!_0x266ff6['isIncorrect']);}_removeUnsupportedChanges(_0x160d54){const _0x27a501=this['editor']['model']['schema'];for(let _0x513791=0x0;_0x513791<_0x160d54['length'];_0x513791++){if(!(_0x160d54[_0x513791]['isAdded']||_0x160d54[_0x513791]['isAddSuggestion']||_0x160d54[_0x513791]['isRemoved']||_0x160d54[_0x513791]['isRemoveSuggestion']))continue;if(0x0==_0x160d54[_0x513791]['distance'])continue;const _0x2f2db5=_0x160d54[_0x513791]['item'];_0x27a501['isBlock'](_0x2f2db5)||_0x27a501['isLimit'](_0x2f2db5)||(_0x160d54[_0x513791]['isAdded']&&delete _0x160d54[_0x513791]['isAdded'],_0x160d54[_0x513791]['isAddSuggestion']&&delete _0x160d54[_0x513791]['isAddSuggestion'],_0x160d54[_0x513791]['isRemoveSuggestion']&&delete _0x160d54[_0x513791]['isRemoveSuggestion'],_0x160d54[_0x513791]['isRemoved']&&(_0x160d54[_0x513791]['isIncorrect']=!0x0));}return _0x160d54['filter'](_0x5876ae=>!_0x5876ae['isIncorrect']);}['_makeModelFromTape'](_0x2e2918,_0x2ec99f,_0x5e2b20,_0x1056a2){const _0x156acc=new _0x4acbd6(),_0x264172=[],_0x21d6cc=new Map(),_0x56b1be=this['editor']['model'],_0x3edc86=_0x56b1be['schema'],_0x303829=[_0x156acc],_0x206601={},_0x4f5f80={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x156acc['name']=_0x1056a2;let _0x476aaa=null;const _0x33dd7f=[0x0];for(let _0x2f60b6=0x0;_0x2f60b6<_0x2e2918['length'];_0x2f60b6++)if('elementStart'===_0x2e2918[_0x2f60b6]['type']){_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f);const _0x1debae=new _0x28c730(_0x2e2918[_0x2f60b6]['item']['name'],_0x2e2918[_0x2f60b6]['item']['getAttributes']());_0x303829[0x0]['_appendChild'](_0x1debae),_0x33dd7f['push'](0x0),_0x303829['unshift'](_0x1debae),_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f);}else'elementEnd'===_0x2e2918[_0x2f60b6]['type']?(_0x303829['shift'](),_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f),_0x33dd7f['pop'](),_0x33dd7f[_0x33dd7f['length']-0x1]++,_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f)):(_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f),_0x476aaa?_0x476aaa['_data']+=_0x2e2918[_0x2f60b6]['item']['data']:_0x476aaa=new _0x42becd(_0x2e2918[_0x2f60b6]['item']['data'],_0x2e2918[_0x2f60b6]['item']['getAttributes']()),_0x2e2918[_0x2f60b6+0x1]&&'text'===_0x2e2918[_0x2f60b6+0x1]['type']&&_0x4668f7(_0x476aaa,_0x2e2918[_0x2f60b6+0x1]['item'])||(_0x303829[0x0]['_appendChild'](_0x476aaa),_0x476aaa=null),_0x33dd7f[_0x33dd7f['length']-0x1]+=_0x2e2918[_0x2f60b6]['item']['offsetSize'],_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f));for(let _0x380b44=0x0;_0x380b44<_0x2e2918['length'];_0x380b44++){const _0x58e7e8=_0x2e2918[_0x380b44]['previousPosition'],_0x22b0d5=_0x2e2918[_0x380b44]['nextPosition'];for(const _0x55dfd4 of _0x2e2918[_0x380b44]['markersStart'])_0x21d6cc['set'](_0x55dfd4,{'start':_0x58e7e8,'end':null});_0x4c2137('isRemoveSuggestion',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isAddSuggestion',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isRemoved',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isAdded',_0x380b44,_0x58e7e8,_0x22b0d5);for(const _0x423d9b of _0x2e2918[_0x380b44]['markersEnd']){const _0x146a85=_0x21d6cc['get'](_0x423d9b);_0x146a85?_0x146a85['end']=_0x22b0d5:_0x21d6cc['set'](_0x423d9b,{'start':_0x22b0d5,'end':_0x22b0d5});}}for(const [_0x2f9def,_0x243957]of _0x21d6cc){const _0x4957cc=this['editor']['model']['createRange'](_0x243957['start'],_0x243957['end']);_0x156acc['markers']['set'](_0x2f9def,_0x4957cc);}return _0x264172['sort']((_0x4e5b92,_0x466903)=>{const _0x41ac70=_0x156acc['markers']['get']('revision:'+_0x4e5b92['id']),_0x40fefa=_0x156acc['markers']['get']('revision:'+_0x466903['id']);return _0x41ac70['start']['isBefore'](_0x40fefa['start'])?-0x1:_0x41ac70['start']['isAfter'](_0x40fefa['start'])?0x1:_0x41ac70['end']['isBefore'](_0x40fefa['end'])?-0x1:_0x41ac70['end']['isAfter'](_0x40fefa['end'])?0x1:'add'===_0x4e5b92['type']?-0x1:0x1;}),{'root':_0x156acc,'changes':_0x264172};function _0x4c2137(_0x3b7ad7,_0x25666c,_0x55fe1f,_0x540746){const _0x12aab8=!!_0x2e2918[_0x25666c][_0x3b7ad7],_0x3efdb4=_0x12aab8?_0x2e2918[_0x25666c][_0x3b7ad7]['userId']:null,_0x5b9227=_0x12aab8&&_0x2e2918[_0x25666c][_0x3b7ad7]['aiSource']||null,_0x5114ba=_0x25666c===_0x2e2918['length']-0x1,_0x3e13b4=_0x4f5f80[_0x3b7ad7][0x0],_0x3f6b50=_0x3edc86['isObject'](_0x2e2918[_0x25666c]['item']);!_0x206601[_0x3b7ad7]&&_0x12aab8?_0x206601[_0x3b7ad7]={'start':_0x55fe1f,'tapeItem':_0x2e2918[_0x25666c],'userId':_0x3efdb4,'aiSource':_0x5b9227,'type':_0x3b7ad7}:_0x206601[_0x3b7ad7]&&!_0x12aab8?(_0x206601[_0x3b7ad7]['end']=_0x55fe1f,_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]=null):_0x206601[_0x3b7ad7]&&_0x12aab8&&(_0x206601[_0x3b7ad7]['userId']!==_0x3efdb4||_0x206601[_0x3b7ad7]['aiSource']!==_0x5b9227)&&(_0x206601[_0x3b7ad7]['end']=_0x55fe1f,_0x3e13b4&&_0x3e13b4['userId']===_0x206601[_0x3b7ad7]['userId']?_0x3e13b4['change']['aiSource']=_0x3e13b4['change']['aiSource']||_0x206601[_0x3b7ad7]['aiSource']:_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]={'start':_0x55fe1f,'tapeItem':_0x2e2918[_0x25666c],'userId':_0x3efdb4,'aiSource':_0x5b9227,'type':_0x3b7ad7}),_0x206601[_0x3b7ad7]&&_0x3f6b50&&('elementStart'!==_0x2e2918[_0x25666c]['type']||_0x3e13b4&&_0x3e13b4['userId']===_0x3efdb4||_0x4f5f80[_0x3b7ad7]['unshift']({'userId':_0x3efdb4,'object':_0x2e2918[_0x25666c]['item'],'change':_0x206601[_0x3b7ad7]}),'elementEnd'===_0x2e2918[_0x25666c]['type']&&_0x3e13b4&&_0x3e13b4['object']===_0x2e2918[_0x25666c]['item']&&(_0x4f5f80[_0x3b7ad7]['shift'](),_0x206601[_0x3b7ad7]=_0x3e13b4['change'])),_0x206601[_0x3b7ad7]&&_0x5114ba&&(_0x206601[_0x3b7ad7]['end']=_0x540746,_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]=null);}function _0x3da67f({start:_0x475d09,end:_0x1ad0b5,tapeItem:_0x57916f,userId:_0x5544bf,aiSource:_0x11766d,type:_0x2afeaf}){const _0x356edc=_0x57916f['item'],_0x365a31=_0x56b1be['schema']['isBlock'](_0x356edc)&&!_0x56b1be['schema']['isLimit'](_0x356edc),_0x3cdf3e=_0x475d09['nodeAfter']==_0x1ad0b5['parent']&&_0x1ad0b5['isAtStart'];if(_0x365a31&&_0x3cdf3e)return;const _0xe20150=_0x56b1be['createRange'](_0x475d09,_0x1ad0b5),_0x4aa45e=_0x2ec99f['get'](_0x5544bf),_0x31253c=new Mt({'author':_0x4aa45e,'type':'isAdded'==_0x2afeaf||'isAddSuggestion'==_0x2afeaf?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2afeaf||'isRemoveSuggestion'==_0x2afeaf,'aiSource':_0x11766d||null},'createdAt':new Date(),'rootName':_0x5e2b20});_0x264172['push'](_0x31253c),_0x156acc['markers']['set']('revision:'+_0x31253c['id'],_0xe20150);}function _0x4668f7(_0x3823a9,_0x5642c4){const _0x46a4f4=_0x3823a9['getAttributes'](),_0x32aa9a=_0x5642c4['getAttributes']();for(const _0x12ef2d of _0x46a4f4){if(_0x12ef2d[0x1]!==_0x5642c4['getAttribute'](_0x12ef2d[0x0]))return!0x1;_0x32aa9a['next']();}return _0x32aa9a['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1d8ce6=>{const _0x5ab55f=_0x1d8ce6['markerName']['split'](':')[0x1],_0xf2c957=this['_getChangeFromId'](_0x5ab55f);if(!_0xf2c957)return null;const _0x212cb2='add'==_0xf2c957['type']?'insertion':'deletion',_0x4780a3=['ck-suggestion-marker','ck-suggestion-marker-'+_0x212cb2];return _0xf2c957['data']['isSuggestion']&&_0x4780a3['push']('ck-suggestion-marker-'+_0x212cb2+'-new'),this['activeChange']==_0xf2c957&&_0x4780a3['push']('ck-suggestion-marker--active'),{'classes':_0x4780a3,'attributes':{'data-change-id':_0x5ab55f}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x24718d=>{_0x24718d['on']('element:pre',(_0x311d35,_0x430d93,_0x19f76b)=>{const _0x246f90=_0x430d93['viewItem']['getChild'](0x0);if(!_0x246f90||!_0x246f90['is']('element','code'))return;if(!_0x19f76b['consumable']['consume'](_0x246f90,{'attributes':['vid_start','vid_end']}))return;const _0xc5bee9=_0x430d93['modelRange']['start']['nodeAfter'];_0x19f76b['writer']['setAttribute']('vid_start',_0x246f90['getAttribute']('vid_start'),_0xc5bee9),_0x19f76b['writer']['setAttribute']('vid_end',_0x246f90['getAttribute']('vid_end'),_0xc5bee9);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x36a1d4=>{_0x36a1d4['on']('element',(_0x508a47,_0x4d22c9,_0x41d3e3)=>{if(!_0x41d3e3['consumable']['consume'](_0x4d22c9['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4d22c9['modelRange']['isCollapsed'])return;const _0x23a3a4=_0x4d22c9['modelRange']['start']['nodeAfter'];_0x23a3a4['hasAttribute']('vid_start')||_0x23a3a4['hasAttribute']('vid')||(_0x41d3e3['writer']['setAttribute']('vid_start',_0x4d22c9['viewItem']['getAttribute']('vid_start'),_0x23a3a4),_0x41d3e3['writer']['setAttribute']('vid_end',_0x4d22c9['viewItem']['getAttribute']('vid_end'),_0x23a3a4));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x5e062d=>_0x5e062d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1e91c2,[,_0xc96aed])=>{['vid_start','vid_end','vid']['includes'](_0xc96aed)&&(_0x1e91c2['return']=!0x0,_0x1e91c2['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x644204=>{_0x644204['on']('attribute:vid',(_0x434cb3,_0x479384,_0x3b0861)=>{if('\x20'!=_0x479384['item']['data']||_0x479384['item']['parent']['maxOffset']>0x1)return;if(!_0x3b0861['consumable']['consume'](_0x479384['item'],_0x434cb3['name']))return;const _0x44fd08=_0x3b0861['writer'],_0x1c1a58=_0x3b0861['mapper']['toViewRange'](_0x479384['range']);_0x44fd08['wrap'](_0x1c1a58,_0x44fd08['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x387f54){const _0x17ea6b=_0x387f54['plugins']['get']('RevisionViewer');return(_0x1602bf,_0x6483a4,_0x517d94)=>{const _0x4e3748=_0x6483a4['markerName']['split'](':')[0x1],_0x272b68=_0x17ea6b['_getChangeFromId'](_0x4e3748);if(!_0x272b68)return null;const _0x2f2933='add'==_0x272b68['type']?'split':'merge';if(!_0x517d94['consumable']['test'](_0x6483a4['markerRange'],_0x1602bf['name']))return;const _0x3e87aa=_0x6483a4['markerRange']['getWalker'](),_0x1c9d6f=_0x6483a4['markerRange']['start'],_0x12fd7c=_0x387f54['model']['schema'];let _0x388f48=null,_0x37082c=null,_0x1c6a23=!0x1,_0x68462d=!0x1;for(const _0x4b5a64 of _0x3e87aa){const _0x4891b7=_0x4b5a64['item'];_0x1c6a23=_0x1c6a23||_0x12fd7c['isContent'](_0x4891b7);const _0x18d41c=_0x517d94['mapper']['toViewElement'](_0x4891b7);if(_0x18d41c&&_0x18d41c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4b5a64['type']&&(_0x12fd7c['isBlock'](_0x4891b7)&&!_0x12fd7c['isLimit'](_0x4891b7)&&(_0x4891b7['nextSibling']||_0x1c9d6f['isAtEnd']?_0x388f48&&_0x388f48['parent']==_0x4891b7||(_0x388f48=_0x4891b7,_0x73243f(_0x4b5a64['previousPosition']),_0x68462d=!0x0):_0x37082c=_0x37082c||_0x4b5a64['previousPosition']));}function _0x73243f(_0x212508){const _0x5befad=_0x517d94['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2f2933}),_0x53fab5=_0x517d94['mapper']['toViewPosition'](_0x212508);_0x272b68['data']['isSuggestion']&&_0x517d94['writer']['addClass']('ck-suggestion-marker-'+_0x2f2933+'-new',_0x5befad),_0x17ea6b['activeChange']==_0x272b68&&_0x517d94['writer']['addClass']('ck-suggestion-marker--active',_0x5befad),_0x517d94['writer']['insert'](_0x53fab5,_0x5befad),_0x517d94['mapper']['bindElementToMarker'](_0x5befad,_0x6483a4['markerName']);}_0x1c6a23||_0x68462d||!_0x37082c||_0x73243f(_0x37082c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2aca78,_0x166930,_0x2bfe6d)=>{const _0x56db6e=_0x2bfe6d['mapper']['markerNameToElements'](_0x166930['markerName']);if(_0x56db6e){for(const _0x44579e of _0x56db6e)(_0x44579e['hasClass']('ck-suggestion-marker-split')||_0x44579e['hasClass']('ck-suggestion-marker-merge'))&&(_0x2bfe6d['mapper']['unbindElementFromMarkerName'](_0x44579e,_0x166930['markerName']),_0x2bfe6d['writer']['remove'](_0x44579e));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3852da,_0x4b4249,_0x130569)=>{const _0x456418=_0x4b4249['markerName']['split'](':')[0x1],_0x585d5a=this['_getChangeFromId'](_0x456418);if(!_0x585d5a)return null;const _0x2769ec='add'==_0x585d5a['type']?'split':'merge';if(_0x130569['consumable']['test'](_0x4b4249['markerRange'],_0x3852da['name']))for(const _0x2a49a9 of _0x4b4249['markerRange']['getItems']()){if(!_0x2a49a9['is']('element','softBreak'))continue;const _0x3de75c=_0x130569['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2769ec}),_0x5c2314=_0x130569['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x2a49a9));_0x585d5a['data']['isSuggestion']&&_0x130569['writer']['addClass']('ck-suggestion-marker-'+_0x2769ec+'-new',_0x3de75c),this['activeChange']==_0x585d5a&&_0x130569['writer']['addClass']('ck-suggestion-marker--active',_0x3de75c),_0x130569['writer']['insert'](_0x5c2314,_0x3de75c),_0x130569['mapper']['bindElementToMarker'](_0x3de75c,_0x4b4249['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x8714cb=>{for(const _0x113a91 of this['editor']['model']['document']['getRootNames']()){const _0x90992a=this['editor']['model']['document']['getRoot'](_0x113a91),_0x41932c=this['editor']['editing']['view']['document']['getRoot'](_0x113a91);if(_0x41932c){const _0x1b4f86=_0x90992a['getAttribute']('revisionHistoryAttachChange');if(_0x8714cb['removeAttribute']('data-change-id',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root-add',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root-remove',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root--active',_0x41932c),_0x1b4f86){const _0x29fbd6=this['_getChangeFromId'](_0x1b4f86);if(!_0x29fbd6)return null;_0x8714cb['setAttribute']('data-change-id',_0x1b4f86,_0x41932c),_0x8714cb['addClass']('ck-revision-history-root-'+_0x29fbd6['type'],_0x41932c),this['activeChange']==_0x29fbd6&&_0x8714cb['addClass']('ck-revision-history-root--active',_0x41932c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x441ef9=>'revision-comment:'+_0x441ef9,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x4801ec=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x4801ec['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x225bc4=>'revision-suggestion:'+_0x225bc4,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3f9819=>({'name':'suggestion:'+_0x3f9819,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x117962=>{const _0x88e71e=_0x117962['markerName']['split'](':')[0x1];return'insertion'!=_0x88e71e&&'deletion'!=_0x88e71e?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x88e71e]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x46e891,_0xb67791,_0xc03b5b)=>{const _0x5da6c5=_0xc03b5b['mapper']['markerNameToElements'](_0xb67791['markerName']);if(_0x5da6c5){for(const _0x9b7941 of _0x5da6c5)_0x9b7941['is']('uiElement')&&(_0xc03b5b['mapper']['unbindElementFromMarkerName'](_0x9b7941,_0xb67791['markerName']),_0xc03b5b['writer']['remove'](_0x9b7941));}},{'priority':'high'});}_getChangeFromId(_0x1c205d){return this['_changeIdToChange']['get'](_0x1c205d);}_getViewForChange(_0x34baea){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x34baea,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x39b3d3,_0x2b5c66,_0x30483e,_0x199054)=>{_0x199054&&this['_balloon']['remove'](_0x199054),_0x30483e&&(this['_balloon']['add']({'view':_0x30483e,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x39554b=this['editor']['editing'],_0x1bac95=this['_getChangeFromId'](_0x30483e['changeId']);let _0x2d536a;if(_0x1bac95['data']['isOnRoot']){const _0x42e69b=_0x39554b['view']['getDomRoot'](_0x1bac95['rootName']);_0x2d536a=Array['from'](_0x42e69b['getClientRects']());}else{const _0x765865=this['editor']['model']['markers']['get']('revision:'+_0x30483e['changeId']);_0x2d536a=Array['from'](_0x39554b['mapper']['markerNameToElements'](_0x765865['name']))['map'](_0x1f41bc=>_0x39554b['view']['domConverter']['mapViewToDom'](_0x1f41bc))['map'](_0x301391=>Array['from'](_0x301391['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x2d536a['find'](_0x2a53fb=>_0x2a53fb['top']-0x3<=this['_activeViewTarget']['y']&&_0x2a53fb['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2a53fb['left']-0x3<=this['_activeViewTarget']['x']&&_0x2a53fb['right']+0x3>=this['_activeViewTarget']['x'])||_0x2d536a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x12afc3,_0x29fe70,_0x521f29,_0x24b674)=>{this['activeView']=_0x521f29?this['_getViewForChange'](_0x521f29):null,this['editor']['model']['change'](()=>{const _0x2b7f29=this['editor']['editing'];_0x24b674&&(_0x24b674['data']['isOnRoot']?_0x2b7f29['view']['change'](_0x5a4dd5=>{_0x5a4dd5['removeClass']('ck-revision-history-root--active',_0x2b7f29['view']['document']['getRoot'](_0x24b674['rootName']));}):_0x2b7f29['reconvertMarker']('revision:'+_0x24b674['id'])),_0x521f29&&(_0x521f29['data']['isOnRoot']?_0x2b7f29['view']['change'](_0x7b5600=>{_0x7b5600['addClass']('ck-revision-history-root--active',_0x2b7f29['view']['document']['getRoot'](_0x521f29['rootName']));}):_0x2b7f29['reconvertMarker']('revision:'+_0x521f29['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x16fa6b,_0x162991)=>{if(this['activeChange'])return;const _0xee9608=this['_findChangeIdFromDomTarget'](_0x162991['target']),_0x25380e=this['_changeIdToChange']['get'](_0xee9608);_0x25380e?(this['_activeViewTarget']={'x':_0x162991['domEvent']['x'],'y':_0x162991['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x25380e)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4a0aaf,_0x5620a3)=>{const _0x412a8a=this['_findChangeIdFromDomTarget'](_0x5620a3['target']),_0x582805=this['_changeIdToChange']['get'](_0x412a8a);_0x582805?(this['_activeViewTarget']={'x':_0x5620a3['domEvent']['x'],'y':_0x5620a3['domEvent']['y']},_0x582805===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x582805):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x5c514f){do{const _0x2d8898=_0x5c514f['getAttribute']('data-change-id');if(_0x2d8898)return _0x2d8898;_0x5c514f=_0x5c514f['parent'];}while(_0x5c514f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x390869=>{for(const _0x3af693 of this['editor']['model']['markers'])_0x390869['removeMarker'](_0x3af693);});}};function Ut(_0x32d48f){return _0x32d48f['split'](':')[0x1];}function Lt(_0x1a5a54,_0x2d5eac){return(_0x403176,_0x31f940,_0x2d6b4c)=>{if(!_0x2d6b4c['consumable']['test'](_0x31f940['markerRange'],_0x403176['name']))return;const _0xbbc7e1=_0x31f940['markerRange']['getWalker'](),_0x455a35=_0x31f940['markerRange']['start'],_0x1e3048=_0x1a5a54['model']['schema'];let _0xa4ac18=null,_0x3abd9e=null,_0x5ea654=!0x1,_0x5ab850=!0x1;for(const _0x4a90bb of _0xbbc7e1){const _0x1e8bc8=_0x4a90bb['item'];_0x5ea654=_0x5ea654||_0x1e3048['isContent'](_0x1e8bc8);const _0x4988fa=_0x2d6b4c['mapper']['toViewElement'](_0x1e8bc8);if(_0x4988fa&&_0x4988fa['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4a90bb['type']&&(_0x1e3048['isBlock'](_0x1e8bc8)&&!_0x1e3048['isLimit'](_0x1e8bc8)&&(_0x1e8bc8['nextSibling']||_0x455a35['isAtEnd']?_0xa4ac18&&_0xa4ac18['parent']==_0x1e8bc8||(_0xa4ac18=_0x1e8bc8,_0x4ea578(_0x4a90bb['previousPosition']),_0x5ab850=!0x0):_0x3abd9e=_0x3abd9e||_0x4a90bb['previousPosition']));}function _0x4ea578(_0x42e75e){const _0x155599=_0x2d6b4c['mapper']['toViewPosition'](_0x42e75e),_0x3af25a=_0x2d6b4c['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2d5eac});_0x2d6b4c['writer']['insert'](_0x155599,_0x3af25a),_0x2d6b4c['mapper']['bindElementToMarker'](_0x3af25a,_0x31f940['markerName']);}_0x5ea654||_0x5ab850||!_0x3abd9e||_0x4ea578(_0x3abd9e);};}var Ft=class extends _0x1ddd1c{constructor(_0x55eafb){super(_0x55eafb);const _0x94bfb3=_0x55eafb['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x94bfb3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x94bfb3,'change:isEnabled',()=>this['refresh']());}execute(){const _0x3dfd4c=this['editor'],_0x2debda=_0x3dfd4c['plugins']['get'](Pt),_0x22e5aa=_0x2debda['isReady']?_0x2debda['diff']['newRevisionId']:null;_0x3dfd4c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x22e5aa);}['refresh'](){const {isReady:_0x590ab4,isEnabled:_0x3160a0,repository:_0x1fbf19,diff:_0x560e5a}=this['editor']['plugins']['get'](Pt),_0x145a16=_0x560e5a&&_0x1fbf19['getLaterVisibleRevision'](_0x560e5a['newRevisionId']);this['isEnabled']=_0x590ab4&&_0x3160a0&&Boolean(_0x145a16);}},$t=class extends _0x1ddd1c{_step;constructor(_0x1874c5,{direction:_0x517533}){super(_0x1874c5);const _0x5a714f=_0x1874c5['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x517533?0x1:-0x1,this['listenTo'](_0x5a714f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5a714f,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5a714f,'change:activeChange',()=>this['refresh']());}execute(){const _0x26835a=this['editor'],_0x362ac2=_0x26835a['plugins']['get'](Pt),{isNavigationMode:_0x2f921f,currentChangeNumber:_0x36797f}=_0x362ac2;let _0x4ab517;if(_0x362ac2['activeChange']=_0x2f921f?_0x362ac2['diff']['changes']['get'](_0x36797f+this['_step']):_0x362ac2['diff']['changes']['first'],_0x362ac2['activeChange']['data']['isOnRoot'])_0x4ab517=_0x26835a['editing']['view']['getDomRoot'](_0x362ac2['activeChange']['rootName']);else{const _0x48a896=_0x26835a['model']['markers']['get']('revision:'+_0x362ac2['activeChange']['id']);_0x4ab517=_0x3ec3b7(_0x26835a['editing'],_0x48a896);}_0x98e9d6({'target':_0x4ab517,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x37987b,currentChangeNumber:_0x2d48c0,numberOfChanges:_0x5f26a2,isReady:_0x434610,isEnabled:_0x1259ed}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x1259ed&&_0x434610&&_0x5f26a2)&&(!_0x37987b||(0x1===this['_step']?_0x2d48c0<_0x5f26a2-0x1:_0x2d48c0>0x0));}},Bt=class extends dt{constructor(_0x2027d9){super(_0x2027d9);const _0x310704=this['bindTemplate'],_0x321334=new _0xfa6b1(_0x2027d9),_0x54a452=new _0xfa6b1(_0x2027d9);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',(_0x52ecfa,_0xaeb4c2)=>_0x52ecfa&&_0xaeb4c2>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x585848,_0x43798b,_0x260b64,_0x31d975)=>{if(!_0x585848)return kt(_0x2027d9,'Loading...');if(!_0x260b64)return kt(_0x2027d9,'No\x20changes');const _0x1ccf4c=kt(_0x2027d9,'NUMBER_OF_CHANGES',_0x260b64);return _0x31d975?kt(_0x2027d9,'X_OF_Y_CHANGES',[_0x43798b+0x1,_0x260b64]):_0x1ccf4c;}),_0x321334['set']({'label':kt(_0x2027d9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x343c90}),_0x54a452['set']({'label':kt(_0x2027d9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4a149a}),_0x321334['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x54a452['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x321334['on']('execute',()=>this['fire']('execute','backward')),_0x54a452['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',_0x310704['if']('_isStatusLabelVisible','ck-hidden',_0x36cc7a=>!_0x36cc7a)]},'children':[{'text':_0x310704['to']('isNavigationMode',_0x20196a=>_0x20196a?kt(_0x2027d9,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x2027d9,'Total')+':\x20')}]},{'text':_0x310704['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x321334,_0x54a452]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1845c8=this['editor']['editing']['view'];_0x1845c8['change'](_0x1afb52=>{for(const _0x48037a of _0x1845c8['document']['roots'])_0x1afb52['addClass'](jt,_0x48037a);});}['hide'](){const _0x2c8e25=this['editor']['editing']['view'];_0x2c8e25['change'](_0x1ef3b7=>{for(const _0xe3c171 of _0x2c8e25['document']['roots'])_0x1ef3b7['removeClass'](jt,_0xe3c171);});}},Kt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x50d73d=this['editor'],_0x112858=_0x50d73d['plugins']['get'](Pt),_0x3fba4f=_0x50d73d['plugins']['get'](Gt);_0x50d73d['ui']['componentFactory']['add']('exitToEditing',_0x535b67=>{const _0x3335a2=new _0xfa6b1(_0x535b67);return _0x3335a2['set']({'label':kt(_0x535b67,'Back\x20to\x20editing'),'icon':_0x2a5c35,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3335a2,'execute',()=>{_0x50d73d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3335a2;}),_0x50d73d['ui']['componentFactory']['add']('restoreRevision',_0x14b59f=>{const _0x239c11=new _0xfa6b1(_0x14b59f);return _0x239c11['set']({'label':kt(_0x14b59f,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x239c11['bind']('isEnabled')['to'](_0x50d73d['commands']['get']('restoreRevision')),this['listenTo'](_0x239c11,'execute',()=>_0x50d73d['execute']('restoreRevision')),_0x239c11;}),_0x50d73d['ui']['componentFactory']['add']('changesNavigation',_0x42bcf6=>{const _0x4b75e7=new Bt(_0x42bcf6),_0x47c20d=_0x50d73d['commands']['get']('showPreviousChange'),_0x14288f=_0x50d73d['commands']['get']('showNextChange');return _0x4b75e7['bind']('isBackwardNavigationEnabled')['to'](_0x47c20d,'isEnabled'),_0x4b75e7['bind']('isForwardNavigationEnabled')['to'](_0x14288f,'isEnabled'),_0x4b75e7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x112858),this['listenTo'](_0x4b75e7,'execute',(_0x2d4632,_0x15524)=>{_0x50d73d['execute']('forward'===_0x15524?'showNextChange':'showPreviousChange');}),_0x4b75e7;}),_0x3fba4f['show'](),_0x112858['on']('change:isReady',(_0x2ca756,_0x181877,_0x4b0d7f)=>{_0x4b0d7f?_0x3fba4f['hide']():_0x3fba4f['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x60b761,_0x26ec76){super(_0x60b761,_0x26ec76);const _0x240262=this['bindTemplate'];this['set']({'label':kt(_0x60b761,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x60b761,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x240262['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x354550(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x115e66=this['fieldView']['element'];this['_tooltipString']=_0x115e66['scrollWidth']>_0x115e66['clientWidth']&&_0x115e66['value']||'';}},Yt=class extends dt{constructor(_0xb584c4,_0x516e6b,_0x45ab60){super(_0xb584c4);const _0x52a001=new _0x4c1208();_0x52a001['set']({'content':_0xac3ad6,'viewBox':'0\x200\x2011\x2010'});const _0x1c2569=['ck','ck-revision-history-sidebar__revision-author'];_0x45ab60&&_0x1c2569['push']('ck-revision-history-sidebar__revision-author_creator');const _0x188339=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0xb584c4,_0x45ab60?'Revision\x20creator':'Revision\x20author')},'children':[_0x52a001,_0x516e6b['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1c2569},'children':_0x188339});}};function Jt(_0x190944,_0x46c3ea){const _0x344fe0=_0x190944['bindTemplate'],_0xde079a=_0x190944['locale'],_0x46e7fc=vt(_0xde079a);_0x46e7fc['panelPosition']='sw';const _0x31f369=function(_0x4a60fd,_0xd268f2){const _0x15e9d7=function(_0x2d6a97,_0x1635dd){const _0x466d8c=_0x2d6a97['locale'],_0x1b58d6={'Compare\x20against\x20selected':kt(_0x466d8c,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x466d8c,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x466d8c,'Restore\x20this\x20revision')};return _0x1635dd['map'](_0x3f9c17=>{const _0x34425e=_0x1b58d6[_0x3f9c17['name']];return _0x34425e&&_0x34425e!==_0x3f9c17['name']&&(_0x3f9c17['name']=_0x34425e),_0x3f9c17;});}(_0x4a60fd,_0xd268f2),_0x13f3d8=new _0x520f62();for(const _0x1b91d2 of _0x15e9d7){const _0x2b5e85={'type':'button','model':new ut({'label':_0x1b91d2['name'],'class':_0x1b91d2['class'],'withText':!0x0,'role':'menuitem','_action':_0x1b91d2['action']})};_0x2b5e85['model']['bind']('isEnabled')['to'](_0x4a60fd,'isActionsDropdownOpen',_0x5f4ad9=>'function'!=typeof _0x1b91d2['isEnabled']||(!_0x5f4ad9||_0x1b91d2['isEnabled'](_0x4a60fd))),_0x13f3d8['add'](_0x2b5e85);}return _0x13f3d8;}(_0x190944,_0x46c3ea);return _0x190944['bind']('isActionsDropdownOpen')['to'](_0x46e7fc,'isOpen'),_0x46e7fc['buttonView']['set']({'label':kt(_0xde079a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x467e7d}),_0x46e7fc['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x344fe0['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x344fe0['to'](_0x354c11=>_0x354c11['stopPropagation']())}}),_0x46e7fc['on']('execute',_0x2039f5=>{_0x190944['isReady']&&'function'==typeof _0x2039f5['source']['_action']&&_0x2039f5['source']['_action'](_0x190944);}),ft(_0x46e7fc,_0x31f369,{'role':'menu'}),_0x46e7fc['listenTo'](_0x190944,'change:isActionsDropdownOpen',(_0x3a4031,_0x2bd758,_0x39af69)=>{if(_0x39af69)for(const _0xf53b87 of _0x46e7fc['listView']['items']){const _0xec71e5=_0xf53b87['children']['first'],_0x5ef007=_0x46c3ea['find'](_0x58a5e1=>_0x58a5e1['action']===_0xec71e5['_action'])['isVisible'];_0xf53b87['isVisible']=void 0x0===_0x5ef007||_0x5ef007(_0x190944);}}),_0x46e7fc;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x43ed20(dt);var Xt=class extends Wt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0xebe67c,_0x4c0744,_0x57497b,_0x3f5ff8,_0x534a0d=!0x1){super(_0xebe67c);const _0x3b8592=this['bindTemplate'],_0x4d1d00=function(_0x103afc,_0x1098c0){const _0x10b460=Array['from'](_0x1098c0['authors'])['filter'](_0x4f2bc3=>_0x4f2bc3!=_0x1098c0['creator']);return _0x1098c0['creator']&&_0x10b460['unshift'](_0x1098c0['creator']),_0x10b460['map'](_0x53a4e3=>new Yt(_0x103afc,_0x53a4e3,_0x53a4e3==_0x1098c0['creator']));}(_0xebe67c,_0x4c0744);this['id']=_0x4c0744['id'],this['_revision']=_0x4c0744,this['_requireRevisionName']=_0x3f5ff8,this['bind']('_isAiGenerated')['to'](_0x4c0744,'attributes',_0x1ecf3b=>!(!_0x1ecf3b||!_0x1ecf3b['@ai'])),this['bind']('name','createdAt')['to'](_0x4c0744),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2354a6=>{return _0xe3ac46=_0xebe67c['uiLanguage'],(_0x3316ea=_0x2354a6)['toLocaleDateString'](_0xe3ac46,{'month':'long','day':'numeric'})+',\x20'+_0x3316ea['toLocaleTimeString'](_0xe3ac46,{'hour':'numeric','minute':'numeric'});var _0xe3ac46,_0x3316ea;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new qt(_0xebe67c,gt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3d3489=>_0x3d3489||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x3aec9d,_0x45eb50)=>_0x3aec9d&&_0x45eb50),this['revisionActionsView']=_0x57497b&&_0x57497b['length']?Jt(this,_0x57497b):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x534a0d?this['_createAiPillView'](_0xebe67c):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x3b8592['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x3b8592['if']('isEnabled','ck-disabled',_0x2d2521=>!_0x2d2521),_0x3b8592['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x3b8592['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x3b8592['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':_0x3b8592['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':_0x4d1d00}]},..._0x534a0d?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x3b8592['if']('_isAiGenerated','ck-hidden',_0x3b71f9=>!_0x3b71f9)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x3b8592['to'](_0x2ecd03=>{_0x2ecd03['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x3da415){const _0x3ba17d=new _0x1d0883(_0x3da415);return _0x3ba17d['set']({'icon':_0x2d837c,'label':kt(_0x3da415,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':kt(_0x3da415,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x3ba17d['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x3ba17d;}['render'](){super['render']();const _0x51379b=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x51379b,'change',()=>{this['_requireRevisionName']&&!_0x51379b['value']||this['fire']('setName',{'id':this['id'],'name':_0x51379b['value']}),_0x51379b['value']||(_0x51379b['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Qt(_0x5ea2cd,_0xa57d37){const _0x557dee=wt['fromJSDate'](_0x5ea2cd)['setLocale'](_0xa57d37),_0x4bca50=wt['local'](),_0x3f8e34=_0x4bca50['minus']({'days':0x1})['startOf']('day');let _0x2ad872,_0x1eb737;return _0x557dee['hasSame'](_0x4bca50,'day')?(_0x2ad872=_0x557dee['startOf']('day')['toJSDate'](),_0x1eb737=_0x557dee['toRelativeCalendar']()):_0x557dee['hasSame'](_0x3f8e34,'day')?(_0x2ad872=_0x3f8e34['toJSDate'](),_0x1eb737=_0x557dee['toRelativeCalendar']()):_0x557dee['hasSame'](_0x4bca50,'week')?(_0x2ad872=_0x557dee['startOf']('week')['toJSDate'](),_0x1eb737=_0x557dee['weekdayLong']||''):_0x557dee['hasSame'](_0x4bca50,'year')?(_0x2ad872=_0x557dee['startOf']('month')['toJSDate'](),_0x1eb737=_0x557dee['monthLong']||''):(_0x2ad872=_0x557dee['startOf']('year')['toJSDate'](),_0x1eb737=String(_0x557dee['year'])),{'startDate':_0x2ad872,'localizedPeriodName':_0x1eb737};}var zt=class extends dt{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x4e6932,_0x403988,_0x295012,_0xca6cb2,_0x2b2dca){super(_0x4e6932);const _0x54dec6=Qt(_0x403988,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x403988,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x295012,this['_requireRevisionName']=_0xca6cb2,this['_showAISource']=_0x2b2dca,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':_0x54dec6}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x48af33){const _0x53426c=new Xt(this['locale'],_0x48af33,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x53426c);}['removeRevision'](_0x36eb43){const _0x544a31=this['revisionViews']['find'](_0x260241=>_0x260241['id']===_0x36eb43['id']);this['revisionViews']['remove'](_0x544a31);}},Zt=class extends dt{constructor(_0x501296){super(_0x501296);const _0x3eca28=new _0x4c1208();_0x3eca28['content']=_0x1f6913,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x3eca28,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[kt(_0x501296,'Revision\x20history')]}]});}},ti=class extends dt{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x1ef719,_0x4debd3,_0x1992da,_0x2a3d7b,_0x33367d){super(_0x1ef719);const _0x255b99=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4debd3,this['_revisionActions']=_0x1992da,this['_requireRevisionName']=_0x2a3d7b,this['_showAISource']=_0x33367d,this['on']('select',(_0x1a6616,_0x5451b3)=>{this['fire']('revisionSelected',_0x5451b3);}),this['on']('setName',(_0x43936a,_0x4c1ecb)=>{this['fire']('revisionSetName',_0x4c1ecb);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Zt(_0x1ef719),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x255b99['if']('isEnabled','ck-disabled',_0x51414f=>!_0x51414f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x1c4b4c of this['_revisions'])this['_addRevision'](_0x1c4b4c);this['_revisions']['on']('add',(_0x300622,_0x5beab2)=>{this['_addRevision'](_0x5beab2);}),this['_revisions']['on']('remove',(_0x1480c8,_0x466fe9)=>{this['_removeRevision'](_0x466fe9);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x1457df=>_0x1457df['revisionViews']['map'](_0x340da3=>_0x340da3))['flat']();}selectRevision(_0x5bff4){for(const _0x1e4458 of this['revisionViews'])_0x5bff4&&_0x5bff4['id']===_0x1e4458['id']?_0x1e4458['select']():_0x1e4458['deselect']();}highlightRevisions(_0x5e76d2){for(const _0x5ea673 of this['revisionViews'])_0x5e76d2['some'](({id:_0x2eaab2})=>_0x2eaab2===_0x5ea673['id'])?_0x5ea673['highlight']():_0x5ea673['unhighlight']();}['_addRevision'](_0x48eeeb){const _0xe11b17=Qt(_0x48eeeb['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x14e8f9=this['_getTimePeriodViewByStartDate'](_0xe11b17);_0x14e8f9||(_0x14e8f9=new zt(this['locale'],_0xe11b17,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x14e8f9)),_0x14e8f9['addRevision'](_0x48eeeb);}['_removeRevision'](_0xfa6a69){const _0x50cb0f=Qt(_0xfa6a69['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x50cb0f)['removeRevision'](_0xfa6a69);}_getTimePeriodViewByStartDate(_0x2ed97c){return this['timePeriodViews']['find'](_0x106396=>_0x106396['startDate']['getTime']()===_0x2ed97c['getTime']());}},ii=class RevisionsSidebar extends _0x3ccb16{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(
|
|
30
|
-
_0x26e01a(_0x106ed9);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x37bb9e,_0x44b692){super(_0x44b692),this['sourceElement']=_0x37bb9e,this['model']['document']['createRoot']();const _0xef1723=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0xef1723);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x545375,_0x2675cc){const _0xe6382f=new this(_0x545375,_0x2675cc);return await _0xe6382f['initPlugins'](),await _0xe6382f['ui']['init'](_0x545375),await _0xe6382f['data']['init'](_0xe6382f['config']['get']('initialData')||''),_0xe6382f['fire']('ready'),_0xe6382f;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0xc8641b{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2eb63e){super(_0x2eb63e),this['result']='end',_0x2eb63e['editing']['view']['_overlayModeHint']='auto',_0x2eb63e['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0xc8641b{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x4a86b7){if(super(_0x4a86b7),!this['editor']['config']['get']('revisionHistory'))throw new _0x3aa143('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2b9428=>this['_showRevisionViewer']({..._0x2b9428,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1e2408=>this['_closeRevisionViewer'](_0x1e2408)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1f278a=>this['_restoreRevision'](_0x1f278a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x460635){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x460635;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0xf0148f){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xf0148f);}getRevision(_0x49b381){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x49b381);}getRevisions(_0x412337){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x412337||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x4e884a=this['editor'],_0x59212d=_0x4dfb55(_0x4e884a,ai),_0x16d46d=_0x4e884a['plugins']['get']('RevisionTracker'),_0x38114f=_0x4e884a['plugins']['get'](_0x1ee77a)['users'];return _0x59212d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x59212d['lazyRoots'],(_0x59212d['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0xc8641b{static get requires(){return[Pt,_0x1ee77a];}init(){const _0x44ac1f=this['editor']['plugins']['get'](_0x1ee77a);for(const _0x49f841 of _0x38114f)_0x49f841['isAnonymous']||_0x44ac1f['getUser'](_0x49f841['id'])||_0x44ac1f['addUser'](_0x49f841);const _0x66ec89=_0x16d46d['repository']['getRevisions']();let _0x475722=null;const _0x7b2a0b=this['editor']['plugins']['get']('RevisionViewer');if(_0x7b2a0b['adapter']=_0x16d46d['adapter'],_0x7b2a0b['bind']('isEnabled')['to'](_0x16d46d),_0x4e884a['plugins']['has']('CommentsRepository')){const _0x36b747=_0x4e884a['plugins']['get']('CommentsRepository');_0x7b2a0b['_getVisibleCommentThreadIds']=()=>new Set(_0x36b747['getCommentThreads']()['filter'](_0x2b7ee4=>!_0x2b7ee4['isResolved'])['map'](_0x4e29e3=>_0x4e29e3['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4e884a,'isReadOnly',_0xed86bf=>!_0xed86bf);for(const _0x573e89 of _0x66ec89){const _0x3ef316=null===_0x573e89['creator'];if(_0x3ef316&&_0x573e89['toVersion']===_0x573e89['fromVersion'])continue;const _0x201272=_0x573e89['toJSON']();_0x7b2a0b['addRevisionData'](_0x201272,(_0xcfbc3a,_0xedc2e6,_0x3cef21)=>{if(_0x3ef316){if(_0x475722)_0x475722['_update'](_0xcfbc3a,_0xedc2e6);else{if(!_0xedc2e6){const _0x3fa000=_0x3cef21['toJSON']();_0x3fa000['id']=_0x30d584(),_0x16d46d['saveRevision'](_0x3fa000,_0x3cef21['toVersion'])['then'](_0x4a1445=>{_0x475722=_0x4a1445;});}}}else _0x573e89['_update'](_0xcfbc3a,_0xedc2e6);});}}},ii),_0x59212d);}['_enhanceShowRevisionViewerCallback'](){const _0x4d1987=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3f4687=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x3f4687['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2ff694=this['editor']['plugins']['get']('Dialog');_0x2ff694['isOpen']&&_0x2ff694['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x26aaef=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x2bc1dd of _0x26aaef)_0x2bc1dd['class']=_0x2bc1dd['class']?_0x2bc1dd['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x2ffc1d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2ffc1d&&_0x2ffc1d['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xf4dc42=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xf4dc42&&_0xf4dc42['setAttribute']('tabindex','-1');}}const _0x1212d0=this['_getRevisionViewerEditorConfig']();return _0x4d1987(_0x1212d0)['then'](_0x387885=>(this['_viewerEditor']=_0x387885,this['editor']['plugins']['has']('Annotations')&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x387885))['catch'](_0x3fa54a=>(console['error'](_0x3fa54a),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4bd2fd=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x39c4fe=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xa8f1d8 of _0x39c4fe)_0xa8f1d8['class']='ck-tab-panel_disabled'===_0xa8f1d8['class']?'':_0xa8f1d8['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5c14cf=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5c14cf&&_0x5c14cf['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3a5028=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3a5028&&_0x3a5028['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4bd2fd(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2f9f0f=this['editor']['plugins']['get']('Annotations');_0x2f9f0f['refreshVisibility'](),_0x2f9f0f['refreshPositioning']();}});});}['_showRevisionViewer'](_0x4b0802){const _0x77c3ba=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x39e386=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4adb62=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x4adb62,_0x4b0802)['then'](_0x1f0b2d=>(_0x39e386['style']['display']='block',_0x77c3ba['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1f0b2d));}['_closeRevisionViewer'](_0x37d0d4){const _0x118834=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x118834['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x37d0d4['destroy']();}async _restoreRevision(_0x5e4fdf){const _0x2c0a7f=this['editor'],_0x5bc304=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x436346=_0x2c0a7f['plugins']['get']('RevisionTracker'),_0x4f8508=_0x2c0a7f['plugins']['get']('RevisionHistoryUtils'),_0x5c13af=_0x5bc304['repository']['getRevision'](_0x5e4fdf);let _0x56d5b8,_0x4b888a,_0x2ef739;try{await _0x4f8508['loadRevisionData'](_0x5c13af,this['adapter']),_0x56d5b8=_0x4f8508['getRevisionDocumentData'](_0x5c13af),_0x4b888a=_0x4f8508['getRevisionRootsAttributes'](_0x5c13af);}catch(_0x15233a){return void console['error'](_0x15233a);}_0x2c0a7f['model']['change'](_0x331001=>{for(const _0x2ab7d9 of Array['from'](_0x2c0a7f['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x331001['removeMarker'](_0x2ab7d9);}),_0x5bc304['isReady']=!0x1,_0x2c0a7f['model']['enqueueChange'](_0x2060dc=>{_0x2060dc['setSelection'](null),_0x2060dc['removeSelectionAttribute'](_0x2c0a7f['model']['document']['selection']['getAttributeKeys']());const _0x3661da=Object['keys'](_0x56d5b8);for(const _0x3e4170 of _0x2c0a7f['model']['document']['roots'])'$graveyard'!=_0x3e4170['rootName']&&_0x3e4170['isAttached']()&&!_0x3661da['includes'](_0x3e4170['rootName'])&&_0x2060dc['detachRoot'](_0x3e4170);for(const _0x242ea9 of _0x3661da){let _0x5498d6=_0x2c0a7f['model']['document']['getRoot'](_0x242ea9);if(!_0x5498d6||!_0x5498d6['isAttached']()){const _0x543105=_0x5c13af['diffData']?.[_0x242ea9]?.['rootElementName']||'$root';_0x5498d6=_0x2060dc['addRoot'](_0x242ea9,_0x543105);}const _0x2241a9=_0x4b888a[_0x242ea9],_0x4b962d=Object['keys'](_0x2241a9),_0x27ad3e=_0x56d5b8[_0x242ea9];for(const _0x36c55f of _0x5498d6['getAttributeKeys']())_0x4b962d['includes'](_0x36c55f)||_0x2060dc['removeAttribute'](_0x36c55f,_0x5498d6);for(const _0x3dd661 of _0x4b962d)_0x2060dc['setAttribute'](_0x3dd661,_0x4b888a[_0x242ea9][_0x3dd661],_0x5498d6);_0x2060dc['remove'](_0x2060dc['createRangeIn'](_0x5498d6)),_0x2060dc['insert'](_0x2c0a7f['data']['parse'](_0x27ad3e,_0x5498d6),_0x5498d6,0x0);}});const _0xd4429e=kt(_0x2c0a7f['locale'],'Restored');if(_0x5c13af['name'])_0x2ef739=-0x1==_0x5c13af['name']['indexOf'](_0xd4429e)?_0xd4429e+':\x20'+_0x5c13af['name']:_0x5c13af['name'];else _0x2ef739=_0xd4429e+':\x20'+(_0x5c13af['createdAt']['toLocaleDateString'](_0x2c0a7f['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x5c13af['createdAt']['toLocaleTimeString'](_0x2c0a7f['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x436346['saveRevision']({'name':_0x2ef739}),_0x5bc304['isReady']=!0x0,_0x2c0a7f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|
|
29
|
+
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(_0x1d0d2e){super(_0x1d0d2e),this['_revisionViewer']=_0x1d0d2e['plugins']['get'](Pt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x3e0307=this['_revisionsRepository']['_revisions'],_0x38776d=this['_createRevisionActions'](),_0x38c2da=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ti(this['editor']['locale'],_0x3e0307,_0x38776d,this['editor']['config']['get']('revisionHistory.requireRevisionName'),'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),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',(_0x32f46c,_0x342beb)=>{_0x342beb['revisionViews']['on']('add',(_0x14165b,_0x3c9f2f)=>{_0x3c9f2f['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)),_0x38c2da['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x224849=this['_revisionsRepository']['getRevision'](0x0);if(_0x224849){const _0x52624d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x224849['id']);this['_revisionViewer']['compare'](_0x224849,_0x52624d);}}_handleRevisionSelected(_0x3c3720,_0x10ab10){const _0x35fa90=this['_revisionsRepository']['getRevision'](_0x10ab10['id']),_0x883441=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x35fa90['id']);this['_revisionViewer']['compare'](_0x35fa90,_0x883441);}_handleRevisionSetName(_0x27bd76,_0x1ffa82){this['_revisionsRepository']['getRevision'](_0x1ffa82['id'])['setName'](_0x1ffa82['name']);}['_handleDiffChange'](_0x16865a,_0x4e7205,_0x4a0a56){const _0xf73b5b=this['_revisionsRepository']['getRevisionsInDiff'](_0x4a0a56);_0xf73b5b['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xf73b5b),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xf73b5b[0x0]));}_createRevisionActions(){const _0x45fbdc=this['editor'],_0x397b20=RevisionsSidebar['availableRevisionActions'],_0x505fd7=_0x45fbdc['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x505fd7['length'])return _0x505fd7['map'](_0x513b40=>{const _0x4fd659='string'==typeof _0x513b40?Object['assign']({},_0x397b20[_0x513b40]):_0x513b40;return _0x4fd659['action']=_0x4fd659['action']['bind'](this,_0x45fbdc),_0x4fd659['isVisible']&&(_0x4fd659['isVisible']=_0x4fd659['isVisible']['bind'](this,_0x45fbdc)),_0x4fd659;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x5928c1},_0x3b62e0)=>{const _0xb3fd65=_0x5928c1['get'](Pt),_0x25ad54=_0xb3fd65['repository'];let _0xc1a238=_0xb3fd65['diff']['newRevisionId'],_0x459bc6=_0x3b62e0['id'];_0x25ad54['getIndex'](_0xc1a238)>_0x25ad54['getIndex'](_0x459bc6)&&([_0xc1a238,_0x459bc6]=[_0x459bc6,_0xc1a238]),_0xb3fd65['compare'](_0xc1a238,_0x459bc6);},'isVisible':({plugins:_0xca102},_0x46db73)=>{const _0x21f517=_0xca102['get'](Pt);return!(_0x21f517['repository']['getRevisionsInDiff'](_0x21f517['diff'])['length']>0x2)&&!_0x46db73['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3d5089,{id:_0x59c942})=>{_0x3d5089['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x59c942);},'isVisible':({plugins:_0x8924be},_0xee06eb)=>!!_0x8924be['get'](Pt)['repository']['getLaterVisibleRevision'](_0xee06eb['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5e6d74},{id:_0x1bcba1,revisionNameView:_0x3890c1})=>{const _0x15136c=_0x5e6d74['get'](Pt),_0x2d2007=_0x15136c['repository']['getEarlierVisibleRevision'](_0x1bcba1);_0x15136c['compare'](_0x1bcba1,_0x2d2007),_0x3890c1['focus'](),_0x3890c1['fieldView']['select']();}}};}var si=class extends _0x598841{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x8974b0,_0x535e53){super(_0x8974b0),this['_view']=_0x535e53,this['_toolbarConfig']=mt(_0x8974b0['config']['get']('toolbar')),this['_elementReplacer']=new _0x2e3fd6();}get element(){return this['view']['element'];}init(_0x85f64a){const _0x100e3d=this['editor'],_0xd16af2=this['view'],_0x4f20ec=_0x100e3d['editing']['view'],_0x2e8c4f=_0xd16af2['editable'];_0x2e8c4f['name']=_0x4f20ec['document']['getRoot']()['rootName'],_0x2e8c4f['isMainFrameEditingRoot']=!0x0,_0xd16af2['render']();const _0x1dc69f=_0x2e8c4f['element'];this['setEditableElement'](_0x2e8c4f['name'],_0x1dc69f),_0xd16af2['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4f20ec['attachDomRoot'](_0x1dc69f),this['_elementReplacer']['replace'](_0x85f64a,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x108932=this['view'],_0x281e74=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x281e74['detachDomRoot'](_0x108932['editable']['name']),_0x108932['destroy']();}_initToolbar(){const _0x39adf5=this['view'];_0x39adf5['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x39adf5['stickyPanel']['limiterElement']=_0x39adf5['element'],_0x39adf5['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x57073d})=>_0x57073d),_0x39adf5['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x39adf5['toolbar']);}},ni=class extends _0x268072{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x5b1e4,_0x105fb7,_0x4bd249={}){super(_0x5b1e4),this['stickyPanel']=new ht(_0x5b1e4),this['toolbar']=new lt(_0x5b1e4,{'shouldGroupWhenFull':_0x4bd249['shouldToolbarGroupWhenFull']}),this['_editable']=new tt(_0x5b1e4,_0x105fb7);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const oi=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4c30f1(_0x3a29f8);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x16c097,_0x48771c){super(_0x48771c),this['sourceElement']=_0x16c097,this['model']['document']['createRoot']();const _0x228d92=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x228d92);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x48ef14,_0x363dc7){const _0x19d298=new this(_0x48ef14,_0x363dc7);return await _0x19d298['initPlugins'](),await _0x19d298['ui']['init'](_0x48ef14),await _0x19d298['data']['init'](_0x19d298['config']['get']('initialData')||''),_0x19d298['fire']('ready'),_0x19d298;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x3ccb16{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f842d){super(_0x4f842d),this['result']='end',_0x4f842d['editing']['view']['_overlayModeHint']='auto',_0x4f842d['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x3ccb16{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0xcb1678){if(super(_0xcb1678),!this['editor']['config']['get']('revisionHistory'))throw new _0x24e679('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x36050d=>this['_showRevisionViewer']({..._0x36050d,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x34ccca=>this['_closeRevisionViewer'](_0x34ccca)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3852dd=>this['_restoreRevision'](_0x3852dd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x501aa4){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x501aa4;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0xeb7e72){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xeb7e72);}getRevision(_0x51e869){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x51e869);}getRevisions(_0x5a36a6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5a36a6||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x11e8d6=this['editor'],_0x50efee=_0x1d9224(_0x11e8d6,ai),_0x1affb0=_0x11e8d6['plugins']['get']('RevisionTracker'),_0x208337=_0x11e8d6['plugins']['get'](_0x312567)['users'];return _0x50efee['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x50efee['lazyRoots'],(_0x50efee['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x3ccb16{static get requires(){return[Pt,_0x312567];}init(){const _0x7c2282=this['editor']['plugins']['get'](_0x312567);for(const _0x270442 of _0x208337)_0x270442['isAnonymous']||_0x7c2282['getUser'](_0x270442['id'])||_0x7c2282['addUser'](_0x270442);const _0x5caa6d=_0x1affb0['repository']['getRevisions']();let _0x3d6209=null;const _0x26e74f=this['editor']['plugins']['get']('RevisionViewer');if(_0x26e74f['adapter']=_0x1affb0['adapter'],_0x26e74f['bind']('isEnabled')['to'](_0x1affb0),_0x11e8d6['plugins']['has']('CommentsRepository')){const _0x139c31=_0x11e8d6['plugins']['get']('CommentsRepository');_0x26e74f['_getVisibleCommentThreadIds']=()=>new Set(_0x139c31['getCommentThreads']()['filter'](_0x8afde2=>!_0x8afde2['isResolved'])['map'](_0x1fd5aa=>_0x1fd5aa['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x11e8d6,'isReadOnly',_0x93d2de=>!_0x93d2de);for(const _0x1c6577 of _0x5caa6d){const _0x60e1df=null===_0x1c6577['creator'];if(_0x60e1df&&_0x1c6577['toVersion']===_0x1c6577['fromVersion'])continue;const _0x5c0057=_0x1c6577['toJSON']();_0x26e74f['addRevisionData'](_0x5c0057,(_0x5c15a2,_0x4d65fd,_0x3fff0a)=>{if(_0x60e1df){if(_0x3d6209)_0x3d6209['_update'](_0x5c15a2,_0x4d65fd);else{if(!_0x4d65fd){const _0x1ce953=_0x3fff0a['toJSON']();_0x1ce953['id']=_0x5289a7(),_0x1affb0['saveRevision'](_0x1ce953,_0x3fff0a['toVersion'])['then'](_0x16fa81=>{_0x3d6209=_0x16fa81;});}}}else _0x1c6577['_update'](_0x5c15a2,_0x4d65fd);});}}},ii),_0x50efee);}['_enhanceShowRevisionViewerCallback'](){const _0x3420a8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4bec2a=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4bec2a['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x26da66=this['editor']['plugins']['get']('Dialog');_0x26da66['isOpen']&&_0x26da66['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xcdfe39=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3e7208 of _0xcdfe39)_0x3e7208['class']=_0x3e7208['class']?_0x3e7208['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x29f3b9=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x29f3b9&&_0x29f3b9['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3301a5=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3301a5&&_0x3301a5['setAttribute']('tabindex','-1');}}const _0x195849=this['_getRevisionViewerEditorConfig']();return _0x3420a8(_0x195849)['then'](_0x1015db=>(this['_viewerEditor']=_0x1015db,this['editor']['plugins']['has']('Annotations')&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x1015db))['catch'](_0x385bc7=>(console['error'](_0x385bc7),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5256fa=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x359149=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x526aa1 of _0x359149)_0x526aa1['class']='ck-tab-panel_disabled'===_0x526aa1['class']?'':_0x526aa1['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x34ff4d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x34ff4d&&_0x34ff4d['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1a0a48=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1a0a48&&_0x1a0a48['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5256fa(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4a1b76=this['editor']['plugins']['get']('Annotations');_0x4a1b76['refreshVisibility'](),_0x4a1b76['refreshPositioning']();}});});}['_showRevisionViewer'](_0x3a03e8){const _0x3b8389=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3426fb=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x19da3e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x19da3e,_0x3a03e8)['then'](_0x204ef3=>(_0x3426fb['style']['display']='block',_0x3b8389['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x204ef3));}['_closeRevisionViewer'](_0x571df8){const _0x54664b=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x54664b['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x571df8['destroy']();}async _restoreRevision(_0x75776f){const _0x6470d7=this['editor'],_0x38d488=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2a448c=_0x6470d7['plugins']['get']('RevisionTracker'),_0x534141=_0x6470d7['plugins']['get']('RevisionHistoryUtils'),_0x4c3549=_0x38d488['repository']['getRevision'](_0x75776f);let _0x283d44,_0x30e38d,_0x2bd41e;try{await _0x534141['loadRevisionData'](_0x4c3549,this['adapter']),_0x283d44=_0x534141['getRevisionDocumentData'](_0x4c3549),_0x30e38d=_0x534141['getRevisionRootsAttributes'](_0x4c3549);}catch(_0x298811){return void console['error'](_0x298811);}_0x6470d7['model']['change'](_0x2b4b9d=>{for(const _0x48a31e of Array['from'](_0x6470d7['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2b4b9d['removeMarker'](_0x48a31e);}),_0x38d488['isReady']=!0x1,_0x6470d7['model']['enqueueChange'](_0x49cf49=>{_0x49cf49['setSelection'](null),_0x49cf49['removeSelectionAttribute'](_0x6470d7['model']['document']['selection']['getAttributeKeys']());const _0x169d64=Object['keys'](_0x283d44);for(const _0x4991b1 of _0x6470d7['model']['document']['roots'])'$graveyard'!=_0x4991b1['rootName']&&_0x4991b1['isAttached']()&&!_0x169d64['includes'](_0x4991b1['rootName'])&&_0x49cf49['detachRoot'](_0x4991b1);for(const _0x46aad4 of _0x169d64){let _0x148e2f=_0x6470d7['model']['document']['getRoot'](_0x46aad4);if(!_0x148e2f||!_0x148e2f['isAttached']()){const _0x408359=_0x4c3549['diffData']?.[_0x46aad4]?.['rootElementName']||'$root';_0x148e2f=_0x49cf49['addRoot'](_0x46aad4,_0x408359);}const _0x3ec03b=_0x30e38d[_0x46aad4],_0x2380ac=Object['keys'](_0x3ec03b),_0x404a51=_0x283d44[_0x46aad4];for(const _0x1106aa of _0x148e2f['getAttributeKeys']())_0x2380ac['includes'](_0x1106aa)||_0x49cf49['removeAttribute'](_0x1106aa,_0x148e2f);for(const _0x27abf8 of _0x2380ac)_0x49cf49['setAttribute'](_0x27abf8,_0x30e38d[_0x46aad4][_0x27abf8],_0x148e2f);_0x49cf49['remove'](_0x49cf49['createRangeIn'](_0x148e2f)),_0x49cf49['insert'](_0x6470d7['data']['parse'](_0x404a51,_0x148e2f),_0x148e2f,0x0);}});const _0x58611a=kt(_0x6470d7['locale'],'Restored');if(_0x4c3549['name'])_0x2bd41e=-0x1==_0x4c3549['name']['indexOf'](_0x58611a)?_0x58611a+':\x20'+_0x4c3549['name']:_0x4c3549['name'];else _0x2bd41e=_0x58611a+':\x20'+(_0x4c3549['createdAt']['toLocaleDateString'](_0x6470d7['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4c3549['createdAt']['toLocaleTimeString'](_0x6470d7['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2a448c['saveRevision']({'name':_0x2bd41e}),_0x38d488['isReady']=!0x0,_0x6470d7['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|