@ckeditor/ckeditor5-revision-history 48.5.0-alpha.2 → 48.5.0-alpha.3
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/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0x306d61();var pt=class extends wt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x3edc98){super(),this['id']=_0x3edc98['id']||_0xd43831(),this['creator']=_0x3edc98['creator']||null,this['authors']=_0x3edc98['authors']||[],this['diffData']=_0x3edc98['diffData']||null,this['toVersion']=_0x3edc98['toVersion']||0x0,this['fromVersion']=_0x3edc98['fromVersion']||0x0,this['set']('name',_0x3edc98['name']||''),this['set']('createdAt',_0x3edc98['createdAt']||new Date()),this['set']('attributes',_0x3edc98['attributes']||{});}setName(_0x1fc1b8){this['_update']({'name':_0x1fc1b8});}setAttribute(_0x651ad,_0x301b86){const _0x1ee94c=_0x3ef3d4(this['attributes']);_0x499e1f(_0x1ee94c,_0x651ad,_0x301b86),this['_update']({'attributes':_0x1ee94c});}removeAttribute(_0x303989){const _0x172e45=_0x3ef3d4(this['attributes']);_0x55f1c2(_0x172e45,_0x303989),this['_update']({'attributes':_0x172e45});}_update(_0x5f1852,_0x3dcd19=!0x1){let _0xfb639e=!0x1;const _0x1b916e={'id':this['id']};for(const _0x570dc6 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x56dda1=_0x5f1852[_0x570dc6];void 0x0!==_0x56dda1&&_0x56dda1!==this[_0x570dc6]&&(this[_0x570dc6]=_0x56dda1,_0x1b916e[_0x570dc6]=_0x56dda1,_0xfb639e=!0x0);}_0xfb639e&&(_0x1b916e['authors']&&(_0x1b916e['authorsIds']=_0x1b916e['authors']['map'](_0x1362ee=>_0x1362ee['id']),delete _0x1b916e['authors']),this['fire']('_update',_0x1b916e,_0x3dcd19));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x22e412=>_0x22e412['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},yt=class extends _0x5ca6f9{['_revisions'];static get requires(){return[_0xe140c3];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x469603){super(_0x469603),this['_revisions']=new _0x17289a();}afterInit(){!async function(_0x495110){const _0x2ade2e='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x257185=0xeb829,_0x4f1fa7=0x793f8,_0x156c28={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x5e38a0(_0x271c72){const _0x3e242f=new window['Promise'](_0x54f675=>{_0x271c72['once']('ready',_0x54f675);}),_0x591aeb=window['Date']['now'](),_0x3e70f6=_0x271c72['config']['get']('licenseKey');async function _0x475fd1(){let _0x2c0ace,_0x5d3640=null,_0x39f187=null;try{return'GPL'==_0x3e70f6?'NotAllowed':(_0x2c0ace=_0x2de9a9(),_0x2c0ace?(_0x2c0ace['usageEndpoint']&&(_0x39f187=_0x1133ab(_0x2c0ace['usageEndpoint'],_0x2c0ace['jti'])),await _0x56ac49()?_0x4cea14()?_0x35f286()?'Expired':_0x302695()?('evaluation'==_0x2c0ace['licenseType']&&(_0x5d3640=_0x489759('EvaluationLimit')),await _0xea9a3c()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x35f286(){const _0x1cfe53=['evaluation','trial']['includes'](_0x2c0ace['licenseType'])?_0x591aeb/0x3e8:0xe10*_0x4f1fa7;return _0x2c0ace['exp']<_0x1cfe53;}function _0x4cea14(){const _0x3a4006=_0x2c0ace['features'];if(!_0x3a4006)return!0x1;if(_0x3a4006['includes']('*'))return!0x0;if(_0x3a4006['includes']('RH'))return!0x0;if(_0x3a4006['includes']('RRH')){if(_0x58275())return!0x0;if(_0x1fe84e()||_0x29c3aa())return!0x0;}return!0x1;}function _0x302695(){const _0x2811cf=_0x2c0ace['licensedHosts'];if(!_0x2811cf||0x0==_0x2811cf['length'])return!0x0;const {hostname:_0x36fecb}=new URL(window['location']['href']);if(_0x2811cf['includes'](_0x36fecb))return!0x0;const _0x54a178=_0x36fecb['split']('.');return _0x2811cf['filter'](_0xacb284=>_0xacb284['includes']('*'))['map'](_0x4331a1=>_0x4331a1['split']('.'))['filter'](_0xbe0afe=>_0xbe0afe['length']<=_0x54a178['length'])['map'](_0x4c2fe4=>Array(_0x54a178['length']-_0x4c2fe4['length'])['fill']('*'===_0x4c2fe4[0x0]?'*':'')['concat'](_0x4c2fe4))['some'](_0xd46374=>_0x54a178['every']((_0x1d5f4b,_0x527c8d)=>_0xd46374[_0x527c8d]===_0x1d5f4b||'*'===_0xd46374[_0x527c8d]));}function _0xea9a3c(){return _0x5d3640&&_0x39f187?new window['Promise']((_0x23dea8,_0x5e5ff6)=>{_0x5d3640['then'](_0x23dea8,_0x5e5ff6),_0x39f187['then'](_0x118d64=>{'Valid'!=_0x118d64&&_0x23dea8(_0x118d64);},_0x5e5ff6);}):_0x5d3640||_0x39f187||'Valid';}}function _0x1133ab(_0x20c7b5,_0x12d05a){return new window['Promise'](_0x53a117=>{if(_0x4d1f4e())return _0x53a117('Valid');_0xd86770(),_0x271c72['decorate']('_sendUsageRequest');let _0x207820=!0x1;const _0x477f5a=_0xd43831();function _0x3e7029(_0x47f380){return!!_0x47f380&&('object'==typeof _0x47f380||'function'==typeof _0x47f380)&&'function'==typeof _0x47f380['then']&&'function'==typeof _0x47f380['catch'];}function _0x116dcc(_0x35841e){_0x16040f(_0x35841e)['then'](_0x333188=>_0x333188&&'ok'==_0x333188['status']?_0x379319(_0xbeb176(_0x477f5a+_0x12d05a))!=_0x333188['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4bcfdc=>(_0x5d6b26(),_0x4bcfdc),()=>{const _0x444b98=_0x2c8ca6();return null==_0x444b98?(_0x5d6b26(),'Valid'):_0x591aeb-_0x444b98>0x240c8400?'UsageLimit':'Valid';})['then'](_0x53a117)['catch'](()=>{_0x53a117('UsageLimit');});const _0x41bdf0=0x36ee80;function _0x5d6b26(){const _0xa3e4ea='llct-'+_0x379319(_0xbeb176(_0x20c7b5)),_0x2fd989=_0x35319c(_0x379319(window['Math']['ceil'](_0x591aeb/_0x41bdf0)));window['localStorage']['setItem'](_0xa3e4ea,_0x2fd989);}function _0x2c8ca6(){const _0x37a463='llct-'+_0x379319(_0xbeb176(_0x20c7b5)),_0x53b47a=window['localStorage']['getItem'](_0x37a463);return _0x53b47a?window['parseInt'](_0x35319c(_0x53b47a),0x10)*_0x41bdf0:null;}function _0x16040f(_0x82a201){return new window['Promise']((_0xb5b902,_0x5031a9)=>{_0x82a201['then'](_0xb5b902,_0x5031a9),window['setTimeout'](_0x5031a9,0x1d4c0);});}}_0x271c72['on']('_sendUsageRequest',(_0x1ea1d3,_0x3fe0bc)=>{if(_0x3fe0bc[0x0]!=_0x20c7b5)return _0x53a117('UsageLimit');_0x3fe0bc[0x1]={..._0x3fe0bc[0x1],'requestId':_0x477f5a};},{'priority':'high'}),_0x271c72['on']('_sendUsageRequest',_0x443799=>{_0x3e7029(_0x443799['return'])&&(_0x207820=!0x0,_0x116dcc(_0x443799['return']));},{'priority':'low'}),_0x3e242f['then'](()=>{_0x207820||_0x53a117('UsageLimit');});});function _0x4d1f4e(){return'auto'==_0x271c72['editing']['view']['_overlayModeHint'];}function _0xd86770(){_0x271c72['editing']['view']['_overlayModeHint']='auto';}}function _0x489759(_0x7005c9){const _0x2510f3=[new window['Promise'](_0x1b6fe1=>setTimeout(_0x1b6fe1,0x93ecc)),_0x3e242f['then'](()=>new window['Promise'](_0x13155f=>{const _0x497907=0x7,_0x27a337=_0x495110['_revisions'];function _0x43d31f(){_0x27a337['length']>=_0x497907&&_0x13155f();}_0x43d31f(),_0x27a337['on']('add',_0x43d31f);})),new window['Promise'](_0x27010c=>{function _0x2d8df7(){for(const _0x58a629 in window)if(window['Number']['isNaN'](window['Number'](_0x58a629))&&window[_0x58a629]==_0x257185)return _0x27010c();'destroyed'!=_0x271c72['state']&&window['setTimeout'](_0x2d8df7,0x1388);}_0x831563('RevisionViewer')&&_0x2d8df7();})];return window['Promise']['race'](_0x2510f3)['then'](()=>_0x7005c9);}async function _0x1d3e41(){if(await _0x3e242f,_0x831563('RevisionViewer')){const _0x34e448=_0x495110['getRevision'](0x0),_0x21689e=_0x495110['getEarlierVisibleRevision'](_0x34e448['id']),_0x356239=_0x489649('RevisionViewer');return await _0x356239['compare'](_0x34e448['id'],_0x21689e?_0x21689e['id']:null,!0x0),_0x356239['unbind']('isEnabled'),_0x356239['isEnabled']=!0x1,_0x356239['compare']=_0xf52a48,void(_0x356239['_getDiff']=_0xf52a48);}if(_0x831563('RevisionTracker')){const _0x3a2b79=_0x489649('RevisionTracker');_0x3a2b79['unbind']('isEnabled'),_0x3a2b79['isEnabled']=!0x1,_0x3a2b79['update']=_0xf52a48,_0x3a2b79['saveRevision']=_0xf52a48;}_0x271c72['model']['change']=_0xf52a48,_0x271c72['model']['enqueueChange']=_0xf52a48,_0x271c72['enableReadOnlyMode']('model');}function _0x58275(){return _0x831563('WebSocketGateway')&&'connected'==_0x489649('WebSocketGateway')['state'];}function _0x1fe84e(){return _0x831563('RevisionViewerIntegration');}function _0x29c3aa(){return _0x831563('TrackChangesDataGetter');}function _0x2863c3(_0x187dee){const _0x1b569b=_0x553cca();_0x271c72[_0x1b569b]='revisionHistoryLicenseKey'+_0x187dee,_0x187dee['endsWith']('Limit')&&(window[_0x553cca()]=_0x257185),'Valid'!=_0x187dee&&_0x1d3e41();}function _0x553cca(){const _0x1da5ef=window['String'](window['performance']['now']())['replace']('.','');let _0x4633cc='N';for(let _0x4166ac=0x0;_0x4166ac<_0x1da5ef['length'];_0x4166ac+=0x2){let _0x3a639b=window['parseInt'](_0x1da5ef['substring'](_0x4166ac,_0x4166ac+0x2));_0x3a639b>=0x3e&&(_0x3a639b-=0x3e),_0x4633cc+=_0x2ade2e[_0x3a639b];}return _0x4633cc;}function _0x2de9a9(){const _0x817bc2=_0x3e70f6['split']('.');if(0x3!=_0x817bc2['length'])return null;return _0x50753d(_0x817bc2[0x1]);function _0x50753d(_0x17b275){const _0x53c824=_0xdbc1c1(_0x17b275);return _0x53c824&&_0x1c574a()?_0x53c824:null;function _0x1c574a(){const _0x3dce7d=_0x53c824['jti'],_0x1ba2c6=window['parseInt'](_0x3dce7d['substring'](_0x3dce7d['length']-0x8),0x10),_0x5379b1={..._0x53c824,'jti':_0x3dce7d['substring'](0x0,_0x3dce7d['length']-0x8)};return delete _0x5379b1['vc'],_0xbeb176(_0x5379b1)==_0x1ba2c6;}}}async function _0x56ac49(){let _0x78dbc7=!0x0;try{const [_0x53fe65,_0x38ae62,_0x71626e]=_0x3e70f6['split']('.');return _0x371a64(_0x53fe65),await _0x599b10(_0x53fe65,_0x38ae62,_0x71626e),_0x78dbc7;}catch{return!0x1;}function _0x371a64(_0x328e4a){const _0x4108f7=_0xdbc1c1(_0x328e4a);_0x4108f7&&'ES256'==_0x4108f7['alg']||(_0x78dbc7=!0x1);}async function _0x599b10(_0x3990f5,_0x4a8da7,_0x473ba4){const _0x5da5c5=window['Uint8Array']['from'](_0x10f81f(_0x473ba4),_0x2baa45=>_0x2baa45['charCodeAt'](0x0)),_0x29ebae=new window['TextEncoder']()['encode'](_0x3990f5+'.'+_0x4a8da7),_0x3f2326=window['crypto']['subtle'];if(!_0x3f2326)return;const _0x3d1468=await _0x3f2326['importKey']('jwk',_0x156c28,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3f2326['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3d1468,_0x5da5c5,_0x29ebae)||(_0x78dbc7=!0x1);}}function _0xdbc1c1(_0x1102f7){return _0x1102f7['startsWith']('ey')?JSON['parse'](_0x10f81f(_0x1102f7)):null;}function _0x10f81f(_0xe12d53){return window['atob'](_0xe12d53['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xbeb176(_0x3ea33b){let _0x26b42a=0x1505;function _0x13849c(_0x235be4){for(let _0x3b6b93=0x0;_0x3b6b93<_0x235be4['length'];_0x3b6b93++){const _0x59b454=_0x235be4['charCodeAt'](_0x3b6b93);_0x26b42a=(_0x26b42a<<0x5)+_0x26b42a+_0x59b454,_0x26b42a&=_0x26b42a;}}function _0x276861(_0x55b5a3){Array['isArray'](_0x55b5a3)?_0x55b5a3['forEach'](_0x276861):_0x55b5a3&&'object'==typeof _0x55b5a3?Object['entries'](_0x55b5a3)['sort']()['forEach'](([_0x2f0f9b,_0x253cb6])=>{_0x13849c(_0x2f0f9b),_0x276861(_0x253cb6);}):_0x13849c(window['String'](_0x55b5a3));}return _0x276861(_0x3ea33b),_0x26b42a>>>0x0;}function _0x379319(_0x4ffecd){return _0x4ffecd['toString'](0x10)['padStart'](0x8,'0');}function _0x35319c(_0x37cd44){return _0x37cd44['split']('')['reverse']()['join']('');}function _0x831563(_0x1a2a9c){return _0x271c72['plugins']['has'](_0x1a2a9c);}function _0x489649(_0x109281){return _0x271c72['plugins']['get'](_0x109281);}function _0xf52a48(){}_0x2863c3(await _0x475fd1());}_0x5e38a0(_0x495110['editor']);}(this);}createRevision(_0xbe312){const _0x267c5a=this['editor']['plugins']['get']('Users');return new pt({'id':_0xbe312['id'],'name':_0xbe312['name'],'creator':_0xbe312['creatorId']?_0x267c5a['getUser'](_0xbe312['creatorId']):null,'diffData':_0xbe312['diffData']||_0xbe312['data'],'authors':_0xbe312['authorsIds']['map'](_0x5b7279=>_0x267c5a['getUser'](_0x5b7279)),'createdAt':new Date(_0xbe312['createdAt']),'attributes':_0xbe312['attributes'],'fromVersion':_0xbe312['fromVersion'],'toVersion':_0xbe312['toVersion']});}['addRevision'](_0x32329b,_0x6e75a=0x0){this['_revisions']['add'](_0x32329b,_0x6e75a);}getRevision(_0x2acd9c){return this['_revisions']['get'](_0x2acd9c);}getRevisions(_0x3ac0fa={'toJSON':!0x1}){const _0x386d33=Array['from'](this['_revisions']);return _0x386d33['reverse'](),_0x3ac0fa['toJSON']?_0x386d33['map'](_0x1e212a=>_0x1e212a['toJSON']()):_0x386d33;}getIndex(_0x35ac75){return this['_revisions']['getIndex'](_0x35ac75);}getEarlierVisibleRevision(_0x599f03){const [,_0x4fb296]=this['getRevisionsIterator'](_0x599f03,{'direction':'earlier'});return _0x4fb296;}getLaterVisibleRevision(_0x31a91c){const [,_0x109c2c]=this['getRevisionsIterator'](_0x31a91c,{'direction':'later'});return _0x109c2c;}getRevisionsInDiff(_0x215af9){const _0x353b70=[];for(const _0x2cf486 of this['getRevisionsIterator'](_0x215af9['newRevisionId']))if(_0x353b70['push'](_0x2cf486),_0x2cf486['id']===_0x215af9['oldRevisionId'])break;return _0x353b70;}*getRevisionsIterator(_0x32f084,{direction:_0x1abb5f='earlier',filter:_0x45419c=()=>!0x0}={}){const _0xf7b65f='earlier'===_0x1abb5f?0x1:-0x1;let _0x3283e2=this['_revisions']['get'](_0x32f084),_0x4ae43e=this['getIndex'](_0x3283e2);for(yield _0x3283e2;_0x3283e2;){if(_0x4ae43e+=_0xf7b65f,_0x3283e2=this['getRevision'](_0x4ae43e),!_0x3283e2)return;_0x45419c(_0x3283e2)&&(yield _0x3283e2);}}},bt=class extends _0x5ca6f9{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1de965,'c'],[_0x691ed5,'a'],[_0x4ef025,'e'],[_0x491a29,'r'],[_0x48b554,'u']]);_typeCharToViewClass=new Map([['c',_0x1de965],['a',_0x691ed5],['e',_0x4ef025],['r',_0x491a29],['u',_0x48b554]]);async loadRevisionData(_0x125fd3,_0x277a7e){if(_0x125fd3['diffData']||!_0x277a7e)return;const _0xae6526=this['editor']['config']['get']('collaboration.channelId');_0x125fd3['diffData']=(await _0x277a7e['getRevision']({'channelId':_0xae6526,'revisionId':_0x125fd3['id']}))['diffData'];}getRevisionDocumentData(_0x3719df){const _0x16d1c9={};for(const _0x580cbd in _0x3719df['diffData']){if(_0x3719df['diffData'][_0x580cbd]['attachChange']&&!_0x3719df['diffData'][_0x580cbd]['attachChange']['isAttached'])continue;const _0xa450f8=this['_removeRevisionMarkers'](JSON['parse'](_0x3719df['diffData'][_0x580cbd]['insertions'])),_0x3f4dd5=this['editor']['editing']['view']['document'],_0x836200=new _0x5e0e74(_0x3f4dd5,_0xa450f8['map'](_0x3eab35=>this['_getViewFromDiffObj'](_0x3eab35,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x16d1c9[_0x580cbd]=this['editor']['data']['processor']['toData'](_0x836200),this['editor']['data']['processor']['useFillerType']('default');}return _0x16d1c9;}getRevisionRootsAttributes(_0x536a4f){const _0x58517d={};for(const _0x55a2ba in _0x536a4f['diffData'])_0x536a4f['diffData'][_0x55a2ba]['attachChange']&&!_0x536a4f['diffData'][_0x55a2ba]['attachChange']['isAttached']||(_0x58517d[_0x55a2ba]=_0x536a4f['diffData'][_0x55a2ba]['attributesAfter']||{});return _0x58517d;}getRevisionRootsModelElements(_0x21d6a3){const _0x45fb0c={};for(const _0x15011e in _0x21d6a3['diffData']){if(_0x21d6a3['diffData'][_0x15011e]['attachChange']&&!_0x21d6a3['diffData'][_0x15011e]['attachChange']['isAttached'])continue;const _0x49047c=_0x21d6a3['diffData'][_0x15011e]['rootElementName'];_0x49047c&&(_0x45fb0c[_0x15011e]=_0x49047c);}return _0x45fb0c;}_getTypeCharForViewElement(_0x419688){return this['_viewClassToTypeChar']['get'](_0x419688['constructor']);}_getViewFromDiffObj(_0x5f1a23,_0x8d02f8){const _0x114844=this['editor']['editing']['view']['document'];if('string'==typeof _0x5f1a23)return new _0x26b384(_0x114844,_0x5f1a23);{let _0x1e74a7,_0x5d45e0;_0x5d45e0='u'==_0x5f1a23['type']||'r'==_0x5f1a23['type']?[]:_0x5f1a23['children']['map'](_0x44f9cd=>this['_getViewFromDiffObj'](_0x44f9cd,_0x8d02f8));const _0x31e0f2=this['_typeCharToViewClass']['get'](_0x5f1a23['type'])||_0x816cc6,_0x1a8f83=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1e74a7=new _0x31e0f2(_0x114844,_0x5f1a23['name'],_0x5f1a23['attributes'],_0x5d45e0),'u'==_0x5f1a23['type']&&_0x5f1a23['children'][0x0]){const _0x4c29e6=_0x5f1a23['children'][0x0];if(_0x1e74a7['render']=function(_0x32a3b7){const _0x135975=_0x32a3b7['createElement']('div');return _0x135975['innerHTML']=_0x4c29e6,_0x135975['childNodes'][0x0];},_0x8d02f8){const _0x2d5591=new _0x5e0e74(_0x114844);_0x2d5591['_appendChild'](_0x1e74a7);const _0x54bbdb=Array['from'](_0x1a8f83['viewChildrenToDom'](_0x2d5591,{'bind':!0x1})),_0x160277=_0x1a8f83['domDocument']['createElement']('div');_0x160277['append'](..._0x54bbdb),_0x1e74a7=Array['from'](_0x1a8f83['domChildrenToView'](_0x160277))[0x0];}}else{if('r'==_0x5f1a23['type']&&_0x5f1a23['children'][0x0]){const _0x2533d6=_0x5f1a23['children'][0x0];if(_0x1e74a7['render']=function(_0x1d235c){_0x1d235c['innerHTML']=_0x2533d6;},_0x8d02f8){const _0x49a1c5=new _0x5e0e74(_0x114844);_0x49a1c5['_appendChild'](_0x1e74a7);const _0x4188eb=Array['from'](_0x1a8f83['viewChildrenToDom'](_0x49a1c5,{'bind':!0x1})),_0x309939=_0x1a8f83['domDocument']['createElement']('div');_0x309939['append'](..._0x4188eb);const _0x1af714=Array['from'](_0x1a8f83['domChildrenToView'](_0x309939));_0x1af714['length']>0x1?_0x1e74a7['_appendChild'](_0x1af714):_0x1e74a7=_0x1af714[0x0];}}}if(_0x5f1a23['customProperties']){for(const [_0x182e81,_0x25ce0b]of _0x5f1a23['customProperties'])_0x1e74a7['_setCustomProperty'](_0x182e81,_0x25ce0b);}const _0x4681b0=void 0x0===_0x5f1a23['fillerOffset']?null:_0x5f1a23['fillerOffset'];return null!==_0x4681b0&&(_0x1e74a7['getFillerOffset']=()=>_0x4681b0),_0x1e74a7;}}_makeModelFromViewString(_0xc0116,_0x411e23){const _0x475b57=JSON['parse'](_0xc0116),_0xade007=this['editor']['editing']['view']['document'],_0x4d095b=new _0x5e0e74(_0xade007,_0x475b57['map'](_0x5b7186=>this['_getViewFromDiffObj'](_0x5b7186,!0x0))),_0xe62f99=this['editor']['data']['toModel'](_0x4d095b,_0x411e23);return _0xe62f99['name']=_0x411e23,_0xe62f99;}['_removeRevisionMarkers'](_0xb35bfc){return(_0xb35bfc=_0xb35bfc['filter'](_0xcfda5=>!_0xcfda5['name']||'revision-start'!==_0xcfda5['name']&&'revision-end'!==_0xcfda5['name']))['forEach'](_0xf1166e=>{'string'!=typeof _0xf1166e&&(_0xf1166e['children']=this['_removeRevisionMarkers'](_0xf1166e['children']),_0xf1166e['attributes']=_0xf1166e['attributes']['filter'](_0x5641a2=>!_0x5641a2[0x0]['startsWith']('data-revision-')));}),_0xb35bfc;}};function Rt(_0x11a43a,_0x455112,_0x5943c7){const t=_0x11a43a['t'];switch(_0x455112){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'},_0x5943c7);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5943c7);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'},_0x5943c7);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x5943c7);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x5943c7);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var kt=class extends _0x5ca6f9{['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[_0xe140c3,yt,bt,_0x4dabe1];}constructor(_0x3b4624){super(_0x3b4624),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new At(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0xd1802d=_0xd43831();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0xd1802d},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 _0x535156=this['repository']['getRevision'](0x0),_0x2ce14b=_0x535156&&null===_0x535156['creator']?_0x535156:null;if(this['_continueCurrentRevision']=!!_0x2ce14b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4137d9=this['_source']['getCurrentRevisionId'](),_0x215706=this['repository']['getRevision'](_0x4137d9);if(_0x215706)this['_startingVersion']=_0x215706['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5a183f=this['_source']['history']['_operations']['find'](_0x41fcf2=>!_0x41fcf2['_isInit']),_0x30d0df=_0x5a183f?_0x5a183f['baseVersion']:this['_source']['history']['version'];_0x535156?(_0x535156['toVersion']<_0x30d0df&&_0x535156['_update']({'toVersion':_0x30d0df}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2ce14b['id'],this['_startingVersion']=_0x2ce14b['fromVersion']):(this['_startingVersion']=_0x535156['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x30d0df,this['_continueCurrentRevision']=!0x1);}}else _0x2ce14b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2ce14b['toVersion'],this['editor']['model']['document']['history']['version']),_0x2ce14b['fromVersion']===_0x2ce14b['toVersion']?(0x0!==_0x2ce14b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ce14b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ce14b['id'],this['_startingVersion']=_0x2ce14b['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',_0x11950f=>!_0x11950f),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0xb1b858=[this['editor']];for(const _0x4253ad of _0xb1b858){let _0x17733a;for(const _0x4a1796 in _0x4253ad){const _0x205617=_0x4a1796,_0x2c8b66=_0x4253ad[_0x205617];if('revisionHistoryLicenseKeyValid'==_0x2c8b66||'revisionHistoryLicenseKeyInvalid'==_0x2c8b66||'revisionHistoryLicenseKeyExpired'==_0x2c8b66||'revisionHistoryLicenseKeyDomainLimit'==_0x2c8b66||'revisionHistoryLicenseKeyNotAllowed'==_0x2c8b66||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2c8b66||'revisionHistoryLicenseKeyUsageLimit'==_0x2c8b66){delete _0x4253ad[_0x205617],_0x17733a=_0x2c8b66,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x17733a&&_0x4253ad['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x17733a&&_0x4253ad['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x17733a&&_0x4253ad['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x17733a&&_0x4253ad['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x17733a&&_0x4253ad['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x17733a&&_0x4253ad['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x20a0f1=this['repository']['getRevision'](0x0),_0x51ce8d=await this['getRevisionDocumentData'](_0x20a0f1),_0x44b6d7=await this['getRevisionRootsAttributes'](_0x20a0f1),_0xe6ef42=this['_utils']['getRevisionRootsModelElements'](_0x20a0f1);this['_replaceEditorDataWithRevisionData'](_0x51ce8d,_0x44b6d7,_0xe6ef42);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x4de89c){this['_source']=_0x4de89c;}async update(){const _0x448ecb=await this['_source']['getLatestVersion']();if(_0x448ecb>this['currentRevision']['toVersion']){await this['_loadState']();const _0x4e6900=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x448ecb});_0x4e6900['authors']=_0x4e6900['authorsIds']['map'](_0x4c7efd=>this['editor']['plugins']['get']('Users')['getUser'](_0x4c7efd)),this['currentRevision']['_update'](_0x4e6900);}}async['saveRevision'](_0x1abff1={},_0xbcf0aa=null){const _0x4a2971=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xbcf0aa>this['currentRevision']['toVersion']&&(_0xbcf0aa=null),null===_0xbcf0aa&&(_0xbcf0aa=await this['_source']['getLatestVersion']());const _0x47f088=this['_getFromVersion'](_0xbcf0aa),_0x300cad=this['buildRevisionData']({'from':_0x47f088,'to':_0xbcf0aa});if(this['currentRevision']['toVersion']<_0xbcf0aa){const _0x462f33=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xbcf0aa,'to':_0xbcf0aa});_0x462f33['authors']=[],_0x462f33['authorsIds']=[],_0x462f33['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x462f33,!0x0),delete _0x462f33['authors'],_0x4a2971['push'](_0x462f33);}const _0x5b1924={..._0x1abff1,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1abff1['name']||null,'id':_0x1abff1['id']||_0xd43831(),..._0x300cad,'attributes':{..._0x1abff1['attributes'],..._0x300cad['attributes']}},_0x1cbe51=this['addRevisionData'](_0x5b1924);_0x4a2971['push'](_0x5b1924);const _0x595e1b=this['repository']['getIndex'](_0x1cbe51);if(0x0!==_0x595e1b){const _0x1abe6e=this['repository']['getRevision'](_0x595e1b-0x1);if(_0x1abe6e['fromVersion']!==_0xbcf0aa){const _0x351299=this['_revisionDataBuilder']['getData'](_0xbcf0aa,_0x1abe6e['toVersion']),_0x79306c={'id':_0x1abe6e['id'],'diffData':_0x351299['diffData'],'authorsIds':_0x351299['authorsIds'],'authors':_0x351299['authorsIds']['map'](_0x582f6f=>this['editor']['plugins']['get']('Users')['getUser'](_0x582f6f)),'fromVersion':_0xbcf0aa};this['_stampAiAttribute'](_0x79306c,_0x1abe6e,!!_0x351299['hasAIChanges']),_0x1abe6e===this['currentRevision']&&(_0x79306c['createdAt']=new Date(_0x5b1924['createdAt']['getTime']()+0xa)),_0x1abe6e['_update'](_0x79306c,!0x0),delete _0x79306c['authors'],_0x4a2971['push'](_0x79306c);}}if(this['adapter']){for(const _0x41de6a of _0x4a2971)this['_bufferUpdate'](_0x41de6a['id'],_0x41de6a,!0x0);this['sendBufferedUpdates']();}return _0x1cbe51;}addRevisionData(_0x2b12ba){const _0x2aad45=this['repository']['createRevision'](_0x2b12ba);return this['adapter']&&_0x2aad45['on']('_update',(_0x45000a,_0xc9edeb,_0x4638a4)=>{_0x4638a4||(this['_bufferUpdate'](_0xc9edeb['id'],_0xc9edeb,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2aad45,this['_findInsertionIndex'](_0x2aad45)),_0x2aad45;}async getRevisionDocumentData(_0x287633){return await this['_utils']['loadRevisionData'](_0x287633,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x287633);}async getRevisionRootsAttributes(_0xc27d94){return await this['_utils']['loadRevisionData'](_0xc27d94,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xc27d94);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1c534c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1ef102=0x0;_0x1ef102<_0x1c534c['length'];_0x1ef102++){const _0x467f31=_0x1c534c[_0x1ef102];let _0x2cf5d6=!0x1;for(const _0x185454 of Object['keys'](_0x467f31))void 0x0===_0x467f31[_0x185454]?delete _0x467f31[_0x185454]:'id'!==_0x185454&&(_0x2cf5d6=!0x0);_0x2cf5d6||(_0x1c534c[_0x1ef102]=null);}if(_0x1c534c=_0x1c534c['filter'](_0x1fc698=>null!==_0x1fc698),!_0x1c534c['length'])return;for(let _0x505687=0x0;_0x505687<_0x1c534c['length'];_0x505687++){const _0xf76eea=_0x1c534c[_0x505687];void 0x0!==_0xf76eea['fromVersion']&&void 0x0===_0xf76eea['toVersion']&&(_0xf76eea['toVersion']=this['repository']['getRevision'](_0xf76eea['id'])['toVersion']),void 0x0!==_0xf76eea['toVersion']&&void 0x0===_0xf76eea['fromVersion']&&(_0xf76eea['fromVersion']=this['repository']['getRevision'](_0xf76eea['id'])['fromVersion']);}const _0x3f2943=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1c534c,_0x3f2943)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x47845b=>{if(_0x47845b){for(const _0x24a28c of _0x47845b)this['setRevisionData']({'id':_0x24a28c['id'],'createdAt':_0x24a28c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x4741cb,_0x188cb0,_0x424e92){if(_0x424e92===(!!_0x188cb0&&!!_0x188cb0['attributes']['@ai']))return;const _0x1fb006={..._0x188cb0?_0x188cb0['attributes']:{},..._0x4741cb['attributes']};_0x424e92?_0x1fb006['@ai']=!0x0:delete _0x1fb006['@ai'],_0x4741cb['attributes']=_0x1fb006;}buildRevisionData({revision:_0x127254=null,from:_0x4b42c6=null,to:_0x5470fb=null}){_0x4b42c6=null!==_0x4b42c6?_0x4b42c6:_0x127254['fromVersion'],_0x5470fb=null!==_0x5470fb?_0x5470fb:_0x127254['toVersion'];const _0x5f514c=this['_revisionDataBuilder']['getData'](_0x4b42c6,_0x5470fb),_0x284b37={'diffData':_0x5f514c['diffData'],'authorsIds':_0x5f514c['authorsIds'],'fromVersion':_0x4b42c6,'toVersion':_0x5470fb};if(this['_stampAiAttribute'](_0x284b37,_0x127254,!!_0x5f514c['hasAIChanges']),!_0x127254||_0x5470fb!==_0x127254['toVersion']){const _0x10404b=_0x5470fb-0x1,_0x30c5a1=this['_source']['history']['getOperation'](_0x10404b);_0x284b37['createdAt']=_0x30c5a1&&_0x30c5a1['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4b42c6===this['_loadedStateData']['fromVersion']){for(const _0x2eb128 of this['_loadedStateData']['authors'])_0x284b37['authorsIds']['includes'](_0x2eb128['id'])||_0x284b37['authorsIds']['push'](_0x2eb128['id']);}return _0x284b37;}_bufferUpdate(_0x4ad72c,_0x4dd660,_0x422b7a){if(this['_bufferedUpdates']['has'](_0x4ad72c)){const _0x32674e=this['_bufferedUpdates']['get'](_0x4ad72c);_0x4dd660=_0x422b7a?{..._0x32674e,..._0x4dd660}:{..._0x4dd660,..._0x32674e};}this['_bufferedUpdates']['set'](_0x4ad72c,_0x4dd660);}setRevisionData(_0x340376){const _0x520071=this['repository']['getRevision'](_0x340376['id']);if(_0x340376['createdAt']&&(_0x340376['createdAt']=new Date(_0x340376['createdAt'])),_0x340376['authorsIds']){const _0xfdc05e=this['editor']['plugins']['get']('Users');_0x340376['authors']=_0x340376['authorsIds']['map'](_0x1e8d93=>_0xfdc05e['getUser'](_0x1e8d93));}_0x520071['_update'](_0x340376,!0x0);}_createInitialRevision(_0x583017){const _0xd5d1bf=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xd5d1bf)this['_initialRevisionId']=_0xd5d1bf['id'];else{const _0x1bdcbf=!this['editor']['model']['document']['roots']['find'](_0x586af5=>this['editor']['model']['hasContent'](_0x586af5)),_0x2d80a5=this['editor']['plugins']['get']('Users')['me']['id'],_0x432c6a=Rt(this['editor']['locale'],_0x1bdcbf?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x583017,'to':_0x583017,'id':this['_initialRevisionId'],'name':_0x432c6a,'creatorId':_0x2d80a5});}}_createCurrentRevision(_0x639f80){const _0x596b3c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x596b3c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x639f80,'to':_0x639f80,'id':_0x596b3c,'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(_0x4106c3,_0x58c274,_0x10a2a8){const _0x257af6={},_0x7ed7ab={},_0x5f2601={},_0x11f4e7=this['editor']['config']['get']('roots')||{};for(const [_0x1d9463,_0x537c36]of Object['entries'](_0x11f4e7))_0x537c36['lazyLoad']||(_0x257af6[_0x1d9463]=_0x537c36['initialData']??'',_0x7ed7ab[_0x1d9463]=_0x537c36['modelAttributes']||{},_0x537c36['modelElement']&&(_0x5f2601[_0x1d9463]=_0x537c36['modelElement']));for(const _0xa7d2bc of this['editor']['model']['document']['getRootNames']())_0x257af6[_0xa7d2bc]??='',_0x7ed7ab[_0xa7d2bc]??={};let _0x14f23a=!0x1;const _0x2a4c4c=Object['keys'](_0x257af6),_0x26297a=Object['keys'](_0x4106c3);for(const _0x43f2a5 of _0x2a4c4c){if(_0x257af6[_0x43f2a5]!==_0x4106c3[_0x43f2a5]&&''!==_0x257af6[_0x43f2a5]['trim']()){_0x14f23a=!0x0;break;}if(!_0x17185f(_0x7ed7ab[_0x43f2a5],_0x58c274[_0x43f2a5])&&Object['keys'](_0x7ed7ab[_0x43f2a5])['length']>0x0){_0x14f23a=!0x0;break;}const _0x42dce2=_0x5f2601[_0x43f2a5],_0x481c25=_0x10a2a8[_0x43f2a5];if(_0x42dce2&&_0x481c25&&_0x42dce2!==_0x481c25){_0x14f23a=!0x0;break;}}_0x14f23a||(_0x14f23a=_0x26297a['some'](_0x5af664=>!this['editor']['model']['document']['getRoot'](_0x5af664))),_0x14f23a&&_0x4c174d('editor-initial-data-replaced-with-revision-data',{'editorData':_0x257af6,'editorRootsAttributes':_0x7ed7ab,'editorRootsModelElements':_0x5f2601,'revisionData':_0x4106c3,'revisionRootsAttributes':_0x58c274,'revisionRootsModelElements':_0x10a2a8});for(const [_0x1acdb8,_0x41eeb9]of Object['entries'](_0x4106c3))this['editor']['config']['set']('roots.'+_0x1acdb8+'.initialData',_0x41eeb9);for(const [_0x12d187,_0x7f1287]of Object['entries'](_0x58c274))this['editor']['config']['set']('roots.'+_0x12d187+'.modelAttributes',_0x7f1287);const _0x24fdda=this['editor']['model']['document'];for(const [_0x30ce34,_0x4c66a]of Object['entries'](_0x10a2a8)){this['editor']['config']['set']('roots.'+_0x30ce34+'.modelElement',_0x4c66a);const _0x39b022=_0x24fdda['getRoot'](_0x30ce34);_0x39b022&&_0x39b022['name']!==_0x4c66a&&(_0x24fdda['roots']['remove'](_0x30ce34),_0x24fdda['createRoot'](_0x4c66a,_0x30ce34));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2f68cf=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2f68cf['add'](Rt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x4e06f7){const _0x1156c1=this['repository']['getRevisions']();_0x1156c1['reverse']();let _0x28dfed=0x0;for(;_0x28dfed<_0x1156c1['length'];){const _0xe0baec=_0x1156c1[_0x28dfed];if(_0xe0baec===this['currentRevision']){_0x28dfed++;continue;}if(_0xe0baec['id']===this['_initialRevisionId'])break;const _0xa9cee6=_0x4e06f7['toVersion']-_0xe0baec['toVersion']||_0x4e06f7['fromVersion']-_0xe0baec['fromVersion'];if(_0xa9cee6>0x0)break;if(_0xa9cee6<0x0)_0x28dfed++;else{if(!_0x4e06f7['creator']&&_0xe0baec['creator'])break;if(_0xe0baec['creator']||!_0x4e06f7['creator']){if(_0x4e06f7['createdAt']>_0xe0baec['createdAt'])break;_0x28dfed++;}else _0x28dfed++;}}return _0x28dfed;}_getFromVersion(_0x22f13e){const _0xe65dcc=this['repository']['getRevisions']();_0xe65dcc['reverse'](),_0xe65dcc['shift']();const _0x586acf=_0xe65dcc['find'](_0x2057af=>_0x2057af['toVersion']<=_0x22f13e)['toVersion'];return _0x586acf<this['_startingVersion']?this['_startingVersion']:_0x586acf;}['_makeRevision']({name:_0x1fb4b5,from:_0x1031b6,to:_0x21bb09,creatorId:_0x24942e,id:_0x236c11}){const _0x445da5=this['buildRevisionData']({'from':_0x1031b6,'to':_0x21bb09});_0x445da5['name']=_0x1fb4b5,_0x445da5['creatorId']=_0x24942e,_0x445da5['id']=_0x236c11;const _0x1c3612=this['addRevisionData'](_0x445da5);return this['adapter']&&this['_bufferUpdate'](_0x445da5['id'],_0x445da5,!0x0),_0x1c3612;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},At=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x50ce88){this['editor']=_0x50ce88,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(_0x161598){this['source']=_0x161598;const _0x4dc264=new Map(),_0x2e8beb=new Map(),_0x381366=this['editor']['model']['document']['roots']['map'](_0x41d027=>_0x41d027['rootName']);for(const _0x47d089 of _0x381366){const _0x32aef7=this['editor']['model']['document']['getRoot'](_0x47d089),_0x418207=It(_0x32aef7);_0x4dc264['set'](_0x47d089,_0x418207),_0x2e8beb['set'](_0x47d089,Object['fromEntries'](_0x32aef7['getAttributes']()));}const _0x33fef4=Array['from'](this['editor']['model']['markers'])['map'](_0x382043=>[_0x382043['name'],_0x382043['getRange']()]),_0x5e1fa4=this['source']['version'];this['_saveMetaData'](_0x5e1fa4,_0x4dc264,_0x33fef4,_0x2e8beb),this['_startingRevisionId']=this['_revisionId'];const _0x2f4cc9=new Map(),_0x425b7a=new Map();for(const _0x248f2a of _0x381366){const _0x17bf49=St(_0x248f2a,this['editor']['model']['document']['getRoot'](_0x248f2a)['name']);_0x2f4cc9['set'](_0x248f2a,_0x17bf49),_0x425b7a['set'](_0x248f2a,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2f4cc9,[],_0x425b7a);}getData(_0x4574c3,_0x5b8a17){if(this['_lastFrom']===_0x4574c3&&this['_lastTo']<=_0x5b8a17)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5b8a17,!0x0);else{if(!this['_savedMetaData']['has'](_0x4574c3)){const _0xacd49f=this['_getPreviousFrom'](_0x4574c3);this['_calculateMetaData'](_0xacd49f,_0x4574c3,!0x1);}this['_calculateMetaData'](_0x4574c3,_0x5b8a17,!0x0);}return this['_lastFrom']=_0x4574c3,this['_lastTo']=_0x5b8a17,this['_getState']();}loadState(_0x3f6f53){if(!this['_savedMetaData']['has'](_0x3f6f53['fromVersion'])){const _0x87dd94=this['_getPreviousFrom'](_0x3f6f53['fromVersion']);this['_calculateMetaData'](_0x87dd94,_0x3f6f53['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3f6f53['fromVersion'],_0x3f6f53['toVersion'],!0x1);const _0x23b312=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3f6f53['fromVersion'],this['_lastTo']=_0x3f6f53['toVersion'];for(const _0x6669c6 in _0x3f6f53['diffData']){const _0x559b35=_0x3f6f53['diffData'][_0x6669c6]['attachChange'],_0x267569=_0x3ef3d4(_0x3f6f53['diffData'][_0x6669c6]['attributesBefore'])||{},_0x57be58=_0x3f6f53['diffData'][_0x6669c6],_0x580fba=_0x23b312['_makeModelFromViewString'](_0x57be58['deletions'],_0x57be58['rootElementName']||'$root');_0x580fba['rootName']=_0x6669c6,_0x580fba['_isAttached']=!_0x559b35||!_0x559b35['isAttached'],_0x580fba['isAttached']=()=>_0x580fba['_isAttached'],this['_baseRoots']['set'](_0x6669c6,_0x580fba),this['_baseRootsAttributes']['set'](_0x6669c6,_0x267569),_0x559b35&&this['_touchedRoots']['set'](_0x6669c6,_0x559b35);const _0x58547d=this['_makeIdsRoot'](_0x580fba);this['_baseIdsRoots']['set'](_0x6669c6,_0x58547d);for(const [_0x554ca6,_0x25668e]of _0x580fba['markers']){if(!_0x554ca6['startsWith']('revision:'))continue;const _0x35f675=_0x554ca6['split'](':')[0x2],_0x19a584=_0x57be58['aiSources']?.[_0x554ca6]||null;for(const _0x4fc244 of _0x25668e['getWalker']({'singleCharacters':!0x0})){const _0x130a70=this['_getVidAttributeName'](_0x4fc244),_0x1870f2='elementEnd'==_0x4fc244['type']?_0x4fc244['previousPosition']['path']['slice'](0x0,-0x1):_0x4fc244['previousPosition']['path'],_0x3d7853=_0x58547d['getNodeByPath'](_0x1870f2)['getAttribute'](_0x130a70);this['_touched']['set'](_0x3d7853,{'userId':_0x35f675,'aiSource':_0x19a584});}_0x580fba['markers']['delete'](_0x554ca6);}}this['_startingRevisionId']=this['_revisionId'];const _0x440ce4=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x54b1b0=>!this['_touched']['has'](_0x54b1b0));let _0x36e363=0x0;const _0x40d14b=new Map();for(const _0x61c373 in _0x3f6f53['diffData']){const _0x2b82d3=_0x3f6f53['diffData'][_0x61c373]['attachChange'],_0x2326b2=_0x3ef3d4(_0x3f6f53['diffData'][_0x61c373]['attributesAfter'])||{},_0x3ccd44=_0x3f6f53['diffData'][_0x61c373],_0x5efdea=_0x23b312['_makeModelFromViewString'](_0x3ccd44['insertions'],_0x3ccd44['rootElementName']||'$root');_0x5efdea['rootName']=_0x61c373,_0x5efdea['_isAttached']=!_0x2b82d3||_0x2b82d3['isAttached'],_0x5efdea['isAttached']=()=>_0x5efdea['_isAttached'],this['_diffRoots']['set'](_0x61c373,_0x5efdea),this['_diffRootsAttributes']['set'](_0x61c373,_0x2326b2);const _0x271035=this['_makeIdsRoot'](_0x5efdea,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x61c373,_0x271035),_0x40d14b['set'](_0x61c373,_0x5efdea['isAttached']()?_0x2326b2:{});for(const [_0x133205,_0x2b61a0]of _0x5efdea['markers']){if(!_0x133205['startsWith']('revision:'))continue;const _0x45fa95=_0x133205['split'](':')[0x2],_0x25871b=_0x3ccd44['aiSources']?.[_0x133205]||null;for(const _0x49a1fc of _0x2b61a0['getWalker']({'singleCharacters':!0x0})){const _0x3c6bab=this['_getVidAttributeName'](_0x49a1fc),_0x3d90ef=this['_revisionId']++,_0x45a4ab='elementEnd'==_0x49a1fc['type']?_0x49a1fc['previousPosition']['path']['slice'](0x0,-0x1):_0x49a1fc['previousPosition']['path'];_0x271035['getNodeByPath'](_0x45a4ab)['_setAttribute'](_0x3c6bab,_0x3d90ef),this['_touched']['set'](_0x3d90ef,{'userId':_0x45fa95,'aiSource':_0x25871b});}_0x5efdea['markers']['delete'](_0x133205);}for(const _0x206fa1 of this['editor']['model']['createRangeIn'](_0x5efdea)['getWalker']({'singleCharacters':!0x0})){const _0x18881e=this['_getVidAttributeName'](_0x206fa1),_0xff4211='elementEnd'==_0x206fa1['type']?_0x206fa1['previousPosition']['path']['slice'](0x0,-0x1):_0x206fa1['previousPosition']['path'],_0x1672cc=_0x271035['getNodeByPath'](_0xff4211);_0x1672cc['getAttribute'](_0x18881e)>0x0||_0x1672cc['_setAttribute'](_0x18881e,_0x440ce4[_0x36e363++]);}for(const [_0x3d87f6,_0x1bb539]of _0x5efdea['markers'])_0x3d87f6['startsWith']('revision:')||this['_markers']['set'](_0x3d87f6,_0x1bb539);}const {roots:_0x525005}=this['_savedMetaData']['get'](_0x3f6f53['fromVersion']),{roots:_0x43c712}=this['_savedMetaData']['get'](_0x3f6f53['toVersion']),_0xdcbaf1=It(_0x525005['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xdcbaf1),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xdcbaf1,Number['NEGATIVE_INFINITY']));const _0x4a2416=It(_0x43c712['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x4a2416),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4a2416));const _0x52f2c4=Array['from'](this['_diffRoots'])['map'](([_0x363393,_0x1b22c1])=>[_0x363393,It(_0x1b22c1)]);this['_saveMetaData'](this['_lastTo'],_0x52f2c4,this['_markers'],_0x40d14b);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x1789e3,_0x54162f,_0x397bd3,_0x36c7fb){const _0x317d90=new Map(_0x54162f),_0x493c8c=new Map(_0x3ef3d4(_0x36c7fb)),_0x2e2368=new Map();for(const [_0x62e75a,_0x4ab433]of _0x397bd3)_0x2e2368['set'](_0x62e75a,{'start':_0x4ab433['start']['clone'](),'end':_0x4ab433['end']['clone'](),'rootName':_0x4ab433['root']['rootName']});this['_savedMetaData']['set'](_0x1789e3,{'roots':_0x317d90,'markers':_0x2e2368,'rootsAttributes':_0x493c8c});}_removeMetaData(_0x3ea5c7){this['_savedMetaData']['delete'](_0x3ea5c7);}_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(_0x2a0cda,_0x330809=null){let _0x51d3f9=null;_0x2a0cda['is']('documentFragment')||(_0x51d3f9=new _0x51c9e7(_0x2a0cda['name'],{'vid_start':null===_0x330809?this['_revisionId']++:_0x330809++}));const _0x2f15f6=[];for(const _0x3f25c0 of _0x2a0cda['getChildren']())if(_0x3f25c0['is']('element')){_0x2f15f6['push'](this['_makeIdsRoot'](_0x3f25c0,_0x330809));const _0x580e33=_0x2f15f6[_0x2f15f6['length']-0x1];null!==_0x330809&&(_0x330809=_0x580e33['is']('element','$text')?_0x580e33['getAttribute']('vid')+0x1:_0x580e33['getAttribute']('vid_end')+0x1);}else{for(let _0x3c1e79=0x0;_0x3c1e79<_0x3f25c0['offsetSize'];_0x3c1e79++)_0x2f15f6['push'](new _0x51c9e7('$text',{'vid':null===_0x330809?this['_revisionId']++:_0x330809++}));}if(_0x2a0cda['is']('documentFragment')){const _0x1da0c3=St(_0x2a0cda['rootName'],_0x2a0cda['name']);return _0x1da0c3['_insertChild'](0x0,_0x2f15f6),_0x1da0c3;}return _0x51d3f9['_setAttribute']('vid_end',null===_0x330809?this['_revisionId']++:_0x330809),_0x51d3f9['_insertChild'](0x0,_0x2f15f6),_0x51d3f9;}_calculateMetaData(_0x3fe51e,_0x10fa16,_0x47aa30){this['_reset']();const {roots:_0x163251,markers:_0x40d8b3,rootsAttributes:_0x2ba518}=this['_savedMetaData']['get'](_0x3fe51e);this['_baseRoots']=new Map(_0x163251),this['_baseRootsAttributes']=new Map(_0x3ef3d4(_0x2ba518));for(const [_0x55e388,_0x454c01]of this['_baseRoots'])if('$graveyard'!==_0x55e388&&(this['_diffRoots']['set'](_0x55e388,It(_0x454c01)),this['_diffRootsAttributes']=new Map(_0x3ef3d4(_0x2ba518)),_0x47aa30)){const _0x4ab60a=this['_revisionId'];this['_idsRoots']['set'](_0x55e388,this['_makeIdsRoot'](_0x454c01)),this['_baseIdsRoots']['set'](_0x55e388,this['_makeIdsRoot'](_0x454c01,_0x4ab60a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',It(this['_baseRoots']['get']('$graveyard'))),_0x47aa30&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x167971,_0xec34e0]of _0x40d8b3){const _0x1eba34=this['_baseRoots']['get'](_0xec34e0['rootName']),_0x57bd24=this['_diffRoots']['get'](_0xec34e0['rootName']),_0xeaf704=new _0x54cb06(_0x1ef4a1(_0xec34e0['start'],_0x1eba34),_0x1ef4a1(_0xec34e0['end'],_0x1eba34)),_0x4f72bc=_0x9e12d7(_0xeaf704,_0x57bd24);_0x1eba34['markers']['set'](_0x167971,_0xeaf704),this['_markers']['set'](_0x167971,_0x4f72bc);}this['_applyOperations'](_0x3fe51e,_0x10fa16,_0x47aa30);}_applyOperations(_0x174e19,_0x361ada,_0x508b71){for(const _0x131843 of this['source']['getOperations'](_0x174e19,_0x361ada))this['_handleOperation'](_0x131843,_0x508b71);for(const _0x25ee07 of this['_diffRoots']['values']())_0x25ee07['markers']['clear']();for(const [_0x4fd351,_0x129a6a]of this['_markers'])this['_diffRoots']['get'](_0x129a6a['root']['rootName'])['markers']['set'](_0x4fd351,_0x129a6a['clone']());const _0x5057d4=new Map(),_0x2cef01=new Map();for(const [_0x1fbb8a,_0x2c4dad]of this['_diffRoots'])_0x5057d4['set'](_0x1fbb8a,It(_0x2c4dad)),_0x2cef01['set'](_0x1fbb8a,this['_diffRootsAttributes']['get'](_0x1fbb8a));this['_saveMetaData'](_0x361ada,_0x5057d4,this['_markers'],_0x2cef01);}_getPreviousFrom(_0x901581){const _0x48df8e=Array['from'](this['_savedMetaData']['keys']());_0x48df8e['sort']((_0x5ba43f,_0x5cedb3)=>_0x5ba43f-_0x5cedb3),_0x48df8e['reverse']();for(const _0x11898f of _0x48df8e)if(_0x11898f<_0x901581)return _0x11898f;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x132051,_0x2e789d){const _0x401236=Array['from'](_0x2e789d['markers'])['map'](([_0x28e294,_0xba0ede])=>[_0x28e294,_0x9e12d7(_0xba0ede,_0x132051)]);_0x132051['markers']=new Map(_0x401236);}_transformMarkers(_0x2d6613){for(const _0x3480a0 of this['_markers']['values']()){const _0x533d8f=_0x3480a0['getTransformedByOperation'](_0x2d6613),_0x495c54=_0x54cb06['_createFromRanges'](_0x533d8f);_0x3480a0['start']=_0x495c54['start'],_0x3480a0['end']=_0x495c54['end'];}}_handleOperation(_0x5d264c,_0x15581f){if('addRoot'!=_0x5d264c['type']&&'detachRoot'!=_0x5d264c['type']){if('insert'==_0x5d264c['type']){const _0x29bda0=_0x5d264c['position']['root'],_0x410cc1=_0x29bda0['rootName'],_0x11db4d=_0x29bda0['name'];this['_diffRoots']['has'](_0x410cc1)||(this['_diffRoots']['set'](_0x410cc1,St(_0x410cc1,_0x11db4d,!0x0)),this['_diffRootsAttributes']['set'](_0x410cc1,{}),_0x15581f&&this['_idsRoots']['set'](_0x410cc1,St(_0x410cc1,_0x11db4d,!0x0)));}else{if('addRootAttribute'==_0x5d264c['type']||'removeRootAttribute'==_0x5d264c['type']||'changeRootAttribute'==_0x5d264c['type'])return void this['_handleRootAttributeOperation'](_0x5d264c);'marker'==_0x5d264c['type']&&this['_handleMarkerOperation'](_0x5d264c);}if('marker'!==_0x5d264c['type']){const _0x48f5bd=this['_cloneOperation'](_0x5d264c,this['_diffRoots']);_0x48f5bd['_execute'](),this['_transformMarkers'](_0x48f5bd);}if(_0x15581f)switch(_0x5d264c['type']){case'insert':this['_handleInsertOperation'](_0x5d264c);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5d264c);break;case'merge':this['_handleMergeOperation'](_0x5d264c);break;case'split':this['_handleSplitOperation'](_0x5d264c);}}else this['_handleRootOperation'](_0x5d264c,_0x15581f);}_cloneOperation(_0x49d1d7,_0x34885c){const _0x52f379=_0x49d1d7['clone']();return _0x52f379['_authorId']=_0x49d1d7['_authorId'],_0x52f379['_aiSource']=_0x49d1d7['_aiSource'],_0x52f379['baseVersion']=null,_0x153219(_0x52f379,_0x34885c),_0x52f379;}_getBaseVids(_0x5a5dd4){return _0x5a5dd4['map'](_0x107721=>{const _0xea3177=this['_getVidAttributeName'](_0x107721);return Number(_0x107721['item']['getAttribute'](_0xea3177));});}_generateTape(_0x434f62,_0x130118){if(_0x434f62['is']('element','$text'))_0x130118['push']({'item':_0x434f62,'type':'text'});else{_0x434f62['is']('element')&&_0x130118['push']({'item':_0x434f62,'type':'elementStart'});for(const _0x41d508 of _0x434f62['getChildren']())this['_generateTape'](_0x41d508,_0x130118);_0x434f62['is']('element')&&_0x130118['push']({'item':_0x434f62,'type':'elementEnd'});}return _0x130118;}_getState(){const _0x5e056b=new Map(this['_touched']),_0x2e592c=new Map(_0x5e056b),_0xbf3e34=new Map(),_0x56545d={'insertions':{},'deletions':{}},_0x1dd7fe={'insertions':{},'deletions':{}},_0x3c75aa=new Map(),_0x2094c2=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x18f327=new Map();_0x2094c2['delete']('$graveyard');for(const _0x468e50 of _0x2094c2){const _0x210390=(this['_diffRoots']['get'](_0x468e50)??this['_baseRoots']['get'](_0x468e50))['name'],_0x54d1d2=this['_diffRoots']['get'](_0x468e50)||St(_0x468e50,_0x210390,!0x1),_0x28ba80=this['_baseRoots']['get'](_0x468e50)||St(_0x468e50,_0x210390,!0x1);_0x54d1d2['isAttached']()||_0x28ba80['isAttached']()?(_0x18f327['set'](_0x468e50,_0x210390),_0x56545d['insertions'][_0x468e50]=It(_0x54d1d2),_0x56545d['deletions'][_0x468e50]=It(_0x28ba80),this['_copyMarkers'](_0x56545d['deletions'][_0x468e50],_0x28ba80),this['_copyMarkers'](_0x56545d['insertions'][_0x468e50],_0x54d1d2),_0x1dd7fe['insertions'][_0x468e50]=this['_generateTape'](this['_idsRoots']['get'](_0x468e50),[]),_0x1dd7fe['deletions'][_0x468e50]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x468e50)||St(_0x468e50,_0x210390,!0x1),[])):_0x2094c2['delete'](_0x468e50);}for(const _0x42dd20 of _0x2094c2){const _0xc97982=_0x1dd7fe['insertions'][_0x42dd20];for(const _0x17283a of _0xc97982){const _0x315bd2=this['_getVidAttributeName'](_0x17283a),_0xd8f632=_0x17283a['item']['getAttribute'](_0x315bd2);_0x2e592c['delete'](_0xd8f632),_0xd8f632>=this['_startingRevisionId']&&_0xbf3e34['set'](_0xd8f632,_0x5e056b['get'](_0xd8f632));}}for(const _0x10f361 of _0x2094c2){const _0x143a5f=_0x1dd7fe['insertions'][_0x10f361],_0x5a4b2a=this['_getBaseVids'](_0x1dd7fe['deletions'][_0x10f361]);let _0x5747f1=0x0;for(const _0x33b149 of _0x143a5f){const _0x298ea4=this['_getVidAttributeName'](_0x33b149),_0x21329d=_0x33b149['item']['getAttribute'](_0x298ea4);if(!_0xbf3e34['has'](_0x21329d)&&!_0x3c75aa['has'](_0x21329d)){if(_0x2e592c['has'](_0x21329d))_0x5747f1++;else{if(_0x21329d!=_0x5a4b2a[_0x5747f1]){const _0x56d0e6=_0x5e056b['get'](_0x21329d)||_0x5e056b['get'](_0x5a4b2a[_0x5747f1]);for(;_0x21329d!=_0x5a4b2a[_0x5747f1];)_0x2e592c['has'](_0x5a4b2a[_0x5747f1])||(_0x3c75aa['set'](_0x5a4b2a[_0x5747f1],_0x56d0e6),_0x5e056b['set'](_0x5a4b2a[_0x5747f1],_0x56d0e6)),_0x5747f1++;}_0x5747f1++;}}}}for(const _0x5d4c8a of _0x2094c2){const _0x12599f=_0x1dd7fe['insertions'][_0x5d4c8a];for(const _0x3b5e72 of _0x12599f){const _0xf8371a=this['_getVidAttributeName'](_0x3b5e72),_0x530fb8=_0x3b5e72['item']['getAttribute'](_0xf8371a);if(_0x3c75aa['has'](_0x530fb8)){const _0xf219c=_0x3c75aa['get'](_0x530fb8);_0x2e592c['has'](_0x530fb8)||_0x2e592c['set'](_0x530fb8,{..._0xf219c}),_0xbf3e34['set'](_0x530fb8,{..._0xf219c});}}}for(const _0x4803cf of _0x2e592c['keys']())_0x4803cf>=this['_startingRevisionId']&&_0x2e592c['delete'](_0x4803cf);const _0x42ebd3=new Map();for(const _0x4b59b5 of _0x2094c2){let _0x1b2e7e=_0x1dd7fe['insertions'][_0x4b59b5];for(const _0x45304b of _0x1b2e7e)if(_0x45304b['item']['is']('element','tableCell')){const _0xece137=this['_getVidAttributeName'](_0x45304b),_0x26cf2c=_0x45304b['item']['getAttribute'](_0xece137);if(_0xbf3e34['has'](_0x26cf2c)){const _0x4f4bd5=_0x45304b['item']['parent']['parent']['getAttribute']('vid_start'),_0x403f6c=_0xbf3e34['get'](_0x26cf2c),_0x2c24ef=_0x42ebd3['get'](_0x4f4bd5)||{'users':new Set(),'aiSource':null};_0x2c24ef['users']['add'](_0x403f6c['userId']),_0x2c24ef['aiSource']=_0x2c24ef['aiSource']||_0x403f6c['aiSource']||null,_0x42ebd3['set'](_0x4f4bd5,_0x2c24ef);}}_0x1b2e7e=_0x1dd7fe['deletions'][_0x4b59b5];for(const _0x4434b1 of _0x1b2e7e)if(_0x4434b1['item']['is']('element','tableCell')){const _0x383b3e=this['_getVidAttributeName'](_0x4434b1),_0x1281d6=_0x4434b1['item']['getAttribute'](_0x383b3e);if(_0x2e592c['has'](_0x1281d6)){const _0x4424e3=_0x4434b1['item']['parent']['parent']['getAttribute']('vid_start'),_0x1fbe39=_0x2e592c['get'](_0x1281d6),_0x311d78=_0x42ebd3['get'](_0x4424e3)||{'users':new Set(),'aiSource':null};_0x311d78['users']['add'](_0x1fbe39['userId']),_0x311d78['aiSource']=_0x311d78['aiSource']||_0x1fbe39['aiSource']||null,_0x42ebd3['set'](_0x4424e3,_0x311d78);}}for(const _0x230162 of _0x42ebd3['keys']())(_0xbf3e34['has'](_0x230162)||_0x2e592c['has'](_0x230162))&&_0x42ebd3['delete'](_0x230162);}for(const _0x377ee7 of _0x2094c2){const _0x5de934=_0x1dd7fe['insertions'][_0x377ee7];let _0x5ed98c=null,_0x513407=null,_0x43dfad=null;for(const _0x3ec71a of _0x5de934){const _0x51072a=this['_getVidAttributeName'](_0x3ec71a),_0x25b5c7=_0x3ec71a['item']['getAttribute'](_0x51072a),_0x3c0536=_0x42ebd3['get'](_0x25b5c7);if(_0x3c0536&&'elementStart'==_0x3ec71a['type']&&(_0x5ed98c=Array['from'](_0x3c0536['users'])[0x0],_0x513407=_0x3c0536['aiSource'],_0x43dfad=_0x3ec71a['item']['getAttribute']('vid_end')),_0x5ed98c){const _0x2caf62=_0x513407||_0x2e592c['get'](_0x25b5c7)?.['aiSource']||null,_0x45b545=_0x513407||_0xbf3e34['get'](_0x25b5c7)?.['aiSource']||null;_0x2e592c['set'](_0x25b5c7,{'userId':_0x5ed98c,'aiSource':_0x2caf62}),_0xbf3e34['set'](_0x25b5c7,{'userId':_0x5ed98c,'aiSource':_0x45b545});}_0x25b5c7==_0x43dfad&&(_0x5ed98c=null,_0x43dfad=null);}}const _0x350529={},_0x2e9ceb=new Set();for(const _0x51e978 of _0x2094c2){const _0x335f6c=_0x56545d['deletions'][_0x51e978],_0x4e242c=_0x56545d['insertions'][_0x51e978];for(const {userId:_0x165eaa}of this['_touchedMarkers']['values']())null!==_0x165eaa&&_0x2e9ceb['add'](_0x165eaa);for(const {userId:_0xf08642}of this['_touchedRoots']['values']())null!==_0xf08642&&_0x2e9ceb['add'](_0xf08642);const _0xa9dc76={};this['_markChanges'](_0x4e242c,_0x1dd7fe['insertions'][_0x51e978],_0xbf3e34,'insertion',_0x2e9ceb,_0xa9dc76),this['_markChanges'](_0x335f6c,_0x1dd7fe['deletions'][_0x51e978],_0x2e592c,'deletion',_0x2e9ceb,_0xa9dc76),this['_collectSuggestionAiSources'](_0x4e242c,_0xa9dc76),this['_collectSuggestionAiSources'](_0x335f6c,_0xa9dc76),_0x350529[_0x51e978]={'insertions':this['_prepareViewToSave'](_0x4e242c),'deletions':this['_prepareViewToSave'](_0x335f6c),'attachChange':this['_touchedRoots']['get'](_0x51e978)||null,'attributesBefore':_0x3ef3d4(this['_baseRootsAttributes']['get'](_0x51e978))||{},'attributesAfter':_0x3ef3d4(this['_diffRootsAttributes']['get'](_0x51e978)),'rootElementName':_0x18f327['get'](_0x51e978),'aiSources':_0xa9dc76};}const _0x3e3ac8=Array['from'](_0xbf3e34['values']())['some'](_0x1f550c=>!(!_0x1f550c||!_0x1f550c['aiSource']))||Array['from'](_0x2e592c['values']())['some'](_0x3dd418=>!(!_0x3dd418||!_0x3dd418['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x1b1a32=>this['_aiTouchedMarkers']['has'](_0x1b1a32));return{'diffData':_0x350529,'authorsIds':Array['from'](_0x2e9ceb),'hasAIChanges':_0x3e3ac8};}_collectSuggestionAiSources(_0x1ad1e3,_0x5727b6){const _0x4f5a46=_0x1ad1e3['markers'];for(const _0x5e470b of _0x4f5a46['keys']()){if(!_0x5e470b['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x5e470b))continue;const _0x292f58=this['_aiTouchedMarkers']['get'](_0x5e470b);_0x292f58&&(_0x5727b6[_0x5e470b]=_0x292f58);}}_processRootBeforeSave(_0x1c3373){for(const [,_0x3428ed]of _0x1c3373['markers']){const _0x575d71=_0x3428ed['start']['getAncestors']()['filter'](_0x36b0d0=>'tableCell'==_0x36b0d0['name']);for(const _0x1815f2 of _0x575d71)0x1==_0x1815f2['childCount']&&_0x1815f2['getChild'](0x0)['is']('element','paragraph')&&_0x1815f2['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x107d60){this['_processRootBeforeSave'](_0x107d60);const _0x450c30=this['editor']['data']['toView'](_0x107d60,{}),_0x2553a4=Array['from'](_0x450c30['getChildren']())['map'](_0xe5845c=>this['_getViewJson'](_0xe5845c));return JSON['stringify'](_0x2553a4);}_getViewJson(_0x339b0e){if(_0x339b0e['is']('$text'))return _0x339b0e['data'];{const _0x31cc67=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1b530e=_0x339b0e,_0x3483f4=this['editor']['data']['htmlProcessor']['domConverter'],_0x32d80a={'type':_0x31cc67['_getTypeCharForViewElement'](_0x1b530e),'name':_0x1b530e['name'],'attributes':Array['from'](_0x1b530e['getAttributes']()),'children':Array['from'](_0x1b530e['getChildren']())['map'](_0x58bf88=>this['_getViewJson'](_0x58bf88))};if(_0x339b0e['is']('uiElement')&&'$comment'!=_0x339b0e['name']){const _0x2c0279=_0x339b0e['render'](_0x3483f4['domDocument'],_0x3483f4);_0x32d80a['children']['push'](_0x2c0279['outerHTML']);}else{if(_0x339b0e['is']('rawElement')){const _0x4055a4=_0x3483f4['domDocument']['createElement'](_0x1b530e['name']);_0x339b0e['render'](_0x4055a4,_0x3483f4),_0x32d80a['children']['push'](_0x4055a4['innerHTML']);}}const _0x326aec=Array['from'](_0x1b530e['getCustomProperties']());_0x326aec['length']>0x0&&(_0x32d80a['customProperties']=_0x326aec);const _0x579385=_0x1b530e['getFillerOffset']();return null!==_0x579385&&(_0x32d80a['fillerOffset']=_0x579385),_0x32d80a;}}['_markChanges'](_0xbe6a2c,_0x25812a,_0xa71113,_0x266914,_0x3df8e8,_0x2fcc34){let _0x57a277=null,_0x4ecd91=null,_0x5a01c1=0x0;const _0x5a7a1c=this['editor']['model'];for(let _0x217055=0x0;_0x217055<_0x25812a['length'];_0x217055++){const _0x134afc=this['_getVidAttributeName'](_0x25812a[_0x217055]),_0x57c61b=_0x25812a[_0x217055]['item']['getAttribute'](_0x134afc),_0x3a18dd=_0xa71113['get'](_0x57c61b),_0x3966b5=_0x217055==_0x25812a['length']-0x1;!_0x57a277&&_0x3a18dd&&(_0x57a277=_0x3a18dd,_0x4ecd91=_0x25812a[_0x217055]);const _0x33ae51=!!_0x57a277&&!!_0x3a18dd&&_0x3a18dd['userId']!=_0x57a277['userId'],_0x1edb4e=!!_0x57a277&&!!_0x3a18dd&&_0x3a18dd['aiSource']!=_0x57a277['aiSource'];_0x57a277&&(!_0x3a18dd||_0x33ae51||_0x1edb4e)&&(_0x4b3094(_0x3a18dd,Et(_0x4ecd91,_0xbe6a2c,_0x5a7a1c),Et(_0x25812a[_0x217055],_0xbe6a2c,_0x5a7a1c)),_0x57a277=_0x3a18dd||null,_0x4ecd91=_0x3a18dd?_0x25812a[_0x217055]:null),_0x57a277&&_0x3966b5&&_0x4b3094(_0x3a18dd,Et(_0x4ecd91,_0xbe6a2c,_0x5a7a1c),Ot(_0x25812a[_0x217055],_0xbe6a2c,_0x5a7a1c));}function _0x4b3094(_0x15b7ec,_0x54a7ce,_0x506900){const _0x3cf19b=_0x57a277['userId'],_0x385bb2=_0x57a277['aiSource'],_0x52eaf8='revision:'+_0x266914+':'+_0x3cf19b+':'+_0x5a01c1++,_0x124010=_0x5a7a1c['createRange'](_0x54a7ce,_0x506900);_0xbe6a2c['markers']['set'](_0x52eaf8,_0x124010),_0x385bb2&&(_0x2fcc34[_0x52eaf8]=_0x385bb2),null!==_0x3cf19b&&_0x3df8e8['add'](_0x3cf19b);}}_getVidAttributeName(_0x2df8b2){switch(_0x2df8b2['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x250305){const _0x11ad12=this['_idsRoots']['get'](_0x250305['position']['root']['rootName']),_0x34b3fd=_0x1ef4a1(_0x250305['position'],_0x11ad12),_0x2fca9e=null===_0x250305['_authorId']?null:_0x250305['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x52c5b3=_0x250305['_aiSource']||null,_0x26b05d=_0x34b3fd['parent'],_0x3244d0=this['_revisionId'],_0x2f4b11=[];for(const _0x2cc5a1 of _0x250305['nodes'])if(_0x2cc5a1['is']('element'))_0x2f4b11['push'](this['_makeIdsRoot'](_0x2cc5a1));else{for(let _0x460ef7=0x0;_0x460ef7<_0x2cc5a1['offsetSize'];_0x460ef7++)_0x2f4b11['push'](new _0x51c9e7('$text',{'vid':this['_revisionId']++}));}const _0x1ce3ed=this['_revisionId'];for(let _0x30810d=_0x3244d0;_0x30810d<_0x1ce3ed;_0x30810d++)this['_touched']['set'](_0x30810d,{'userId':_0x2fca9e,'aiSource':_0x52c5b3});_0x26b05d['_insertChild'](_0x34b3fd['offset'],_0x2f4b11);}_setTouched(_0x183955,_0x270e43,_0x2b188b){this['_touched']['set'](_0x183955,{'userId':_0x270e43,'aiSource':_0x2b188b||this['_touched']['get'](_0x183955)?.['aiSource']||null});}_handleMoveOperation(_0x56efc9){(_0x56efc9=this['_cloneOperation'](_0x56efc9,this['_idsRoots']))['_execute']();const _0x1decab=null===_0x56efc9['_authorId']?null:_0x56efc9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x249318=_0x56efc9['_aiSource']||null,_0x3f8322=_0x56efc9['getMovedRangeStart'](),_0x595229=_0x3f8322['parent'],_0x197527=_0x3f8322['offset'],_0x335013=(_0x59d563,_0x2c59ef,_0x6a8684)=>{for(let _0x3aa278=_0x2c59ef;_0x3aa278<_0x6a8684;_0x3aa278++){const _0x16c0f5=_0x59d563['getChild'](_0x3aa278);_0x16c0f5['is']('element','$text')?this['_setTouched'](_0x16c0f5['getAttribute']('vid'),_0x1decab,_0x249318):(this['_setTouched'](_0x16c0f5['getAttribute']('vid_start'),_0x1decab,_0x249318),_0x335013(_0x16c0f5,0x0,_0x16c0f5['childCount']),this['_setTouched'](_0x16c0f5['getAttribute']('vid_end'),_0x1decab,_0x249318));}};_0x335013(_0x595229,_0x197527,_0x197527+_0x56efc9['howMany']);}_handleMergeOperation(_0xe4657e){const _0x566a13=null===(_0xe4657e=this['_cloneOperation'](_0xe4657e,this['_idsRoots']))['_authorId']?null:_0xe4657e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f98e7=_0xe4657e['_aiSource']||null,_0x51e478=_0xe4657e['targetPosition']['parent'],_0x2d78a2=_0xe4657e['sourcePosition']['parent'],_0x4226b9=_0x51e478['getAttribute']('vid_end'),_0x3940ae=_0x2d78a2['getAttribute']('vid_start');_0x51e478['_setAttribute']('vid_end',_0x2d78a2['getAttribute']('vid_end')),_0x2d78a2['_setAttribute']('vid_end',_0x4226b9),this['_setTouched'](_0x3940ae,_0x566a13,_0x1f98e7),this['_setTouched'](_0x4226b9,_0x566a13,_0x1f98e7),_0xe4657e['_execute']();}_handleSplitOperation(_0x2ff5af){const _0x341368=null===(_0x2ff5af=this['_cloneOperation'](_0x2ff5af,this['_idsRoots']))['_authorId']?null:_0x2ff5af['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37dc80=_0x2ff5af['_aiSource']||null,_0x1557a1=_0x2ff5af['graveyardPosition'],_0x16a100=_0x2ff5af['splitPosition']['parent'];_0x2ff5af['_execute']();const _0x2b9da0=_0x16a100['getAttribute']('vid_end'),_0x42498d=_0x2ff5af['insertionPosition']['nodeAfter'];if(_0x1557a1){const _0x4b4e56=_0x42498d['getAttribute']('vid_end'),_0x2ef88e=_0x16a100['getAttribute']('vid_end');_0x16a100['_setAttribute']('vid_end',_0x4b4e56),_0x42498d['_setAttribute']('vid_end',_0x2ef88e),this['_setTouched'](_0x16a100['getAttribute']('vid_end'),_0x341368,_0x37dc80),this['_setTouched'](_0x42498d['getAttribute']('vid_start'),_0x341368,_0x37dc80);}else{const _0x5d955e=this['_revisionId']++,_0xe1c782=this['_revisionId']++;_0x16a100['_setAttribute']('vid_end',_0x5d955e),_0x42498d['_setAttribute']('vid_start',_0xe1c782),_0x42498d['_setAttribute']('vid_end',_0x2b9da0),this['_setTouched'](_0x5d955e,_0x341368,_0x37dc80),this['_setTouched'](_0xe1c782,_0x341368,_0x37dc80);}}_handleMarkerOperation(_0x35cd1c){if(!_0x35cd1c['affectsData'])return;const _0x3b30b0=(_0x35cd1c=this['_cloneOperation'](_0x35cd1c,this['_diffRoots']))['oldRange']?_0x35cd1c['oldRange']['root']:null,_0x1e7dd5=_0x35cd1c['newRange']?_0x35cd1c['newRange']['root']:null;_0x3b30b0&&this['_markers']['delete'](_0x35cd1c['name']),_0x1e7dd5&&this['_markers']['set'](_0x35cd1c['name'],_0x35cd1c['newRange']['clone']());const _0xbc3675=null===_0x35cd1c['_authorId']?null:_0x35cd1c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1afb36=_0x35cd1c['name'];if(_0x35cd1c['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x1afb36,_0x35cd1c['_aiSource']),!this['_touchedMarkers']['has'](_0x1afb36))return void this['_touchedMarkers']['set'](_0x1afb36,{'range':_0x35cd1c['oldRange'],'userId':_0xbc3675});const _0x43ec55=this['_touchedMarkers']['get'](_0x1afb36),_0x300aaf=_0x43ec55['range'],_0x18c54a=_0x35cd1c['newRange'];null==_0x300aaf&&null==_0x18c54a||_0x300aaf&&_0x18c54a&&_0x300aaf['isEqual'](_0x18c54a)?this['_touchedMarkers']['delete'](_0x35cd1c['name']):_0x43ec55['userId']=_0xbc3675;}_handleRootOperation(_0x26dd8b,_0x134a06){this['_diffRoots']['has'](_0x26dd8b['rootName'])?this['_diffRoots']['get'](_0x26dd8b['rootName'])['_isAttached']=_0x26dd8b['isAdd']:(this['_diffRoots']['set'](_0x26dd8b['rootName'],St(_0x26dd8b['rootName'],_0x26dd8b['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x26dd8b['rootName'],{}),_0x134a06&&this['_idsRoots']['set'](_0x26dd8b['rootName'],St(_0x26dd8b['rootName'],_0x26dd8b['elementName'],!0x0)));const _0x3e494a=null===_0x26dd8b['_authorId']?null:_0x26dd8b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5a365f=this['_touchedRoots']['get'](_0x26dd8b['rootName']);_0x5a365f&&_0x5a365f['userId']===_0x3e494a?this['_touchedRoots']['delete'](_0x26dd8b['rootName']):this['_touchedRoots']['set'](_0x26dd8b['rootName'],{'userId':_0x3e494a,'isAttached':_0x26dd8b['isAdd']});}_handleRootAttributeOperation(_0x4e6ade){const _0x2fbd7f=this['_diffRootsAttributes']['get'](_0x4e6ade['root']['rootName']);null===_0x4e6ade['newValue']?delete _0x2fbd7f[_0x4e6ade['key']]:_0x2fbd7f[_0x4e6ade['key']]=_0x4e6ade['newValue'];}};function It(_0x3487d5){const _0x5a1bd1=St(_0x3487d5['rootName'],_0x3487d5['name'],_0x3487d5['isAttached']());for(const _0x5d9c33 of _0x3487d5['getChildren']()){const _0x25c170=_0x5d9c33['_clone'](!0x0);_0x5a1bd1['_appendChild'](_0x25c170);}return _0x5a1bd1;}function St(_0x358bcf,_0x2d2798,_0x1ab712=!0x0){const _0x17ba5f=new _0x3e4772();return _0x17ba5f['rootName']=_0x358bcf,_0x17ba5f['name']=_0x2d2798,_0x17ba5f['_isAttached']=_0x1ab712,_0x17ba5f['isAttached']=()=>_0x17ba5f['_isAttached'],_0x17ba5f;}function Et(_0x3752bd,_0x1b7aa6,_0x3f9cbf){const _0x117fb8='elementEnd'==_0x3752bd['type']?_0x3f9cbf['createPositionAt'](_0x3752bd['item'],'end'):_0x3f9cbf['createPositionBefore'](_0x3752bd['item']);return _0x3f9cbf['createPositionFromPath'](_0x1b7aa6,_0x117fb8['path'],_0x117fb8['stickiness']);}function Ot(_0x4b1f1c,_0x5770ee,_0x3c36b7){const _0x57b5b9='elementStart'==_0x4b1f1c['type']?_0x3c36b7['createPositionAt'](_0x4b1f1c['item'],0x0):_0x3c36b7['createPositionAfter'](_0x4b1f1c['item']);return _0x3c36b7['createPositionFromPath'](_0x5770ee,_0x57b5b9['path'],_0x57b5b9['stickiness']);}const Ct=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x306d61();var Tt=class extends Vt{['id'];author;type;data;rootName;constructor(_0x1bfb04){super(),this['id']=_0x1bfb04['id']||_0xd43831(),this['author']=_0x1bfb04['author'],this['type']=_0x1bfb04['type'],this['data']=_0x1bfb04['data']||{},this['rootName']=_0x1bfb04['rootName'],this['set']('createdAt',_0x1bfb04['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Mt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x2f4cca,_0xc7ecd9){this['newRevisionId']=_0x2f4cca,this['oldRevisionId']=_0xc7ecd9,this['changes']=new _0x17289a();}_setChanges(_0x15763d){for(const _0x22ef46 of _0x15763d)this['changes']['add'](_0x22ef46);}},Ht=class extends _0x5ca6f9{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[_0xe140c3,_0x408baa,yt,bt];}constructor(_0x1b97b2){super(_0x1b97b2),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',(_0x4255fb,_0x3bd92b,_0xbc4bdf)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3a0f2f=>{for(const _0x16541d of this['editor']['editing']['view']['document']['roots'])_0xbc4bdf?_0x3a0f2f['removeClass']('ck-editor__editable__overlay',_0x16541d):_0x3a0f2f['addClass']('ck-editor__editable__overlay',_0x16541d);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x522c1b=>null!==_0x522c1b),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x491798,_0x45ced7,_0x19f92d)=>_0x491798&&_0x19f92d?_0x45ced7['changes']['getIndex'](_0x19f92d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x45f6f2,_0x59fa1e)=>_0x45f6f2?_0x59fa1e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x408baa),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x5efb74=this['editor'],_0x282795=new Ft(_0x5efb74,{'direction':'backward'}),_0x2bde64=new Ft(_0x5efb74,{'direction':'forward'});_0x5efb74['commands']['add']('showPreviousChange',_0x282795),_0x5efb74['commands']['add']('showNextChange',_0x2bde64),_0x5efb74['commands']['add']('restoreRevision',new Lt(_0x5efb74)),this['on']('change:numberOfChanges',()=>{_0x282795['refresh'](),_0x2bde64['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5efb74['enableReadOnlyMode']('revision-viewer'),_0x5efb74['plugins']['has']('WidgetToolbarRepository')&&_0x5efb74['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x10f60a){return await this['_utils']['loadRevisionData'](_0x10f60a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x10f60a);}async getRevisionRootsAttributes(_0x565993){return await this['_utils']['loadRevisionData'](_0x565993,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x565993);}async['compare'](_0x2a6a96,_0x42145b,_0x451a87=!0x1){if(!this['isEnabled'])return;const _0xc8fe2b=this['diff'],_0x3d0c03=this['repository'],_0x53c1c5='string'==typeof _0x2a6a96?_0x3d0c03['getRevision'](_0x2a6a96):_0x2a6a96,_0x240ba5='string'==typeof _0x42145b?_0x3d0c03['getRevision'](_0x42145b):_0x42145b,_0x3b2ce8=_0x53c1c5['id'],_0x266aba=_0x240ba5?_0x240ba5['id']:null;if(!_0x451a87&&this['diff']&&this['diff']['newRevisionId']===_0x3b2ce8&&this['diff']['oldRevisionId']===_0x266aba)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Mt(_0x3b2ce8,_0x266aba);const _0x5dc4f7=this['_getRevisionsRange'](_0x53c1c5,_0x240ba5,!0x0)['map'](_0x176a24=>this['_utils']['loadRevisionData'](_0x176a24,this['adapter']));return _0x5dc4f7['push'](new Promise(_0x7ff036=>{setTimeout(_0x7ff036,0x14);})),Promise['all'](_0x5dc4f7)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x173cfc=this['_getDiff'](_0x3b2ce8,_0x266aba);this['_cleanUpCommentMarkers'](_0x173cfc);for(const _0x2ccc67 of _0x173cfc['changes'])this['_changeIdToChange']['set'](_0x2ccc67['id'],_0x2ccc67);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x37ae99=>{for(const _0x57618d of this['editor']['model']['document']['getRootNames']())_0x37ae99['detachRoot'](_0x57618d);for(const _0x4ca9c2 of Object['keys'](_0x173cfc['model'])){const _0x1dfa63=_0x173cfc['model'][_0x4ca9c2]['name'],_0x1f8d59=_0x37ae99['addRoot'](_0x4ca9c2,_0x1dfa63);for(const _0x1344ed of Object['keys'](_0x173cfc['attributes'][_0x4ca9c2]))_0x37ae99['setAttribute'](_0x1344ed,_0x173cfc['attributes'][_0x4ca9c2][_0x1344ed],_0x1f8d59);_0x37ae99['insert'](_0x173cfc['model'][_0x4ca9c2],_0x1f8d59,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x173cfc['changes'])),this['isReady']=!0x0;})['catch'](_0x3a0ed6=>{console['error'](_0x3a0ed6),this['_cleanUp'](),_0xc8fe2b&&(this['diff']=_0xc8fe2b),this['isReady']=!0x0;});}addRevisionData(_0x5ef84a,_0x2077c2){const _0x45492a=this['repository']['createRevision'](_0x5ef84a);return _0x45492a['on']('_update',(_0x536772,_0xdb317e,_0x306af7)=>_0x2077c2(_0xdb317e,_0x306af7,_0x45492a)),this['repository']['addRevision'](_0x45492a),_0x45492a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4749f2=>{for(const _0x32824e of this['editor']['model']['document']['getRootNames']())_0x4749f2['detachRoot'](_0x32824e);});}_cleanUpCommentMarkers(_0x411648){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x96ada1=this['_getVisibleCommentThreadIds']();for(const _0x4b38b7 of Object['values'](_0x411648['model']))for(const _0x4b1465 of Array['from'](_0x4b38b7['markers']['keys']()))_0x4b1465['startsWith']('revision-comment:')&&!_0x96ada1['has'](Pt(_0x4b1465))&&_0x4b38b7['markers']['delete'](_0x4b1465);}_sortAndFilterDiffChanges(_0xb2855){const _0xfddf79=[],_0x493463=new Map();for(const _0x1fcb5e of this['editor']['model']['document']['getRootNames']()){const _0x2bd8b0=this['editor']['editing']['view']['getDomRoot'](_0x1fcb5e);if(!_0x2bd8b0)continue;const _0x3a91e1=_0x2bd8b0['getClientRects']()['item'](0x0);_0x3a91e1&&(_0xfddf79['push'](_0x1fcb5e),_0x493463['set'](_0x1fcb5e,_0x3a91e1));}return _0xfddf79['sort']((_0x52015e,_0x282de6)=>{const _0x4033a1=_0x493463['get'](_0x52015e),_0x1887f9=_0x493463['get'](_0x282de6);return _0x4033a1['y']-_0x1887f9['y']||_0x4033a1['x']-_0x1887f9['x'];}),(_0xb2855=_0xb2855['filter'](_0x58ddca=>_0xfddf79['includes'](_0x58ddca['rootName'])))['sort']((_0x570cc6,_0x5ae820)=>_0xfddf79['indexOf'](_0x570cc6['rootName'])-_0xfddf79['indexOf'](_0x5ae820['rootName'])),_0xb2855;}['_makeTape'](_0x4be07e,_0x281512={}){const _0x1cf265=Array['from'](_0x4be07e['markers'])['filter'](([_0x37823b,_0x433c29])=>_0x37823b['startsWith']('revision:')&&!_0x433c29['isCollapsed']),_0xfa353d=Array['from'](this['editor']['model']['createRangeIn'](_0x4be07e)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1cf265['length'])for(const _0x535432 of _0xfa353d){const [_0x3be031,_0xc99d58]=_0x1cf265[0x0],[,_0x556f35,_0x19beef]=_0x3be031['split'](':'),_0x5a1126=_0x281512[_0x3be031]||null;if(_0xc99d58['end']['isEqual'](_0x535432['nextPosition'])&&_0x1cf265['shift'](),(_0x535432['previousPosition']['isEqual'](_0xc99d58['start'])||_0x535432['previousPosition']['isAfter'](_0xc99d58['start']))&&('insertion'==_0x556f35?_0x535432['isAdded']={'userId':_0x19beef,'aiSource':_0x5a1126}:'deletion'==_0x556f35&&(_0x535432['isRemoved']={'userId':_0x19beef,'aiSource':_0x5a1126})),0x0==_0x1cf265['length'])break;}return _0xfa353d;}_refreshStartEndIndex(_0x47f14c){const _0x19da0e=new Map();for(let _0x201b1c=0x0;_0x201b1c<_0x47f14c['length'];_0x201b1c++)'text'===_0x47f14c[_0x201b1c]['type']?(_0x47f14c[_0x201b1c]['item']['startIndex']=_0x201b1c,_0x47f14c[_0x201b1c]['item']['endIndex']=_0x201b1c):('elementStart'===_0x47f14c[_0x201b1c]['type']?_0x47f14c[_0x201b1c]['item']['startIndex']=_0x201b1c:'elementEnd'===_0x47f14c[_0x201b1c]['type']&&(_0x47f14c[_0x201b1c]['item']['endIndex']=_0x201b1c),_0x19da0e['set'](_0x47f14c[_0x201b1c]['id'],_0x201b1c));for(const _0x538947 of _0x19da0e['values']())'elementStart'===_0x47f14c[_0x538947]['type']?_0x47f14c[_0x538947]['item']['endIndex']=_0x19da0e['get'](_0x47f14c[_0x538947]['pairId']):'elementEnd'===_0x47f14c[_0x538947]['type']&&(_0x47f14c[_0x538947]['item']['startIndex']=_0x19da0e['get'](_0x47f14c[_0x538947]['pairId']));}['_processTape'](_0x552ace){for(let _0x3ee3b6=0x0;_0x3ee3b6<_0x552ace['length'];_0x3ee3b6++){if('elementStart'===_0x552ace[_0x3ee3b6]['type'])_0x552ace[_0x3ee3b6]['item']['startIndex']=_0x3ee3b6;else{if('elementEnd'===_0x552ace[_0x3ee3b6]['type']){_0x552ace[_0x3ee3b6]['item']['endIndex']=_0x3ee3b6;const _0x5c790c=_0x552ace[_0x3ee3b6]['item']['startIndex'];_0x552ace[_0x5c790c]['pairId']=_0x552ace[_0x3ee3b6]['id'],_0x552ace[_0x3ee3b6]['pairId']=_0x552ace[_0x5c790c]['id'];}else _0x552ace[_0x3ee3b6]['item']['startIndex']=_0x3ee3b6,_0x552ace[_0x3ee3b6]['item']['endIndex']=_0x3ee3b6,_0x552ace[_0x3ee3b6]['pairId']=null;}_0x552ace[_0x3ee3b6]['markersStart']||(_0x552ace[_0x3ee3b6]['markersStart']=[],_0x552ace[_0x3ee3b6]['markersEnd']=[]);}}_markInsertions(_0x112f9d,_0x4dfacb){const _0x377ca2=_0x112f9d['filter'](_0x2cb24c=>!_0x2cb24c['isAdded']);for(let _0x210df2=0x0;_0x210df2<_0x4dfacb['length'];_0x210df2++)_0x4dfacb[_0x210df2]['isAdded']&&(_0x377ca2[_0x210df2]['isAdded']=_0x4dfacb[_0x210df2]['isAdded']);}_getDiff(_0x53fbdb,_0x21bccc=null){const _0x73685=this['repository']['getRevision'](_0x53fbdb),_0x2c0eb0=_0x21bccc?this['repository']['getRevision'](_0x21bccc):null,_0x400932=this['_getRevisionsRange'](_0x73685,_0x2c0eb0),_0x477b57=_0x400932[_0x400932['length']-0x1],_0x4f49f0=new Map(),_0x44a752={'model':{},'attributes':{},'changes':[]},_0x29e97a=new Set(),_0x4427be=new Map();for(let _0x17ea4f=_0x400932['length']-0x1;_0x17ea4f>=0x0;_0x17ea4f--){const _0x540f08=_0x400932[_0x17ea4f];for(const _0x51d7ca of Object['keys'](_0x540f08['diffData']))if(_0x540f08['diffData'][_0x51d7ca]['attachChange']){const _0x265414=_0x540f08['diffData'][_0x51d7ca]['attachChange'];_0x265414['isAttached']?(_0x29e97a['add'](_0x51d7ca),_0x4427be['has'](_0x51d7ca)&&_0x4427be['get'](_0x51d7ca)['userId']==_0x265414['userId']?_0x4427be['delete'](_0x51d7ca):_0x4427be['set'](_0x51d7ca,_0x265414)):_0x4427be['has'](_0x51d7ca)?(_0x29e97a['delete'](_0x51d7ca),_0x4427be['delete'](_0x51d7ca)):(_0x29e97a['add'](_0x51d7ca),_0x4427be['set'](_0x51d7ca,_0x265414));}else _0x29e97a['add'](_0x51d7ca);}for(const _0x229b75 of _0x29e97a){const _0x138395=_0x4427be['has'](_0x229b75)&&!_0x4427be['get'](_0x229b75)['isAttached'];let _0x212940=_0x138395?_0x400932['length']-0x1:0x0;const _0x5c46a6=_0x138395?-0x1:0x1;for(;_0x400932[_0x212940];){const _0x570b02=_0x400932[_0x212940];if(_0x570b02['diffData'][_0x229b75]){const _0x250b61=_0x138395?_0x570b02['diffData'][_0x229b75]['attributesBefore']:_0x570b02['diffData'][_0x229b75]['attributesAfter'];_0x44a752['attributes'][_0x229b75]=_0x250b61?_0x3ef3d4(_0x250b61):{};break;}_0x212940+=_0x5c46a6;}}for(const _0x2af2b3 of _0x400932){_0x2af2b3['model']={};for(const _0x14760d of _0x2af2b3['authors'])_0x4f49f0['set'](_0x14760d['id'],_0x14760d);for(const _0x10dea5 of _0x29e97a){const _0x17eb42=_0x2af2b3['diffData'][_0x10dea5]?_0x2af2b3['diffData'][_0x10dea5]['insertions']:'[]',_0x15d276=_0x2af2b3['diffData'][_0x10dea5]?_0x2af2b3['diffData'][_0x10dea5]['deletions']:'[]',_0x1dd01e=_0x2af2b3['diffData'][_0x10dea5]?.['rootElementName']||'$root';_0x2af2b3['model'][_0x10dea5]={'insertions':this['_utils']['_makeModelFromViewString'](_0x17eb42,_0x1dd01e),'deletions':this['_utils']['_makeModelFromViewString'](_0x15d276,_0x1dd01e)};}}for(const _0x426974 of _0x29e97a){let _0x27b6c2=null,_0x540ef5=0x0;const _0x3383a2=_0x400932['map'](_0x2adfa9=>_0x2adfa9['diffData'][_0x426974]?.['rootElementName'])['find'](_0x3adc44=>void 0x0!==_0x3adc44)||'$root',_0x17e53a=new Map(Array['from'](_0x73685['model'][_0x426974]['insertions']['markers'])['filter'](([_0x3a3df9])=>!_0x3a3df9['startsWith']('revision:')));let _0x44dee0=0x0;for(const _0x5c8e0c of _0x400932){const _0x2afe9a=_0x5c8e0c['diffData'][_0x426974]?.['aiSources']||{},_0x24a950=this['_makeTape'](_0x5c8e0c['model'][_0x426974]['insertions'],_0x2afe9a);_0x5c8e0c==_0x73685?(_0x27b6c2=_0x24a950,_0x540ef5=_0x27b6c2['length'],_0x27b6c2['forEach'](_0x58df02=>{_0x58df02['id']=_0x44dee0++;}),this['_processTape'](_0x27b6c2)):this['_markInsertions'](_0x27b6c2,_0x24a950);const _0x51fa4a=_0x27b6c2['filter'](_0x583705=>!_0x583705['isAdded'])['map'](_0x387bc9=>_0x387bc9['id']);let _0x1c229c=0x0;const _0x113b8e=this['_makeTape'](_0x5c8e0c['model'][_0x426974]['deletions'],_0x2afe9a);_0x113b8e['forEach'](_0x19eec0=>{_0x19eec0['isRemoved']?_0x19eec0['id']=_0x540ef5++:_0x19eec0['id']=_0x51fa4a[_0x1c229c++];}),this['_processTape'](_0x113b8e),this['_setDistance'](_0x27b6c2,'isAdded'),this['_setDistance'](_0x113b8e,'isRemoved'),_0x5c8e0c==_0x73685&&this['_markMarkers'](_0x27b6c2,_0x17e53a),_0x27b6c2=this['_joinTapes'](_0x27b6c2,_0x113b8e),this['_refreshStartEndIndex'](_0x27b6c2),this['_setDistance'](_0x27b6c2,'isRemoved');}_0x27b6c2=_0x27b6c2['filter'](_0x2532a6=>!(_0x2532a6['isAdded']&&_0x2532a6['isRemoved']));const _0x22017d=new Map(_0x477b57['model'][_0x426974]['deletions']['markers']),_0xd5c3b0=new Set(_0x17e53a['keys']());for(const _0x451e71 of _0x22017d['keys']())_0xd5c3b0['delete'](_0x451e71);const _0xa96901=Object['assign']({},..._0x400932['map'](_0x63cbce=>_0x63cbce['diffData'][_0x426974]?.['aiSources']));this['_markSuggestions'](_0x27b6c2,_0xd5c3b0,_0xa96901),this['_fixObsoleteTags'](_0x27b6c2),_0x27b6c2=this['_removeMissingPairs'](_0x27b6c2),_0x27b6c2=this['_markMismatchedRemovedTags'](_0x27b6c2),_0x27b6c2=this['_removeUnsupportedChanges'](_0x27b6c2);const {root:_0x1add32,changes:_0x372708}=this['_makeModelFromTape'](_0x27b6c2,_0x4f49f0,_0x426974,_0x3383a2);_0x44a752['model'][_0x426974]=_0x1add32;const _0x5cb7c0=_0x4427be['get'](_0x426974);if(_0x5cb7c0){const _0x23aad8=_0x4f49f0['get'](_0x5cb7c0['userId']),_0x525a1f=new Tt({'author':_0x23aad8,'type':_0x5cb7c0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x426974});_0x372708['unshift'](_0x525a1f),_0x44a752['attributes'][_0x426974]['revisionHistoryAttachChange']=_0x525a1f['id'];}_0x44a752['changes']=_0x44a752['changes']['concat'](_0x372708);}return _0x44a752;}['_markMarkers'](_0x2bee5a,_0x5917ee){for(let _0x91fd36=0x0;_0x91fd36<_0x2bee5a['length'];_0x91fd36++)for(const [_0x8b1010,_0x3334f7]of _0x5917ee)!_0x3334f7['isCollapsed']&&_0x3334f7['start']['isEqual'](_0x2bee5a[_0x91fd36]['previousPosition'])&&_0x2bee5a[_0x91fd36]['markersStart']['push'](_0x8b1010),_0x3334f7['end']['isEqual'](_0x2bee5a[_0x91fd36]['nextPosition'])&&_0x2bee5a[_0x91fd36]['markersEnd']['push'](_0x8b1010);}['_joinTapes'](_0x5c231a,_0x27b335){let _0x1f5b5e=[],_0x3af9a2=0x0,_0x441439=0x0;for(;_0x3af9a2<_0x5c231a['length']||_0x441439<_0x27b335['length'];){const _0x788741=_0x5c231a[_0x3af9a2]||{},_0x1b7562=_0x27b335[_0x441439]||{};if(_0x788741['id']==_0x1b7562['id'])_0x3af9a2++,_0x441439++,_0x1f5b5e['push'](_0x788741);else{if(_0x1b7562['isRemoved']&&_0x788741['isAdded']){const {commonTape:_0x5eb843,iEnd:_0x3ba7b7,jEnd:_0x36e22a}=this['_threeWayMerge'](_0x5c231a,_0x3af9a2,_0x27b335,_0x441439);_0x1f5b5e=_0x1f5b5e['concat'](_0x5eb843),_0x3af9a2=_0x3ba7b7,_0x441439=_0x36e22a;}else _0x1b7562['isRemoved']?(_0x441439++,_0x1f5b5e['push'](_0x1b7562)):(_0x3af9a2++,_0x1f5b5e['push'](_0x788741));}}return _0x1f5b5e;}_markSuggestions(_0x3e2586,_0xd4010,_0x4ae35a){const _0xa9eea8=[];for(let _0x5d1fe5=0x0;_0x5d1fe5<_0x3e2586['length'];_0x5d1fe5++){for(let _0xd7abc5=0x0;_0xd7abc5<_0x3e2586[_0x5d1fe5]['markersStart']['length'];_0xd7abc5++){const _0x448d72=_0x3e2586[_0x5d1fe5]['markersStart'][_0xd7abc5];if(!_0xd4010['has'](_0x448d72))continue;const {group:_0x5a42cf,type:_0x39cb80,authorId:_0x188523}=_0x494d5f(_0x448d72);if('revision-suggestion'!=_0x5a42cf||'insertion'!=_0x39cb80&&'deletion'!=_0x39cb80)continue;const _0x517eea=_0x4ae35a['suggestion:'+_0x448d72['slice'](0x14)]||null;_0xa9eea8['unshift']({'type':_0x39cb80,'name':_0x448d72,'userId':_0x188523,'aiSource':_0x517eea}),_0x3e2586[_0x5d1fe5]['markersStart']['splice'](_0xd7abc5,0x1),_0xd7abc5--;}_0x1405af(_0x3e2586[_0x5d1fe5]);for(let _0x5cce87=0x0;_0x5cce87<_0x3e2586[_0x5d1fe5]['markersEnd']['length'];_0x5cce87++){const _0xbfa54f=_0x3e2586[_0x5d1fe5]['markersEnd'][_0x5cce87];if(!_0xd4010['has'](_0xbfa54f))continue;const {group:_0x2f55df,type:_0x10d2d3}=_0x494d5f(_0xbfa54f);if('revision-suggestion'!=_0x2f55df||'insertion'!=_0x10d2d3&&'deletion'!=_0x10d2d3)continue;_0x3e2586[_0x5d1fe5]['markersEnd']['splice'](_0x5cce87,0x1),_0x5cce87--;const _0x1d7a06=_0xa9eea8['findIndex'](_0x333554=>_0x333554['name']==_0xbfa54f);_0x1d7a06>-0x1&&_0xa9eea8['splice'](_0x1d7a06,0x1);}}function _0x494d5f(_0x4fd190){const _0x292ee5=_0x4fd190['split'](':');return{'group':_0x292ee5[0x0],'type':_0x292ee5[0x1],'subType':_0x292ee5['length']>=0x5?_0x292ee5[0x2]:null,'id':_0x292ee5['length']<0x5?_0x292ee5[0x2]:_0x292ee5[0x3],'authorId':_0x292ee5['length']<0x5?_0x292ee5[0x3]:_0x292ee5[0x4],'markerCount':0x6==_0x292ee5['length']?_0x292ee5[0x5]:null};}function _0x1405af(_0x225b73){for(let _0x9623a1=0x0;_0x9623a1<_0xa9eea8['length'];_0x9623a1++){if(_0x225b73['isAdded']&&'insertion'==_0xa9eea8[_0x9623a1]['type']&&_0x225b73['isAdded']['userId']==_0xa9eea8[_0x9623a1]['userId'])return _0x225b73['isAddSuggestion']={..._0xa9eea8[_0x9623a1],'aiSource':_0x225b73['isAdded']['aiSource']||_0xa9eea8[_0x9623a1]['aiSource']},void delete _0x225b73['isAdded'];if(!_0x225b73['isAdded']&&!_0x225b73['isRemoved']&&'deletion'==_0xa9eea8[_0x9623a1]['type'])return void(_0x225b73['isRemoveSuggestion']=_0xa9eea8[_0x9623a1]);}}}_setDistance(_0x5017c0,_0x3b39aa){let _0x12eca4=0x0,_0x4a5d3b=!0x1;const _0x51ac73=new Map();for(const _0x23a510 of _0x5017c0)_0x23a510[_0x3b39aa]?_0x4a5d3b&&(_0x12eca4++,_0x4a5d3b=!0x1):(_0x12eca4++,_0x4a5d3b=!0x0),_0x51ac73['set'](_0x23a510['id'],_0x12eca4);for(let _0x3dc580=0x0;_0x3dc580<_0x5017c0['length'];_0x3dc580++){if('isRemoved'==_0x3b39aa&&_0x5017c0[_0x3dc580]['isAdded']||'isAdded'==_0x3b39aa&&_0x5017c0[_0x3dc580]['isRemoved'])continue;if('text'==_0x5017c0[_0x3dc580]['type']){_0x5017c0[_0x3dc580]['distance']=0x0;continue;}const _0x6ce7cc=_0x51ac73['get'](_0x5017c0[_0x3dc580]['pairId']),_0x1fa19a=_0x51ac73['get'](_0x5017c0[_0x3dc580]['id']);_0x5017c0[_0x3dc580]['distance']=_0x6ce7cc-_0x1fa19a;}}_getRevisionsRange(_0xeae527,_0x472a31,_0x152c76=!0x1){const _0x22c0f7=[];let _0x1765dc=this['repository']['getIndex'](_0xeae527),_0x487662=this['repository']['getIndex'](_0x472a31);for(-0x1==_0x487662&&(_0x487662=this['repository']['_revisions']['length'],_0x152c76=!0x1);_0x1765dc<_0x487662;)_0x22c0f7['push'](this['repository']['getRevision'](_0x1765dc)),_0x1765dc++;return _0x152c76&&_0x22c0f7['push'](this['repository']['getRevision'](_0x1765dc)),_0x22c0f7;}_threeWayMerge(_0x309b3b,_0x229f8d,_0x491d54,_0x4ab7c6){const _0x31fa82=this['editor']['model']['schema'];let _0x16f75f=_0x229f8d;for(;_0x309b3b[_0x16f75f]&&_0x309b3b[_0x16f75f]['isAdded'];)_0x16f75f++;let _0x4293ed=_0x4ab7c6;for(;_0x491d54[_0x4293ed]&&_0x491d54[_0x4293ed]['isRemoved'];)_0x4293ed++;_0x2a86fd(_0x309b3b,_0x229f8d,_0x16f75f),_0x2a86fd(_0x491d54,_0x4ab7c6,_0x4293ed);const _0xa95e8=_0x491d54['slice'](_0x4ab7c6,_0x4293ed)['concat'](_0x309b3b['slice'](_0x229f8d,_0x16f75f));return _0xa95e8['sort']((_0x4b0516,_0x54b593)=>_0x4b0516['side']!=_0x54b593['side']?_0x4b0516['side']-_0x54b593['side']:_0x4b0516['level']!=_0x54b593['level']?_0x4b0516['level']-_0x54b593['level']:_0x4b0516['distance']!=_0x54b593['distance']?_0x54b593['distance']-_0x4b0516['distance']:!!_0x4b0516['isAdded']!=!!_0x54b593['isAdded']?-0x1==_0x4b0516['side']||0x0==_0x4b0516['side']?_0x4b0516['isAdded']?-0x1:0x1:_0x4b0516['isAdded']?0x1:-0x1:_0x4b0516['index']-_0x54b593['index']),{'commonTape':_0xa95e8,'iEnd':_0x16f75f,'jEnd':_0x4293ed};function _0x2a86fd(_0x113f82,_0x2ef207,_0x4f5142){let _0x2ea880=-0x1,_0x8140f5=Number['POSITIVE_INFINITY'],_0x5485cd=!0x0;for(let _0x401894=_0x2ef207;_0x401894<_0x4f5142;_0x401894++)if(_0x31fa82['isInline'](_0x113f82[_0x401894]['item'])||(_0x5485cd=!0x1),_0x113f82[_0x401894]['item']['startIndex']<_0x2ef207&&(_0x2ea880=_0x401894),_0x113f82[_0x401894]['item']['endIndex']>=_0x4f5142){_0x8140f5=_0x401894;break;}_0x5485cd&&(_0x2ea880=_0x4f5142-0x1);for(let _0x281aa5=_0x2ef207;_0x281aa5<_0x4f5142;_0x281aa5++)_0x113f82[_0x281aa5]['side']=_0x281aa5<=_0x2ea880?-0x1:_0x281aa5<_0x8140f5?0x0:0x1,_0x113f82[_0x281aa5]['index']=_0x281aa5;let _0x245160=0x0;for(let _0x3aaa41=_0x2ef207;_0x3aaa41<=_0x2ea880;_0x3aaa41++)0x0==_0x113f82[_0x3aaa41]['distance']?_0x113f82[_0x3aaa41]['level']=_0x245160:(_0x245160++,_0x113f82[_0x3aaa41]['level']=_0x245160,_0x245160++);for(let _0xd0100a=_0x2ef207;_0xd0100a<_0x4f5142;_0xd0100a++)0x0==_0x113f82[_0xd0100a]['side']&&(_0x113f82[_0xd0100a]['level']=_0x245160);_0x245160=0x0;for(let _0x26fbca=_0x4f5142-0x1;_0x26fbca>=_0x8140f5;_0x26fbca--)0x0==_0x113f82[_0x26fbca]['distance']?_0x113f82[_0x26fbca]['level']=_0x245160:(_0x245160--,_0x113f82[_0x26fbca]['level']=_0x245160,_0x245160--);}}_fixObsoleteTags(_0x19b1cd){const _0x4d0c02=new Map(),_0xf32e2e=this['editor']['model']['schema'];for(let _0x527634=0x1;_0x527634<_0x19b1cd['length'];_0x527634++){let _0x3fef55,_0xbcf522,_0x2faf05;const _0x386bc9=_0x19b1cd[_0x527634],_0x3ad566=_0x19b1cd[_0x527634-0x1];if('text'==_0x386bc9['type'])continue;if(_0x386bc9['type']!=_0x3ad566['type'])continue;if(!_0xf32e2e['isBlock'](_0x3ad566['item'])||_0xf32e2e['isLimit'](_0x3ad566['item']))continue;if(!_0xf32e2e['isBlock'](_0x386bc9['item'])||_0xf32e2e['isLimit'](_0x386bc9['item']))continue;if((_0x19b1cd[_0x527634]['isAdded']||_0x19b1cd[_0x527634]['isAddSuggestion'])&&_0x19b1cd[_0x527634-0x1]['isRemoved'])_0x3fef55=_0x19b1cd[_0x527634],_0xbcf522=_0x19b1cd[_0x527634-0x1],_0x2faf05=_0x527634-0x1;else{if(!_0x19b1cd[_0x527634]['isRemoved']||!_0x19b1cd[_0x527634-0x1]['isAdded']&&!_0x19b1cd[_0x527634-0x1]['isAddSuggestion'])continue;_0x3fef55=_0x19b1cd[_0x527634-0x1],_0xbcf522=_0x19b1cd[_0x527634],_0x2faf05=_0x527634;}const _0x3388e6=_0x3fef55['level']==_0xbcf522['level'],_0x4aa348=Math['abs'](_0x3fef55['level'])<Math['abs'](_0xbcf522['level'])&&0x0==_0xbcf522['distance'];(_0x3388e6||_0x4aa348)&&(_0x4d0c02['set'](_0xbcf522['id'],_0x3fef55['id']),_0x19b1cd['splice'](_0x2faf05,0x1),_0x527634--,_0x3fef55['isAdded']=!0x1);}for(let _0x541de6=0x0;_0x541de6<_0x19b1cd['length'];_0x541de6++)_0x4d0c02['has'](_0x19b1cd[_0x541de6]['pairId'])&&(_0x19b1cd[_0x541de6]['pairId']=_0x4d0c02['get'](_0x19b1cd[_0x541de6]['pairId']));}['_removeMissingPairs'](_0x2e22fb){const _0x18465e=new Set(_0x2e22fb['map'](_0x33cf7d=>_0x33cf7d['id']));for(let _0x5cc488=0x0;_0x5cc488<_0x2e22fb['length'];_0x5cc488++)_0x18465e['has'](_0x2e22fb[_0x5cc488]['pairId'])||0x0==_0x2e22fb[_0x5cc488]['distance']||(_0x2e22fb[_0x5cc488]['isIncorrect']=!0x0);return _0x2e22fb['filter'](_0x294ecc=>!_0x294ecc['isIncorrect']);}_markMismatchedRemovedTags(_0x500171){const _0x3c12a9=new Set();for(let _0x2123e6=0x0;_0x2123e6<_0x500171['length'];_0x2123e6++){if(_0x3c12a9['has'](_0x500171[_0x2123e6]['id'])&&_0x500171[_0x2123e6]['isRemoved']&&(_0x500171[_0x2123e6]['isIncorrect']=!0x0),_0x500171[_0x2123e6]['isIncorrect'])continue;if(0x0==_0x500171[_0x2123e6]['distance'])continue;if('elementStart'!=_0x500171[_0x2123e6]['type'])continue;if(null==_0x500171[_0x2123e6]['pairId'])continue;let _0x1d0eca=_0x2123e6+0x1,_0x5bae55=0x0;for(;_0x500171[_0x1d0eca]['id']!=_0x500171[_0x2123e6]['pairId'];)'elementStart'==_0x500171[_0x1d0eca]['type']?_0x5bae55++:'elementEnd'==_0x500171[_0x1d0eca]['type']&&_0x5bae55--,_0x1d0eca++;if(0x0!=_0x5bae55){if(_0x500171[_0x2123e6]['isRemoved'])_0x500171[_0x2123e6]['isIncorrect']=!0x0;else{for(;_0x1d0eca!=_0x2123e6;)_0x500171[_0x1d0eca]['isRemoved']&&0x0!=_0x500171[_0x1d0eca]['distance']&&(_0x500171[_0x1d0eca]['isIncorrect']=!0x0,_0x3c12a9['add'](_0x500171[_0x1d0eca]['pairId'])),_0x1d0eca--;}}}return _0x500171['filter'](_0x4e4717=>!_0x4e4717['isIncorrect']);}_removeUnsupportedChanges(_0x33ed3a){const _0x4f9bbe=this['editor']['model']['schema'];for(let _0x420790=0x0;_0x420790<_0x33ed3a['length'];_0x420790++){if(!(_0x33ed3a[_0x420790]['isAdded']||_0x33ed3a[_0x420790]['isAddSuggestion']||_0x33ed3a[_0x420790]['isRemoved']||_0x33ed3a[_0x420790]['isRemoveSuggestion']))continue;if(0x0==_0x33ed3a[_0x420790]['distance'])continue;const _0x4ee0f3=_0x33ed3a[_0x420790]['item'];_0x4f9bbe['isBlock'](_0x4ee0f3)||_0x4f9bbe['isLimit'](_0x4ee0f3)||(_0x33ed3a[_0x420790]['isAdded']&&delete _0x33ed3a[_0x420790]['isAdded'],_0x33ed3a[_0x420790]['isAddSuggestion']&&delete _0x33ed3a[_0x420790]['isAddSuggestion'],_0x33ed3a[_0x420790]['isRemoveSuggestion']&&delete _0x33ed3a[_0x420790]['isRemoveSuggestion'],_0x33ed3a[_0x420790]['isRemoved']&&(_0x33ed3a[_0x420790]['isIncorrect']=!0x0));}return _0x33ed3a['filter'](_0x4b8260=>!_0x4b8260['isIncorrect']);}['_makeModelFromTape'](_0x1803b7,_0x52b2f8,_0x51be74,_0x5ac299){const _0x242909=new _0x3e4772(),_0x3f8482=[],_0x83abdf=new Map(),_0x4fbde9=this['editor']['model'],_0x158062=_0x4fbde9['schema'],_0x3fbfe0=[_0x242909],_0x30400={},_0x46f153={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x242909['name']=_0x5ac299;let _0x16bd9d=null;const _0x4df818=[0x0];for(let _0x3a8c51=0x0;_0x3a8c51<_0x1803b7['length'];_0x3a8c51++)if('elementStart'===_0x1803b7[_0x3a8c51]['type']){_0x1803b7[_0x3a8c51]['previousPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818);const _0x32da7b=new _0x51c9e7(_0x1803b7[_0x3a8c51]['item']['name'],_0x1803b7[_0x3a8c51]['item']['getAttributes']());_0x3fbfe0[0x0]['_appendChild'](_0x32da7b),_0x4df818['push'](0x0),_0x3fbfe0['unshift'](_0x32da7b),_0x1803b7[_0x3a8c51]['nextPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818);}else'elementEnd'===_0x1803b7[_0x3a8c51]['type']?(_0x3fbfe0['shift'](),_0x1803b7[_0x3a8c51]['previousPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818),_0x4df818['pop'](),_0x4df818[_0x4df818['length']-0x1]++,_0x1803b7[_0x3a8c51]['nextPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818)):(_0x1803b7[_0x3a8c51]['previousPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818),_0x16bd9d?_0x16bd9d['_data']+=_0x1803b7[_0x3a8c51]['item']['data']:_0x16bd9d=new _0x5c3b83(_0x1803b7[_0x3a8c51]['item']['data'],_0x1803b7[_0x3a8c51]['item']['getAttributes']()),_0x1803b7[_0x3a8c51+0x1]&&'text'===_0x1803b7[_0x3a8c51+0x1]['type']&&_0x4385b3(_0x16bd9d,_0x1803b7[_0x3a8c51+0x1]['item'])||(_0x3fbfe0[0x0]['_appendChild'](_0x16bd9d),_0x16bd9d=null),_0x4df818[_0x4df818['length']-0x1]+=_0x1803b7[_0x3a8c51]['item']['offsetSize'],_0x1803b7[_0x3a8c51]['nextPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818));for(let _0x1d9c20=0x0;_0x1d9c20<_0x1803b7['length'];_0x1d9c20++){const _0x90902c=_0x1803b7[_0x1d9c20]['previousPosition'],_0x128724=_0x1803b7[_0x1d9c20]['nextPosition'];for(const _0x2f775c of _0x1803b7[_0x1d9c20]['markersStart'])_0x83abdf['set'](_0x2f775c,{'start':_0x90902c,'end':null});_0x3bd555('isRemoveSuggestion',_0x1d9c20,_0x90902c,_0x128724),_0x3bd555('isAddSuggestion',_0x1d9c20,_0x90902c,_0x128724),_0x3bd555('isRemoved',_0x1d9c20,_0x90902c,_0x128724),_0x3bd555('isAdded',_0x1d9c20,_0x90902c,_0x128724);for(const _0x45b875 of _0x1803b7[_0x1d9c20]['markersEnd']){const _0x52839e=_0x83abdf['get'](_0x45b875);_0x52839e?_0x52839e['end']=_0x128724:_0x83abdf['set'](_0x45b875,{'start':_0x128724,'end':_0x128724});}}for(const [_0x1ab0ef,_0x41b91d]of _0x83abdf){const _0x4136f7=this['editor']['model']['createRange'](_0x41b91d['start'],_0x41b91d['end']);_0x242909['markers']['set'](_0x1ab0ef,_0x4136f7);}return _0x3f8482['sort']((_0x4baede,_0x5a1cb1)=>{const _0x4b6d4a=_0x242909['markers']['get']('revision:'+_0x4baede['id']),_0x341ed1=_0x242909['markers']['get']('revision:'+_0x5a1cb1['id']);return _0x4b6d4a['start']['isBefore'](_0x341ed1['start'])?-0x1:_0x4b6d4a['start']['isAfter'](_0x341ed1['start'])?0x1:_0x4b6d4a['end']['isBefore'](_0x341ed1['end'])?-0x1:_0x4b6d4a['end']['isAfter'](_0x341ed1['end'])?0x1:'add'===_0x4baede['type']?-0x1:0x1;}),{'root':_0x242909,'changes':_0x3f8482};function _0x3bd555(_0x1c0d9d,_0x672e5c,_0x215688,_0x13a5d7){const _0x10ee30=!!_0x1803b7[_0x672e5c][_0x1c0d9d],_0x62befe=_0x10ee30?_0x1803b7[_0x672e5c][_0x1c0d9d]['userId']:null,_0xd25f5d=_0x10ee30&&_0x1803b7[_0x672e5c][_0x1c0d9d]['aiSource']||null,_0x4ee5fc=_0x672e5c===_0x1803b7['length']-0x1,_0x2764bd=_0x46f153[_0x1c0d9d][0x0],_0xccce26=_0x158062['isObject'](_0x1803b7[_0x672e5c]['item']);!_0x30400[_0x1c0d9d]&&_0x10ee30?_0x30400[_0x1c0d9d]={'start':_0x215688,'tapeItem':_0x1803b7[_0x672e5c],'userId':_0x62befe,'aiSource':_0xd25f5d,'type':_0x1c0d9d}:_0x30400[_0x1c0d9d]&&!_0x10ee30?(_0x30400[_0x1c0d9d]['end']=_0x215688,_0x1276ab(_0x30400[_0x1c0d9d]),_0x30400[_0x1c0d9d]=null):_0x30400[_0x1c0d9d]&&_0x10ee30&&(_0x30400[_0x1c0d9d]['userId']!==_0x62befe||_0x30400[_0x1c0d9d]['aiSource']!==_0xd25f5d)&&(_0x30400[_0x1c0d9d]['end']=_0x215688,_0x2764bd&&_0x2764bd['userId']===_0x30400[_0x1c0d9d]['userId']?_0x2764bd['change']['aiSource']=_0x2764bd['change']['aiSource']||_0x30400[_0x1c0d9d]['aiSource']:_0x1276ab(_0x30400[_0x1c0d9d]),_0x30400[_0x1c0d9d]={'start':_0x215688,'tapeItem':_0x1803b7[_0x672e5c],'userId':_0x62befe,'aiSource':_0xd25f5d,'type':_0x1c0d9d}),_0x30400[_0x1c0d9d]&&_0xccce26&&('elementStart'!==_0x1803b7[_0x672e5c]['type']||_0x2764bd&&_0x2764bd['userId']===_0x62befe||_0x46f153[_0x1c0d9d]['unshift']({'userId':_0x62befe,'object':_0x1803b7[_0x672e5c]['item'],'change':_0x30400[_0x1c0d9d]}),'elementEnd'===_0x1803b7[_0x672e5c]['type']&&_0x2764bd&&_0x2764bd['object']===_0x1803b7[_0x672e5c]['item']&&(_0x46f153[_0x1c0d9d]['shift'](),_0x30400[_0x1c0d9d]=_0x2764bd['change'])),_0x30400[_0x1c0d9d]&&_0x4ee5fc&&(_0x30400[_0x1c0d9d]['end']=_0x13a5d7,_0x1276ab(_0x30400[_0x1c0d9d]),_0x30400[_0x1c0d9d]=null);}function _0x1276ab({start:_0x2232e4,end:_0x4a6a06,tapeItem:_0x62a6e4,userId:_0x5ce858,aiSource:_0x34b4f7,type:_0x3ebc37}){const _0x41d50b=_0x62a6e4['item'],_0x66fd74=_0x4fbde9['schema']['isBlock'](_0x41d50b)&&!_0x4fbde9['schema']['isLimit'](_0x41d50b),_0x10ac5b=_0x2232e4['nodeAfter']==_0x4a6a06['parent']&&_0x4a6a06['isAtStart'];if(_0x66fd74&&_0x10ac5b)return;const _0x26a148=_0x4fbde9['createRange'](_0x2232e4,_0x4a6a06),_0x3e1e3e=_0x52b2f8['get'](_0x5ce858),_0x31b0fe=new Tt({'author':_0x3e1e3e,'type':'isAdded'==_0x3ebc37||'isAddSuggestion'==_0x3ebc37?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3ebc37||'isRemoveSuggestion'==_0x3ebc37,'aiSource':_0x34b4f7||null},'createdAt':new Date(),'rootName':_0x51be74});_0x3f8482['push'](_0x31b0fe),_0x242909['markers']['set']('revision:'+_0x31b0fe['id'],_0x26a148);}function _0x4385b3(_0x1c2ee9,_0x45c813){const _0x30e2da=_0x1c2ee9['getAttributes'](),_0x34398b=_0x45c813['getAttributes']();for(const _0xf8f751 of _0x30e2da){if(_0xf8f751[0x1]!==_0x45c813['getAttribute'](_0xf8f751[0x0]))return!0x1;_0x34398b['next']();}return _0x34398b['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x190cea=>{const _0x2edeb6=_0x190cea['markerName']['split'](':')[0x1],_0x431ec9=this['_getChangeFromId'](_0x2edeb6);if(!_0x431ec9)return null;const _0x4b13dd='add'==_0x431ec9['type']?'insertion':'deletion',_0x38ef17=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4b13dd];return _0x431ec9['data']['isSuggestion']&&_0x38ef17['push']('ck-suggestion-marker-'+_0x4b13dd+'-new'),this['activeChange']==_0x431ec9&&_0x38ef17['push']('ck-suggestion-marker--active'),{'classes':_0x38ef17,'attributes':{'data-change-id':_0x2edeb6}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x46543e=>{_0x46543e['on']('element:pre',(_0x2cb75b,_0x1e31ab,_0x3e2953)=>{const _0x39d3d9=_0x1e31ab['viewItem']['getChild'](0x0);if(!_0x39d3d9||!_0x39d3d9['is']('element','code'))return;if(!_0x3e2953['consumable']['consume'](_0x39d3d9,{'attributes':['vid_start','vid_end']}))return;const _0x23278e=_0x1e31ab['modelRange']['start']['nodeAfter'];_0x3e2953['writer']['setAttribute']('vid_start',_0x39d3d9['getAttribute']('vid_start'),_0x23278e),_0x3e2953['writer']['setAttribute']('vid_end',_0x39d3d9['getAttribute']('vid_end'),_0x23278e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x301b5=>{_0x301b5['on']('element',(_0x53af13,_0x3f68ba,_0x311cb2)=>{if(!_0x311cb2['consumable']['consume'](_0x3f68ba['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3f68ba['modelRange']['isCollapsed'])return;const _0x64ea92=_0x3f68ba['modelRange']['start']['nodeAfter'];_0x64ea92['hasAttribute']('vid_start')||_0x64ea92['hasAttribute']('vid')||(_0x311cb2['writer']['setAttribute']('vid_start',_0x3f68ba['viewItem']['getAttribute']('vid_start'),_0x64ea92),_0x311cb2['writer']['setAttribute']('vid_end',_0x3f68ba['viewItem']['getAttribute']('vid_end'),_0x64ea92));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2cb1d6=>_0x2cb1d6['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4b985b,[,_0x1beff3])=>{['vid_start','vid_end','vid']['includes'](_0x1beff3)&&(_0x4b985b['return']=!0x0,_0x4b985b['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x39e0ce=>{_0x39e0ce['on']('attribute:vid',(_0x830a5a,_0x4bacf5,_0x5a3b58)=>{if('\x20'!=_0x4bacf5['item']['data']||_0x4bacf5['item']['parent']['maxOffset']>0x1)return;if(!_0x5a3b58['consumable']['consume'](_0x4bacf5['item'],_0x830a5a['name']))return;const _0x4087b2=_0x5a3b58['writer'],_0x1f68fe=_0x5a3b58['mapper']['toViewRange'](_0x4bacf5['range']);_0x4087b2['wrap'](_0x1f68fe,_0x4087b2['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x19312a){const _0x8d48e0=_0x19312a['plugins']['get']('RevisionViewer');return(_0x2fc03e,_0x349a92,_0x19bd0b)=>{const _0x3f2036=_0x349a92['markerName']['split'](':')[0x1],_0x43ba2a=_0x8d48e0['_getChangeFromId'](_0x3f2036);if(!_0x43ba2a)return null;const _0xa0c280='add'==_0x43ba2a['type']?'split':'merge';if(!_0x19bd0b['consumable']['test'](_0x349a92['markerRange'],_0x2fc03e['name']))return;const _0x372064=_0x349a92['markerRange']['getWalker'](),_0x3ffe7b=_0x349a92['markerRange']['start'],_0x22a405=_0x19312a['model']['schema'];let _0x3f0f9e=null,_0x1bb879=null,_0x2d6f15=!0x1,_0x4fe4f3=!0x1;for(const _0x11bf1a of _0x372064){const _0x3b38f5=_0x11bf1a['item'];_0x2d6f15=_0x2d6f15||_0x22a405['isContent'](_0x3b38f5);const _0x4f5184=_0x19bd0b['mapper']['toViewElement'](_0x3b38f5);if(_0x4f5184&&_0x4f5184['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x11bf1a['type']&&(_0x22a405['isBlock'](_0x3b38f5)&&!_0x22a405['isLimit'](_0x3b38f5)&&(_0x3b38f5['nextSibling']||_0x3ffe7b['isAtEnd']?_0x3f0f9e&&_0x3f0f9e['parent']==_0x3b38f5||(_0x3f0f9e=_0x3b38f5,_0x2433ae(_0x11bf1a['previousPosition']),_0x4fe4f3=!0x0):_0x1bb879=_0x1bb879||_0x11bf1a['previousPosition']));}function _0x2433ae(_0x320d6b){const _0x56d13e=_0x19bd0b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xa0c280}),_0x919b03=_0x19bd0b['mapper']['toViewPosition'](_0x320d6b);_0x43ba2a['data']['isSuggestion']&&_0x19bd0b['writer']['addClass']('ck-suggestion-marker-'+_0xa0c280+'-new',_0x56d13e),_0x8d48e0['activeChange']==_0x43ba2a&&_0x19bd0b['writer']['addClass']('ck-suggestion-marker--active',_0x56d13e),_0x19bd0b['writer']['insert'](_0x919b03,_0x56d13e),_0x19bd0b['mapper']['bindElementToMarker'](_0x56d13e,_0x349a92['markerName']);}_0x2d6f15||_0x4fe4f3||!_0x1bb879||_0x2433ae(_0x1bb879);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x18d47c,_0x41cfdb,_0x309ce4)=>{const _0x3bf5e5=_0x309ce4['mapper']['markerNameToElements'](_0x41cfdb['markerName']);if(_0x3bf5e5){for(const _0xd6b252 of _0x3bf5e5)(_0xd6b252['hasClass']('ck-suggestion-marker-split')||_0xd6b252['hasClass']('ck-suggestion-marker-merge'))&&(_0x309ce4['mapper']['unbindElementFromMarkerName'](_0xd6b252,_0x41cfdb['markerName']),_0x309ce4['writer']['remove'](_0xd6b252));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3ddd71,_0x59dfdb,_0x24de83)=>{const _0x44de86=_0x59dfdb['markerName']['split'](':')[0x1],_0x483586=this['_getChangeFromId'](_0x44de86);if(!_0x483586)return null;const _0x467f55='add'==_0x483586['type']?'split':'merge';if(_0x24de83['consumable']['test'](_0x59dfdb['markerRange'],_0x3ddd71['name']))for(const _0x4caec8 of _0x59dfdb['markerRange']['getItems']()){if(!_0x4caec8['is']('element','softBreak'))continue;const _0x301a4c=_0x24de83['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x467f55}),_0x34b790=_0x24de83['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4caec8));_0x483586['data']['isSuggestion']&&_0x24de83['writer']['addClass']('ck-suggestion-marker-'+_0x467f55+'-new',_0x301a4c),this['activeChange']==_0x483586&&_0x24de83['writer']['addClass']('ck-suggestion-marker--active',_0x301a4c),_0x24de83['writer']['insert'](_0x34b790,_0x301a4c),_0x24de83['mapper']['bindElementToMarker'](_0x301a4c,_0x59dfdb['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x262173=>{for(const _0x22bdbd of this['editor']['model']['document']['getRootNames']()){const _0x5cd19e=this['editor']['model']['document']['getRoot'](_0x22bdbd),_0x33bf45=this['editor']['editing']['view']['document']['getRoot'](_0x22bdbd);if(_0x33bf45){const _0xffc620=_0x5cd19e['getAttribute']('revisionHistoryAttachChange');if(_0x262173['removeAttribute']('data-change-id',_0x33bf45),_0x262173['removeClass']('ck-revision-history-root-add',_0x33bf45),_0x262173['removeClass']('ck-revision-history-root-remove',_0x33bf45),_0x262173['removeClass']('ck-revision-history-root--active',_0x33bf45),_0xffc620){const _0x4af723=this['_getChangeFromId'](_0xffc620);if(!_0x4af723)return null;_0x262173['setAttribute']('data-change-id',_0xffc620,_0x33bf45),_0x262173['addClass']('ck-revision-history-root-'+_0x4af723['type'],_0x33bf45),this['activeChange']==_0x4af723&&_0x262173['addClass']('ck-revision-history-root--active',_0x33bf45);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1ab457=>'revision-comment:'+_0x1ab457,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x55cc5c=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Pt(_0x55cc5c['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x246297=>'revision-suggestion:'+_0x246297,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x129a08=>({'name':'suggestion:'+_0x129a08,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x229c1d=>{const _0x4706d9=_0x229c1d['markerName']['split'](':')[0x1];return'insertion'!=_0x4706d9&&'deletion'!=_0x4706d9?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4706d9]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ut(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ut(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3a7314,_0x2f9956,_0x85210b)=>{const _0x178855=_0x85210b['mapper']['markerNameToElements'](_0x2f9956['markerName']);if(_0x178855){for(const _0x2854c4 of _0x178855)_0x2854c4['is']('uiElement')&&(_0x85210b['mapper']['unbindElementFromMarkerName'](_0x2854c4,_0x2f9956['markerName']),_0x85210b['writer']['remove'](_0x2854c4));}},{'priority':'high'});}_getChangeFromId(_0x1b8d44){return this['_changeIdToChange']['get'](_0x1b8d44);}_getViewForChange(_0x1a1f1c){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Dt(this['editor']['locale'],_0x1a1f1c,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4dc269,_0x3b8346,_0x5e117d,_0x55b864)=>{_0x55b864&&this['_balloon']['remove'](_0x55b864),_0x5e117d&&(this['_balloon']['add']({'view':_0x5e117d,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2f3736=this['editor']['editing'],_0x516856=this['_getChangeFromId'](_0x5e117d['changeId']);let _0x319f94;if(_0x516856['data']['isOnRoot']){const _0x18fa5e=_0x2f3736['view']['getDomRoot'](_0x516856['rootName']);_0x319f94=Array['from'](_0x18fa5e['getClientRects']());}else{const _0xae6380=this['editor']['model']['markers']['get']('revision:'+_0x5e117d['changeId']);_0x319f94=Array['from'](_0x2f3736['mapper']['markerNameToElements'](_0xae6380['name']))['map'](_0x2014b3=>_0x2f3736['view']['domConverter']['mapViewToDom'](_0x2014b3))['map'](_0xa2a362=>Array['from'](_0xa2a362['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x319f94['find'](_0x3a212d=>_0x3a212d['top']-0x3<=this['_activeViewTarget']['y']&&_0x3a212d['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3a212d['left']-0x3<=this['_activeViewTarget']['x']&&_0x3a212d['right']+0x3>=this['_activeViewTarget']['x'])||_0x319f94[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x274286,_0x1fd083,_0x1cdbfa,_0x1f2b0d)=>{this['activeView']=_0x1cdbfa?this['_getViewForChange'](_0x1cdbfa):null,this['editor']['model']['change'](()=>{const _0x11e3c6=this['editor']['editing'];_0x1f2b0d&&(_0x1f2b0d['data']['isOnRoot']?_0x11e3c6['view']['change'](_0x1836d6=>{_0x1836d6['removeClass']('ck-revision-history-root--active',_0x11e3c6['view']['document']['getRoot'](_0x1f2b0d['rootName']));}):_0x11e3c6['reconvertMarker']('revision:'+_0x1f2b0d['id'])),_0x1cdbfa&&(_0x1cdbfa['data']['isOnRoot']?_0x11e3c6['view']['change'](_0x52c1ee=>{_0x52c1ee['addClass']('ck-revision-history-root--active',_0x11e3c6['view']['document']['getRoot'](_0x1cdbfa['rootName']));}):_0x11e3c6['reconvertMarker']('revision:'+_0x1cdbfa['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5d31fc,_0x1173c0)=>{if(this['activeChange'])return;const _0x2caab6=this['_findChangeIdFromDomTarget'](_0x1173c0['target']),_0x1f4bc0=this['_changeIdToChange']['get'](_0x2caab6);_0x1f4bc0?(this['_activeViewTarget']={'x':_0x1173c0['domEvent']['x'],'y':_0x1173c0['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1f4bc0)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x463286,_0x552389)=>{const _0x2f228c=this['_findChangeIdFromDomTarget'](_0x552389['target']),_0x5a9232=this['_changeIdToChange']['get'](_0x2f228c);_0x5a9232?(this['_activeViewTarget']={'x':_0x552389['domEvent']['x'],'y':_0x552389['domEvent']['y']},_0x5a9232===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5a9232):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x24a11f){do{const _0x2cc784=_0x24a11f['getAttribute']('data-change-id');if(_0x2cc784)return _0x2cc784;_0x24a11f=_0x24a11f['parent'];}while(_0x24a11f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x47348f=>{for(const _0x48fe05 of this['editor']['model']['markers'])_0x47348f['removeMarker'](_0x48fe05);});}};function Pt(_0x46405d){return _0x46405d['split'](':')[0x1];}function Ut(_0x48072a,_0x414af3){return(_0x2c1dda,_0x75731,_0x103b27)=>{if(!_0x103b27['consumable']['test'](_0x75731['markerRange'],_0x2c1dda['name']))return;const _0x1c430c=_0x75731['markerRange']['getWalker'](),_0x46fdea=_0x75731['markerRange']['start'],_0x303baa=_0x48072a['model']['schema'];let _0x3f01c0=null,_0x1471e9=null,_0x518b4a=!0x1,_0x13cf43=!0x1;for(const _0x4d5994 of _0x1c430c){const _0x161318=_0x4d5994['item'];_0x518b4a=_0x518b4a||_0x303baa['isContent'](_0x161318);const _0x39ddbf=_0x103b27['mapper']['toViewElement'](_0x161318);if(_0x39ddbf&&_0x39ddbf['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4d5994['type']&&(_0x303baa['isBlock'](_0x161318)&&!_0x303baa['isLimit'](_0x161318)&&(_0x161318['nextSibling']||_0x46fdea['isAtEnd']?_0x3f01c0&&_0x3f01c0['parent']==_0x161318||(_0x3f01c0=_0x161318,_0x725605(_0x4d5994['previousPosition']),_0x13cf43=!0x0):_0x1471e9=_0x1471e9||_0x4d5994['previousPosition']));}function _0x725605(_0x546cb3){const _0x53b5d8=_0x103b27['mapper']['toViewPosition'](_0x546cb3),_0xbb3d60=_0x103b27['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x414af3});_0x103b27['writer']['insert'](_0x53b5d8,_0xbb3d60),_0x103b27['mapper']['bindElementToMarker'](_0xbb3d60,_0x75731['markerName']);}_0x518b4a||_0x13cf43||!_0x1471e9||_0x725605(_0x1471e9);};}var Lt=class extends _0x2d8dff{constructor(_0x22dfaa){super(_0x22dfaa);const _0xa7a506=_0x22dfaa['plugins']['get'](Ht);this['affectsData']=!0x1,this['listenTo'](_0xa7a506,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xa7a506,'change:isEnabled',()=>this['refresh']());}execute(){const _0x58355c=this['editor'],_0x335ee5=_0x58355c['plugins']['get'](Ht),_0x46b16e=_0x335ee5['isReady']?_0x335ee5['diff']['newRevisionId']:null;_0x58355c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x46b16e);}['refresh'](){const {isReady:_0xc3e8c0,isEnabled:_0x2dca1b,repository:_0xb1a6e9,diff:_0x5df4f2}=this['editor']['plugins']['get'](Ht),_0x36cf8d=_0x5df4f2&&_0xb1a6e9['getLaterVisibleRevision'](_0x5df4f2['newRevisionId']);this['isEnabled']=_0xc3e8c0&&_0x2dca1b&&Boolean(_0x36cf8d);}},Ft=class extends _0x2d8dff{_step;constructor(_0x3b6aa1,{direction:_0x439a65}){super(_0x3b6aa1);const _0x5bd5b6=_0x3b6aa1['plugins']['get'](Ht);this['affectsData']=!0x1,this['_step']='forward'===_0x439a65?0x1:-0x1,this['listenTo'](_0x5bd5b6,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5bd5b6,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5bd5b6,'change:activeChange',()=>this['refresh']());}execute(){const _0xf39382=this['editor'],_0x5fa021=_0xf39382['plugins']['get'](Ht),{isNavigationMode:_0x364fc0,currentChangeNumber:_0x86920f}=_0x5fa021;let _0x24d12f;if(_0x5fa021['activeChange']=_0x364fc0?_0x5fa021['diff']['changes']['get'](_0x86920f+this['_step']):_0x5fa021['diff']['changes']['first'],_0x5fa021['activeChange']['data']['isOnRoot'])_0x24d12f=_0xf39382['editing']['view']['getDomRoot'](_0x5fa021['activeChange']['rootName']);else{const _0x2c2424=_0xf39382['model']['markers']['get']('revision:'+_0x5fa021['activeChange']['id']);_0x24d12f=_0x141319(_0xf39382['editing'],_0x2c2424);}_0x51e00f({'target':_0x24d12f,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xf16361,currentChangeNumber:_0x3b50f5,numberOfChanges:_0x1b9b07,isReady:_0x52e0e3,isEnabled:_0x376007}=this['editor']['plugins']['get'](Ht);this['isEnabled']=!!(_0x376007&&_0x52e0e3&&_0x1b9b07)&&(!_0xf16361||(0x1===this['_step']?_0x3b50f5<_0x1b9b07-0x1:_0x3b50f5>0x0));}},$t=class extends ut{constructor(_0x5aec4d){super(_0x5aec4d);const _0xdf588c=this['bindTemplate'],_0x425838=new _0x18f462(_0x5aec4d),_0x5968e7=new _0x18f462(_0x5aec4d);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',(_0x3855ad,_0x5d313b)=>_0x3855ad&&_0x5d313b>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4f57be,_0x5278e8,_0x42243b,_0x23e13d)=>{if(!_0x4f57be)return Rt(_0x5aec4d,'Loading...');if(!_0x42243b)return Rt(_0x5aec4d,'No\x20changes');const _0xec4ba5=Rt(_0x5aec4d,'NUMBER_OF_CHANGES',_0x42243b);return _0x23e13d?Rt(_0x5aec4d,'X_OF_Y_CHANGES',[_0x5278e8+0x1,_0x42243b]):_0xec4ba5;}),_0x425838['set']({'label':Rt(_0x5aec4d,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1aa34a}),_0x5968e7['set']({'label':Rt(_0x5aec4d,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5735e9}),_0x425838['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5968e7['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x425838['on']('execute',()=>this['fire']('execute','backward')),_0x5968e7['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',_0xdf588c['if']('_isStatusLabelVisible','ck-hidden',_0x480705=>!_0x480705)]},'children':[{'text':_0xdf588c['to']('isNavigationMode',_0x40b3db=>_0x40b3db?Rt(_0x5aec4d,'EDIT_X_OF_Y_REVISIONS')+':\x20':Rt(_0x5aec4d,'Total')+':\x20')}]},{'text':_0xdf588c['to']('_statusText')}]},new ht(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x425838,_0x5968e7]}]});}};const Bt='ck-editor__editable__loading-overlay';var jt=class extends _0x5ca6f9{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1da51a=this['editor']['editing']['view'];_0x1da51a['change'](_0x36debd=>{for(const _0x1ecab9 of _0x1da51a['document']['roots'])_0x36debd['addClass'](Bt,_0x1ecab9);});}['hide'](){const _0x2124a2=this['editor']['editing']['view'];_0x2124a2['change'](_0x16b423=>{for(const _0x419abc of _0x2124a2['document']['roots'])_0x16b423['removeClass'](Bt,_0x419abc);});}},Gt=class extends _0x5ca6f9{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht,jt];}init(){const _0x3c4b1e=this['editor'],_0x138115=_0x3c4b1e['plugins']['get'](Ht),_0x2ff816=_0x3c4b1e['plugins']['get'](jt);_0x3c4b1e['ui']['componentFactory']['add']('exitToEditing',_0x3bf49f=>{const _0x46ee10=new _0x18f462(_0x3bf49f);return _0x46ee10['set']({'label':Rt(_0x3bf49f,'Back\x20to\x20editing'),'icon':_0x33137a,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x46ee10,'execute',()=>{_0x3c4b1e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x46ee10;}),_0x3c4b1e['ui']['componentFactory']['add']('restoreRevision',_0x2fd02d=>{const _0x25e08d=new _0x18f462(_0x2fd02d);return _0x25e08d['set']({'label':Rt(_0x2fd02d,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x25e08d['bind']('isEnabled')['to'](_0x3c4b1e['commands']['get']('restoreRevision')),this['listenTo'](_0x25e08d,'execute',()=>_0x3c4b1e['execute']('restoreRevision')),_0x25e08d;}),_0x3c4b1e['ui']['componentFactory']['add']('changesNavigation',_0x30ff59=>{const _0x3fa1f9=new $t(_0x30ff59),_0x8c03aa=_0x3c4b1e['commands']['get']('showPreviousChange'),_0x125b2f=_0x3c4b1e['commands']['get']('showNextChange');return _0x3fa1f9['bind']('isBackwardNavigationEnabled')['to'](_0x8c03aa,'isEnabled'),_0x3fa1f9['bind']('isForwardNavigationEnabled')['to'](_0x125b2f,'isEnabled'),_0x3fa1f9['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x138115),this['listenTo'](_0x3fa1f9,'execute',(_0x3d52b3,_0x443293)=>{_0x3c4b1e['execute']('forward'===_0x443293?'showNextChange':'showPreviousChange');}),_0x3fa1f9;}),_0x2ff816['show'](),_0x138115['on']('change:isReady',(_0x5ce6b0,_0x4e4df3,_0x32cbe5)=>{_0x32cbe5?_0x2ff816['hide']():_0x2ff816['show']();});}},Kt=class extends tt{['_resizeObserver']=null;constructor(_0x29149b,_0x4615d2){super(_0x29149b,_0x4615d2);const _0x28c82b=this['bindTemplate'];this['set']({'label':Rt(_0x29149b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=Rt(_0x29149b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x28c82b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1f97d9(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x429eb2=this['fieldView']['element'];this['_tooltipString']=_0x429eb2['scrollWidth']>_0x429eb2['clientWidth']&&_0x429eb2['value']||'';}},qt=class extends ut{constructor(_0x47b81a,_0x25a5e0,_0x3dccf7){super(_0x47b81a);const _0x525dd7=new _0x47b8ed();_0x525dd7['set']({'content':_0x36a883,'viewBox':'0\x200\x2011\x2010'});const _0x2b8be3=['ck','ck-revision-history-sidebar__revision-author'];_0x3dccf7&&_0x2b8be3['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1be6e0=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':Rt(_0x47b81a,_0x3dccf7?'Revision\x20creator':'Revision\x20author')},'children':[_0x525dd7,_0x25a5e0['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2b8be3},'children':_0x1be6e0});}};function Yt(_0x414a86,_0x280b9c){const _0x17b920=_0x414a86['bindTemplate'],_0x2a336a=_0x414a86['locale'],_0x243bb1=ft(_0x2a336a);_0x243bb1['panelPosition']='sw';const _0x5b7843=function(_0x439690,_0x55d400){const _0x2dcd9e=function(_0x7f82a2,_0xdd5a6a){const _0x5e2552=_0x7f82a2['locale'],_0x525716={'Compare\x20against\x20selected':Rt(_0x5e2552,'Compare\x20against\x20selected'),'Name\x20this\x20revision':Rt(_0x5e2552,'Name\x20this\x20revision'),'Restore\x20this\x20revision':Rt(_0x5e2552,'Restore\x20this\x20revision')};return _0xdd5a6a['map'](_0x2c642a=>{const _0x5ed773=_0x525716[_0x2c642a['name']];return _0x5ed773&&_0x5ed773!==_0x2c642a['name']&&(_0x2c642a['name']=_0x5ed773),_0x2c642a;});}(_0x439690,_0x55d400),_0x4aabff=new _0x17289a();for(const _0x334862 of _0x2dcd9e){const _0x1b2c89={'type':'button','model':new lt({'label':_0x334862['name'],'class':_0x334862['class'],'withText':!0x0,'role':'menuitem','_action':_0x334862['action']})};_0x1b2c89['model']['bind']('isEnabled')['to'](_0x439690,'isActionsDropdownOpen',_0x4e1c94=>'function'!=typeof _0x334862['isEnabled']||(!_0x4e1c94||_0x334862['isEnabled'](_0x439690))),_0x4aabff['add'](_0x1b2c89);}return _0x4aabff;}(_0x414a86,_0x280b9c);return _0x414a86['bind']('isActionsDropdownOpen')['to'](_0x243bb1,'isOpen'),_0x243bb1['buttonView']['set']({'label':Rt(_0x2a336a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x246cca}),_0x243bb1['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x17b920['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x17b920['to'](_0x1175ce=>_0x1175ce['stopPropagation']())}}),_0x243bb1['on']('execute',_0x3a55ee=>{_0x414a86['isReady']&&'function'==typeof _0x3a55ee['source']['_action']&&_0x3a55ee['source']['_action'](_0x414a86);}),dt(_0x243bb1,_0x5b7843,{'role':'menu'}),_0x243bb1['listenTo'](_0x414a86,'change:isActionsDropdownOpen',(_0x3901e4,_0x429bd8,_0x2f9952)=>{if(_0x2f9952)for(const _0x3b5e5a of _0x243bb1['listView']['items']){const _0x264fb9=_0x3b5e5a['children']['first'],_0x9820b=_0x280b9c['find'](_0x13e026=>_0x13e026['action']===_0x264fb9['_action'])['isVisible'];_0x3b5e5a['isVisible']=void 0x0===_0x9820b||_0x9820b(_0x414a86);}}),_0x243bb1;}const Jt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0xf2df99,Collection as _0x1b928b,ElementReplacer as _0x178f0c,FocusTracker as _0x4d9461,KeystrokeHandler as _0x2ceefc,ObservableMixin as _0x591c98,ResizeObserver as _0x1e29b3,logWarning as _0x2e1924,scrollViewportToShowTarget as _0x6eee20,uid as _0x3a243d}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x4c4837,isEqual as _0x330946,set as _0x6d3aed,unset as _0x4f3c57}from'es-toolkit/compat';import{Command as _0x18a40f,Editor as _0xb27820,ElementApiMixin as _0x34e3e6,PendingActions as _0x4e8f00,Plugin as _0x245d60}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x8c2f21,PillView as _0x2190ec,Users as _0x124f7c,getMarkerDomElement as _0xf9a4c5,reRootOperation as _0x568fec,reRootPosition as _0x543b7d,reRootRange as _0x399603,sanitizeEditorConfig as _0x2d7eba}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x5b0952,ModelElement as _0x33393c,ModelRange as _0x4a1c21,ModelText as _0x39f156,ViewAttributeElement as _0x175cb2,ViewContainerElement as _0x1cb690,ViewDocumentFragment as _0x1675a3,ViewElement as _0x1a33c3,ViewEmptyElement as _0x4091aa,ViewRawElement as _0x7dd57b,ViewText as _0x2cedf2,ViewUIElement as _0x339ddb}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x3e7cc1,IconChevronUp as _0x56cdc6,IconHistory as _0x5bf3c2,IconSparkle as _0x32cbb7,IconThreeVerticalDots as _0x9592c1,IconUndo as _0x329eec,IconUser as _0x5991e0}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0xd98ee5,ButtonView as _0x3cad3d,ContextualBalloon as _0x2fe268,CssTransitionDisablerMixin as _0x3231bb,EditorUI as _0x4d2c08,IconView as _0x203f2d,InlineEditableUIView as _0x356c60,LabeledFieldView as tt,ListItemView as it,ListView as et,MenuBarMenuListItemButtonView as st,MenuBarMenuListItemView as nt,MenuBarMenuListView as ot,MenuBarMenuView as rt,StickyPanelView as at,ToolbarSeparatorView as ht,ToolbarView as ct,UIModel as lt,View as ut,addListToDropdown as dt,createDropdown as ft,createLabeledInputText as vt,normalizeToolbarConfig as gt,submitHandler as mt}from'@ckeditor/ckeditor5-ui';import{DateTime as _t}from'luxon';const wt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x591c98();var pt=class extends wt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x25a374){super(),this['id']=_0x25a374['id']||_0x3a243d(),this['creator']=_0x25a374['creator']||null,this['authors']=_0x25a374['authors']||[],this['diffData']=_0x25a374['diffData']||null,this['toVersion']=_0x25a374['toVersion']||0x0,this['fromVersion']=_0x25a374['fromVersion']||0x0,this['set']('name',_0x25a374['name']||''),this['set']('createdAt',_0x25a374['createdAt']||new Date()),this['set']('attributes',_0x25a374['attributes']||{});}setName(_0x2e9325){this['_update']({'name':_0x2e9325});}setAttribute(_0x374e12,_0x471770){const _0x595877=_0x4c4837(this['attributes']);_0x6d3aed(_0x595877,_0x374e12,_0x471770),this['_update']({'attributes':_0x595877});}removeAttribute(_0x50712a){const _0x375797=_0x4c4837(this['attributes']);_0x4f3c57(_0x375797,_0x50712a),this['_update']({'attributes':_0x375797});}_update(_0x4f0dfb,_0x10ed9d=!0x1){let _0x298224=!0x1;const _0x1fa197={'id':this['id']};for(const _0x2efc38 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x50242a=_0x4f0dfb[_0x2efc38];void 0x0!==_0x50242a&&_0x50242a!==this[_0x2efc38]&&(this[_0x2efc38]=_0x50242a,_0x1fa197[_0x2efc38]=_0x50242a,_0x298224=!0x0);}_0x298224&&(_0x1fa197['authors']&&(_0x1fa197['authorsIds']=_0x1fa197['authors']['map'](_0x4ca5e5=>_0x4ca5e5['id']),delete _0x1fa197['authors']),this['fire']('_update',_0x1fa197,_0x10ed9d));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1a902c=>_0x1a902c['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},yt=class extends _0x245d60{['_revisions'];static get requires(){return[_0x124f7c];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x1b8a6a){super(_0x1b8a6a),this['_revisions']=new _0x1b928b();}afterInit(){!async function(_0x237dde){const _0x312900='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x55b238=0xeb829,_0x449747=0x79410,_0x1a3e4a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x1a1cb2(_0xbac3c3){const _0x5e8f06=new window['Promise'](_0x183578=>{_0xbac3c3['once']('ready',_0x183578);}),_0xdc0a7b=window['Date']['now'](),_0x3130d9=_0xbac3c3['config']['get']('licenseKey');async function _0x5a37b9(){let _0x4e9b7c,_0x2d440a=null,_0x5a8f69=null;try{return'GPL'==_0x3130d9?'NotAllowed':(_0x4e9b7c=_0x14592e(),_0x4e9b7c?(_0x4e9b7c['usageEndpoint']&&(_0x5a8f69=_0x324e4a(_0x4e9b7c['usageEndpoint'],_0x4e9b7c['jti'])),await _0x4350be()?_0x4c7844()?_0x327bb1()?'Expired':_0x55a2c5()?('evaluation'==_0x4e9b7c['licenseType']&&(_0x2d440a=_0xaf17b7('EvaluationLimit')),await _0x5bdf1c()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x327bb1(){const _0x2ead91=['evaluation','trial']['includes'](_0x4e9b7c['licenseType'])?_0xdc0a7b/0x3e8:0xe10*_0x449747;return _0x4e9b7c['exp']<_0x2ead91;}function _0x4c7844(){const _0x424689=_0x4e9b7c['features'];if(!_0x424689)return!0x1;if(_0x424689['includes']('*'))return!0x0;if(_0x424689['includes']('RH'))return!0x0;if(_0x424689['includes']('RRH')){if(_0x551525())return!0x0;if(_0x30cf61()||_0x112e1a())return!0x0;}return!0x1;}function _0x55a2c5(){const _0x5d17f6=_0x4e9b7c['licensedHosts'];if(!_0x5d17f6||0x0==_0x5d17f6['length'])return!0x0;const {hostname:_0x15c2b4}=new URL(window['location']['href']);if(_0x5d17f6['includes'](_0x15c2b4))return!0x0;const _0x345b6a=_0x15c2b4['split']('.');return _0x5d17f6['filter'](_0x3cd2aa=>_0x3cd2aa['includes']('*'))['map'](_0x1aaa45=>_0x1aaa45['split']('.'))['filter'](_0x211348=>_0x211348['length']<=_0x345b6a['length'])['map'](_0xd094db=>Array(_0x345b6a['length']-_0xd094db['length'])['fill']('*'===_0xd094db[0x0]?'*':'')['concat'](_0xd094db))['some'](_0xef117=>_0x345b6a['every']((_0x191f7c,_0x3e38e0)=>_0xef117[_0x3e38e0]===_0x191f7c||'*'===_0xef117[_0x3e38e0]));}function _0x5bdf1c(){return _0x2d440a&&_0x5a8f69?new window['Promise']((_0x5de2a3,_0x216e32)=>{_0x2d440a['then'](_0x5de2a3,_0x216e32),_0x5a8f69['then'](_0x4de2d0=>{'Valid'!=_0x4de2d0&&_0x5de2a3(_0x4de2d0);},_0x216e32);}):_0x2d440a||_0x5a8f69||'Valid';}}function _0x324e4a(_0xbe2b46,_0x50e140){return new window['Promise'](_0x1ad21b=>{if(_0x46e08a())return _0x1ad21b('Valid');_0x4872c0(),_0xbac3c3['decorate']('_sendUsageRequest');let _0x439f35=!0x1;const _0x5292b5=_0x3a243d();function _0x5da31b(_0x48a10d){return!!_0x48a10d&&('object'==typeof _0x48a10d||'function'==typeof _0x48a10d)&&'function'==typeof _0x48a10d['then']&&'function'==typeof _0x48a10d['catch'];}function _0x47271d(_0x4fc90d){_0x1b1c94(_0x4fc90d)['then'](_0x517c80=>_0x517c80&&'ok'==_0x517c80['status']?_0xe50427(_0x41ef5c(_0x5292b5+_0x50e140))!=_0x517c80['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x50d268=>(_0x3a8bf7(),_0x50d268),()=>{const _0xcdc6f2=_0xc51213();return null==_0xcdc6f2?(_0x3a8bf7(),'Valid'):_0xdc0a7b-_0xcdc6f2>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1ad21b)['catch'](()=>{_0x1ad21b('UsageLimit');});const _0x1f8d70=0x36ee80;function _0x3a8bf7(){const _0x5a8704='llct-'+_0xe50427(_0x41ef5c(_0xbe2b46)),_0x4d84e0=_0x241a27(_0xe50427(window['Math']['ceil'](_0xdc0a7b/_0x1f8d70)));window['localStorage']['setItem'](_0x5a8704,_0x4d84e0);}function _0xc51213(){const _0x230632='llct-'+_0xe50427(_0x41ef5c(_0xbe2b46)),_0x593ecc=window['localStorage']['getItem'](_0x230632);return _0x593ecc?window['parseInt'](_0x241a27(_0x593ecc),0x10)*_0x1f8d70:null;}function _0x1b1c94(_0x4e2a13){return new window['Promise']((_0x166b7f,_0xdeba50)=>{_0x4e2a13['then'](_0x166b7f,_0xdeba50),window['setTimeout'](_0xdeba50,0x1d4c0);});}}_0xbac3c3['on']('_sendUsageRequest',(_0x31bec2,_0x15db79)=>{if(_0x15db79[0x0]!=_0xbe2b46)return _0x1ad21b('UsageLimit');_0x15db79[0x1]={..._0x15db79[0x1],'requestId':_0x5292b5};},{'priority':'high'}),_0xbac3c3['on']('_sendUsageRequest',_0x568f6b=>{_0x5da31b(_0x568f6b['return'])&&(_0x439f35=!0x0,_0x47271d(_0x568f6b['return']));},{'priority':'low'}),_0x5e8f06['then'](()=>{_0x439f35||_0x1ad21b('UsageLimit');});});function _0x46e08a(){return'auto'==_0xbac3c3['editing']['view']['_overlayModeHint'];}function _0x4872c0(){_0xbac3c3['editing']['view']['_overlayModeHint']='auto';}}function _0xaf17b7(_0x25dc0e){const _0x5c111c=[new window['Promise'](_0x1175e4=>setTimeout(_0x1175e4,0x93ecc)),_0x5e8f06['then'](()=>new window['Promise'](_0x36a978=>{const _0x3db9d8=0x7,_0x17daf4=_0x237dde['_revisions'];function _0x1c4f9b(){_0x17daf4['length']>=_0x3db9d8&&_0x36a978();}_0x1c4f9b(),_0x17daf4['on']('add',_0x1c4f9b);})),new window['Promise'](_0x30436e=>{function _0x35a318(){for(const _0x420e0a in window)if(window['Number']['isNaN'](window['Number'](_0x420e0a))&&window[_0x420e0a]==_0x55b238)return _0x30436e();'destroyed'!=_0xbac3c3['state']&&window['setTimeout'](_0x35a318,0x1388);}_0xc463f5('RevisionViewer')&&_0x35a318();})];return window['Promise']['race'](_0x5c111c)['then'](()=>_0x25dc0e);}async function _0x489613(){if(await _0x5e8f06,_0xc463f5('RevisionViewer')){const _0x3c80a5=_0x237dde['getRevision'](0x0),_0x4bfaa9=_0x237dde['getEarlierVisibleRevision'](_0x3c80a5['id']),_0x7145a=_0x9f7575('RevisionViewer');return await _0x7145a['compare'](_0x3c80a5['id'],_0x4bfaa9?_0x4bfaa9['id']:null,!0x0),_0x7145a['unbind']('isEnabled'),_0x7145a['isEnabled']=!0x1,_0x7145a['compare']=_0x42a577,void(_0x7145a['_getDiff']=_0x42a577);}if(_0xc463f5('RevisionTracker')){const _0x19606e=_0x9f7575('RevisionTracker');_0x19606e['unbind']('isEnabled'),_0x19606e['isEnabled']=!0x1,_0x19606e['update']=_0x42a577,_0x19606e['saveRevision']=_0x42a577;}_0xbac3c3['model']['change']=_0x42a577,_0xbac3c3['model']['enqueueChange']=_0x42a577,_0xbac3c3['enableReadOnlyMode']('model');}function _0x551525(){return _0xc463f5('WebSocketGateway')&&'connected'==_0x9f7575('WebSocketGateway')['state'];}function _0x30cf61(){return _0xc463f5('RevisionViewerIntegration');}function _0x112e1a(){return _0xc463f5('TrackChangesDataGetter');}function _0x505624(_0x4e05b8){const _0x5c7ac0=_0x37853a();_0xbac3c3[_0x5c7ac0]='revisionHistoryLicenseKey'+_0x4e05b8,_0x4e05b8['endsWith']('Limit')&&(window[_0x37853a()]=_0x55b238),'Valid'!=_0x4e05b8&&_0x489613();}function _0x37853a(){const _0x1deab6=window['String'](window['performance']['now']())['replace']('.','');let _0x5b0bfa='N';for(let _0x10ef74=0x0;_0x10ef74<_0x1deab6['length'];_0x10ef74+=0x2){let _0x3eb614=window['parseInt'](_0x1deab6['substring'](_0x10ef74,_0x10ef74+0x2));_0x3eb614>=0x3e&&(_0x3eb614-=0x3e),_0x5b0bfa+=_0x312900[_0x3eb614];}return _0x5b0bfa;}function _0x14592e(){const _0x90b0f4=_0x3130d9['split']('.');if(0x3!=_0x90b0f4['length'])return null;return _0x320a07(_0x90b0f4[0x1]);function _0x320a07(_0x271d4b){const _0x434fd9=_0xf38ef5(_0x271d4b);return _0x434fd9&&_0x2ff7c5()?_0x434fd9:null;function _0x2ff7c5(){const _0x255ea2=_0x434fd9['jti'],_0x4fb736=window['parseInt'](_0x255ea2['substring'](_0x255ea2['length']-0x8),0x10),_0x48a86f={..._0x434fd9,'jti':_0x255ea2['substring'](0x0,_0x255ea2['length']-0x8)};return delete _0x48a86f['vc'],_0x41ef5c(_0x48a86f)==_0x4fb736;}}}async function _0x4350be(){let _0x284444=!0x0;try{const [_0x4da17,_0x269794,_0x1b2ee3]=_0x3130d9['split']('.');return _0x22720c(_0x4da17),await _0x2a1232(_0x4da17,_0x269794,_0x1b2ee3),_0x284444;}catch{return!0x1;}function _0x22720c(_0x5a4b05){const _0x3ee516=_0xf38ef5(_0x5a4b05);_0x3ee516&&'ES256'==_0x3ee516['alg']||(_0x284444=!0x1);}async function _0x2a1232(_0x409063,_0xb0489d,_0x388a7e){const _0x15b799=window['Uint8Array']['from'](_0x5a7ebd(_0x388a7e),_0x498df9=>_0x498df9['charCodeAt'](0x0)),_0x493c6e=new window['TextEncoder']()['encode'](_0x409063+'.'+_0xb0489d),_0x13f224=window['crypto']['subtle'];if(!_0x13f224)return;const _0x540896=await _0x13f224['importKey']('jwk',_0x1a3e4a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x13f224['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x540896,_0x15b799,_0x493c6e)||(_0x284444=!0x1);}}function _0xf38ef5(_0x552002){return _0x552002['startsWith']('ey')?JSON['parse'](_0x5a7ebd(_0x552002)):null;}function _0x5a7ebd(_0xb1a7f0){return window['atob'](_0xb1a7f0['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x41ef5c(_0x45d2fd){let _0x4f1c71=0x1505;function _0x13e6bc(_0x79ddae){for(let _0xb2fede=0x0;_0xb2fede<_0x79ddae['length'];_0xb2fede++){const _0x17f3c6=_0x79ddae['charCodeAt'](_0xb2fede);_0x4f1c71=(_0x4f1c71<<0x5)+_0x4f1c71+_0x17f3c6,_0x4f1c71&=_0x4f1c71;}}function _0x1e30ba(_0x281468){Array['isArray'](_0x281468)?_0x281468['forEach'](_0x1e30ba):_0x281468&&'object'==typeof _0x281468?Object['entries'](_0x281468)['sort']()['forEach'](([_0x36f37e,_0x33fbf5])=>{_0x13e6bc(_0x36f37e),_0x1e30ba(_0x33fbf5);}):_0x13e6bc(window['String'](_0x281468));}return _0x1e30ba(_0x45d2fd),_0x4f1c71>>>0x0;}function _0xe50427(_0x4147f6){return _0x4147f6['toString'](0x10)['padStart'](0x8,'0');}function _0x241a27(_0x502a8b){return _0x502a8b['split']('')['reverse']()['join']('');}function _0xc463f5(_0x12a282){return _0xbac3c3['plugins']['has'](_0x12a282);}function _0x9f7575(_0x708d3b){return _0xbac3c3['plugins']['get'](_0x708d3b);}function _0x42a577(){}_0x505624(await _0x5a37b9());}_0x1a1cb2(_0x237dde['editor']);}(this);}createRevision(_0x49c1cb){const _0x1cb487=this['editor']['plugins']['get']('Users');return new pt({'id':_0x49c1cb['id'],'name':_0x49c1cb['name'],'creator':_0x49c1cb['creatorId']?_0x1cb487['getUser'](_0x49c1cb['creatorId']):null,'diffData':_0x49c1cb['diffData']||_0x49c1cb['data'],'authors':_0x49c1cb['authorsIds']['map'](_0x402ac5=>_0x1cb487['getUser'](_0x402ac5)),'createdAt':new Date(_0x49c1cb['createdAt']),'attributes':_0x49c1cb['attributes'],'fromVersion':_0x49c1cb['fromVersion'],'toVersion':_0x49c1cb['toVersion']});}['addRevision'](_0x4e5296,_0x205641=0x0){this['_revisions']['add'](_0x4e5296,_0x205641);}getRevision(_0x94c40f){return this['_revisions']['get'](_0x94c40f);}getRevisions(_0xaf7d95={'toJSON':!0x1}){const _0x1c9d31=Array['from'](this['_revisions']);return _0x1c9d31['reverse'](),_0xaf7d95['toJSON']?_0x1c9d31['map'](_0x3a1dac=>_0x3a1dac['toJSON']()):_0x1c9d31;}getIndex(_0xf05d03){return this['_revisions']['getIndex'](_0xf05d03);}getEarlierVisibleRevision(_0x185a61){const [,_0x5db430]=this['getRevisionsIterator'](_0x185a61,{'direction':'earlier'});return _0x5db430;}getLaterVisibleRevision(_0x1f69cc){const [,_0x4097c1]=this['getRevisionsIterator'](_0x1f69cc,{'direction':'later'});return _0x4097c1;}getRevisionsInDiff(_0x4694c9){const _0x262238=[];for(const _0x5425c7 of this['getRevisionsIterator'](_0x4694c9['newRevisionId']))if(_0x262238['push'](_0x5425c7),_0x5425c7['id']===_0x4694c9['oldRevisionId'])break;return _0x262238;}*getRevisionsIterator(_0x221811,{direction:_0x5a61bb='earlier',filter:_0x13ac6e=()=>!0x0}={}){const _0x16fb37='earlier'===_0x5a61bb?0x1:-0x1;let _0x721aa4=this['_revisions']['get'](_0x221811),_0x308589=this['getIndex'](_0x721aa4);for(yield _0x721aa4;_0x721aa4;){if(_0x308589+=_0x16fb37,_0x721aa4=this['getRevision'](_0x308589),!_0x721aa4)return;_0x13ac6e(_0x721aa4)&&(yield _0x721aa4);}}},bt=class extends _0x245d60{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1cb690,'c'],[_0x175cb2,'a'],[_0x4091aa,'e'],[_0x7dd57b,'r'],[_0x339ddb,'u']]);_typeCharToViewClass=new Map([['c',_0x1cb690],['a',_0x175cb2],['e',_0x4091aa],['r',_0x7dd57b],['u',_0x339ddb]]);async loadRevisionData(_0x2ef8ae,_0x27de32){if(_0x2ef8ae['diffData']||!_0x27de32)return;const _0x293f58=this['editor']['config']['get']('collaboration.channelId');_0x2ef8ae['diffData']=(await _0x27de32['getRevision']({'channelId':_0x293f58,'revisionId':_0x2ef8ae['id']}))['diffData'];}getRevisionDocumentData(_0x4c4443){const _0x4e0c85={};for(const _0x747380 in _0x4c4443['diffData']){if(_0x4c4443['diffData'][_0x747380]['attachChange']&&!_0x4c4443['diffData'][_0x747380]['attachChange']['isAttached'])continue;const _0x8fbd6b=this['_removeRevisionMarkers'](JSON['parse'](_0x4c4443['diffData'][_0x747380]['insertions'])),_0xaa9c93=this['editor']['editing']['view']['document'],_0x222b57=new _0x1675a3(_0xaa9c93,_0x8fbd6b['map'](_0x5c158f=>this['_getViewFromDiffObj'](_0x5c158f,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4e0c85[_0x747380]=this['editor']['data']['processor']['toData'](_0x222b57),this['editor']['data']['processor']['useFillerType']('default');}return _0x4e0c85;}getRevisionRootsAttributes(_0x4d8097){const _0x162d90={};for(const _0x3b1090 in _0x4d8097['diffData'])_0x4d8097['diffData'][_0x3b1090]['attachChange']&&!_0x4d8097['diffData'][_0x3b1090]['attachChange']['isAttached']||(_0x162d90[_0x3b1090]=_0x4d8097['diffData'][_0x3b1090]['attributesAfter']||{});return _0x162d90;}getRevisionRootsModelElements(_0x2aa909){const _0x154789={};for(const _0x446765 in _0x2aa909['diffData']){if(_0x2aa909['diffData'][_0x446765]['attachChange']&&!_0x2aa909['diffData'][_0x446765]['attachChange']['isAttached'])continue;const _0x141245=_0x2aa909['diffData'][_0x446765]['rootElementName'];_0x141245&&(_0x154789[_0x446765]=_0x141245);}return _0x154789;}_getTypeCharForViewElement(_0x4d4a78){return this['_viewClassToTypeChar']['get'](_0x4d4a78['constructor']);}_getViewFromDiffObj(_0x14a031,_0x10ea59){const _0x3ebee7=this['editor']['editing']['view']['document'];if('string'==typeof _0x14a031)return new _0x2cedf2(_0x3ebee7,_0x14a031);{let _0x1f2eaa,_0x36ca63;_0x36ca63='u'==_0x14a031['type']||'r'==_0x14a031['type']?[]:_0x14a031['children']['map'](_0x700f6a=>this['_getViewFromDiffObj'](_0x700f6a,_0x10ea59));const _0x409110=this['_typeCharToViewClass']['get'](_0x14a031['type'])||_0x1a33c3,_0x36ed01=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1f2eaa=new _0x409110(_0x3ebee7,_0x14a031['name'],_0x14a031['attributes'],_0x36ca63),'u'==_0x14a031['type']&&_0x14a031['children'][0x0]){const _0x808e24=_0x14a031['children'][0x0];if(_0x1f2eaa['render']=function(_0x28dba6){const _0x2b7413=_0x28dba6['createElement']('div');return _0x2b7413['innerHTML']=_0x808e24,_0x2b7413['childNodes'][0x0];},_0x10ea59){const _0x2e3f26=new _0x1675a3(_0x3ebee7);_0x2e3f26['_appendChild'](_0x1f2eaa);const _0x4a2af0=Array['from'](_0x36ed01['viewChildrenToDom'](_0x2e3f26,{'bind':!0x1})),_0x59b2df=_0x36ed01['domDocument']['createElement']('div');_0x59b2df['append'](..._0x4a2af0),_0x1f2eaa=Array['from'](_0x36ed01['domChildrenToView'](_0x59b2df))[0x0];}}else{if('r'==_0x14a031['type']&&_0x14a031['children'][0x0]){const _0x2a9ad6=_0x14a031['children'][0x0];if(_0x1f2eaa['render']=function(_0x22d844){_0x22d844['innerHTML']=_0x2a9ad6;},_0x10ea59){const _0x188fac=new _0x1675a3(_0x3ebee7);_0x188fac['_appendChild'](_0x1f2eaa);const _0x79cd89=Array['from'](_0x36ed01['viewChildrenToDom'](_0x188fac,{'bind':!0x1})),_0x61388d=_0x36ed01['domDocument']['createElement']('div');_0x61388d['append'](..._0x79cd89);const _0x3f0868=Array['from'](_0x36ed01['domChildrenToView'](_0x61388d));_0x3f0868['length']>0x1?_0x1f2eaa['_appendChild'](_0x3f0868):_0x1f2eaa=_0x3f0868[0x0];}}}if(_0x14a031['customProperties']){for(const [_0x2a83d3,_0x4fe1fe]of _0x14a031['customProperties'])_0x1f2eaa['_setCustomProperty'](_0x2a83d3,_0x4fe1fe);}const _0x3f9bfb=void 0x0===_0x14a031['fillerOffset']?null:_0x14a031['fillerOffset'];return null!==_0x3f9bfb&&(_0x1f2eaa['getFillerOffset']=()=>_0x3f9bfb),_0x1f2eaa;}}_makeModelFromViewString(_0x350efb,_0x2a33fb){const _0x2ccda2=JSON['parse'](_0x350efb),_0xf734ff=this['editor']['editing']['view']['document'],_0x4be62d=new _0x1675a3(_0xf734ff,_0x2ccda2['map'](_0x333804=>this['_getViewFromDiffObj'](_0x333804,!0x0))),_0x86bdd6=this['editor']['data']['toModel'](_0x4be62d,_0x2a33fb);return _0x86bdd6['name']=_0x2a33fb,_0x86bdd6;}['_removeRevisionMarkers'](_0x1b98c0){return(_0x1b98c0=_0x1b98c0['filter'](_0x117cb7=>!_0x117cb7['name']||'revision-start'!==_0x117cb7['name']&&'revision-end'!==_0x117cb7['name']))['forEach'](_0x13ce67=>{'string'!=typeof _0x13ce67&&(_0x13ce67['children']=this['_removeRevisionMarkers'](_0x13ce67['children']),_0x13ce67['attributes']=_0x13ce67['attributes']['filter'](_0x141c7a=>!_0x141c7a[0x0]['startsWith']('data-revision-')));}),_0x1b98c0;}};function Rt(_0x5dd755,_0x503a5c,_0x54c50f){const t=_0x5dd755['t'];switch(_0x503a5c){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'},_0x54c50f);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x54c50f);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'},_0x54c50f);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x54c50f);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x54c50f);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var kt=class extends _0x245d60{['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[_0x124f7c,yt,bt,_0x4e8f00];}constructor(_0x4b8b39){super(_0x4b8b39),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new At(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0xeb09ff=_0x3a243d();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0xeb09ff},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 _0x324711=this['repository']['getRevision'](0x0),_0x31606a=_0x324711&&null===_0x324711['creator']?_0x324711:null;if(this['_continueCurrentRevision']=!!_0x31606a&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x271783=this['_source']['getCurrentRevisionId'](),_0x1e09d4=this['repository']['getRevision'](_0x271783);if(_0x1e09d4)this['_startingVersion']=_0x1e09d4['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3b0a58=this['_source']['history']['_operations']['find'](_0x506655=>!_0x506655['_isInit']),_0x2053bc=_0x3b0a58?_0x3b0a58['baseVersion']:this['_source']['history']['version'];_0x324711?(_0x324711['toVersion']<_0x2053bc&&_0x324711['_update']({'toVersion':_0x2053bc}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x31606a['id'],this['_startingVersion']=_0x31606a['fromVersion']):(this['_startingVersion']=_0x324711['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2053bc,this['_continueCurrentRevision']=!0x1);}}else _0x31606a&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x31606a['toVersion'],this['editor']['model']['document']['history']['version']),_0x31606a['fromVersion']===_0x31606a['toVersion']?(0x0!==_0x31606a['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x31606a['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x31606a['id'],this['_startingVersion']=_0x31606a['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',_0x3e99b9=>!_0x3e99b9),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x18242e=[this['editor']];for(const _0x4cb0a3 of _0x18242e){let _0x112c7e;for(const _0x240ebc in _0x4cb0a3){const _0x341c8c=_0x240ebc,_0x34841d=_0x4cb0a3[_0x341c8c];if('revisionHistoryLicenseKeyValid'==_0x34841d||'revisionHistoryLicenseKeyInvalid'==_0x34841d||'revisionHistoryLicenseKeyExpired'==_0x34841d||'revisionHistoryLicenseKeyDomainLimit'==_0x34841d||'revisionHistoryLicenseKeyNotAllowed'==_0x34841d||'revisionHistoryLicenseKeyEvaluationLimit'==_0x34841d||'revisionHistoryLicenseKeyUsageLimit'==_0x34841d){delete _0x4cb0a3[_0x341c8c],_0x112c7e=_0x34841d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x112c7e&&_0x4cb0a3['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x112c7e&&_0x4cb0a3['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x112c7e&&_0x4cb0a3['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x112c7e&&_0x4cb0a3['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x112c7e&&_0x4cb0a3['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x112c7e&&_0x4cb0a3['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x42dd72=this['repository']['getRevision'](0x0),_0x422f16=await this['getRevisionDocumentData'](_0x42dd72),_0x84e8f3=await this['getRevisionRootsAttributes'](_0x42dd72),_0x3dd44c=this['_utils']['getRevisionRootsModelElements'](_0x42dd72);this['_replaceEditorDataWithRevisionData'](_0x422f16,_0x84e8f3,_0x3dd44c);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x55cd96){this['_source']=_0x55cd96;}async update(){const _0x320fbb=await this['_source']['getLatestVersion']();if(_0x320fbb>this['currentRevision']['toVersion']){await this['_loadState']();const _0xfe7cfa=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x320fbb});_0xfe7cfa['authors']=_0xfe7cfa['authorsIds']['map'](_0x1d47e4=>this['editor']['plugins']['get']('Users')['getUser'](_0x1d47e4)),this['currentRevision']['_update'](_0xfe7cfa);}}async['saveRevision'](_0x1d59d4={},_0x57316b=null){const _0x2fe00d=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x57316b>this['currentRevision']['toVersion']&&(_0x57316b=null),null===_0x57316b&&(_0x57316b=await this['_source']['getLatestVersion']());const _0x51d997=this['_getFromVersion'](_0x57316b),_0x515294=this['buildRevisionData']({'from':_0x51d997,'to':_0x57316b});if(this['currentRevision']['toVersion']<_0x57316b){const _0x51578b=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x57316b,'to':_0x57316b});_0x51578b['authors']=[],_0x51578b['authorsIds']=[],_0x51578b['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x51578b,!0x0),delete _0x51578b['authors'],_0x2fe00d['push'](_0x51578b);}const _0x58d824={..._0x1d59d4,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1d59d4['name']||null,'id':_0x1d59d4['id']||_0x3a243d(),..._0x515294,'attributes':{..._0x1d59d4['attributes'],..._0x515294['attributes']}},_0x13cbce=this['addRevisionData'](_0x58d824);_0x2fe00d['push'](_0x58d824);const _0x156c01=this['repository']['getIndex'](_0x13cbce);if(0x0!==_0x156c01){const _0x24f075=this['repository']['getRevision'](_0x156c01-0x1);if(_0x24f075['fromVersion']!==_0x57316b){const _0x532c20=this['_revisionDataBuilder']['getData'](_0x57316b,_0x24f075['toVersion']),_0x3119b2={'id':_0x24f075['id'],'diffData':_0x532c20['diffData'],'authorsIds':_0x532c20['authorsIds'],'authors':_0x532c20['authorsIds']['map'](_0x242ba8=>this['editor']['plugins']['get']('Users')['getUser'](_0x242ba8)),'fromVersion':_0x57316b};this['_stampAiAttribute'](_0x3119b2,_0x24f075,!!_0x532c20['hasAIChanges']),_0x24f075===this['currentRevision']&&(_0x3119b2['createdAt']=new Date(_0x58d824['createdAt']['getTime']()+0xa)),_0x24f075['_update'](_0x3119b2,!0x0),delete _0x3119b2['authors'],_0x2fe00d['push'](_0x3119b2);}}if(this['adapter']){for(const _0x41cb34 of _0x2fe00d)this['_bufferUpdate'](_0x41cb34['id'],_0x41cb34,!0x0);this['sendBufferedUpdates']();}return _0x13cbce;}addRevisionData(_0x271202){const _0x35710c=this['repository']['createRevision'](_0x271202);return this['adapter']&&_0x35710c['on']('_update',(_0x4f3bfb,_0x36b5f9,_0x11829c)=>{_0x11829c||(this['_bufferUpdate'](_0x36b5f9['id'],_0x36b5f9,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x35710c,this['_findInsertionIndex'](_0x35710c)),_0x35710c;}async getRevisionDocumentData(_0x2342bd){return await this['_utils']['loadRevisionData'](_0x2342bd,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2342bd);}async getRevisionRootsAttributes(_0x59a3bd){return await this['_utils']['loadRevisionData'](_0x59a3bd,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x59a3bd);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x4d6bb0=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0xb6fab3=0x0;_0xb6fab3<_0x4d6bb0['length'];_0xb6fab3++){const _0x58ed7c=_0x4d6bb0[_0xb6fab3];let _0x44b919=!0x1;for(const _0x1756d0 of Object['keys'](_0x58ed7c))void 0x0===_0x58ed7c[_0x1756d0]?delete _0x58ed7c[_0x1756d0]:'id'!==_0x1756d0&&(_0x44b919=!0x0);_0x44b919||(_0x4d6bb0[_0xb6fab3]=null);}if(_0x4d6bb0=_0x4d6bb0['filter'](_0x546b84=>null!==_0x546b84),!_0x4d6bb0['length'])return;for(let _0x5a4700=0x0;_0x5a4700<_0x4d6bb0['length'];_0x5a4700++){const _0x49dee3=_0x4d6bb0[_0x5a4700];void 0x0!==_0x49dee3['fromVersion']&&void 0x0===_0x49dee3['toVersion']&&(_0x49dee3['toVersion']=this['repository']['getRevision'](_0x49dee3['id'])['toVersion']),void 0x0!==_0x49dee3['toVersion']&&void 0x0===_0x49dee3['fromVersion']&&(_0x49dee3['fromVersion']=this['repository']['getRevision'](_0x49dee3['id'])['fromVersion']);}const _0x37a520=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x4d6bb0,_0x37a520)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x49d799=>{if(_0x49d799){for(const _0xd867c2 of _0x49d799)this['setRevisionData']({'id':_0xd867c2['id'],'createdAt':_0xd867c2['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x1a018b,_0x1a0945,_0x50ee33){if(_0x50ee33===(!!_0x1a0945&&!!_0x1a0945['attributes']['@ai']))return;const _0x275a5a={..._0x1a0945?_0x1a0945['attributes']:{},..._0x1a018b['attributes']};_0x50ee33?_0x275a5a['@ai']=!0x0:delete _0x275a5a['@ai'],_0x1a018b['attributes']=_0x275a5a;}buildRevisionData({revision:_0x4a0f6b=null,from:_0x5caf91=null,to:_0x573876=null}){_0x5caf91=null!==_0x5caf91?_0x5caf91:_0x4a0f6b['fromVersion'],_0x573876=null!==_0x573876?_0x573876:_0x4a0f6b['toVersion'];const _0x14d3f2=this['_revisionDataBuilder']['getData'](_0x5caf91,_0x573876),_0x53227d={'diffData':_0x14d3f2['diffData'],'authorsIds':_0x14d3f2['authorsIds'],'fromVersion':_0x5caf91,'toVersion':_0x573876};if(this['_stampAiAttribute'](_0x53227d,_0x4a0f6b,!!_0x14d3f2['hasAIChanges']),!_0x4a0f6b||_0x573876!==_0x4a0f6b['toVersion']){const _0x526af3=_0x573876-0x1,_0x48a6d1=this['_source']['history']['getOperation'](_0x526af3);_0x53227d['createdAt']=_0x48a6d1&&_0x48a6d1['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5caf91===this['_loadedStateData']['fromVersion']){for(const _0x3c939c of this['_loadedStateData']['authors'])_0x53227d['authorsIds']['includes'](_0x3c939c['id'])||_0x53227d['authorsIds']['push'](_0x3c939c['id']);}return _0x53227d;}_bufferUpdate(_0x26d78d,_0x57ba6a,_0x4f148f){if(this['_bufferedUpdates']['has'](_0x26d78d)){const _0x4aaef4=this['_bufferedUpdates']['get'](_0x26d78d);_0x57ba6a=_0x4f148f?{..._0x4aaef4,..._0x57ba6a}:{..._0x57ba6a,..._0x4aaef4};}this['_bufferedUpdates']['set'](_0x26d78d,_0x57ba6a);}setRevisionData(_0x22f66c){const _0x27156b=this['repository']['getRevision'](_0x22f66c['id']);if(_0x22f66c['createdAt']&&(_0x22f66c['createdAt']=new Date(_0x22f66c['createdAt'])),_0x22f66c['authorsIds']){const _0x5edfa1=this['editor']['plugins']['get']('Users');_0x22f66c['authors']=_0x22f66c['authorsIds']['map'](_0x5c35e5=>_0x5edfa1['getUser'](_0x5c35e5));}_0x27156b['_update'](_0x22f66c,!0x0);}_createInitialRevision(_0x7c8a3){const _0x13c88c=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x13c88c)this['_initialRevisionId']=_0x13c88c['id'];else{const _0x15b86e=!this['editor']['model']['document']['roots']['find'](_0x2fb0fb=>this['editor']['model']['hasContent'](_0x2fb0fb)),_0x334f86=this['editor']['plugins']['get']('Users')['me']['id'],_0xc00bd9=Rt(this['editor']['locale'],_0x15b86e?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x7c8a3,'to':_0x7c8a3,'id':this['_initialRevisionId'],'name':_0xc00bd9,'creatorId':_0x334f86});}}_createCurrentRevision(_0x6efce){const _0x51580a=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x51580a),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x6efce,'to':_0x6efce,'id':_0x51580a,'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(_0x6ee5ff,_0x20bc73,_0x143be6){const _0x26a053={},_0x8dece6={},_0x1b457c={},_0x2d9d88=this['editor']['config']['get']('roots')||{};for(const [_0x1d5c0c,_0x2930d0]of Object['entries'](_0x2d9d88))_0x2930d0['lazyLoad']||(_0x26a053[_0x1d5c0c]=_0x2930d0['initialData']??'',_0x8dece6[_0x1d5c0c]=_0x2930d0['modelAttributes']||{},_0x2930d0['modelElement']&&(_0x1b457c[_0x1d5c0c]=_0x2930d0['modelElement']));for(const _0x93721 of this['editor']['model']['document']['getRootNames']())_0x26a053[_0x93721]??='',_0x8dece6[_0x93721]??={};let _0x212478=!0x1;const _0x47c775=Object['keys'](_0x26a053),_0x1df89f=Object['keys'](_0x6ee5ff);for(const _0x56c9bb of _0x47c775){if(_0x26a053[_0x56c9bb]!==_0x6ee5ff[_0x56c9bb]&&''!==_0x26a053[_0x56c9bb]['trim']()){_0x212478=!0x0;break;}if(!_0x330946(_0x8dece6[_0x56c9bb],_0x20bc73[_0x56c9bb])&&Object['keys'](_0x8dece6[_0x56c9bb])['length']>0x0){_0x212478=!0x0;break;}const _0x22f3f9=_0x1b457c[_0x56c9bb],_0x234629=_0x143be6[_0x56c9bb];if(_0x22f3f9&&_0x234629&&_0x22f3f9!==_0x234629){_0x212478=!0x0;break;}}_0x212478||(_0x212478=_0x1df89f['some'](_0x2dafbd=>!this['editor']['model']['document']['getRoot'](_0x2dafbd))),_0x212478&&_0x2e1924('editor-initial-data-replaced-with-revision-data',{'editorData':_0x26a053,'editorRootsAttributes':_0x8dece6,'editorRootsModelElements':_0x1b457c,'revisionData':_0x6ee5ff,'revisionRootsAttributes':_0x20bc73,'revisionRootsModelElements':_0x143be6});for(const [_0x2d03ec,_0x496a67]of Object['entries'](_0x6ee5ff))this['editor']['config']['set']('roots.'+_0x2d03ec+'.initialData',_0x496a67);for(const [_0x6c6844,_0x4f0e09]of Object['entries'](_0x20bc73))this['editor']['config']['set']('roots.'+_0x6c6844+'.modelAttributes',_0x4f0e09);const _0x213fe9=this['editor']['model']['document'];for(const [_0x58a1a1,_0x40224f]of Object['entries'](_0x143be6)){this['editor']['config']['set']('roots.'+_0x58a1a1+'.modelElement',_0x40224f);const _0x18f740=_0x213fe9['getRoot'](_0x58a1a1);_0x18f740&&_0x18f740['name']!==_0x40224f&&(_0x213fe9['roots']['remove'](_0x58a1a1),_0x213fe9['createRoot'](_0x40224f,_0x58a1a1));}}_addPendingAction(){if(!this['_pendingAction']){const _0x3c0c7d=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3c0c7d['add'](Rt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x32b5c9){const _0x241d64=this['repository']['getRevisions']();_0x241d64['reverse']();let _0x375e93=0x0;for(;_0x375e93<_0x241d64['length'];){const _0x59ff7c=_0x241d64[_0x375e93];if(_0x59ff7c===this['currentRevision']){_0x375e93++;continue;}if(_0x59ff7c['id']===this['_initialRevisionId'])break;const _0x4244ca=_0x32b5c9['toVersion']-_0x59ff7c['toVersion']||_0x32b5c9['fromVersion']-_0x59ff7c['fromVersion'];if(_0x4244ca>0x0)break;if(_0x4244ca<0x0)_0x375e93++;else{if(!_0x32b5c9['creator']&&_0x59ff7c['creator'])break;if(_0x59ff7c['creator']||!_0x32b5c9['creator']){if(_0x32b5c9['createdAt']>_0x59ff7c['createdAt'])break;_0x375e93++;}else _0x375e93++;}}return _0x375e93;}_getFromVersion(_0x2565e9){const _0x41e6cc=this['repository']['getRevisions']();_0x41e6cc['reverse'](),_0x41e6cc['shift']();const _0x59dc59=_0x41e6cc['find'](_0x450262=>_0x450262['toVersion']<=_0x2565e9)['toVersion'];return _0x59dc59<this['_startingVersion']?this['_startingVersion']:_0x59dc59;}['_makeRevision']({name:_0x406edb,from:_0x761be0,to:_0x3e0241,creatorId:_0x453606,id:_0xfb00b9}){const _0x22f326=this['buildRevisionData']({'from':_0x761be0,'to':_0x3e0241});_0x22f326['name']=_0x406edb,_0x22f326['creatorId']=_0x453606,_0x22f326['id']=_0xfb00b9;const _0x44f317=this['addRevisionData'](_0x22f326);return this['adapter']&&this['_bufferUpdate'](_0x22f326['id'],_0x22f326,!0x0),_0x44f317;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},At=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x28f16e){this['editor']=_0x28f16e,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(_0x6b66e8){this['source']=_0x6b66e8;const _0x2eb4f1=new Map(),_0x19ccef=new Map(),_0x48ee59=this['editor']['model']['document']['roots']['map'](_0x1edc90=>_0x1edc90['rootName']);for(const _0x3c8730 of _0x48ee59){const _0x37f9ca=this['editor']['model']['document']['getRoot'](_0x3c8730),_0x1a9fc2=It(_0x37f9ca);_0x2eb4f1['set'](_0x3c8730,_0x1a9fc2),_0x19ccef['set'](_0x3c8730,Object['fromEntries'](_0x37f9ca['getAttributes']()));}const _0x3161b9=Array['from'](this['editor']['model']['markers'])['map'](_0x7cfc77=>[_0x7cfc77['name'],_0x7cfc77['getRange']()]),_0x2ef5cf=this['source']['version'];this['_saveMetaData'](_0x2ef5cf,_0x2eb4f1,_0x3161b9,_0x19ccef),this['_startingRevisionId']=this['_revisionId'];const _0x44e3e5=new Map(),_0x587d9c=new Map();for(const _0x331c7c of _0x48ee59){const _0x40c365=St(_0x331c7c,this['editor']['model']['document']['getRoot'](_0x331c7c)['name']);_0x44e3e5['set'](_0x331c7c,_0x40c365),_0x587d9c['set'](_0x331c7c,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x44e3e5,[],_0x587d9c);}getData(_0x343282,_0x281d36){if(this['_lastFrom']===_0x343282&&this['_lastTo']<=_0x281d36)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x281d36,!0x0);else{if(!this['_savedMetaData']['has'](_0x343282)){const _0x4fb4f0=this['_getPreviousFrom'](_0x343282);this['_calculateMetaData'](_0x4fb4f0,_0x343282,!0x1);}this['_calculateMetaData'](_0x343282,_0x281d36,!0x0);}return this['_lastFrom']=_0x343282,this['_lastTo']=_0x281d36,this['_getState']();}loadState(_0x2410ff){if(!this['_savedMetaData']['has'](_0x2410ff['fromVersion'])){const _0x1bf1a9=this['_getPreviousFrom'](_0x2410ff['fromVersion']);this['_calculateMetaData'](_0x1bf1a9,_0x2410ff['fromVersion'],!0x1);}this['_calculateMetaData'](_0x2410ff['fromVersion'],_0x2410ff['toVersion'],!0x1);const _0x439cfb=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x2410ff['fromVersion'],this['_lastTo']=_0x2410ff['toVersion'];for(const _0x11815e in _0x2410ff['diffData']){const _0x2a3dcd=_0x2410ff['diffData'][_0x11815e]['attachChange'],_0x3730db=_0x4c4837(_0x2410ff['diffData'][_0x11815e]['attributesBefore'])||{},_0xfb9e6f=_0x2410ff['diffData'][_0x11815e],_0x560b57=_0x439cfb['_makeModelFromViewString'](_0xfb9e6f['deletions'],_0xfb9e6f['rootElementName']||'$root');_0x560b57['rootName']=_0x11815e,_0x560b57['_isAttached']=!_0x2a3dcd||!_0x2a3dcd['isAttached'],_0x560b57['isAttached']=()=>_0x560b57['_isAttached'],this['_baseRoots']['set'](_0x11815e,_0x560b57),this['_baseRootsAttributes']['set'](_0x11815e,_0x3730db),_0x2a3dcd&&this['_touchedRoots']['set'](_0x11815e,_0x2a3dcd);const _0x137044=this['_makeIdsRoot'](_0x560b57);this['_baseIdsRoots']['set'](_0x11815e,_0x137044);for(const [_0x2a4fc2,_0x3238d9]of _0x560b57['markers']){if(!_0x2a4fc2['startsWith']('revision:'))continue;const _0x17645e=_0x2a4fc2['split'](':')[0x2],_0x5036ec=_0xfb9e6f['aiSources']?.[_0x2a4fc2]||null;for(const _0x5cfd9b of _0x3238d9['getWalker']({'singleCharacters':!0x0})){const _0x692ac3=this['_getVidAttributeName'](_0x5cfd9b),_0x3ae4ae='elementEnd'==_0x5cfd9b['type']?_0x5cfd9b['previousPosition']['path']['slice'](0x0,-0x1):_0x5cfd9b['previousPosition']['path'],_0x5a2525=_0x137044['getNodeByPath'](_0x3ae4ae)['getAttribute'](_0x692ac3);this['_touched']['set'](_0x5a2525,{'userId':_0x17645e,'aiSource':_0x5036ec});}_0x560b57['markers']['delete'](_0x2a4fc2);}}this['_startingRevisionId']=this['_revisionId'];const _0x5a5dc6=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x49c02e=>!this['_touched']['has'](_0x49c02e));let _0x1113ae=0x0;const _0x17439d=new Map();for(const _0x25736c in _0x2410ff['diffData']){const _0x540057=_0x2410ff['diffData'][_0x25736c]['attachChange'],_0x344e54=_0x4c4837(_0x2410ff['diffData'][_0x25736c]['attributesAfter'])||{},_0x59520b=_0x2410ff['diffData'][_0x25736c],_0x227fde=_0x439cfb['_makeModelFromViewString'](_0x59520b['insertions'],_0x59520b['rootElementName']||'$root');_0x227fde['rootName']=_0x25736c,_0x227fde['_isAttached']=!_0x540057||_0x540057['isAttached'],_0x227fde['isAttached']=()=>_0x227fde['_isAttached'],this['_diffRoots']['set'](_0x25736c,_0x227fde),this['_diffRootsAttributes']['set'](_0x25736c,_0x344e54);const _0x28b081=this['_makeIdsRoot'](_0x227fde,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x25736c,_0x28b081),_0x17439d['set'](_0x25736c,_0x227fde['isAttached']()?_0x344e54:{});for(const [_0x2d522f,_0x5910a4]of _0x227fde['markers']){if(!_0x2d522f['startsWith']('revision:'))continue;const _0x9a2a58=_0x2d522f['split'](':')[0x2],_0xcee5c9=_0x59520b['aiSources']?.[_0x2d522f]||null;for(const _0x47bdb7 of _0x5910a4['getWalker']({'singleCharacters':!0x0})){const _0xd2e7d5=this['_getVidAttributeName'](_0x47bdb7),_0x34daa3=this['_revisionId']++,_0x5da2ea='elementEnd'==_0x47bdb7['type']?_0x47bdb7['previousPosition']['path']['slice'](0x0,-0x1):_0x47bdb7['previousPosition']['path'];_0x28b081['getNodeByPath'](_0x5da2ea)['_setAttribute'](_0xd2e7d5,_0x34daa3),this['_touched']['set'](_0x34daa3,{'userId':_0x9a2a58,'aiSource':_0xcee5c9});}_0x227fde['markers']['delete'](_0x2d522f);}for(const _0x5db9db of this['editor']['model']['createRangeIn'](_0x227fde)['getWalker']({'singleCharacters':!0x0})){const _0x39af9a=this['_getVidAttributeName'](_0x5db9db),_0x239e28='elementEnd'==_0x5db9db['type']?_0x5db9db['previousPosition']['path']['slice'](0x0,-0x1):_0x5db9db['previousPosition']['path'],_0x25d389=_0x28b081['getNodeByPath'](_0x239e28);_0x25d389['getAttribute'](_0x39af9a)>0x0||_0x25d389['_setAttribute'](_0x39af9a,_0x5a5dc6[_0x1113ae++]);}for(const [_0x1a8b2d,_0x4b7437]of _0x227fde['markers'])_0x1a8b2d['startsWith']('revision:')||this['_markers']['set'](_0x1a8b2d,_0x4b7437);}const {roots:_0x103285}=this['_savedMetaData']['get'](_0x2410ff['fromVersion']),{roots:_0x4340f2}=this['_savedMetaData']['get'](_0x2410ff['toVersion']),_0x332eb4=It(_0x103285['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x332eb4),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x332eb4,Number['NEGATIVE_INFINITY']));const _0x2d5b05=It(_0x4340f2['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2d5b05),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2d5b05));const _0x5b5484=Array['from'](this['_diffRoots'])['map'](([_0xc5806,_0x5e816a])=>[_0xc5806,It(_0x5e816a)]);this['_saveMetaData'](this['_lastTo'],_0x5b5484,this['_markers'],_0x17439d);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x469097,_0x2dead1,_0x5f205d,_0x6b0e66){const _0x1d8fe1=new Map(_0x2dead1),_0x505446=new Map(_0x4c4837(_0x6b0e66)),_0x290309=new Map();for(const [_0x4291dc,_0x46f37b]of _0x5f205d)_0x290309['set'](_0x4291dc,{'start':_0x46f37b['start']['clone'](),'end':_0x46f37b['end']['clone'](),'rootName':_0x46f37b['root']['rootName']});this['_savedMetaData']['set'](_0x469097,{'roots':_0x1d8fe1,'markers':_0x290309,'rootsAttributes':_0x505446});}_removeMetaData(_0x1aaa3b){this['_savedMetaData']['delete'](_0x1aaa3b);}_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(_0xbfa2cf,_0xc3d9a6=null){let _0x29750f=null;_0xbfa2cf['is']('documentFragment')||(_0x29750f=new _0x33393c(_0xbfa2cf['name'],{'vid_start':null===_0xc3d9a6?this['_revisionId']++:_0xc3d9a6++}));const _0x182a9c=[];for(const _0x4e61bb of _0xbfa2cf['getChildren']())if(_0x4e61bb['is']('element')){_0x182a9c['push'](this['_makeIdsRoot'](_0x4e61bb,_0xc3d9a6));const _0x3ffb52=_0x182a9c[_0x182a9c['length']-0x1];null!==_0xc3d9a6&&(_0xc3d9a6=_0x3ffb52['is']('element','$text')?_0x3ffb52['getAttribute']('vid')+0x1:_0x3ffb52['getAttribute']('vid_end')+0x1);}else{for(let _0x3633f3=0x0;_0x3633f3<_0x4e61bb['offsetSize'];_0x3633f3++)_0x182a9c['push'](new _0x33393c('$text',{'vid':null===_0xc3d9a6?this['_revisionId']++:_0xc3d9a6++}));}if(_0xbfa2cf['is']('documentFragment')){const _0x257158=St(_0xbfa2cf['rootName'],_0xbfa2cf['name']);return _0x257158['_insertChild'](0x0,_0x182a9c),_0x257158;}return _0x29750f['_setAttribute']('vid_end',null===_0xc3d9a6?this['_revisionId']++:_0xc3d9a6),_0x29750f['_insertChild'](0x0,_0x182a9c),_0x29750f;}_calculateMetaData(_0x360c52,_0x566321,_0x4ebe97){this['_reset']();const {roots:_0x199f58,markers:_0x536635,rootsAttributes:_0x317589}=this['_savedMetaData']['get'](_0x360c52);this['_baseRoots']=new Map(_0x199f58),this['_baseRootsAttributes']=new Map(_0x4c4837(_0x317589));for(const [_0x21981e,_0x579841]of this['_baseRoots'])if('$graveyard'!==_0x21981e&&(this['_diffRoots']['set'](_0x21981e,It(_0x579841)),this['_diffRootsAttributes']=new Map(_0x4c4837(_0x317589)),_0x4ebe97)){const _0xf0d987=this['_revisionId'];this['_idsRoots']['set'](_0x21981e,this['_makeIdsRoot'](_0x579841)),this['_baseIdsRoots']['set'](_0x21981e,this['_makeIdsRoot'](_0x579841,_0xf0d987));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',It(this['_baseRoots']['get']('$graveyard'))),_0x4ebe97&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x34a5c5,_0x38edfd]of _0x536635){const _0x1a638c=this['_baseRoots']['get'](_0x38edfd['rootName']),_0x206e2d=this['_diffRoots']['get'](_0x38edfd['rootName']),_0x1d19c6=new _0x4a1c21(_0x543b7d(_0x38edfd['start'],_0x1a638c),_0x543b7d(_0x38edfd['end'],_0x1a638c)),_0x5bdc28=_0x399603(_0x1d19c6,_0x206e2d);_0x1a638c['markers']['set'](_0x34a5c5,_0x1d19c6),this['_markers']['set'](_0x34a5c5,_0x5bdc28);}this['_applyOperations'](_0x360c52,_0x566321,_0x4ebe97);}_applyOperations(_0x17d75d,_0x4ec120,_0x49c8d2){for(const _0x2571b2 of this['source']['getOperations'](_0x17d75d,_0x4ec120))this['_handleOperation'](_0x2571b2,_0x49c8d2);for(const _0x4eb6ea of this['_diffRoots']['values']())_0x4eb6ea['markers']['clear']();for(const [_0xa536ec,_0x5bab93]of this['_markers'])this['_diffRoots']['get'](_0x5bab93['root']['rootName'])['markers']['set'](_0xa536ec,_0x5bab93['clone']());const _0x7e170f=new Map(),_0x2add05=new Map();for(const [_0x1fd9e6,_0x312190]of this['_diffRoots'])_0x7e170f['set'](_0x1fd9e6,It(_0x312190)),_0x2add05['set'](_0x1fd9e6,this['_diffRootsAttributes']['get'](_0x1fd9e6));this['_saveMetaData'](_0x4ec120,_0x7e170f,this['_markers'],_0x2add05);}_getPreviousFrom(_0x5f5c25){const _0x22be90=Array['from'](this['_savedMetaData']['keys']());_0x22be90['sort']((_0x3373b8,_0x756e3e)=>_0x3373b8-_0x756e3e),_0x22be90['reverse']();for(const _0x46251c of _0x22be90)if(_0x46251c<_0x5f5c25)return _0x46251c;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x56c3d8,_0x46d617){const _0x48f3a8=Array['from'](_0x46d617['markers'])['map'](([_0x658585,_0x11402b])=>[_0x658585,_0x399603(_0x11402b,_0x56c3d8)]);_0x56c3d8['markers']=new Map(_0x48f3a8);}_transformMarkers(_0x5888c6){for(const _0x47eb5f of this['_markers']['values']()){const _0x1889b2=_0x47eb5f['getTransformedByOperation'](_0x5888c6),_0x145e36=_0x4a1c21['_createFromRanges'](_0x1889b2);_0x47eb5f['start']=_0x145e36['start'],_0x47eb5f['end']=_0x145e36['end'];}}_handleOperation(_0x456314,_0x557e85){if('addRoot'!=_0x456314['type']&&'detachRoot'!=_0x456314['type']){if('insert'==_0x456314['type']){const _0x405e69=_0x456314['position']['root'],_0x4c91e1=_0x405e69['rootName'],_0x222b61=_0x405e69['name'];this['_diffRoots']['has'](_0x4c91e1)||(this['_diffRoots']['set'](_0x4c91e1,St(_0x4c91e1,_0x222b61,!0x0)),this['_diffRootsAttributes']['set'](_0x4c91e1,{}),_0x557e85&&this['_idsRoots']['set'](_0x4c91e1,St(_0x4c91e1,_0x222b61,!0x0)));}else{if('addRootAttribute'==_0x456314['type']||'removeRootAttribute'==_0x456314['type']||'changeRootAttribute'==_0x456314['type'])return void this['_handleRootAttributeOperation'](_0x456314);'marker'==_0x456314['type']&&this['_handleMarkerOperation'](_0x456314);}if('marker'!==_0x456314['type']){const _0x2450e5=this['_cloneOperation'](_0x456314,this['_diffRoots']);_0x2450e5['_execute'](),this['_transformMarkers'](_0x2450e5);}if(_0x557e85)switch(_0x456314['type']){case'insert':this['_handleInsertOperation'](_0x456314);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x456314);break;case'merge':this['_handleMergeOperation'](_0x456314);break;case'split':this['_handleSplitOperation'](_0x456314);}}else this['_handleRootOperation'](_0x456314,_0x557e85);}_cloneOperation(_0x4a7cdf,_0x56ec9e){const _0x1def20=_0x4a7cdf['clone']();return _0x1def20['_authorId']=_0x4a7cdf['_authorId'],_0x1def20['_aiSource']=_0x4a7cdf['_aiSource'],_0x1def20['baseVersion']=null,_0x568fec(_0x1def20,_0x56ec9e),_0x1def20;}_getBaseVids(_0x12ad11){return _0x12ad11['map'](_0x371730=>{const _0x2a6ef0=this['_getVidAttributeName'](_0x371730);return Number(_0x371730['item']['getAttribute'](_0x2a6ef0));});}_generateTape(_0x302ce9,_0x20d16a){if(_0x302ce9['is']('element','$text'))_0x20d16a['push']({'item':_0x302ce9,'type':'text'});else{_0x302ce9['is']('element')&&_0x20d16a['push']({'item':_0x302ce9,'type':'elementStart'});for(const _0x2cb706 of _0x302ce9['getChildren']())this['_generateTape'](_0x2cb706,_0x20d16a);_0x302ce9['is']('element')&&_0x20d16a['push']({'item':_0x302ce9,'type':'elementEnd'});}return _0x20d16a;}_getState(){const _0x57eeae=new Map(this['_touched']),_0x3e1fb0=new Map(_0x57eeae),_0x1e31b4=new Map(),_0x43a832={'insertions':{},'deletions':{}},_0x530515={'insertions':{},'deletions':{}},_0x89fc0=new Map(),_0x1c50ac=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x4fe931=new Map();_0x1c50ac['delete']('$graveyard');for(const _0x102d0c of _0x1c50ac){const _0x199f44=(this['_diffRoots']['get'](_0x102d0c)??this['_baseRoots']['get'](_0x102d0c))['name'],_0x7a1c2e=this['_diffRoots']['get'](_0x102d0c)||St(_0x102d0c,_0x199f44,!0x1),_0x3237d7=this['_baseRoots']['get'](_0x102d0c)||St(_0x102d0c,_0x199f44,!0x1);_0x7a1c2e['isAttached']()||_0x3237d7['isAttached']()?(_0x4fe931['set'](_0x102d0c,_0x199f44),_0x43a832['insertions'][_0x102d0c]=It(_0x7a1c2e),_0x43a832['deletions'][_0x102d0c]=It(_0x3237d7),this['_copyMarkers'](_0x43a832['deletions'][_0x102d0c],_0x3237d7),this['_copyMarkers'](_0x43a832['insertions'][_0x102d0c],_0x7a1c2e),_0x530515['insertions'][_0x102d0c]=this['_generateTape'](this['_idsRoots']['get'](_0x102d0c),[]),_0x530515['deletions'][_0x102d0c]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x102d0c)||St(_0x102d0c,_0x199f44,!0x1),[])):_0x1c50ac['delete'](_0x102d0c);}for(const _0x1b467c of _0x1c50ac){const _0x49c125=_0x530515['insertions'][_0x1b467c];for(const _0x94e14e of _0x49c125){const _0x123319=this['_getVidAttributeName'](_0x94e14e),_0x26ff9c=_0x94e14e['item']['getAttribute'](_0x123319);_0x3e1fb0['delete'](_0x26ff9c),_0x26ff9c>=this['_startingRevisionId']&&_0x1e31b4['set'](_0x26ff9c,_0x57eeae['get'](_0x26ff9c));}}for(const _0xe1c971 of _0x1c50ac){const _0x150c66=_0x530515['insertions'][_0xe1c971],_0x40c5b7=this['_getBaseVids'](_0x530515['deletions'][_0xe1c971]);let _0x32343d=0x0;for(const _0xc6d663 of _0x150c66){const _0x31c02b=this['_getVidAttributeName'](_0xc6d663),_0x25d05b=_0xc6d663['item']['getAttribute'](_0x31c02b);if(!_0x1e31b4['has'](_0x25d05b)&&!_0x89fc0['has'](_0x25d05b)){if(_0x3e1fb0['has'](_0x25d05b))_0x32343d++;else{if(_0x25d05b!=_0x40c5b7[_0x32343d]){const _0x43a513=_0x57eeae['get'](_0x25d05b)||_0x57eeae['get'](_0x40c5b7[_0x32343d]);for(;_0x25d05b!=_0x40c5b7[_0x32343d];)_0x3e1fb0['has'](_0x40c5b7[_0x32343d])||(_0x89fc0['set'](_0x40c5b7[_0x32343d],_0x43a513),_0x57eeae['set'](_0x40c5b7[_0x32343d],_0x43a513)),_0x32343d++;}_0x32343d++;}}}}for(const _0x4a45ef of _0x1c50ac){const _0x26694a=_0x530515['insertions'][_0x4a45ef];for(const _0x392635 of _0x26694a){const _0x34e951=this['_getVidAttributeName'](_0x392635),_0x4161a0=_0x392635['item']['getAttribute'](_0x34e951);if(_0x89fc0['has'](_0x4161a0)){const _0x3c4a21=_0x89fc0['get'](_0x4161a0);_0x3e1fb0['has'](_0x4161a0)||_0x3e1fb0['set'](_0x4161a0,{..._0x3c4a21}),_0x1e31b4['set'](_0x4161a0,{..._0x3c4a21});}}}for(const _0x45fa58 of _0x3e1fb0['keys']())_0x45fa58>=this['_startingRevisionId']&&_0x3e1fb0['delete'](_0x45fa58);const _0x737f3f=new Map();for(const _0x263cc1 of _0x1c50ac){let _0x118534=_0x530515['insertions'][_0x263cc1];for(const _0x7b1891 of _0x118534)if(_0x7b1891['item']['is']('element','tableCell')){const _0x3e24d7=this['_getVidAttributeName'](_0x7b1891),_0x467990=_0x7b1891['item']['getAttribute'](_0x3e24d7);if(_0x1e31b4['has'](_0x467990)){const _0x2f9102=_0x7b1891['item']['parent']['parent']['getAttribute']('vid_start'),_0x405caf=_0x1e31b4['get'](_0x467990),_0x37621c=_0x737f3f['get'](_0x2f9102)||{'users':new Set(),'aiSource':null};_0x37621c['users']['add'](_0x405caf['userId']),_0x37621c['aiSource']=_0x37621c['aiSource']||_0x405caf['aiSource']||null,_0x737f3f['set'](_0x2f9102,_0x37621c);}}_0x118534=_0x530515['deletions'][_0x263cc1];for(const _0x5806a8 of _0x118534)if(_0x5806a8['item']['is']('element','tableCell')){const _0x47310b=this['_getVidAttributeName'](_0x5806a8),_0x53436b=_0x5806a8['item']['getAttribute'](_0x47310b);if(_0x3e1fb0['has'](_0x53436b)){const _0x3bda05=_0x5806a8['item']['parent']['parent']['getAttribute']('vid_start'),_0x5b97d3=_0x3e1fb0['get'](_0x53436b),_0x54b1bd=_0x737f3f['get'](_0x3bda05)||{'users':new Set(),'aiSource':null};_0x54b1bd['users']['add'](_0x5b97d3['userId']),_0x54b1bd['aiSource']=_0x54b1bd['aiSource']||_0x5b97d3['aiSource']||null,_0x737f3f['set'](_0x3bda05,_0x54b1bd);}}for(const _0x50afdd of _0x737f3f['keys']())(_0x1e31b4['has'](_0x50afdd)||_0x3e1fb0['has'](_0x50afdd))&&_0x737f3f['delete'](_0x50afdd);}for(const _0x53bf47 of _0x1c50ac){const _0x4e88d3=_0x530515['insertions'][_0x53bf47];let _0x2086f0=null,_0x50560f=null,_0x2fb88=null;for(const _0x33b217 of _0x4e88d3){const _0x45ed31=this['_getVidAttributeName'](_0x33b217),_0x107c04=_0x33b217['item']['getAttribute'](_0x45ed31),_0xaf0995=_0x737f3f['get'](_0x107c04);if(_0xaf0995&&'elementStart'==_0x33b217['type']&&(_0x2086f0=Array['from'](_0xaf0995['users'])[0x0],_0x50560f=_0xaf0995['aiSource'],_0x2fb88=_0x33b217['item']['getAttribute']('vid_end')),_0x2086f0){const _0x856bb4=_0x50560f||_0x3e1fb0['get'](_0x107c04)?.['aiSource']||null,_0x65e206=_0x50560f||_0x1e31b4['get'](_0x107c04)?.['aiSource']||null;_0x3e1fb0['set'](_0x107c04,{'userId':_0x2086f0,'aiSource':_0x856bb4}),_0x1e31b4['set'](_0x107c04,{'userId':_0x2086f0,'aiSource':_0x65e206});}_0x107c04==_0x2fb88&&(_0x2086f0=null,_0x2fb88=null);}}const _0x4cb232={},_0x5f0cd2=new Set();for(const _0x45436a of _0x1c50ac){const _0x53bd21=_0x43a832['deletions'][_0x45436a],_0x3e9c4=_0x43a832['insertions'][_0x45436a];for(const {userId:_0x5d7296}of this['_touchedMarkers']['values']())null!==_0x5d7296&&_0x5f0cd2['add'](_0x5d7296);for(const {userId:_0x143f0e}of this['_touchedRoots']['values']())null!==_0x143f0e&&_0x5f0cd2['add'](_0x143f0e);const _0x5f2bf8={};this['_markChanges'](_0x3e9c4,_0x530515['insertions'][_0x45436a],_0x1e31b4,'insertion',_0x5f0cd2,_0x5f2bf8),this['_markChanges'](_0x53bd21,_0x530515['deletions'][_0x45436a],_0x3e1fb0,'deletion',_0x5f0cd2,_0x5f2bf8),this['_collectSuggestionAiSources'](_0x3e9c4,_0x5f2bf8),this['_collectSuggestionAiSources'](_0x53bd21,_0x5f2bf8),_0x4cb232[_0x45436a]={'insertions':this['_prepareViewToSave'](_0x3e9c4),'deletions':this['_prepareViewToSave'](_0x53bd21),'attachChange':this['_touchedRoots']['get'](_0x45436a)||null,'attributesBefore':_0x4c4837(this['_baseRootsAttributes']['get'](_0x45436a))||{},'attributesAfter':_0x4c4837(this['_diffRootsAttributes']['get'](_0x45436a)),'rootElementName':_0x4fe931['get'](_0x45436a),'aiSources':_0x5f2bf8};}const _0x2cd6be=Array['from'](_0x1e31b4['values']())['some'](_0x6f2a25=>!(!_0x6f2a25||!_0x6f2a25['aiSource']))||Array['from'](_0x3e1fb0['values']())['some'](_0x727d29=>!(!_0x727d29||!_0x727d29['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x156afc=>this['_aiTouchedMarkers']['has'](_0x156afc));return{'diffData':_0x4cb232,'authorsIds':Array['from'](_0x5f0cd2),'hasAIChanges':_0x2cd6be};}_collectSuggestionAiSources(_0x5b7d26,_0x403df6){const _0x220729=_0x5b7d26['markers'];for(const _0x14e167 of _0x220729['keys']()){if(!_0x14e167['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x14e167))continue;const _0xaab142=this['_aiTouchedMarkers']['get'](_0x14e167);_0xaab142&&(_0x403df6[_0x14e167]=_0xaab142);}}_processRootBeforeSave(_0x33e997){for(const [,_0x1f1cff]of _0x33e997['markers']){const _0x4297ca=_0x1f1cff['start']['getAncestors']()['filter'](_0x3cda94=>'tableCell'==_0x3cda94['name']);for(const _0x1c144c of _0x4297ca)0x1==_0x1c144c['childCount']&&_0x1c144c['getChild'](0x0)['is']('element','paragraph')&&_0x1c144c['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x65b342){this['_processRootBeforeSave'](_0x65b342);const _0x34ecf2=this['editor']['data']['toView'](_0x65b342,{}),_0x4e1748=Array['from'](_0x34ecf2['getChildren']())['map'](_0x58d90e=>this['_getViewJson'](_0x58d90e));return JSON['stringify'](_0x4e1748);}_getViewJson(_0x203146){if(_0x203146['is']('$text'))return _0x203146['data'];{const _0x290eae=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1abe54=_0x203146,_0x21181d=this['editor']['data']['htmlProcessor']['domConverter'],_0x380005={'type':_0x290eae['_getTypeCharForViewElement'](_0x1abe54),'name':_0x1abe54['name'],'attributes':Array['from'](_0x1abe54['getAttributes']()),'children':Array['from'](_0x1abe54['getChildren']())['map'](_0x4c3d0b=>this['_getViewJson'](_0x4c3d0b))};if(_0x203146['is']('uiElement')&&'$comment'!=_0x203146['name']){const _0x200353=_0x203146['render'](_0x21181d['domDocument'],_0x21181d);_0x380005['children']['push'](_0x200353['outerHTML']);}else{if(_0x203146['is']('rawElement')){const _0x346ea2=_0x21181d['domDocument']['createElement'](_0x1abe54['name']);_0x203146['render'](_0x346ea2,_0x21181d),_0x380005['children']['push'](_0x346ea2['innerHTML']);}}const _0x132ba4=Array['from'](_0x1abe54['getCustomProperties']());_0x132ba4['length']>0x0&&(_0x380005['customProperties']=_0x132ba4);const _0x5eb6e7=_0x1abe54['getFillerOffset']();return null!==_0x5eb6e7&&(_0x380005['fillerOffset']=_0x5eb6e7),_0x380005;}}['_markChanges'](_0x55ca41,_0xbd4cad,_0xc41b36,_0x93cf3b,_0x307d72,_0x47e191){let _0x15a653=null,_0x161718=null,_0x367f05=0x0;const _0x4c9400=this['editor']['model'];for(let _0x21bca2=0x0;_0x21bca2<_0xbd4cad['length'];_0x21bca2++){const _0x43bc19=this['_getVidAttributeName'](_0xbd4cad[_0x21bca2]),_0x17de54=_0xbd4cad[_0x21bca2]['item']['getAttribute'](_0x43bc19),_0x59d0b3=_0xc41b36['get'](_0x17de54),_0x258cac=_0x21bca2==_0xbd4cad['length']-0x1;!_0x15a653&&_0x59d0b3&&(_0x15a653=_0x59d0b3,_0x161718=_0xbd4cad[_0x21bca2]);const _0x40902d=!!_0x15a653&&!!_0x59d0b3&&_0x59d0b3['userId']!=_0x15a653['userId'],_0x34aad6=!!_0x15a653&&!!_0x59d0b3&&_0x59d0b3['aiSource']!=_0x15a653['aiSource'];_0x15a653&&(!_0x59d0b3||_0x40902d||_0x34aad6)&&(_0x47534d(_0x59d0b3,Et(_0x161718,_0x55ca41,_0x4c9400),Et(_0xbd4cad[_0x21bca2],_0x55ca41,_0x4c9400)),_0x15a653=_0x59d0b3||null,_0x161718=_0x59d0b3?_0xbd4cad[_0x21bca2]:null),_0x15a653&&_0x258cac&&_0x47534d(_0x59d0b3,Et(_0x161718,_0x55ca41,_0x4c9400),Ot(_0xbd4cad[_0x21bca2],_0x55ca41,_0x4c9400));}function _0x47534d(_0x198782,_0x329186,_0x35e822){const _0x4f73e4=_0x15a653['userId'],_0x2f50e9=_0x15a653['aiSource'],_0x8a1c36='revision:'+_0x93cf3b+':'+_0x4f73e4+':'+_0x367f05++,_0x1cca34=_0x4c9400['createRange'](_0x329186,_0x35e822);_0x55ca41['markers']['set'](_0x8a1c36,_0x1cca34),_0x2f50e9&&(_0x47e191[_0x8a1c36]=_0x2f50e9),null!==_0x4f73e4&&_0x307d72['add'](_0x4f73e4);}}_getVidAttributeName(_0x2c3d11){switch(_0x2c3d11['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x4c22db){const _0x41b829=this['_idsRoots']['get'](_0x4c22db['position']['root']['rootName']),_0xcafb63=_0x543b7d(_0x4c22db['position'],_0x41b829),_0x47d33c=null===_0x4c22db['_authorId']?null:_0x4c22db['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2840ac=_0x4c22db['_aiSource']||null,_0x4cc7d5=_0xcafb63['parent'],_0x19c4b2=this['_revisionId'],_0x32d12e=[];for(const _0x26713f of _0x4c22db['nodes'])if(_0x26713f['is']('element'))_0x32d12e['push'](this['_makeIdsRoot'](_0x26713f));else{for(let _0x2d2e1f=0x0;_0x2d2e1f<_0x26713f['offsetSize'];_0x2d2e1f++)_0x32d12e['push'](new _0x33393c('$text',{'vid':this['_revisionId']++}));}const _0x1a2d2c=this['_revisionId'];for(let _0x532a81=_0x19c4b2;_0x532a81<_0x1a2d2c;_0x532a81++)this['_touched']['set'](_0x532a81,{'userId':_0x47d33c,'aiSource':_0x2840ac});_0x4cc7d5['_insertChild'](_0xcafb63['offset'],_0x32d12e);}_setTouched(_0x55e52b,_0x53e02d,_0xcc3dc0){this['_touched']['set'](_0x55e52b,{'userId':_0x53e02d,'aiSource':_0xcc3dc0||this['_touched']['get'](_0x55e52b)?.['aiSource']||null});}_handleMoveOperation(_0x12ef71){(_0x12ef71=this['_cloneOperation'](_0x12ef71,this['_idsRoots']))['_execute']();const _0x3f644b=null===_0x12ef71['_authorId']?null:_0x12ef71['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xfa959e=_0x12ef71['_aiSource']||null,_0x4e6feb=_0x12ef71['getMovedRangeStart'](),_0x34579a=_0x4e6feb['parent'],_0x5b31d0=_0x4e6feb['offset'],_0x4a6bf5=(_0xedb959,_0x3abc56,_0x5b136c)=>{for(let _0x590e0b=_0x3abc56;_0x590e0b<_0x5b136c;_0x590e0b++){const _0x46e376=_0xedb959['getChild'](_0x590e0b);_0x46e376['is']('element','$text')?this['_setTouched'](_0x46e376['getAttribute']('vid'),_0x3f644b,_0xfa959e):(this['_setTouched'](_0x46e376['getAttribute']('vid_start'),_0x3f644b,_0xfa959e),_0x4a6bf5(_0x46e376,0x0,_0x46e376['childCount']),this['_setTouched'](_0x46e376['getAttribute']('vid_end'),_0x3f644b,_0xfa959e));}};_0x4a6bf5(_0x34579a,_0x5b31d0,_0x5b31d0+_0x12ef71['howMany']);}_handleMergeOperation(_0x1ef71a){const _0x106c63=null===(_0x1ef71a=this['_cloneOperation'](_0x1ef71a,this['_idsRoots']))['_authorId']?null:_0x1ef71a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x355af1=_0x1ef71a['_aiSource']||null,_0x15ee32=_0x1ef71a['targetPosition']['parent'],_0x144771=_0x1ef71a['sourcePosition']['parent'],_0x314ad5=_0x15ee32['getAttribute']('vid_end'),_0x447c31=_0x144771['getAttribute']('vid_start');_0x15ee32['_setAttribute']('vid_end',_0x144771['getAttribute']('vid_end')),_0x144771['_setAttribute']('vid_end',_0x314ad5),this['_setTouched'](_0x447c31,_0x106c63,_0x355af1),this['_setTouched'](_0x314ad5,_0x106c63,_0x355af1),_0x1ef71a['_execute']();}_handleSplitOperation(_0x41b58e){const _0x4053a5=null===(_0x41b58e=this['_cloneOperation'](_0x41b58e,this['_idsRoots']))['_authorId']?null:_0x41b58e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5abd82=_0x41b58e['_aiSource']||null,_0xa00a2b=_0x41b58e['graveyardPosition'],_0x5b8e7b=_0x41b58e['splitPosition']['parent'];_0x41b58e['_execute']();const _0x2c1e52=_0x5b8e7b['getAttribute']('vid_end'),_0x16e118=_0x41b58e['insertionPosition']['nodeAfter'];if(_0xa00a2b){const _0x6b6a8a=_0x16e118['getAttribute']('vid_end'),_0x5c4fcb=_0x5b8e7b['getAttribute']('vid_end');_0x5b8e7b['_setAttribute']('vid_end',_0x6b6a8a),_0x16e118['_setAttribute']('vid_end',_0x5c4fcb),this['_setTouched'](_0x5b8e7b['getAttribute']('vid_end'),_0x4053a5,_0x5abd82),this['_setTouched'](_0x16e118['getAttribute']('vid_start'),_0x4053a5,_0x5abd82);}else{const _0x216355=this['_revisionId']++,_0x50254b=this['_revisionId']++;_0x5b8e7b['_setAttribute']('vid_end',_0x216355),_0x16e118['_setAttribute']('vid_start',_0x50254b),_0x16e118['_setAttribute']('vid_end',_0x2c1e52),this['_setTouched'](_0x216355,_0x4053a5,_0x5abd82),this['_setTouched'](_0x50254b,_0x4053a5,_0x5abd82);}}_handleMarkerOperation(_0x512b25){if(!_0x512b25['affectsData'])return;const _0x4f933d=(_0x512b25=this['_cloneOperation'](_0x512b25,this['_diffRoots']))['oldRange']?_0x512b25['oldRange']['root']:null,_0x32ee5f=_0x512b25['newRange']?_0x512b25['newRange']['root']:null;_0x4f933d&&this['_markers']['delete'](_0x512b25['name']),_0x32ee5f&&this['_markers']['set'](_0x512b25['name'],_0x512b25['newRange']['clone']());const _0x3c632a=null===_0x512b25['_authorId']?null:_0x512b25['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xadad73=_0x512b25['name'];if(_0x512b25['_aiSource']&&this['_aiTouchedMarkers']['set'](_0xadad73,_0x512b25['_aiSource']),!this['_touchedMarkers']['has'](_0xadad73))return void this['_touchedMarkers']['set'](_0xadad73,{'range':_0x512b25['oldRange'],'userId':_0x3c632a});const _0x1d2707=this['_touchedMarkers']['get'](_0xadad73),_0x3f8f58=_0x1d2707['range'],_0x2da896=_0x512b25['newRange'];null==_0x3f8f58&&null==_0x2da896||_0x3f8f58&&_0x2da896&&_0x3f8f58['isEqual'](_0x2da896)?this['_touchedMarkers']['delete'](_0x512b25['name']):_0x1d2707['userId']=_0x3c632a;}_handleRootOperation(_0xb86e2,_0x3272b4){this['_diffRoots']['has'](_0xb86e2['rootName'])?this['_diffRoots']['get'](_0xb86e2['rootName'])['_isAttached']=_0xb86e2['isAdd']:(this['_diffRoots']['set'](_0xb86e2['rootName'],St(_0xb86e2['rootName'],_0xb86e2['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0xb86e2['rootName'],{}),_0x3272b4&&this['_idsRoots']['set'](_0xb86e2['rootName'],St(_0xb86e2['rootName'],_0xb86e2['elementName'],!0x0)));const _0x38ffab=null===_0xb86e2['_authorId']?null:_0xb86e2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2b27c4=this['_touchedRoots']['get'](_0xb86e2['rootName']);_0x2b27c4&&_0x2b27c4['userId']===_0x38ffab?this['_touchedRoots']['delete'](_0xb86e2['rootName']):this['_touchedRoots']['set'](_0xb86e2['rootName'],{'userId':_0x38ffab,'isAttached':_0xb86e2['isAdd']});}_handleRootAttributeOperation(_0x4d6826){const _0x317fdf=this['_diffRootsAttributes']['get'](_0x4d6826['root']['rootName']);null===_0x4d6826['newValue']?delete _0x317fdf[_0x4d6826['key']]:_0x317fdf[_0x4d6826['key']]=_0x4d6826['newValue'];}};function It(_0x166bcf){const _0x2663cf=St(_0x166bcf['rootName'],_0x166bcf['name'],_0x166bcf['isAttached']());for(const _0x37eacf of _0x166bcf['getChildren']()){const _0x50cd3e=_0x37eacf['_clone'](!0x0);_0x2663cf['_appendChild'](_0x50cd3e);}return _0x2663cf;}function St(_0x2bd0b2,_0x1a313e,_0x13c916=!0x0){const _0x24ffc3=new _0x5b0952();return _0x24ffc3['rootName']=_0x2bd0b2,_0x24ffc3['name']=_0x1a313e,_0x24ffc3['_isAttached']=_0x13c916,_0x24ffc3['isAttached']=()=>_0x24ffc3['_isAttached'],_0x24ffc3;}function Et(_0x20da2e,_0x5b8bbf,_0xcc8e79){const _0x2bc14a='elementEnd'==_0x20da2e['type']?_0xcc8e79['createPositionAt'](_0x20da2e['item'],'end'):_0xcc8e79['createPositionBefore'](_0x20da2e['item']);return _0xcc8e79['createPositionFromPath'](_0x5b8bbf,_0x2bc14a['path'],_0x2bc14a['stickiness']);}function Ot(_0x30ce44,_0x18cbc6,_0x16279d){const _0xca99c6='elementStart'==_0x30ce44['type']?_0x16279d['createPositionAt'](_0x30ce44['item'],0x0):_0x16279d['createPositionAfter'](_0x30ce44['item']);return _0x16279d['createPositionFromPath'](_0x18cbc6,_0xca99c6['path'],_0xca99c6['stickiness']);}const Ct=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3231bb(ut);var Nt=class extends Ct{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x451e31,_0x180ebb){super(_0x451e31),this['focusTracker']=new _0x4d9461(),this['keystrokes']=new _0x2ceefc(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x180ebb),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'](),mt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x40c8a8=_0xe3428e=>_0xe3428e['stopPropagation']();this['keystrokes']['set']('arrowright',_0x40c8a8),this['keystrokes']['set']('arrowleft',_0x40c8a8),this['keystrokes']['set']('arrowup',_0x40c8a8),this['keystrokes']['set']('arrowdown',_0x40c8a8);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x417896){this['revisionNameInputView']['fieldView']['element']['value']=_0x417896['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x3916b4){const _0x5e3267=new tt(this['locale'],vt),_0x555ae=_0x5e3267['fieldView'];_0x555ae['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4d812c=Rt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x3916b4&&(_0x4d812c+='\x20('+Rt(this['locale'],'optional')+')'),(_0x5e3267['label']=_0x4d812c,_0x555ae['on']('input',()=>{this['revisionNameInputValue']=_0x555ae['element']['value']['trim']();}),_0x5e3267);}},xt=class extends _0x245d60{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt];}['_saveRevisionFormView'];init(){const _0x96ddc4=this['editor'],_0x4f95f2=_0x96ddc4['plugins']['get']('RevisionTracker');_0x96ddc4['ui']['componentFactory']['add']('revisionHistory',_0x100e01=>{const _0x4c9f1c=ft(_0x100e01),_0x4b547d=_0x4c9f1c['panelView']['children'],_0x1e1c65=new et(_0x100e01),_0x353fbd=new it(_0x100e01),_0xd8b759=this['_createSaveRevisionButton'](_0x3cad3d),_0x2cc924=new it(_0x100e01),_0x2bad23=this['_createOpenRevisionButton'](_0x3cad3d);return _0x4c9f1c['bind']('isEnabled')['to'](_0x4f95f2,'isReady',_0x4f95f2,'isEnabled',_0x96ddc4,'isReadOnly',(_0x3e2de3,_0x18c360,_0x18dd4e)=>_0x3e2de3&&_0x18c360&&!_0x18dd4e),_0x4c9f1c['buttonView']['set']({'icon':_0x5bf3c2,'label':Rt(_0x100e01,'Revision\x20history'),'tooltip':!0x0}),_0xd8b759['set']({'withText':!0x0,'role':'menuitem'}),_0x2bad23['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x2bad23,'execute',()=>{_0x4c9f1c['isOpen']=!0x1,_0x96ddc4['editing']['view']['focus']();},{'priority':'low'}),_0x353fbd['children']['add'](_0xd8b759),_0x2cc924['children']['add'](_0x2bad23),_0x1e1c65['role']='menu',_0x1e1c65['items']['addMany']([_0x353fbd,_0x2cc924]),_0x4b547d['add'](_0x1e1c65),_0x4c9f1c;}),_0x96ddc4['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x1c153b=this['editor'],_0x175540=_0x1c153b['locale'],_0x3fc621=_0x1c153b['plugins']['get']('RevisionTracker'),_0x3f8f56=new rt(_0x175540),_0x17fef5=new ot(_0x175540);_0x3f8f56['bind']('isEnabled')['to'](_0x3fc621,'isReady',_0x3fc621,'isEnabled',_0x1c153b,'isReadOnly',(_0x324e1b,_0x3e6158,_0xd64f90)=>_0x324e1b&&_0x3e6158&&!_0xd64f90),_0x3f8f56['buttonView']['set']({'icon':_0x5bf3c2,'label':Rt(_0x175540,'Revision\x20history')});const _0x553b5b=new nt(_0x175540,_0x3f8f56),_0x3396da=this['_createSaveRevisionButton'](st);_0x3396da['delegate']('execute')['to'](_0x3f8f56),_0x553b5b['children']['add'](_0x3396da),_0x17fef5['items']['add'](_0x553b5b);const _0x809be9=new nt(_0x175540,_0x3f8f56),_0x1c8aae=this['_createOpenRevisionButton'](st);return _0x1c8aae['delegate']('execute')['to'](_0x3f8f56),_0x809be9['children']['add'](_0x1c8aae),_0x17fef5['items']['add'](_0x809be9),_0x3f8f56['panelView']['children']['add'](_0x17fef5),_0x3f8f56;}_createSaveRevisionButton(_0x48a00b){const _0x324213=this['editor'],_0x4f1249=_0x324213['plugins']['get']('RevisionTracker'),_0x43756a=new _0x48a00b(_0x324213['locale']);return _0x43756a['set']({'label':Rt(_0x324213['locale'],'Save\x20current\x20revision')}),_0x43756a['bind']('isEnabled')['to'](_0x4f1249,'isReady',_0x4f1249,'isEnabled',_0x324213,'isReadOnly',(_0x92c0e4,_0x1207c9,_0x5dcc34)=>_0x92c0e4&&_0x1207c9&&!_0x5dcc34),this['listenTo'](_0x43756a,'execute',()=>{this['_showDialog']();}),_0x43756a;}_createOpenRevisionButton(_0x4788ff){const _0xa9b23=this['editor'],_0x3baeae=_0xa9b23['plugins']['get']('RevisionTracker'),_0x307bc9=new _0x4788ff(_0xa9b23['locale']);return _0x307bc9['set']({'label':Rt(_0xa9b23['locale'],'Open\x20revision\x20history')}),_0x307bc9['bind']('isEnabled')['to'](_0x3baeae,'isReady',_0xa9b23,'isReadOnly',(_0x3fa099,_0x39f2b1)=>_0x3fa099&&!_0x39f2b1),this['listenTo'](_0x307bc9,'execute',()=>{_0xa9b23['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x307bc9;}['_showDialog'](){const _0x2833e2=this['editor'],_0x5c9f2c=_0x2833e2['locale'],_0x419373=_0x2833e2['plugins']['get']('Dialog'),_0x4f5b8f=_0x2833e2['plugins']['get']('RevisionTracker');function _0x57d5a3(_0x5016e7){_0x2833e2['config']['get']('revisionHistory.requireRevisionName')&&''===_0x5016e7['revisionName']?_0x5016e7['revisionNameInputView']['errorText']=Rt(_0x5c9f2c,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2833e2['plugins']['get'](kt)['saveRevision']({'name':_0x5016e7['revisionName']}),_0x419373['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x57d5a3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x419373['show']({'id':'revisionSave','title':Rt(_0x5c9f2c,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':Rt(_0x2833e2['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x419373['hide']()},{'label':Rt(_0x2833e2['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x159598){_0x159598['bind']('isEnabled')['to'](_0x4f5b8f,'isReady',_0x4f5b8f,'isEnabled',_0x2833e2,'isReadOnly',(_0x26ccf5,_0x4ec068,_0x3878e9)=>_0x26ccf5&&_0x4ec068&&!_0x3878e9);},'onExecute':()=>_0x57d5a3(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x4dd078=this['editor'],_0x2f59a0=_0x4dd078['locale'];this['_saveRevisionFormView']=new Nt(_0x2f59a0,_0x4dd078['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Dt=class extends ut{['changeId'];['_model'];constructor(_0x1a32db,_0x469838,_0x64df02=!0x1){super(_0x1a32db),this['_model']=_0x469838,this['changeId']=_0x469838['id'];const _0x2b6c2d=this['bindTemplate'],_0x2c0735=_0x64df02&&!!_0x469838['data']['aiSource'],_0x1fdcbf=_0x2c0735?this['_createAiIconView'](_0x1a32db):null;this['set']('type',_0x469838['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x2b6c2d['to']('type',_0x5057cb=>'ck-revision-change__'+_0x5057cb),..._0x2c0735?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x2c0735?[this['_createAiDescriptionView'](_0x1a32db,_0x469838),_0x1fdcbf]:this['_getDescriptionChildren'](_0x1a32db,_0x469838)}]});}_getDescriptionChildren(_0x3e0c03,_0x199fb2){let _0x5e7752='Removed\x20by';return _0x199fb2['data']['isSuggestion']?_0x5e7752='Suggested\x20by':'add'==_0x199fb2['type']&&(_0x5e7752='Added\x20by'),[this['_createLabel'](Rt(_0x3e0c03,_0x5e7752)),{'text':'\x20'+_0x199fb2['author']['name']}];}_createAiDescriptionView(_0x486a89,_0x1f6870){let _0x30b33f='AI_SOURCE_REMOVED_BY';_0x1f6870['data']['isSuggestion']?_0x30b33f='AI_SOURCE_SUGGESTED_BY':'add'==_0x1f6870['type']&&(_0x30b33f='AI_SOURCE_ADDED_BY');const _0x1ed2b3=new ut(_0x486a89);return _0x1ed2b3['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0x1ed2b3['render'](),_0x1ed2b3['element']['innerHTML']=Rt(_0x486a89,_0x30b33f,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+Rt(_0x486a89,'AI_SOURCE_AI')+'</span>']),_0x1ed2b3['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x1f6870['author']['name'],_0x1ed2b3;}_createLabel(_0xbff96f){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0xbff96f}]};}_createAiIconView(_0x100866){const _0x5c8050=new _0x203f2d();return _0x5c8050['content']=_0x32cbb7,_0x5c8050['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':Rt(_0x100866,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x5c8050;}['focus'](){this['element']['focus']();}};const Vt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x591c98();var Tt=class extends Vt{['id'];author;type;data;rootName;constructor(_0x392f5b){super(),this['id']=_0x392f5b['id']||_0x3a243d(),this['author']=_0x392f5b['author'],this['type']=_0x392f5b['type'],this['data']=_0x392f5b['data']||{},this['rootName']=_0x392f5b['rootName'],this['set']('createdAt',_0x392f5b['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Mt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1363bb,_0xe835aa){this['newRevisionId']=_0x1363bb,this['oldRevisionId']=_0xe835aa,this['changes']=new _0x1b928b();}_setChanges(_0x54fe89){for(const _0x172f7f of _0x54fe89)this['changes']['add'](_0x172f7f);}},Ht=class extends _0x245d60{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[_0x124f7c,_0x2fe268,yt,bt];}constructor(_0x1a9377){super(_0x1a9377),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',(_0xf50aec,_0x5d70b6,_0x5b2728)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x1d73ad=>{for(const _0x12eead of this['editor']['editing']['view']['document']['roots'])_0x5b2728?_0x1d73ad['removeClass']('ck-editor__editable__overlay',_0x12eead):_0x1d73ad['addClass']('ck-editor__editable__overlay',_0x12eead);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x623861=>null!==_0x623861),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x404ad8,_0x4c6316,_0x570f53)=>_0x404ad8&&_0x570f53?_0x4c6316['changes']['getIndex'](_0x570f53):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xb70d8,_0x3511c8)=>_0xb70d8?_0x3511c8['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x2fe268),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x193ab0=this['editor'],_0x170dd6=new Ft(_0x193ab0,{'direction':'backward'}),_0xf0afae=new Ft(_0x193ab0,{'direction':'forward'});_0x193ab0['commands']['add']('showPreviousChange',_0x170dd6),_0x193ab0['commands']['add']('showNextChange',_0xf0afae),_0x193ab0['commands']['add']('restoreRevision',new Lt(_0x193ab0)),this['on']('change:numberOfChanges',()=>{_0x170dd6['refresh'](),_0xf0afae['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x193ab0['enableReadOnlyMode']('revision-viewer'),_0x193ab0['plugins']['has']('WidgetToolbarRepository')&&_0x193ab0['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x557a8a){return await this['_utils']['loadRevisionData'](_0x557a8a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x557a8a);}async getRevisionRootsAttributes(_0x46ae95){return await this['_utils']['loadRevisionData'](_0x46ae95,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x46ae95);}async['compare'](_0x16bea5,_0x1e2880,_0x8aba04=!0x1){if(!this['isEnabled'])return;const _0xca187=this['diff'],_0x3e2898=this['repository'],_0x4830df='string'==typeof _0x16bea5?_0x3e2898['getRevision'](_0x16bea5):_0x16bea5,_0x556cb3='string'==typeof _0x1e2880?_0x3e2898['getRevision'](_0x1e2880):_0x1e2880,_0x705a45=_0x4830df['id'],_0x23b6b7=_0x556cb3?_0x556cb3['id']:null;if(!_0x8aba04&&this['diff']&&this['diff']['newRevisionId']===_0x705a45&&this['diff']['oldRevisionId']===_0x23b6b7)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Mt(_0x705a45,_0x23b6b7);const _0x219f9e=this['_getRevisionsRange'](_0x4830df,_0x556cb3,!0x0)['map'](_0x4e7ede=>this['_utils']['loadRevisionData'](_0x4e7ede,this['adapter']));return _0x219f9e['push'](new Promise(_0x513b88=>{setTimeout(_0x513b88,0x14);})),Promise['all'](_0x219f9e)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x45586b=this['_getDiff'](_0x705a45,_0x23b6b7);this['_cleanUpCommentMarkers'](_0x45586b);for(const _0x33dd4a of _0x45586b['changes'])this['_changeIdToChange']['set'](_0x33dd4a['id'],_0x33dd4a);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2db3e9=>{for(const _0x334ded of this['editor']['model']['document']['getRootNames']())_0x2db3e9['detachRoot'](_0x334ded);for(const _0x210cad of Object['keys'](_0x45586b['model'])){const _0x129e06=_0x45586b['model'][_0x210cad]['name'],_0x508df6=_0x2db3e9['addRoot'](_0x210cad,_0x129e06);for(const _0x42a499 of Object['keys'](_0x45586b['attributes'][_0x210cad]))_0x2db3e9['setAttribute'](_0x42a499,_0x45586b['attributes'][_0x210cad][_0x42a499],_0x508df6);_0x2db3e9['insert'](_0x45586b['model'][_0x210cad],_0x508df6,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x45586b['changes'])),this['isReady']=!0x0;})['catch'](_0x56e741=>{console['error'](_0x56e741),this['_cleanUp'](),_0xca187&&(this['diff']=_0xca187),this['isReady']=!0x0;});}addRevisionData(_0x480757,_0x2277c9){const _0x438155=this['repository']['createRevision'](_0x480757);return _0x438155['on']('_update',(_0x40def5,_0x50476f,_0x286a80)=>_0x2277c9(_0x50476f,_0x286a80,_0x438155)),this['repository']['addRevision'](_0x438155),_0x438155;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x113645=>{for(const _0x590389 of this['editor']['model']['document']['getRootNames']())_0x113645['detachRoot'](_0x590389);});}_cleanUpCommentMarkers(_0x147a77){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x4b763c=this['_getVisibleCommentThreadIds']();for(const _0x5b89a4 of Object['values'](_0x147a77['model']))for(const _0x479a07 of Array['from'](_0x5b89a4['markers']['keys']()))_0x479a07['startsWith']('revision-comment:')&&!_0x4b763c['has'](Pt(_0x479a07))&&_0x5b89a4['markers']['delete'](_0x479a07);}_sortAndFilterDiffChanges(_0x476c60){const _0x5ed7f0=[],_0x4dcd6a=new Map();for(const _0x44df27 of this['editor']['model']['document']['getRootNames']()){const _0x132565=this['editor']['editing']['view']['getDomRoot'](_0x44df27);if(!_0x132565)continue;const _0x4305c9=_0x132565['getClientRects']()['item'](0x0);_0x4305c9&&(_0x5ed7f0['push'](_0x44df27),_0x4dcd6a['set'](_0x44df27,_0x4305c9));}return _0x5ed7f0['sort']((_0x160e79,_0x2a7aba)=>{const _0x14cc61=_0x4dcd6a['get'](_0x160e79),_0x348399=_0x4dcd6a['get'](_0x2a7aba);return _0x14cc61['y']-_0x348399['y']||_0x14cc61['x']-_0x348399['x'];}),(_0x476c60=_0x476c60['filter'](_0x478b51=>_0x5ed7f0['includes'](_0x478b51['rootName'])))['sort']((_0x396561,_0x4288e0)=>_0x5ed7f0['indexOf'](_0x396561['rootName'])-_0x5ed7f0['indexOf'](_0x4288e0['rootName'])),_0x476c60;}['_makeTape'](_0x63e71d,_0x4c9c5c={}){const _0x55e0cf=Array['from'](_0x63e71d['markers'])['filter'](([_0x5427ef,_0x409b05])=>_0x5427ef['startsWith']('revision:')&&!_0x409b05['isCollapsed']),_0x177d41=Array['from'](this['editor']['model']['createRangeIn'](_0x63e71d)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x55e0cf['length'])for(const _0x211e77 of _0x177d41){const [_0x2976f9,_0x4056d2]=_0x55e0cf[0x0],[,_0xa3330d,_0x1df2e1]=_0x2976f9['split'](':'),_0xbda463=_0x4c9c5c[_0x2976f9]||null;if(_0x4056d2['end']['isEqual'](_0x211e77['nextPosition'])&&_0x55e0cf['shift'](),(_0x211e77['previousPosition']['isEqual'](_0x4056d2['start'])||_0x211e77['previousPosition']['isAfter'](_0x4056d2['start']))&&('insertion'==_0xa3330d?_0x211e77['isAdded']={'userId':_0x1df2e1,'aiSource':_0xbda463}:'deletion'==_0xa3330d&&(_0x211e77['isRemoved']={'userId':_0x1df2e1,'aiSource':_0xbda463})),0x0==_0x55e0cf['length'])break;}return _0x177d41;}_refreshStartEndIndex(_0x48ceda){const _0x1a4ecd=new Map();for(let _0x4f2a5c=0x0;_0x4f2a5c<_0x48ceda['length'];_0x4f2a5c++)'text'===_0x48ceda[_0x4f2a5c]['type']?(_0x48ceda[_0x4f2a5c]['item']['startIndex']=_0x4f2a5c,_0x48ceda[_0x4f2a5c]['item']['endIndex']=_0x4f2a5c):('elementStart'===_0x48ceda[_0x4f2a5c]['type']?_0x48ceda[_0x4f2a5c]['item']['startIndex']=_0x4f2a5c:'elementEnd'===_0x48ceda[_0x4f2a5c]['type']&&(_0x48ceda[_0x4f2a5c]['item']['endIndex']=_0x4f2a5c),_0x1a4ecd['set'](_0x48ceda[_0x4f2a5c]['id'],_0x4f2a5c));for(const _0x40ba68 of _0x1a4ecd['values']())'elementStart'===_0x48ceda[_0x40ba68]['type']?_0x48ceda[_0x40ba68]['item']['endIndex']=_0x1a4ecd['get'](_0x48ceda[_0x40ba68]['pairId']):'elementEnd'===_0x48ceda[_0x40ba68]['type']&&(_0x48ceda[_0x40ba68]['item']['startIndex']=_0x1a4ecd['get'](_0x48ceda[_0x40ba68]['pairId']));}['_processTape'](_0x469528){for(let _0x36fa4f=0x0;_0x36fa4f<_0x469528['length'];_0x36fa4f++){if('elementStart'===_0x469528[_0x36fa4f]['type'])_0x469528[_0x36fa4f]['item']['startIndex']=_0x36fa4f;else{if('elementEnd'===_0x469528[_0x36fa4f]['type']){_0x469528[_0x36fa4f]['item']['endIndex']=_0x36fa4f;const _0x3d7f9f=_0x469528[_0x36fa4f]['item']['startIndex'];_0x469528[_0x3d7f9f]['pairId']=_0x469528[_0x36fa4f]['id'],_0x469528[_0x36fa4f]['pairId']=_0x469528[_0x3d7f9f]['id'];}else _0x469528[_0x36fa4f]['item']['startIndex']=_0x36fa4f,_0x469528[_0x36fa4f]['item']['endIndex']=_0x36fa4f,_0x469528[_0x36fa4f]['pairId']=null;}_0x469528[_0x36fa4f]['markersStart']||(_0x469528[_0x36fa4f]['markersStart']=[],_0x469528[_0x36fa4f]['markersEnd']=[]);}}_markInsertions(_0x566818,_0x41eb94){const _0x3f6ba5=_0x566818['filter'](_0x201992=>!_0x201992['isAdded']);for(let _0xe0daef=0x0;_0xe0daef<_0x41eb94['length'];_0xe0daef++)_0x41eb94[_0xe0daef]['isAdded']&&(_0x3f6ba5[_0xe0daef]['isAdded']=_0x41eb94[_0xe0daef]['isAdded']);}_getDiff(_0x423099,_0x4d1fc6=null){const _0x5f1191=this['repository']['getRevision'](_0x423099),_0x3dec57=_0x4d1fc6?this['repository']['getRevision'](_0x4d1fc6):null,_0x591805=this['_getRevisionsRange'](_0x5f1191,_0x3dec57),_0x1e8ab7=_0x591805[_0x591805['length']-0x1],_0x422b0e=new Map(),_0x309b4f={'model':{},'attributes':{},'changes':[]},_0x322d72=new Set(),_0x1dddbc=new Map();for(let _0x3c3e5d=_0x591805['length']-0x1;_0x3c3e5d>=0x0;_0x3c3e5d--){const _0x4235a2=_0x591805[_0x3c3e5d];for(const _0x4ca13b of Object['keys'](_0x4235a2['diffData']))if(_0x4235a2['diffData'][_0x4ca13b]['attachChange']){const _0x5b39f0=_0x4235a2['diffData'][_0x4ca13b]['attachChange'];_0x5b39f0['isAttached']?(_0x322d72['add'](_0x4ca13b),_0x1dddbc['has'](_0x4ca13b)&&_0x1dddbc['get'](_0x4ca13b)['userId']==_0x5b39f0['userId']?_0x1dddbc['delete'](_0x4ca13b):_0x1dddbc['set'](_0x4ca13b,_0x5b39f0)):_0x1dddbc['has'](_0x4ca13b)?(_0x322d72['delete'](_0x4ca13b),_0x1dddbc['delete'](_0x4ca13b)):(_0x322d72['add'](_0x4ca13b),_0x1dddbc['set'](_0x4ca13b,_0x5b39f0));}else _0x322d72['add'](_0x4ca13b);}for(const _0x1239ea of _0x322d72){const _0x9057f5=_0x1dddbc['has'](_0x1239ea)&&!_0x1dddbc['get'](_0x1239ea)['isAttached'];let _0x3f4bc4=_0x9057f5?_0x591805['length']-0x1:0x0;const _0x5c3983=_0x9057f5?-0x1:0x1;for(;_0x591805[_0x3f4bc4];){const _0xb9a9c3=_0x591805[_0x3f4bc4];if(_0xb9a9c3['diffData'][_0x1239ea]){const _0x5276d3=_0x9057f5?_0xb9a9c3['diffData'][_0x1239ea]['attributesBefore']:_0xb9a9c3['diffData'][_0x1239ea]['attributesAfter'];_0x309b4f['attributes'][_0x1239ea]=_0x5276d3?_0x4c4837(_0x5276d3):{};break;}_0x3f4bc4+=_0x5c3983;}}for(const _0x6b1e09 of _0x591805){_0x6b1e09['model']={};for(const _0x3e1606 of _0x6b1e09['authors'])_0x422b0e['set'](_0x3e1606['id'],_0x3e1606);for(const _0x42c89e of _0x322d72){const _0x559077=_0x6b1e09['diffData'][_0x42c89e]?_0x6b1e09['diffData'][_0x42c89e]['insertions']:'[]',_0x56f64a=_0x6b1e09['diffData'][_0x42c89e]?_0x6b1e09['diffData'][_0x42c89e]['deletions']:'[]',_0x505dc6=_0x6b1e09['diffData'][_0x42c89e]?.['rootElementName']||'$root';_0x6b1e09['model'][_0x42c89e]={'insertions':this['_utils']['_makeModelFromViewString'](_0x559077,_0x505dc6),'deletions':this['_utils']['_makeModelFromViewString'](_0x56f64a,_0x505dc6)};}}for(const _0x4431a1 of _0x322d72){let _0x1e7ff4=null,_0x1ee623=0x0;const _0x1dc296=_0x591805['map'](_0xf615d0=>_0xf615d0['diffData'][_0x4431a1]?.['rootElementName'])['find'](_0x550e79=>void 0x0!==_0x550e79)||'$root',_0x2c48ee=new Map(Array['from'](_0x5f1191['model'][_0x4431a1]['insertions']['markers'])['filter'](([_0x3007f2])=>!_0x3007f2['startsWith']('revision:')));let _0x1785c1=0x0;for(const _0x2bb0bd of _0x591805){const _0xbced01=_0x2bb0bd['diffData'][_0x4431a1]?.['aiSources']||{},_0x5627fb=this['_makeTape'](_0x2bb0bd['model'][_0x4431a1]['insertions'],_0xbced01);_0x2bb0bd==_0x5f1191?(_0x1e7ff4=_0x5627fb,_0x1ee623=_0x1e7ff4['length'],_0x1e7ff4['forEach'](_0x2fe71f=>{_0x2fe71f['id']=_0x1785c1++;}),this['_processTape'](_0x1e7ff4)):this['_markInsertions'](_0x1e7ff4,_0x5627fb);const _0x4b5a1a=_0x1e7ff4['filter'](_0x5b3ceb=>!_0x5b3ceb['isAdded'])['map'](_0x37aee2=>_0x37aee2['id']);let _0x5a1234=0x0;const _0x47ffc9=this['_makeTape'](_0x2bb0bd['model'][_0x4431a1]['deletions'],_0xbced01);_0x47ffc9['forEach'](_0x5e3a85=>{_0x5e3a85['isRemoved']?_0x5e3a85['id']=_0x1ee623++:_0x5e3a85['id']=_0x4b5a1a[_0x5a1234++];}),this['_processTape'](_0x47ffc9),this['_setDistance'](_0x1e7ff4,'isAdded'),this['_setDistance'](_0x47ffc9,'isRemoved'),_0x2bb0bd==_0x5f1191&&this['_markMarkers'](_0x1e7ff4,_0x2c48ee),_0x1e7ff4=this['_joinTapes'](_0x1e7ff4,_0x47ffc9),this['_refreshStartEndIndex'](_0x1e7ff4),this['_setDistance'](_0x1e7ff4,'isRemoved');}_0x1e7ff4=_0x1e7ff4['filter'](_0x2942a2=>!(_0x2942a2['isAdded']&&_0x2942a2['isRemoved']));const _0x44af5d=new Map(_0x1e8ab7['model'][_0x4431a1]['deletions']['markers']),_0x5f46a0=new Set(_0x2c48ee['keys']());for(const _0x4cf37f of _0x44af5d['keys']())_0x5f46a0['delete'](_0x4cf37f);const _0x53230a=Object['assign']({},..._0x591805['map'](_0x42b9d5=>_0x42b9d5['diffData'][_0x4431a1]?.['aiSources']));this['_markSuggestions'](_0x1e7ff4,_0x5f46a0,_0x53230a),this['_fixObsoleteTags'](_0x1e7ff4),_0x1e7ff4=this['_removeMissingPairs'](_0x1e7ff4),_0x1e7ff4=this['_markMismatchedRemovedTags'](_0x1e7ff4),_0x1e7ff4=this['_removeUnsupportedChanges'](_0x1e7ff4);const {root:_0x145242,changes:_0x5e5f77}=this['_makeModelFromTape'](_0x1e7ff4,_0x422b0e,_0x4431a1,_0x1dc296);_0x309b4f['model'][_0x4431a1]=_0x145242;const _0x3ca823=_0x1dddbc['get'](_0x4431a1);if(_0x3ca823){const _0x3580a0=_0x422b0e['get'](_0x3ca823['userId']),_0x45e06a=new Tt({'author':_0x3580a0,'type':_0x3ca823['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4431a1});_0x5e5f77['unshift'](_0x45e06a),_0x309b4f['attributes'][_0x4431a1]['revisionHistoryAttachChange']=_0x45e06a['id'];}_0x309b4f['changes']=_0x309b4f['changes']['concat'](_0x5e5f77);}return _0x309b4f;}['_markMarkers'](_0x33bbd5,_0x4cb0b0){for(let _0x36e7c8=0x0;_0x36e7c8<_0x33bbd5['length'];_0x36e7c8++)for(const [_0x2041fa,_0x3160df]of _0x4cb0b0)!_0x3160df['isCollapsed']&&_0x3160df['start']['isEqual'](_0x33bbd5[_0x36e7c8]['previousPosition'])&&_0x33bbd5[_0x36e7c8]['markersStart']['push'](_0x2041fa),_0x3160df['end']['isEqual'](_0x33bbd5[_0x36e7c8]['nextPosition'])&&_0x33bbd5[_0x36e7c8]['markersEnd']['push'](_0x2041fa);}['_joinTapes'](_0x480a68,_0x527ebd){let _0x18f346=[],_0x5ce1e1=0x0,_0x37933c=0x0;for(;_0x5ce1e1<_0x480a68['length']||_0x37933c<_0x527ebd['length'];){const _0x31fef5=_0x480a68[_0x5ce1e1]||{},_0x15f5a6=_0x527ebd[_0x37933c]||{};if(_0x31fef5['id']==_0x15f5a6['id'])_0x5ce1e1++,_0x37933c++,_0x18f346['push'](_0x31fef5);else{if(_0x15f5a6['isRemoved']&&_0x31fef5['isAdded']){const {commonTape:_0x47aa20,iEnd:_0x3d4f4c,jEnd:_0x1890f8}=this['_threeWayMerge'](_0x480a68,_0x5ce1e1,_0x527ebd,_0x37933c);_0x18f346=_0x18f346['concat'](_0x47aa20),_0x5ce1e1=_0x3d4f4c,_0x37933c=_0x1890f8;}else _0x15f5a6['isRemoved']?(_0x37933c++,_0x18f346['push'](_0x15f5a6)):(_0x5ce1e1++,_0x18f346['push'](_0x31fef5));}}return _0x18f346;}_markSuggestions(_0x322393,_0x3fc7c4,_0xf21d3b){const _0x4465a2=[];for(let _0x20805e=0x0;_0x20805e<_0x322393['length'];_0x20805e++){for(let _0x5bf277=0x0;_0x5bf277<_0x322393[_0x20805e]['markersStart']['length'];_0x5bf277++){const _0x11a713=_0x322393[_0x20805e]['markersStart'][_0x5bf277];if(!_0x3fc7c4['has'](_0x11a713))continue;const {group:_0x2aa208,type:_0x8a3828,authorId:_0x531093}=_0x425555(_0x11a713);if('revision-suggestion'!=_0x2aa208||'insertion'!=_0x8a3828&&'deletion'!=_0x8a3828)continue;const _0x1b01aa=_0xf21d3b['suggestion:'+_0x11a713['slice'](0x14)]||null;_0x4465a2['unshift']({'type':_0x8a3828,'name':_0x11a713,'userId':_0x531093,'aiSource':_0x1b01aa}),_0x322393[_0x20805e]['markersStart']['splice'](_0x5bf277,0x1),_0x5bf277--;}_0x3471f2(_0x322393[_0x20805e]);for(let _0x3b0432=0x0;_0x3b0432<_0x322393[_0x20805e]['markersEnd']['length'];_0x3b0432++){const _0x5f11e5=_0x322393[_0x20805e]['markersEnd'][_0x3b0432];if(!_0x3fc7c4['has'](_0x5f11e5))continue;const {group:_0x467066,type:_0x1e2a42}=_0x425555(_0x5f11e5);if('revision-suggestion'!=_0x467066||'insertion'!=_0x1e2a42&&'deletion'!=_0x1e2a42)continue;_0x322393[_0x20805e]['markersEnd']['splice'](_0x3b0432,0x1),_0x3b0432--;const _0x2ef786=_0x4465a2['findIndex'](_0x42387e=>_0x42387e['name']==_0x5f11e5);_0x2ef786>-0x1&&_0x4465a2['splice'](_0x2ef786,0x1);}}function _0x425555(_0x25459e){const _0x5cfab5=_0x25459e['split'](':');return{'group':_0x5cfab5[0x0],'type':_0x5cfab5[0x1],'subType':_0x5cfab5['length']>=0x5?_0x5cfab5[0x2]:null,'id':_0x5cfab5['length']<0x5?_0x5cfab5[0x2]:_0x5cfab5[0x3],'authorId':_0x5cfab5['length']<0x5?_0x5cfab5[0x3]:_0x5cfab5[0x4],'markerCount':0x6==_0x5cfab5['length']?_0x5cfab5[0x5]:null};}function _0x3471f2(_0x1fc81c){for(let _0x3fabf6=0x0;_0x3fabf6<_0x4465a2['length'];_0x3fabf6++){if(_0x1fc81c['isAdded']&&'insertion'==_0x4465a2[_0x3fabf6]['type']&&_0x1fc81c['isAdded']['userId']==_0x4465a2[_0x3fabf6]['userId'])return _0x1fc81c['isAddSuggestion']={..._0x4465a2[_0x3fabf6],'aiSource':_0x1fc81c['isAdded']['aiSource']||_0x4465a2[_0x3fabf6]['aiSource']},void delete _0x1fc81c['isAdded'];if(!_0x1fc81c['isAdded']&&!_0x1fc81c['isRemoved']&&'deletion'==_0x4465a2[_0x3fabf6]['type'])return void(_0x1fc81c['isRemoveSuggestion']=_0x4465a2[_0x3fabf6]);}}}_setDistance(_0x281610,_0x2383f7){let _0x58366c=0x0,_0x255d7c=!0x1;const _0x2ac573=new Map();for(const _0x21d3ae of _0x281610)_0x21d3ae[_0x2383f7]?_0x255d7c&&(_0x58366c++,_0x255d7c=!0x1):(_0x58366c++,_0x255d7c=!0x0),_0x2ac573['set'](_0x21d3ae['id'],_0x58366c);for(let _0x185cf5=0x0;_0x185cf5<_0x281610['length'];_0x185cf5++){if('isRemoved'==_0x2383f7&&_0x281610[_0x185cf5]['isAdded']||'isAdded'==_0x2383f7&&_0x281610[_0x185cf5]['isRemoved'])continue;if('text'==_0x281610[_0x185cf5]['type']){_0x281610[_0x185cf5]['distance']=0x0;continue;}const _0x33954c=_0x2ac573['get'](_0x281610[_0x185cf5]['pairId']),_0x51561a=_0x2ac573['get'](_0x281610[_0x185cf5]['id']);_0x281610[_0x185cf5]['distance']=_0x33954c-_0x51561a;}}_getRevisionsRange(_0x23530f,_0x54879a,_0x25ab53=!0x1){const _0x213989=[];let _0x1442e2=this['repository']['getIndex'](_0x23530f),_0x1cfc6f=this['repository']['getIndex'](_0x54879a);for(-0x1==_0x1cfc6f&&(_0x1cfc6f=this['repository']['_revisions']['length'],_0x25ab53=!0x1);_0x1442e2<_0x1cfc6f;)_0x213989['push'](this['repository']['getRevision'](_0x1442e2)),_0x1442e2++;return _0x25ab53&&_0x213989['push'](this['repository']['getRevision'](_0x1442e2)),_0x213989;}_threeWayMerge(_0x3c4d8f,_0x21850d,_0x511de4,_0x23efc4){const _0x3127bb=this['editor']['model']['schema'];let _0x2fcb0d=_0x21850d;for(;_0x3c4d8f[_0x2fcb0d]&&_0x3c4d8f[_0x2fcb0d]['isAdded'];)_0x2fcb0d++;let _0x4f1248=_0x23efc4;for(;_0x511de4[_0x4f1248]&&_0x511de4[_0x4f1248]['isRemoved'];)_0x4f1248++;_0x2b7371(_0x3c4d8f,_0x21850d,_0x2fcb0d),_0x2b7371(_0x511de4,_0x23efc4,_0x4f1248);const _0x31e049=_0x511de4['slice'](_0x23efc4,_0x4f1248)['concat'](_0x3c4d8f['slice'](_0x21850d,_0x2fcb0d));return _0x31e049['sort']((_0x2f121e,_0x5e11bd)=>_0x2f121e['side']!=_0x5e11bd['side']?_0x2f121e['side']-_0x5e11bd['side']:_0x2f121e['level']!=_0x5e11bd['level']?_0x2f121e['level']-_0x5e11bd['level']:_0x2f121e['distance']!=_0x5e11bd['distance']?_0x5e11bd['distance']-_0x2f121e['distance']:!!_0x2f121e['isAdded']!=!!_0x5e11bd['isAdded']?-0x1==_0x2f121e['side']||0x0==_0x2f121e['side']?_0x2f121e['isAdded']?-0x1:0x1:_0x2f121e['isAdded']?0x1:-0x1:_0x2f121e['index']-_0x5e11bd['index']),{'commonTape':_0x31e049,'iEnd':_0x2fcb0d,'jEnd':_0x4f1248};function _0x2b7371(_0x5d7937,_0x424cec,_0x3e657d){let _0x5d78fc=-0x1,_0x58b9e2=Number['POSITIVE_INFINITY'],_0x473b7e=!0x0;for(let _0xe8cc19=_0x424cec;_0xe8cc19<_0x3e657d;_0xe8cc19++)if(_0x3127bb['isInline'](_0x5d7937[_0xe8cc19]['item'])||(_0x473b7e=!0x1),_0x5d7937[_0xe8cc19]['item']['startIndex']<_0x424cec&&(_0x5d78fc=_0xe8cc19),_0x5d7937[_0xe8cc19]['item']['endIndex']>=_0x3e657d){_0x58b9e2=_0xe8cc19;break;}_0x473b7e&&(_0x5d78fc=_0x3e657d-0x1);for(let _0x456d84=_0x424cec;_0x456d84<_0x3e657d;_0x456d84++)_0x5d7937[_0x456d84]['side']=_0x456d84<=_0x5d78fc?-0x1:_0x456d84<_0x58b9e2?0x0:0x1,_0x5d7937[_0x456d84]['index']=_0x456d84;let _0x35e4e2=0x0;for(let _0x40d595=_0x424cec;_0x40d595<=_0x5d78fc;_0x40d595++)0x0==_0x5d7937[_0x40d595]['distance']?_0x5d7937[_0x40d595]['level']=_0x35e4e2:(_0x35e4e2++,_0x5d7937[_0x40d595]['level']=_0x35e4e2,_0x35e4e2++);for(let _0x554b67=_0x424cec;_0x554b67<_0x3e657d;_0x554b67++)0x0==_0x5d7937[_0x554b67]['side']&&(_0x5d7937[_0x554b67]['level']=_0x35e4e2);_0x35e4e2=0x0;for(let _0x1fa63b=_0x3e657d-0x1;_0x1fa63b>=_0x58b9e2;_0x1fa63b--)0x0==_0x5d7937[_0x1fa63b]['distance']?_0x5d7937[_0x1fa63b]['level']=_0x35e4e2:(_0x35e4e2--,_0x5d7937[_0x1fa63b]['level']=_0x35e4e2,_0x35e4e2--);}}_fixObsoleteTags(_0x4c80d6){const _0x5bdae8=new Map(),_0x980471=this['editor']['model']['schema'];for(let _0x16df41=0x1;_0x16df41<_0x4c80d6['length'];_0x16df41++){let _0x356e8b,_0x16fc46,_0x591d08;const _0x415d73=_0x4c80d6[_0x16df41],_0x18b4a0=_0x4c80d6[_0x16df41-0x1];if('text'==_0x415d73['type'])continue;if(_0x415d73['type']!=_0x18b4a0['type'])continue;if(!_0x980471['isBlock'](_0x18b4a0['item'])||_0x980471['isLimit'](_0x18b4a0['item']))continue;if(!_0x980471['isBlock'](_0x415d73['item'])||_0x980471['isLimit'](_0x415d73['item']))continue;if((_0x4c80d6[_0x16df41]['isAdded']||_0x4c80d6[_0x16df41]['isAddSuggestion'])&&_0x4c80d6[_0x16df41-0x1]['isRemoved'])_0x356e8b=_0x4c80d6[_0x16df41],_0x16fc46=_0x4c80d6[_0x16df41-0x1],_0x591d08=_0x16df41-0x1;else{if(!_0x4c80d6[_0x16df41]['isRemoved']||!_0x4c80d6[_0x16df41-0x1]['isAdded']&&!_0x4c80d6[_0x16df41-0x1]['isAddSuggestion'])continue;_0x356e8b=_0x4c80d6[_0x16df41-0x1],_0x16fc46=_0x4c80d6[_0x16df41],_0x591d08=_0x16df41;}const _0x59d601=_0x356e8b['level']==_0x16fc46['level'],_0x59d78a=Math['abs'](_0x356e8b['level'])<Math['abs'](_0x16fc46['level'])&&0x0==_0x16fc46['distance'];(_0x59d601||_0x59d78a)&&(_0x5bdae8['set'](_0x16fc46['id'],_0x356e8b['id']),_0x4c80d6['splice'](_0x591d08,0x1),_0x16df41--,_0x356e8b['isAdded']=!0x1);}for(let _0x52df3b=0x0;_0x52df3b<_0x4c80d6['length'];_0x52df3b++)_0x5bdae8['has'](_0x4c80d6[_0x52df3b]['pairId'])&&(_0x4c80d6[_0x52df3b]['pairId']=_0x5bdae8['get'](_0x4c80d6[_0x52df3b]['pairId']));}['_removeMissingPairs'](_0x539b5a){const _0x1c4e85=new Set(_0x539b5a['map'](_0x30dc1b=>_0x30dc1b['id']));for(let _0x15a9c8=0x0;_0x15a9c8<_0x539b5a['length'];_0x15a9c8++)_0x1c4e85['has'](_0x539b5a[_0x15a9c8]['pairId'])||0x0==_0x539b5a[_0x15a9c8]['distance']||(_0x539b5a[_0x15a9c8]['isIncorrect']=!0x0);return _0x539b5a['filter'](_0x10e8e8=>!_0x10e8e8['isIncorrect']);}_markMismatchedRemovedTags(_0x5a8fbf){const _0x282f14=new Set();for(let _0x586bc5=0x0;_0x586bc5<_0x5a8fbf['length'];_0x586bc5++){if(_0x282f14['has'](_0x5a8fbf[_0x586bc5]['id'])&&_0x5a8fbf[_0x586bc5]['isRemoved']&&(_0x5a8fbf[_0x586bc5]['isIncorrect']=!0x0),_0x5a8fbf[_0x586bc5]['isIncorrect'])continue;if(0x0==_0x5a8fbf[_0x586bc5]['distance'])continue;if('elementStart'!=_0x5a8fbf[_0x586bc5]['type'])continue;if(null==_0x5a8fbf[_0x586bc5]['pairId'])continue;let _0x3dd37c=_0x586bc5+0x1,_0xbde2a4=0x0;for(;_0x5a8fbf[_0x3dd37c]['id']!=_0x5a8fbf[_0x586bc5]['pairId'];)'elementStart'==_0x5a8fbf[_0x3dd37c]['type']?_0xbde2a4++:'elementEnd'==_0x5a8fbf[_0x3dd37c]['type']&&_0xbde2a4--,_0x3dd37c++;if(0x0!=_0xbde2a4){if(_0x5a8fbf[_0x586bc5]['isRemoved'])_0x5a8fbf[_0x586bc5]['isIncorrect']=!0x0;else{for(;_0x3dd37c!=_0x586bc5;)_0x5a8fbf[_0x3dd37c]['isRemoved']&&0x0!=_0x5a8fbf[_0x3dd37c]['distance']&&(_0x5a8fbf[_0x3dd37c]['isIncorrect']=!0x0,_0x282f14['add'](_0x5a8fbf[_0x3dd37c]['pairId'])),_0x3dd37c--;}}}return _0x5a8fbf['filter'](_0x38ff38=>!_0x38ff38['isIncorrect']);}_removeUnsupportedChanges(_0x2f673d){const _0x5c4aa7=this['editor']['model']['schema'];for(let _0x5eb1e5=0x0;_0x5eb1e5<_0x2f673d['length'];_0x5eb1e5++){if(!(_0x2f673d[_0x5eb1e5]['isAdded']||_0x2f673d[_0x5eb1e5]['isAddSuggestion']||_0x2f673d[_0x5eb1e5]['isRemoved']||_0x2f673d[_0x5eb1e5]['isRemoveSuggestion']))continue;if(0x0==_0x2f673d[_0x5eb1e5]['distance'])continue;const _0x564d3a=_0x2f673d[_0x5eb1e5]['item'];_0x5c4aa7['isBlock'](_0x564d3a)||_0x5c4aa7['isLimit'](_0x564d3a)||(_0x2f673d[_0x5eb1e5]['isAdded']&&delete _0x2f673d[_0x5eb1e5]['isAdded'],_0x2f673d[_0x5eb1e5]['isAddSuggestion']&&delete _0x2f673d[_0x5eb1e5]['isAddSuggestion'],_0x2f673d[_0x5eb1e5]['isRemoveSuggestion']&&delete _0x2f673d[_0x5eb1e5]['isRemoveSuggestion'],_0x2f673d[_0x5eb1e5]['isRemoved']&&(_0x2f673d[_0x5eb1e5]['isIncorrect']=!0x0));}return _0x2f673d['filter'](_0x1d0403=>!_0x1d0403['isIncorrect']);}['_makeModelFromTape'](_0x555b44,_0x51697a,_0x4fa16e,_0x1b4acc){const _0x33f1a3=new _0x5b0952(),_0x17785c=[],_0x12a519=new Map(),_0x1a68ae=this['editor']['model'],_0x1def61=_0x1a68ae['schema'],_0x56d873=[_0x33f1a3],_0x1d588d={},_0x472d1={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x33f1a3['name']=_0x1b4acc;let _0x138078=null;const _0x489385=[0x0];for(let _0x49aae5=0x0;_0x49aae5<_0x555b44['length'];_0x49aae5++)if('elementStart'===_0x555b44[_0x49aae5]['type']){_0x555b44[_0x49aae5]['previousPosition']=_0x1a68ae['createPositionFromPath'](_0x33f1a3,_0x489385);const _0x5f5c4c=new _0x33393c(_0x555b44[_0x49aae5]['item']['name'],_0x555b44[_0x49aae5]['item']['getAttributes']());_0x56d873[0x0]['_appendChild'](_0x5f5c4c),_0x489385['push'](0x0),_0x56d873['unshift'](_0x5f5c4c),_0x555b44[_0x49aae5]['nextPosition']=_0x1a68ae['createPositionFromPath'](_0x33f1a3,_0x489385);}else'elementEnd'===_0x555b44[_0x49aae5]['type']?(_0x56d873['shift'](),_0x555b44[_0x49aae5]['previousPosition']=_0x1a68ae['createPositionFromPath'](_0x33f1a3,_0x489385),_0x489385['pop'](),_0x489385[_0x489385['length']-0x1]++,_0x555b44[_0x49aae5]['nextPosition']=_0x1a68ae['createPositionFromPath'](_0x33f1a3,_0x489385)):(_0x555b44[_0x49aae5]['previousPosition']=_0x1a68ae['createPositionFromPath'](_0x33f1a3,_0x489385),_0x138078?_0x138078['_data']+=_0x555b44[_0x49aae5]['item']['data']:_0x138078=new _0x39f156(_0x555b44[_0x49aae5]['item']['data'],_0x555b44[_0x49aae5]['item']['getAttributes']()),_0x555b44[_0x49aae5+0x1]&&'text'===_0x555b44[_0x49aae5+0x1]['type']&&_0x26a8e6(_0x138078,_0x555b44[_0x49aae5+0x1]['item'])||(_0x56d873[0x0]['_appendChild'](_0x138078),_0x138078=null),_0x489385[_0x489385['length']-0x1]+=_0x555b44[_0x49aae5]['item']['offsetSize'],_0x555b44[_0x49aae5]['nextPosition']=_0x1a68ae['createPositionFromPath'](_0x33f1a3,_0x489385));for(let _0x593da5=0x0;_0x593da5<_0x555b44['length'];_0x593da5++){const _0x3b488c=_0x555b44[_0x593da5]['previousPosition'],_0x3eb25c=_0x555b44[_0x593da5]['nextPosition'];for(const _0x4f29f6 of _0x555b44[_0x593da5]['markersStart'])_0x12a519['set'](_0x4f29f6,{'start':_0x3b488c,'end':null});_0x5dfa06('isRemoveSuggestion',_0x593da5,_0x3b488c,_0x3eb25c),_0x5dfa06('isAddSuggestion',_0x593da5,_0x3b488c,_0x3eb25c),_0x5dfa06('isRemoved',_0x593da5,_0x3b488c,_0x3eb25c),_0x5dfa06('isAdded',_0x593da5,_0x3b488c,_0x3eb25c);for(const _0x40d170 of _0x555b44[_0x593da5]['markersEnd']){const _0x1ba619=_0x12a519['get'](_0x40d170);_0x1ba619?_0x1ba619['end']=_0x3eb25c:_0x12a519['set'](_0x40d170,{'start':_0x3eb25c,'end':_0x3eb25c});}}for(const [_0x10a814,_0x2d810e]of _0x12a519){const _0x171147=this['editor']['model']['createRange'](_0x2d810e['start'],_0x2d810e['end']);_0x33f1a3['markers']['set'](_0x10a814,_0x171147);}return _0x17785c['sort']((_0xb4f009,_0x559fb6)=>{const _0x4a8ef7=_0x33f1a3['markers']['get']('revision:'+_0xb4f009['id']),_0x251d72=_0x33f1a3['markers']['get']('revision:'+_0x559fb6['id']);return _0x4a8ef7['start']['isBefore'](_0x251d72['start'])?-0x1:_0x4a8ef7['start']['isAfter'](_0x251d72['start'])?0x1:_0x4a8ef7['end']['isBefore'](_0x251d72['end'])?-0x1:_0x4a8ef7['end']['isAfter'](_0x251d72['end'])?0x1:'add'===_0xb4f009['type']?-0x1:0x1;}),{'root':_0x33f1a3,'changes':_0x17785c};function _0x5dfa06(_0x2c79a1,_0x44fde0,_0x434a19,_0x4f0b4c){const _0x3ce3fb=!!_0x555b44[_0x44fde0][_0x2c79a1],_0x4224cf=_0x3ce3fb?_0x555b44[_0x44fde0][_0x2c79a1]['userId']:null,_0x2b986e=_0x3ce3fb&&_0x555b44[_0x44fde0][_0x2c79a1]['aiSource']||null,_0x1981a8=_0x44fde0===_0x555b44['length']-0x1,_0x550ca0=_0x472d1[_0x2c79a1][0x0],_0x5abf73=_0x1def61['isObject'](_0x555b44[_0x44fde0]['item']);!_0x1d588d[_0x2c79a1]&&_0x3ce3fb?_0x1d588d[_0x2c79a1]={'start':_0x434a19,'tapeItem':_0x555b44[_0x44fde0],'userId':_0x4224cf,'aiSource':_0x2b986e,'type':_0x2c79a1}:_0x1d588d[_0x2c79a1]&&!_0x3ce3fb?(_0x1d588d[_0x2c79a1]['end']=_0x434a19,_0x4171a0(_0x1d588d[_0x2c79a1]),_0x1d588d[_0x2c79a1]=null):_0x1d588d[_0x2c79a1]&&_0x3ce3fb&&(_0x1d588d[_0x2c79a1]['userId']!==_0x4224cf||_0x1d588d[_0x2c79a1]['aiSource']!==_0x2b986e)&&(_0x1d588d[_0x2c79a1]['end']=_0x434a19,_0x550ca0&&_0x550ca0['userId']===_0x1d588d[_0x2c79a1]['userId']?_0x550ca0['change']['aiSource']=_0x550ca0['change']['aiSource']||_0x1d588d[_0x2c79a1]['aiSource']:_0x4171a0(_0x1d588d[_0x2c79a1]),_0x1d588d[_0x2c79a1]={'start':_0x434a19,'tapeItem':_0x555b44[_0x44fde0],'userId':_0x4224cf,'aiSource':_0x2b986e,'type':_0x2c79a1}),_0x1d588d[_0x2c79a1]&&_0x5abf73&&('elementStart'!==_0x555b44[_0x44fde0]['type']||_0x550ca0&&_0x550ca0['userId']===_0x4224cf||_0x472d1[_0x2c79a1]['unshift']({'userId':_0x4224cf,'object':_0x555b44[_0x44fde0]['item'],'change':_0x1d588d[_0x2c79a1]}),'elementEnd'===_0x555b44[_0x44fde0]['type']&&_0x550ca0&&_0x550ca0['object']===_0x555b44[_0x44fde0]['item']&&(_0x472d1[_0x2c79a1]['shift'](),_0x1d588d[_0x2c79a1]=_0x550ca0['change'])),_0x1d588d[_0x2c79a1]&&_0x1981a8&&(_0x1d588d[_0x2c79a1]['end']=_0x4f0b4c,_0x4171a0(_0x1d588d[_0x2c79a1]),_0x1d588d[_0x2c79a1]=null);}function _0x4171a0({start:_0x3e25fc,end:_0x2917a0,tapeItem:_0x139a1b,userId:_0x411e8d,aiSource:_0x572624,type:_0x2a37a5}){const _0x23c942=_0x139a1b['item'],_0x58f3ac=_0x1a68ae['schema']['isBlock'](_0x23c942)&&!_0x1a68ae['schema']['isLimit'](_0x23c942),_0x60264f=_0x3e25fc['nodeAfter']==_0x2917a0['parent']&&_0x2917a0['isAtStart'];if(_0x58f3ac&&_0x60264f)return;const _0x311b9b=_0x1a68ae['createRange'](_0x3e25fc,_0x2917a0),_0x4d4a08=_0x51697a['get'](_0x411e8d),_0x252ba9=new Tt({'author':_0x4d4a08,'type':'isAdded'==_0x2a37a5||'isAddSuggestion'==_0x2a37a5?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2a37a5||'isRemoveSuggestion'==_0x2a37a5,'aiSource':_0x572624||null},'createdAt':new Date(),'rootName':_0x4fa16e});_0x17785c['push'](_0x252ba9),_0x33f1a3['markers']['set']('revision:'+_0x252ba9['id'],_0x311b9b);}function _0x26a8e6(_0x13db15,_0x44c062){const _0x34f883=_0x13db15['getAttributes'](),_0x26efa9=_0x44c062['getAttributes']();for(const _0x303da2 of _0x34f883){if(_0x303da2[0x1]!==_0x44c062['getAttribute'](_0x303da2[0x0]))return!0x1;_0x26efa9['next']();}return _0x26efa9['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3f7740=>{const _0x13647d=_0x3f7740['markerName']['split'](':')[0x1],_0x551a5d=this['_getChangeFromId'](_0x13647d);if(!_0x551a5d)return null;const _0x5d91c7='add'==_0x551a5d['type']?'insertion':'deletion',_0x5d0b73=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5d91c7];return _0x551a5d['data']['isSuggestion']&&_0x5d0b73['push']('ck-suggestion-marker-'+_0x5d91c7+'-new'),this['activeChange']==_0x551a5d&&_0x5d0b73['push']('ck-suggestion-marker--active'),{'classes':_0x5d0b73,'attributes':{'data-change-id':_0x13647d}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x54e587=>{_0x54e587['on']('element:pre',(_0x1bf738,_0x29b003,_0x26e768)=>{const _0x3c216a=_0x29b003['viewItem']['getChild'](0x0);if(!_0x3c216a||!_0x3c216a['is']('element','code'))return;if(!_0x26e768['consumable']['consume'](_0x3c216a,{'attributes':['vid_start','vid_end']}))return;const _0x1b02e1=_0x29b003['modelRange']['start']['nodeAfter'];_0x26e768['writer']['setAttribute']('vid_start',_0x3c216a['getAttribute']('vid_start'),_0x1b02e1),_0x26e768['writer']['setAttribute']('vid_end',_0x3c216a['getAttribute']('vid_end'),_0x1b02e1);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x304b8e=>{_0x304b8e['on']('element',(_0x2c777b,_0x454cc8,_0x1bd55a)=>{if(!_0x1bd55a['consumable']['consume'](_0x454cc8['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x454cc8['modelRange']['isCollapsed'])return;const _0x4786d9=_0x454cc8['modelRange']['start']['nodeAfter'];_0x4786d9['hasAttribute']('vid_start')||_0x4786d9['hasAttribute']('vid')||(_0x1bd55a['writer']['setAttribute']('vid_start',_0x454cc8['viewItem']['getAttribute']('vid_start'),_0x4786d9),_0x1bd55a['writer']['setAttribute']('vid_end',_0x454cc8['viewItem']['getAttribute']('vid_end'),_0x4786d9));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x27c3e1=>_0x27c3e1['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x485d53,[,_0x466601])=>{['vid_start','vid_end','vid']['includes'](_0x466601)&&(_0x485d53['return']=!0x0,_0x485d53['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xbd1dcf=>{_0xbd1dcf['on']('attribute:vid',(_0x4fc041,_0x685349,_0x186f7d)=>{if('\x20'!=_0x685349['item']['data']||_0x685349['item']['parent']['maxOffset']>0x1)return;if(!_0x186f7d['consumable']['consume'](_0x685349['item'],_0x4fc041['name']))return;const _0x79c9f0=_0x186f7d['writer'],_0x23f47a=_0x186f7d['mapper']['toViewRange'](_0x685349['range']);_0x79c9f0['wrap'](_0x23f47a,_0x79c9f0['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x599b87){const _0x56c9c0=_0x599b87['plugins']['get']('RevisionViewer');return(_0x15f3d8,_0x3c14c6,_0x4e8087)=>{const _0x555b95=_0x3c14c6['markerName']['split'](':')[0x1],_0x32920b=_0x56c9c0['_getChangeFromId'](_0x555b95);if(!_0x32920b)return null;const _0x92b975='add'==_0x32920b['type']?'split':'merge';if(!_0x4e8087['consumable']['test'](_0x3c14c6['markerRange'],_0x15f3d8['name']))return;const _0x3976b1=_0x3c14c6['markerRange']['getWalker'](),_0x5c3e75=_0x3c14c6['markerRange']['start'],_0x154f2d=_0x599b87['model']['schema'];let _0x38f385=null,_0x2d0844=null,_0xc6ca06=!0x1,_0x53122c=!0x1;for(const _0x27cae9 of _0x3976b1){const _0x1b087a=_0x27cae9['item'];_0xc6ca06=_0xc6ca06||_0x154f2d['isContent'](_0x1b087a);const _0x161155=_0x4e8087['mapper']['toViewElement'](_0x1b087a);if(_0x161155&&_0x161155['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x27cae9['type']&&(_0x154f2d['isBlock'](_0x1b087a)&&!_0x154f2d['isLimit'](_0x1b087a)&&(_0x1b087a['nextSibling']||_0x5c3e75['isAtEnd']?_0x38f385&&_0x38f385['parent']==_0x1b087a||(_0x38f385=_0x1b087a,_0x2ee608(_0x27cae9['previousPosition']),_0x53122c=!0x0):_0x2d0844=_0x2d0844||_0x27cae9['previousPosition']));}function _0x2ee608(_0x3d0fce){const _0x393be0=_0x4e8087['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x92b975}),_0x516a60=_0x4e8087['mapper']['toViewPosition'](_0x3d0fce);_0x32920b['data']['isSuggestion']&&_0x4e8087['writer']['addClass']('ck-suggestion-marker-'+_0x92b975+'-new',_0x393be0),_0x56c9c0['activeChange']==_0x32920b&&_0x4e8087['writer']['addClass']('ck-suggestion-marker--active',_0x393be0),_0x4e8087['writer']['insert'](_0x516a60,_0x393be0),_0x4e8087['mapper']['bindElementToMarker'](_0x393be0,_0x3c14c6['markerName']);}_0xc6ca06||_0x53122c||!_0x2d0844||_0x2ee608(_0x2d0844);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x4dffb0,_0x40e849,_0x46724f)=>{const _0x1ff1c8=_0x46724f['mapper']['markerNameToElements'](_0x40e849['markerName']);if(_0x1ff1c8){for(const _0x3716d5 of _0x1ff1c8)(_0x3716d5['hasClass']('ck-suggestion-marker-split')||_0x3716d5['hasClass']('ck-suggestion-marker-merge'))&&(_0x46724f['mapper']['unbindElementFromMarkerName'](_0x3716d5,_0x40e849['markerName']),_0x46724f['writer']['remove'](_0x3716d5));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3ef719,_0x43dec1,_0x52c7b7)=>{const _0x2195ae=_0x43dec1['markerName']['split'](':')[0x1],_0x14db0c=this['_getChangeFromId'](_0x2195ae);if(!_0x14db0c)return null;const _0x283b07='add'==_0x14db0c['type']?'split':'merge';if(_0x52c7b7['consumable']['test'](_0x43dec1['markerRange'],_0x3ef719['name']))for(const _0x312b1f of _0x43dec1['markerRange']['getItems']()){if(!_0x312b1f['is']('element','softBreak'))continue;const _0x882249=_0x52c7b7['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x283b07}),_0x1730ed=_0x52c7b7['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x312b1f));_0x14db0c['data']['isSuggestion']&&_0x52c7b7['writer']['addClass']('ck-suggestion-marker-'+_0x283b07+'-new',_0x882249),this['activeChange']==_0x14db0c&&_0x52c7b7['writer']['addClass']('ck-suggestion-marker--active',_0x882249),_0x52c7b7['writer']['insert'](_0x1730ed,_0x882249),_0x52c7b7['mapper']['bindElementToMarker'](_0x882249,_0x43dec1['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4c55c4=>{for(const _0x562d84 of this['editor']['model']['document']['getRootNames']()){const _0x248cd1=this['editor']['model']['document']['getRoot'](_0x562d84),_0x216aa6=this['editor']['editing']['view']['document']['getRoot'](_0x562d84);if(_0x216aa6){const _0x37a476=_0x248cd1['getAttribute']('revisionHistoryAttachChange');if(_0x4c55c4['removeAttribute']('data-change-id',_0x216aa6),_0x4c55c4['removeClass']('ck-revision-history-root-add',_0x216aa6),_0x4c55c4['removeClass']('ck-revision-history-root-remove',_0x216aa6),_0x4c55c4['removeClass']('ck-revision-history-root--active',_0x216aa6),_0x37a476){const _0x4eb502=this['_getChangeFromId'](_0x37a476);if(!_0x4eb502)return null;_0x4c55c4['setAttribute']('data-change-id',_0x37a476,_0x216aa6),_0x4c55c4['addClass']('ck-revision-history-root-'+_0x4eb502['type'],_0x216aa6),this['activeChange']==_0x4eb502&&_0x4c55c4['addClass']('ck-revision-history-root--active',_0x216aa6);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x42947d=>'revision-comment:'+_0x42947d,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x384671=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Pt(_0x384671['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x51aa73=>'revision-suggestion:'+_0x51aa73,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5c6f6a=>({'name':'suggestion:'+_0x5c6f6a,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x2c649c=>{const _0x2fbba4=_0x2c649c['markerName']['split'](':')[0x1];return'insertion'!=_0x2fbba4&&'deletion'!=_0x2fbba4?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2fbba4]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ut(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ut(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2255e3,_0x4b5972,_0x335278)=>{const _0x3b27d9=_0x335278['mapper']['markerNameToElements'](_0x4b5972['markerName']);if(_0x3b27d9){for(const _0x5dd5d7 of _0x3b27d9)_0x5dd5d7['is']('uiElement')&&(_0x335278['mapper']['unbindElementFromMarkerName'](_0x5dd5d7,_0x4b5972['markerName']),_0x335278['writer']['remove'](_0x5dd5d7));}},{'priority':'high'});}_getChangeFromId(_0x3b049c){return this['_changeIdToChange']['get'](_0x3b049c);}_getViewForChange(_0x6ff1cc){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Dt(this['editor']['locale'],_0x6ff1cc,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2fa484,_0x1dd862,_0x365769,_0x38b1cb)=>{_0x38b1cb&&this['_balloon']['remove'](_0x38b1cb),_0x365769&&(this['_balloon']['add']({'view':_0x365769,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5e0721=this['editor']['editing'],_0x8606af=this['_getChangeFromId'](_0x365769['changeId']);let _0x4fcbf5;if(_0x8606af['data']['isOnRoot']){const _0x54226b=_0x5e0721['view']['getDomRoot'](_0x8606af['rootName']);_0x4fcbf5=Array['from'](_0x54226b['getClientRects']());}else{const _0x1e3200=this['editor']['model']['markers']['get']('revision:'+_0x365769['changeId']);_0x4fcbf5=Array['from'](_0x5e0721['mapper']['markerNameToElements'](_0x1e3200['name']))['map'](_0x29c21c=>_0x5e0721['view']['domConverter']['mapViewToDom'](_0x29c21c))['map'](_0x4de16f=>Array['from'](_0x4de16f['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x4fcbf5['find'](_0x7aee9f=>_0x7aee9f['top']-0x3<=this['_activeViewTarget']['y']&&_0x7aee9f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x7aee9f['left']-0x3<=this['_activeViewTarget']['x']&&_0x7aee9f['right']+0x3>=this['_activeViewTarget']['x'])||_0x4fcbf5[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4801cb,_0xc5e903,_0x41f690,_0x39f261)=>{this['activeView']=_0x41f690?this['_getViewForChange'](_0x41f690):null,this['editor']['model']['change'](()=>{const _0x22fead=this['editor']['editing'];_0x39f261&&(_0x39f261['data']['isOnRoot']?_0x22fead['view']['change'](_0x56d667=>{_0x56d667['removeClass']('ck-revision-history-root--active',_0x22fead['view']['document']['getRoot'](_0x39f261['rootName']));}):_0x22fead['reconvertMarker']('revision:'+_0x39f261['id'])),_0x41f690&&(_0x41f690['data']['isOnRoot']?_0x22fead['view']['change'](_0x4f786f=>{_0x4f786f['addClass']('ck-revision-history-root--active',_0x22fead['view']['document']['getRoot'](_0x41f690['rootName']));}):_0x22fead['reconvertMarker']('revision:'+_0x41f690['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0xb9e0a6,_0x17f2f5)=>{if(this['activeChange'])return;const _0x13d337=this['_findChangeIdFromDomTarget'](_0x17f2f5['target']),_0x37069b=this['_changeIdToChange']['get'](_0x13d337);_0x37069b?(this['_activeViewTarget']={'x':_0x17f2f5['domEvent']['x'],'y':_0x17f2f5['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x37069b)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x1012b5,_0xf693e3)=>{const _0x3a9d74=this['_findChangeIdFromDomTarget'](_0xf693e3['target']),_0x100b5d=this['_changeIdToChange']['get'](_0x3a9d74);_0x100b5d?(this['_activeViewTarget']={'x':_0xf693e3['domEvent']['x'],'y':_0xf693e3['domEvent']['y']},_0x100b5d===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x100b5d):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x217494){do{const _0x1c15cb=_0x217494['getAttribute']('data-change-id');if(_0x1c15cb)return _0x1c15cb;_0x217494=_0x217494['parent'];}while(_0x217494);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5c04bb=>{for(const _0x408455 of this['editor']['model']['markers'])_0x5c04bb['removeMarker'](_0x408455);});}};function Pt(_0x415517){return _0x415517['split'](':')[0x1];}function Ut(_0xa63b3d,_0x32ea57){return(_0x29e365,_0xb8da15,_0x2e521d)=>{if(!_0x2e521d['consumable']['test'](_0xb8da15['markerRange'],_0x29e365['name']))return;const _0x3a4d22=_0xb8da15['markerRange']['getWalker'](),_0x1ba1c0=_0xb8da15['markerRange']['start'],_0x470753=_0xa63b3d['model']['schema'];let _0x144ee8=null,_0x389c8d=null,_0x2e0c87=!0x1,_0x5d31f9=!0x1;for(const _0x29bac8 of _0x3a4d22){const _0x48fcc4=_0x29bac8['item'];_0x2e0c87=_0x2e0c87||_0x470753['isContent'](_0x48fcc4);const _0xdab3e0=_0x2e521d['mapper']['toViewElement'](_0x48fcc4);if(_0xdab3e0&&_0xdab3e0['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x29bac8['type']&&(_0x470753['isBlock'](_0x48fcc4)&&!_0x470753['isLimit'](_0x48fcc4)&&(_0x48fcc4['nextSibling']||_0x1ba1c0['isAtEnd']?_0x144ee8&&_0x144ee8['parent']==_0x48fcc4||(_0x144ee8=_0x48fcc4,_0x2ac383(_0x29bac8['previousPosition']),_0x5d31f9=!0x0):_0x389c8d=_0x389c8d||_0x29bac8['previousPosition']));}function _0x2ac383(_0x1171fe){const _0x21fe8b=_0x2e521d['mapper']['toViewPosition'](_0x1171fe),_0x4b3fa3=_0x2e521d['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x32ea57});_0x2e521d['writer']['insert'](_0x21fe8b,_0x4b3fa3),_0x2e521d['mapper']['bindElementToMarker'](_0x4b3fa3,_0xb8da15['markerName']);}_0x2e0c87||_0x5d31f9||!_0x389c8d||_0x2ac383(_0x389c8d);};}var Lt=class extends _0x18a40f{constructor(_0x499b69){super(_0x499b69);const _0x2a6935=_0x499b69['plugins']['get'](Ht);this['affectsData']=!0x1,this['listenTo'](_0x2a6935,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2a6935,'change:isEnabled',()=>this['refresh']());}execute(){const _0x3cd89b=this['editor'],_0x1d207a=_0x3cd89b['plugins']['get'](Ht),_0x4f18bb=_0x1d207a['isReady']?_0x1d207a['diff']['newRevisionId']:null;_0x3cd89b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4f18bb);}['refresh'](){const {isReady:_0x2d54fe,isEnabled:_0x2412d3,repository:_0x2c90d3,diff:_0x36eec9}=this['editor']['plugins']['get'](Ht),_0x2c1b61=_0x36eec9&&_0x2c90d3['getLaterVisibleRevision'](_0x36eec9['newRevisionId']);this['isEnabled']=_0x2d54fe&&_0x2412d3&&Boolean(_0x2c1b61);}},Ft=class extends _0x18a40f{_step;constructor(_0x1ddf55,{direction:_0x56c405}){super(_0x1ddf55);const _0x100999=_0x1ddf55['plugins']['get'](Ht);this['affectsData']=!0x1,this['_step']='forward'===_0x56c405?0x1:-0x1,this['listenTo'](_0x100999,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x100999,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x100999,'change:activeChange',()=>this['refresh']());}execute(){const _0x13a05b=this['editor'],_0x20d9d3=_0x13a05b['plugins']['get'](Ht),{isNavigationMode:_0x2b3a2e,currentChangeNumber:_0x71f461}=_0x20d9d3;let _0x190a2c;if(_0x20d9d3['activeChange']=_0x2b3a2e?_0x20d9d3['diff']['changes']['get'](_0x71f461+this['_step']):_0x20d9d3['diff']['changes']['first'],_0x20d9d3['activeChange']['data']['isOnRoot'])_0x190a2c=_0x13a05b['editing']['view']['getDomRoot'](_0x20d9d3['activeChange']['rootName']);else{const _0x21f79c=_0x13a05b['model']['markers']['get']('revision:'+_0x20d9d3['activeChange']['id']);_0x190a2c=_0xf9a4c5(_0x13a05b['editing'],_0x21f79c);}_0x6eee20({'target':_0x190a2c,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x35e016,currentChangeNumber:_0x302681,numberOfChanges:_0x3cdd3c,isReady:_0x37410f,isEnabled:_0x1352c9}=this['editor']['plugins']['get'](Ht);this['isEnabled']=!!(_0x1352c9&&_0x37410f&&_0x3cdd3c)&&(!_0x35e016||(0x1===this['_step']?_0x302681<_0x3cdd3c-0x1:_0x302681>0x0));}},$t=class extends ut{constructor(_0x10d543){super(_0x10d543);const _0x1c2a42=this['bindTemplate'],_0xc25921=new _0x3cad3d(_0x10d543),_0x4ac650=new _0x3cad3d(_0x10d543);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',(_0x2f5818,_0x1309df)=>_0x2f5818&&_0x1309df>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1d48e0,_0x2fd678,_0x4fc9d0,_0x372e75)=>{if(!_0x1d48e0)return Rt(_0x10d543,'Loading...');if(!_0x4fc9d0)return Rt(_0x10d543,'No\x20changes');const _0x2a4572=Rt(_0x10d543,'NUMBER_OF_CHANGES',_0x4fc9d0);return _0x372e75?Rt(_0x10d543,'X_OF_Y_CHANGES',[_0x2fd678+0x1,_0x4fc9d0]):_0x2a4572;}),_0xc25921['set']({'label':Rt(_0x10d543,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x56cdc6}),_0x4ac650['set']({'label':Rt(_0x10d543,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3e7cc1}),_0xc25921['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4ac650['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xc25921['on']('execute',()=>this['fire']('execute','backward')),_0x4ac650['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',_0x1c2a42['if']('_isStatusLabelVisible','ck-hidden',_0x4b0180=>!_0x4b0180)]},'children':[{'text':_0x1c2a42['to']('isNavigationMode',_0x3ede3a=>_0x3ede3a?Rt(_0x10d543,'EDIT_X_OF_Y_REVISIONS')+':\x20':Rt(_0x10d543,'Total')+':\x20')}]},{'text':_0x1c2a42['to']('_statusText')}]},new ht(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xc25921,_0x4ac650]}]});}};const Bt='ck-editor__editable__loading-overlay';var jt=class extends _0x245d60{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x102258=this['editor']['editing']['view'];_0x102258['change'](_0x55322e=>{for(const _0x1feb1c of _0x102258['document']['roots'])_0x55322e['addClass'](Bt,_0x1feb1c);});}['hide'](){const _0x16c374=this['editor']['editing']['view'];_0x16c374['change'](_0x5c9a09=>{for(const _0x4dbab7 of _0x16c374['document']['roots'])_0x5c9a09['removeClass'](Bt,_0x4dbab7);});}},Gt=class extends _0x245d60{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht,jt];}init(){const _0x52da68=this['editor'],_0x2a0bf6=_0x52da68['plugins']['get'](Ht),_0x325e49=_0x52da68['plugins']['get'](jt);_0x52da68['ui']['componentFactory']['add']('exitToEditing',_0x42201f=>{const _0x62a32e=new _0x3cad3d(_0x42201f);return _0x62a32e['set']({'label':Rt(_0x42201f,'Back\x20to\x20editing'),'icon':_0x329eec,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x62a32e,'execute',()=>{_0x52da68['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x62a32e;}),_0x52da68['ui']['componentFactory']['add']('restoreRevision',_0x341635=>{const _0x549fdf=new _0x3cad3d(_0x341635);return _0x549fdf['set']({'label':Rt(_0x341635,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x549fdf['bind']('isEnabled')['to'](_0x52da68['commands']['get']('restoreRevision')),this['listenTo'](_0x549fdf,'execute',()=>_0x52da68['execute']('restoreRevision')),_0x549fdf;}),_0x52da68['ui']['componentFactory']['add']('changesNavigation',_0x266ab7=>{const _0x326859=new $t(_0x266ab7),_0x31b39b=_0x52da68['commands']['get']('showPreviousChange'),_0x4f9c10=_0x52da68['commands']['get']('showNextChange');return _0x326859['bind']('isBackwardNavigationEnabled')['to'](_0x31b39b,'isEnabled'),_0x326859['bind']('isForwardNavigationEnabled')['to'](_0x4f9c10,'isEnabled'),_0x326859['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2a0bf6),this['listenTo'](_0x326859,'execute',(_0xbce2f9,_0x523014)=>{_0x52da68['execute']('forward'===_0x523014?'showNextChange':'showPreviousChange');}),_0x326859;}),_0x325e49['show'](),_0x2a0bf6['on']('change:isReady',(_0x9f84ac,_0x136c7a,_0x5732dd)=>{_0x5732dd?_0x325e49['hide']():_0x325e49['show']();});}},Kt=class extends tt{['_resizeObserver']=null;constructor(_0x297f9e,_0x55cb44){super(_0x297f9e,_0x55cb44);const _0x353e5f=this['bindTemplate'];this['set']({'label':Rt(_0x297f9e,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=Rt(_0x297f9e,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x353e5f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1e29b3(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x1a7d4a=this['fieldView']['element'];this['_tooltipString']=_0x1a7d4a['scrollWidth']>_0x1a7d4a['clientWidth']&&_0x1a7d4a['value']||'';}},qt=class extends ut{constructor(_0x7289cd,_0x45e156,_0x4f1c68){super(_0x7289cd);const _0x1fb16b=new _0x203f2d();_0x1fb16b['set']({'content':_0x5991e0,'viewBox':'0\x200\x2011\x2010'});const _0x18a3d7=['ck','ck-revision-history-sidebar__revision-author'];_0x4f1c68&&_0x18a3d7['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2ef1ae=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':Rt(_0x7289cd,_0x4f1c68?'Revision\x20creator':'Revision\x20author')},'children':[_0x1fb16b,_0x45e156['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x18a3d7},'children':_0x2ef1ae});}};function Yt(_0x57378b,_0xc02f12){const _0x2af2b0=_0x57378b['bindTemplate'],_0x1ac2ef=_0x57378b['locale'],_0x3fd8bd=ft(_0x1ac2ef);_0x3fd8bd['panelPosition']='sw';const _0x18c3cb=function(_0x3923d6,_0x558f11){const _0x568368=function(_0x45cc47,_0x17a933){const _0x3526a0=_0x45cc47['locale'],_0x2f2db6={'Compare\x20against\x20selected':Rt(_0x3526a0,'Compare\x20against\x20selected'),'Name\x20this\x20revision':Rt(_0x3526a0,'Name\x20this\x20revision'),'Restore\x20this\x20revision':Rt(_0x3526a0,'Restore\x20this\x20revision')};return _0x17a933['map'](_0x316b40=>{const _0x2ead13=_0x2f2db6[_0x316b40['name']];return _0x2ead13&&_0x2ead13!==_0x316b40['name']&&(_0x316b40['name']=_0x2ead13),_0x316b40;});}(_0x3923d6,_0x558f11),_0x4accb0=new _0x1b928b();for(const _0x44fe1d of _0x568368){const _0x4d5fde={'type':'button','model':new lt({'label':_0x44fe1d['name'],'class':_0x44fe1d['class'],'withText':!0x0,'role':'menuitem','_action':_0x44fe1d['action']})};_0x4d5fde['model']['bind']('isEnabled')['to'](_0x3923d6,'isActionsDropdownOpen',_0xb2be18=>'function'!=typeof _0x44fe1d['isEnabled']||(!_0xb2be18||_0x44fe1d['isEnabled'](_0x3923d6))),_0x4accb0['add'](_0x4d5fde);}return _0x4accb0;}(_0x57378b,_0xc02f12);return _0x57378b['bind']('isActionsDropdownOpen')['to'](_0x3fd8bd,'isOpen'),_0x3fd8bd['buttonView']['set']({'label':Rt(_0x1ac2ef,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x9592c1}),_0x3fd8bd['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2af2b0['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2af2b0['to'](_0x4465ae=>_0x4465ae['stopPropagation']())}}),_0x3fd8bd['on']('execute',_0x59eda0=>{_0x57378b['isReady']&&'function'==typeof _0x59eda0['source']['_action']&&_0x59eda0['source']['_action'](_0x57378b);}),dt(_0x3fd8bd,_0x18c3cb,{'role':'menu'}),_0x3fd8bd['listenTo'](_0x57378b,'change:isActionsDropdownOpen',(_0x36a6e5,_0x21a250,_0x3b3b9b)=>{if(_0x3b3b9b)for(const _0xde3ccd of _0x3fd8bd['listView']['items']){const _0x255699=_0xde3ccd['children']['first'],_0x4a534b=_0xc02f12['find'](_0x4542a2=>_0x4542a2['action']===_0x255699['_action'])['isVisible'];_0xde3ccd['isVisible']=void 0x0===_0x4a534b||_0x4a534b(_0x57378b);}}),_0x3fd8bd;}const Jt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x8c2f21(ut);var Wt=class extends Jt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0xd54cbd,_0xfe73ba,_0x2a5254,_0x5d17ea,_0x2dc1ac=!0x1){super(_0xd54cbd);const _0x129e49=this['bindTemplate'],_0x521acb=function(_0x3bf2cd,_0xd3315a){const _0x7cbe3c=Array['from'](_0xd3315a['authors'])['filter'](_0x4aa2b0=>_0x4aa2b0!=_0xd3315a['creator']);return _0xd3315a['creator']&&_0x7cbe3c['unshift'](_0xd3315a['creator']),_0x7cbe3c['map'](_0x5179f6=>new qt(_0x3bf2cd,_0x5179f6,_0x5179f6==_0xd3315a['creator']));}(_0xd54cbd,_0xfe73ba);this['id']=_0xfe73ba['id'],this['_revision']=_0xfe73ba,this['_requireRevisionName']=_0x5d17ea,this['bind']('_isAiGenerated')['to'](_0xfe73ba,'attributes',_0x47b59e=>!(!_0x47b59e||!_0x47b59e['@ai'])),this['bind']('name','createdAt')['to'](_0xfe73ba),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x57a8a5=>{return _0x2d5ff7=_0xd54cbd['uiLanguage'],(_0x215f07=_0x57a8a5)['toLocaleDateString'](_0x2d5ff7,{'month':'long','day':'numeric'})+',\x20'+_0x215f07['toLocaleTimeString'](_0x2d5ff7,{'hour':'numeric','minute':'numeric'});var _0x2d5ff7,_0x215f07;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Kt(_0xd54cbd,vt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x1ed033=>_0x1ed033||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x445a8f,_0xe84ea6)=>_0x445a8f&&_0xe84ea6),this['revisionActionsView']=_0x2a5254&&_0x2a5254['length']?Yt(this,_0x2a5254):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x2dc1ac?this['_createAiPillView'](_0xd54cbd):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x129e49['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x129e49['if']('isEnabled','ck-disabled',_0x34be67=>!_0x34be67),_0x129e49['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x129e49['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x129e49['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':_0x129e49['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':_0x521acb}]},..._0x2dc1ac?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x129e49['if']('_isAiGenerated','ck-hidden',_0x10701b=>!_0x10701b)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x129e49['to'](_0x3a2a8e=>{_0x3a2a8e['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x21feaa){const _0x3b012d=new _0x2190ec(_0x21feaa);return _0x3b012d['set']({'icon':_0x32cbb7,'label':Rt(_0x21feaa,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':Rt(_0x21feaa,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','class':'ck-pill_ai'}),_0x3b012d['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x3b012d;}['render'](){super['render']();const _0x14065e=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x14065e,'change',()=>{this['_requireRevisionName']&&!_0x14065e['value']||this['fire']('setName',{'id':this['id'],'name':_0x14065e['value']}),_0x14065e['value']||(_0x14065e['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Xt(_0x1f5c67,_0x32ba87){const _0x285e87=_t['fromJSDate'](_0x1f5c67)['setLocale'](_0x32ba87),_0x5aaf42=_t['local'](),_0x143681=_0x5aaf42['minus']({'days':0x1})['startOf']('day');let _0x244eba,_0x594e56;return _0x285e87['hasSame'](_0x5aaf42,'day')?(_0x244eba=_0x285e87['startOf']('day')['toJSDate'](),_0x594e56=_0x285e87['toRelativeCalendar']()):_0x285e87['hasSame'](_0x143681,'day')?(_0x244eba=_0x143681['toJSDate'](),_0x594e56=_0x285e87['toRelativeCalendar']()):_0x285e87['hasSame'](_0x5aaf42,'week')?(_0x244eba=_0x285e87['startOf']('week')['toJSDate'](),_0x594e56=_0x285e87['weekdayLong']||''):_0x285e87['hasSame'](_0x5aaf42,'year')?(_0x244eba=_0x285e87['startOf']('month')['toJSDate'](),_0x594e56=_0x285e87['monthLong']||''):(_0x244eba=_0x285e87['startOf']('year')['toJSDate'](),_0x594e56=String(_0x285e87['year'])),{'startDate':_0x244eba,'localizedPeriodName':_0x594e56};}var Qt=class extends ut{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x2ff87d,_0x5d6ea9,_0xa81eec,_0x2d40fd,_0x150c29){super(_0x2ff87d);const _0x1e7ceb=Xt(_0x5d6ea9,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5d6ea9,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xa81eec,this['_requireRevisionName']=_0x2d40fd,this['_showAISource']=_0x150c29,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':_0x1e7ceb}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x5ab8cd){const _0x482541=new Wt(this['locale'],_0x5ab8cd,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x482541);}['removeRevision'](_0x4621e9){const _0x145476=this['revisionViews']['find'](_0x52bd5f=>_0x52bd5f['id']===_0x4621e9['id']);this['revisionViews']['remove'](_0x145476);}},zt=class extends ut{constructor(_0x948b86){super(_0x948b86);const _0x633906=new _0x203f2d();_0x633906['content']=_0x5bf3c2,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x633906,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[Rt(_0x948b86,'Revision\x20history')]}]});}},Zt=class extends ut{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x2f60ed,_0x16da22,_0x1efb58,_0x5f18fa,_0x34ac6f){super(_0x2f60ed);const _0x4fed8b=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x16da22,this['_revisionActions']=_0x1efb58,this['_requireRevisionName']=_0x5f18fa,this['_showAISource']=_0x34ac6f,this['on']('select',(_0x59afbc,_0x2f7d11)=>{this['fire']('revisionSelected',_0x2f7d11);}),this['on']('setName',(_0x244720,_0x495bbb)=>{this['fire']('revisionSetName',_0x495bbb);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new zt(_0x2f60ed),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4fed8b['if']('isEnabled','ck-disabled',_0x4b7c13=>!_0x4b7c13)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x4af579 of this['_revisions'])this['_addRevision'](_0x4af579);this['_revisions']['on']('add',(_0x29783f,_0x905608)=>{this['_addRevision'](_0x905608);}),this['_revisions']['on']('remove',(_0x47d337,_0x22f192)=>{this['_removeRevision'](_0x22f192);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x33de21=>_0x33de21['revisionViews']['map'](_0x16407a=>_0x16407a))['flat']();}selectRevision(_0x27663b){for(const _0x56eb4a of this['revisionViews'])_0x27663b&&_0x27663b['id']===_0x56eb4a['id']?_0x56eb4a['select']():_0x56eb4a['deselect']();}highlightRevisions(_0x57cfd9){for(const _0x279053 of this['revisionViews'])_0x57cfd9['some'](({id:_0x528576})=>_0x528576===_0x279053['id'])?_0x279053['highlight']():_0x279053['unhighlight']();}['_addRevision'](_0x393850){const _0x29a250=Xt(_0x393850['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1ca0da=this['_getTimePeriodViewByStartDate'](_0x29a250);_0x1ca0da||(_0x1ca0da=new Qt(this['locale'],_0x29a250,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x1ca0da)),_0x1ca0da['addRevision'](_0x393850);}['_removeRevision'](_0x5b1763){const _0x5c55bb=Xt(_0x5b1763['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x5c55bb)['removeRevision'](_0x5b1763);}_getTimePeriodViewByStartDate(_0x48bea2){return this['timePeriodViews']['find'](_0x578bcf=>_0x578bcf['startDate']['getTime']()===_0x48bea2['getTime']());}},ti=class RevisionsSidebar extends _0x245d60{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ii();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht];}constructor(
|
|
30
|
-
_0x57bb09(_0x50f53c);var oi=class extends ni{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x50093f,_0x39c59a){super(_0x39c59a),this['sourceElement']=_0x50093f,this['model']['document']['createRoot']();const _0x4140d4=new si(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ei(this,_0x4140d4);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x4be916,_0x35c2eb){const _0x35911b=new this(_0x4be916,_0x35c2eb);return await _0x35911b['initPlugins'](),await _0x35911b['ui']['init'](_0x4be916),await _0x35911b['data']['init'](_0x35911b['config']['get']('initialData')||''),_0x35911b['fire']('ready'),_0x35911b;}};const ri=['RevisionHistoryUI','RestrictedEditingMode'];var ai=class extends _0x5ca6f9{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3da13d){super(_0x3da13d),this['result']='end',_0x3da13d['editing']['view']['_overlayModeHint']='auto',_0x3da13d['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},hi=class extends _0x5ca6f9{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt,xt];}constructor(_0x440389){if(super(_0x440389),!this['editor']['config']['get']('revisionHistory'))throw new _0x5c9921('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xf9323e=>this['_showRevisionViewer']({..._0xf9323e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2d07e9=>this['_closeRevisionViewer'](_0x2d07e9)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x29e579=>this['_restoreRevision'](_0x29e579)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x522228){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x522228;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x932455){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x932455);}getRevision(_0x3179b8){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3179b8);}getRevisions(_0x945ebc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x945ebc||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x5ce967=this['editor'],_0x5c576d=_0x481f7a(_0x5ce967,ri),_0x2195a9=_0x5ce967['plugins']['get']('RevisionTracker'),_0x167afb=_0x5ce967['plugins']['get'](_0xe140c3)['users'];return _0x5c576d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5c576d['lazyRoots'],(_0x5c576d['plugins']['push'](ai,Ht,Gt,class RevisionViewerInit extends _0x5ca6f9{static get requires(){return[Ht,_0xe140c3];}init(){const _0x3fa89e=this['editor']['plugins']['get'](_0xe140c3);for(const _0x3290bb of _0x167afb)_0x3290bb['isAnonymous']||_0x3fa89e['getUser'](_0x3290bb['id'])||_0x3fa89e['addUser'](_0x3290bb);const _0x4110a6=_0x2195a9['repository']['getRevisions']();let _0xc4f93e=null;const _0x3dc206=this['editor']['plugins']['get']('RevisionViewer');if(_0x3dc206['adapter']=_0x2195a9['adapter'],_0x3dc206['bind']('isEnabled')['to'](_0x2195a9),_0x5ce967['plugins']['has']('CommentsRepository')){const _0x197d0f=_0x5ce967['plugins']['get']('CommentsRepository');_0x3dc206['_getVisibleCommentThreadIds']=()=>new Set(_0x197d0f['getCommentThreads']()['filter'](_0x2b3a9b=>!_0x2b3a9b['isResolved'])['map'](_0x10b729=>_0x10b729['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x5ce967,'isReadOnly',_0x53c71c=>!_0x53c71c);for(const _0x1dc230 of _0x4110a6){const _0x218b65=null===_0x1dc230['creator'];if(_0x218b65&&_0x1dc230['toVersion']===_0x1dc230['fromVersion'])continue;const _0x2f7877=_0x1dc230['toJSON']();_0x3dc206['addRevisionData'](_0x2f7877,(_0x1f7f02,_0x5e2fc3,_0xc28263)=>{if(_0x218b65){if(_0xc4f93e)_0xc4f93e['_update'](_0x1f7f02,_0x5e2fc3);else{if(!_0x5e2fc3){const _0xedce97=_0xc28263['toJSON']();_0xedce97['id']=_0xd43831(),_0x2195a9['saveRevision'](_0xedce97,_0xc28263['toVersion'])['then'](_0x226d5e=>{_0xc4f93e=_0x226d5e;});}}}else _0x1dc230['_update'](_0x1f7f02,_0x5e2fc3);});}}},ti),_0x5c576d);}['_enhanceShowRevisionViewerCallback'](){const _0x56819b=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2cdb73=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x2cdb73['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x52f1df=this['editor']['plugins']['get']('Dialog');_0x52f1df['isOpen']&&_0x52f1df['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x4a6ad9=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x13b701 of _0x4a6ad9)_0x13b701['class']=_0x13b701['class']?_0x13b701['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x34fa31=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x34fa31&&_0x34fa31['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3fe715=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3fe715&&_0x3fe715['setAttribute']('tabindex','-1');}}const _0x42d87e=this['_getRevisionViewerEditorConfig']();return _0x56819b(_0x42d87e)['then'](_0x2a7b20=>(this['_viewerEditor']=_0x2a7b20,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'),_0x2a7b20))['catch'](_0x27f0eb=>(console['error'](_0x27f0eb),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x518103=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 _0x4033b5=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1e9e15 of _0x4033b5)_0x1e9e15['class']='ck-tab-panel_disabled'===_0x1e9e15['class']?'':_0x1e9e15['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x227116=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x227116&&_0x227116['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x242322=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x242322&&_0x242322['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x518103(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4a942a=this['editor']['plugins']['get']('Annotations');_0x4a942a['refreshVisibility'](),_0x4a942a['refreshPositioning']();}});});}['_showRevisionViewer'](_0x2c944d){const _0x8b827c=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xaada79=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x21ab70=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return oi['create'](_0x21ab70,_0x2c944d)['then'](_0x3198d8=>(_0xaada79['style']['display']='block',_0x8b827c['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3198d8));}['_closeRevisionViewer'](_0x5c7a4a){const _0x5cc087=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5cc087['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x5c7a4a['destroy']();}async _restoreRevision(_0x47f45d){const _0x4a3381=this['editor'],_0x173661=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x9c199d=_0x4a3381['plugins']['get']('RevisionTracker'),_0x21796f=_0x4a3381['plugins']['get']('RevisionHistoryUtils'),_0x2e2342=_0x173661['repository']['getRevision'](_0x47f45d);let _0x4095a6,_0x2a9043,_0x11562b;try{await _0x21796f['loadRevisionData'](_0x2e2342,this['adapter']),_0x4095a6=_0x21796f['getRevisionDocumentData'](_0x2e2342),_0x2a9043=_0x21796f['getRevisionRootsAttributes'](_0x2e2342);}catch(_0x42baa3){return void console['error'](_0x42baa3);}_0x4a3381['model']['change'](_0x3fac6a=>{for(const _0x1b1668 of Array['from'](_0x4a3381['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x3fac6a['removeMarker'](_0x1b1668);}),_0x173661['isReady']=!0x1,_0x4a3381['model']['enqueueChange'](_0x56db47=>{_0x56db47['setSelection'](null),_0x56db47['removeSelectionAttribute'](_0x4a3381['model']['document']['selection']['getAttributeKeys']());const _0x31ce9d=Object['keys'](_0x4095a6);for(const _0x202cec of _0x4a3381['model']['document']['roots'])'$graveyard'!=_0x202cec['rootName']&&_0x202cec['isAttached']()&&!_0x31ce9d['includes'](_0x202cec['rootName'])&&_0x56db47['detachRoot'](_0x202cec);for(const _0x2af8d2 of _0x31ce9d){let _0x3b38da=_0x4a3381['model']['document']['getRoot'](_0x2af8d2);if(!_0x3b38da||!_0x3b38da['isAttached']()){const _0x324a7f=_0x2e2342['diffData']?.[_0x2af8d2]?.['rootElementName']||'$root';_0x3b38da=_0x56db47['addRoot'](_0x2af8d2,_0x324a7f);}const _0x1e063a=_0x2a9043[_0x2af8d2],_0x4acfa4=Object['keys'](_0x1e063a),_0x4aff9b=_0x4095a6[_0x2af8d2];for(const _0x542186 of _0x3b38da['getAttributeKeys']())_0x4acfa4['includes'](_0x542186)||_0x56db47['removeAttribute'](_0x542186,_0x3b38da);for(const _0x544f17 of _0x4acfa4)_0x56db47['setAttribute'](_0x544f17,_0x2a9043[_0x2af8d2][_0x544f17],_0x3b38da);_0x56db47['remove'](_0x56db47['createRangeIn'](_0x3b38da)),_0x56db47['insert'](_0x4a3381['data']['parse'](_0x4aff9b,_0x3b38da),_0x3b38da,0x0);}});const _0x5cebc4=Rt(_0x4a3381['locale'],'Restored');if(_0x2e2342['name'])_0x11562b=-0x1==_0x2e2342['name']['indexOf'](_0x5cebc4)?_0x5cebc4+':\x20'+_0x2e2342['name']:_0x2e2342['name'];else _0x11562b=_0x5cebc4+':\x20'+(_0x2e2342['createdAt']['toLocaleDateString'](_0x4a3381['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2e2342['createdAt']['toLocaleTimeString'](_0x4a3381['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x9c199d['saveRevision']({'name':_0x11562b}),_0x173661['isReady']=!0x0,_0x4a3381['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Lt as RestoreRevisionCommand,pt as Revision,hi as RevisionHistory,xt as RevisionHistoryUI,bt as RevisionHistoryUtils,kt as RevisionTracker,Ht as RevisionViewer,oi as RevisionViewerEditor,ai as RevisionViewerIntegration,jt as RevisionViewerLoadingOverlay,Gt as RevisionViewerUI,yt as RevisionsRepository,ti as RevisionsSidebar,Ft as ShowChangeCommand};
|
|
29
|
+
ii();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht];}constructor(_0xe97cf8){super(_0xe97cf8),this['_revisionViewer']=_0xe97cf8['plugins']['get'](Ht),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x1b898e=this['_revisionsRepository']['_revisions'],_0x572d86=this['_createRevisionActions'](),_0xe0244c=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Zt(this['editor']['locale'],_0x1b898e,_0x572d86,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',(_0x3a8724,_0xebebc3)=>{_0xebebc3['revisionViews']['on']('add',(_0x5aed90,_0x56b141)=>{_0x56b141['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)),_0xe0244c['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x30692b=this['_revisionsRepository']['getRevision'](0x0);if(_0x30692b){const _0x4f12e6=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x30692b['id']);this['_revisionViewer']['compare'](_0x30692b,_0x4f12e6);}}_handleRevisionSelected(_0x3f58dd,_0x57ff66){const _0x458c20=this['_revisionsRepository']['getRevision'](_0x57ff66['id']),_0x338b60=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x458c20['id']);this['_revisionViewer']['compare'](_0x458c20,_0x338b60);}_handleRevisionSetName(_0x22fa36,_0x4373b6){this['_revisionsRepository']['getRevision'](_0x4373b6['id'])['setName'](_0x4373b6['name']);}['_handleDiffChange'](_0x3d8d29,_0x239d2d,_0x4c5780){const _0x487dde=this['_revisionsRepository']['getRevisionsInDiff'](_0x4c5780);_0x487dde['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x487dde),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x487dde[0x0]));}_createRevisionActions(){const _0x15167b=this['editor'],_0x16a9c9=RevisionsSidebar['availableRevisionActions'],_0x21c24e=_0x15167b['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x21c24e['length'])return _0x21c24e['map'](_0x2b5d31=>{const _0x24d288='string'==typeof _0x2b5d31?Object['assign']({},_0x16a9c9[_0x2b5d31]):_0x2b5d31;return _0x24d288['action']=_0x24d288['action']['bind'](this,_0x15167b),_0x24d288['isVisible']&&(_0x24d288['isVisible']=_0x24d288['isVisible']['bind'](this,_0x15167b)),_0x24d288;});}};function ii(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0xb139d6},_0x3e6ab5)=>{const _0x3a5ce8=_0xb139d6['get'](Ht),_0x316fa2=_0x3a5ce8['repository'];let _0x1ab68c=_0x3a5ce8['diff']['newRevisionId'],_0x50e8a9=_0x3e6ab5['id'];_0x316fa2['getIndex'](_0x1ab68c)>_0x316fa2['getIndex'](_0x50e8a9)&&([_0x1ab68c,_0x50e8a9]=[_0x50e8a9,_0x1ab68c]),_0x3a5ce8['compare'](_0x1ab68c,_0x50e8a9);},'isVisible':({plugins:_0x376cd0},_0x750e9b)=>{const _0x5f226d=_0x376cd0['get'](Ht);return!(_0x5f226d['repository']['getRevisionsInDiff'](_0x5f226d['diff'])['length']>0x2)&&!_0x750e9b['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x5d6ce2,{id:_0x4ef251})=>{_0x5d6ce2['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4ef251);},'isVisible':({plugins:_0x13208a},_0x1402b9)=>!!_0x13208a['get'](Ht)['repository']['getLaterVisibleRevision'](_0x1402b9['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x561620},{id:_0x186919,revisionNameView:_0x5f4ee1})=>{const _0x4f0c3b=_0x561620['get'](Ht),_0x337223=_0x4f0c3b['repository']['getEarlierVisibleRevision'](_0x186919);_0x4f0c3b['compare'](_0x186919,_0x337223),_0x5f4ee1['focus'](),_0x5f4ee1['fieldView']['select']();}}};}var ei=class extends _0x4d2c08{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x2ac16b,_0x46aa10){super(_0x2ac16b),this['_view']=_0x46aa10,this['_toolbarConfig']=gt(_0x2ac16b['config']['get']('toolbar')),this['_elementReplacer']=new _0x178f0c();}get element(){return this['view']['element'];}init(_0x3d15ee){const _0x41aa9e=this['editor'],_0x559925=this['view'],_0x238824=_0x41aa9e['editing']['view'],_0x288752=_0x559925['editable'];_0x288752['name']=_0x238824['document']['getRoot']()['rootName'],_0x559925['render']();const _0x1461a4=_0x288752['element'];this['setEditableElement'](_0x288752['name'],_0x1461a4),_0x559925['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x238824['attachDomRoot'](_0x1461a4),this['_elementReplacer']['replace'](_0x3d15ee,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x43d814=this['view'],_0x10a7d3=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x10a7d3['detachDomRoot'](_0x43d814['editable']['name']),_0x43d814['destroy']();}_initToolbar(){const _0x3307b3=this['view'];_0x3307b3['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3307b3['stickyPanel']['limiterElement']=_0x3307b3['element'],_0x3307b3['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x57ac13})=>_0x57ac13),_0x3307b3['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3307b3['toolbar']);}},si=class extends _0xd98ee5{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x2d4131,_0x1426ee,_0x5cc365={}){super(_0x2d4131),this['stickyPanel']=new at(_0x2d4131),this['toolbar']=new ct(_0x2d4131,{'shouldGroupWhenFull':_0x5cc365['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x356c60(_0x2d4131,_0x1426ee);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const ni=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x34e3e6(_0xb27820);var oi=class extends ni{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2edc15,_0x1f56f9){super(_0x1f56f9),this['sourceElement']=_0x2edc15,this['model']['document']['createRoot']();const _0x3df2ce=new si(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ei(this,_0x3df2ce);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x499a0a,_0x35fe56){const _0x208e27=new this(_0x499a0a,_0x35fe56);return await _0x208e27['initPlugins'](),await _0x208e27['ui']['init'](_0x499a0a),await _0x208e27['data']['init'](_0x208e27['config']['get']('initialData')||''),_0x208e27['fire']('ready'),_0x208e27;}};const ri=['RevisionHistoryUI','RestrictedEditingMode'];var ai=class extends _0x245d60{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe85e10){super(_0xe85e10),this['result']='end',_0xe85e10['editing']['view']['_overlayModeHint']='auto',_0xe85e10['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},hi=class extends _0x245d60{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt,xt];}constructor(_0x247f29){if(super(_0x247f29),!this['editor']['config']['get']('revisionHistory'))throw new _0xf2df99('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4aa434=>this['_showRevisionViewer']({..._0x4aa434,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1d81d6=>this['_closeRevisionViewer'](_0x1d81d6)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x32ed3a=>this['_restoreRevision'](_0x32ed3a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x3dff0d){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3dff0d;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x175fe2){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x175fe2);}getRevision(_0xac8f6f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xac8f6f);}getRevisions(_0x4681dd){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4681dd||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x468955=this['editor'],_0x7d6e42=_0x2d7eba(_0x468955,ri),_0x351163=_0x468955['plugins']['get']('RevisionTracker'),_0x84f72e=_0x468955['plugins']['get'](_0x124f7c)['users'];return _0x7d6e42['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x7d6e42['lazyRoots'],(_0x7d6e42['plugins']['push'](ai,Ht,Gt,class RevisionViewerInit extends _0x245d60{static get requires(){return[Ht,_0x124f7c];}init(){const _0x134b22=this['editor']['plugins']['get'](_0x124f7c);for(const _0x3caebc of _0x84f72e)_0x3caebc['isAnonymous']||_0x134b22['getUser'](_0x3caebc['id'])||_0x134b22['addUser'](_0x3caebc);const _0x20708b=_0x351163['repository']['getRevisions']();let _0x3c1d40=null;const _0x26e9e0=this['editor']['plugins']['get']('RevisionViewer');if(_0x26e9e0['adapter']=_0x351163['adapter'],_0x26e9e0['bind']('isEnabled')['to'](_0x351163),_0x468955['plugins']['has']('CommentsRepository')){const _0x1161ac=_0x468955['plugins']['get']('CommentsRepository');_0x26e9e0['_getVisibleCommentThreadIds']=()=>new Set(_0x1161ac['getCommentThreads']()['filter'](_0xca8a70=>!_0xca8a70['isResolved'])['map'](_0xe9cc12=>_0xe9cc12['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x468955,'isReadOnly',_0x3dcd6a=>!_0x3dcd6a);for(const _0x175562 of _0x20708b){const _0x122f78=null===_0x175562['creator'];if(_0x122f78&&_0x175562['toVersion']===_0x175562['fromVersion'])continue;const _0x9de72a=_0x175562['toJSON']();_0x26e9e0['addRevisionData'](_0x9de72a,(_0x5cb904,_0x4fe658,_0x5534a5)=>{if(_0x122f78){if(_0x3c1d40)_0x3c1d40['_update'](_0x5cb904,_0x4fe658);else{if(!_0x4fe658){const _0x227c39=_0x5534a5['toJSON']();_0x227c39['id']=_0x3a243d(),_0x351163['saveRevision'](_0x227c39,_0x5534a5['toVersion'])['then'](_0xba4afa=>{_0x3c1d40=_0xba4afa;});}}}else _0x175562['_update'](_0x5cb904,_0x4fe658);});}}},ti),_0x7d6e42);}['_enhanceShowRevisionViewerCallback'](){const _0x521832=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4cbf55=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4cbf55['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5c8413=this['editor']['plugins']['get']('Dialog');_0x5c8413['isOpen']&&_0x5c8413['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xc63fb0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x158687 of _0xc63fb0)_0x158687['class']=_0x158687['class']?_0x158687['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x484574=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x484574&&_0x484574['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x23582d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x23582d&&_0x23582d['setAttribute']('tabindex','-1');}}const _0x50e061=this['_getRevisionViewerEditorConfig']();return _0x521832(_0x50e061)['then'](_0x2502d3=>(this['_viewerEditor']=_0x2502d3,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'),_0x2502d3))['catch'](_0x1a46fb=>(console['error'](_0x1a46fb),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x10d584=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 _0x34b9c1=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3ab3f8 of _0x34b9c1)_0x3ab3f8['class']='ck-tab-panel_disabled'===_0x3ab3f8['class']?'':_0x3ab3f8['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x22bc69=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x22bc69&&_0x22bc69['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x7d90d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x7d90d&&_0x7d90d['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x10d584(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4ea41a=this['editor']['plugins']['get']('Annotations');_0x4ea41a['refreshVisibility'](),_0x4ea41a['refreshPositioning']();}});});}['_showRevisionViewer'](_0xf29431){const _0x7bd561=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x165fc7=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1602c8=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return oi['create'](_0x1602c8,_0xf29431)['then'](_0x2019d2=>(_0x165fc7['style']['display']='block',_0x7bd561['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2019d2));}['_closeRevisionViewer'](_0x2b911b){const _0x277181=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x277181['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x2b911b['destroy']();}async _restoreRevision(_0x1c3567){const _0x32aeba=this['editor'],_0x368aa2=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x158f4e=_0x32aeba['plugins']['get']('RevisionTracker'),_0x40f132=_0x32aeba['plugins']['get']('RevisionHistoryUtils'),_0x18bb3a=_0x368aa2['repository']['getRevision'](_0x1c3567);let _0x2629e5,_0x3755e9,_0x4c472c;try{await _0x40f132['loadRevisionData'](_0x18bb3a,this['adapter']),_0x2629e5=_0x40f132['getRevisionDocumentData'](_0x18bb3a),_0x3755e9=_0x40f132['getRevisionRootsAttributes'](_0x18bb3a);}catch(_0x266925){return void console['error'](_0x266925);}_0x32aeba['model']['change'](_0x323bce=>{for(const _0x1fecb7 of Array['from'](_0x32aeba['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x323bce['removeMarker'](_0x1fecb7);}),_0x368aa2['isReady']=!0x1,_0x32aeba['model']['enqueueChange'](_0x38b243=>{_0x38b243['setSelection'](null),_0x38b243['removeSelectionAttribute'](_0x32aeba['model']['document']['selection']['getAttributeKeys']());const _0x398249=Object['keys'](_0x2629e5);for(const _0x357703 of _0x32aeba['model']['document']['roots'])'$graveyard'!=_0x357703['rootName']&&_0x357703['isAttached']()&&!_0x398249['includes'](_0x357703['rootName'])&&_0x38b243['detachRoot'](_0x357703);for(const _0x182fc of _0x398249){let _0x59c387=_0x32aeba['model']['document']['getRoot'](_0x182fc);if(!_0x59c387||!_0x59c387['isAttached']()){const _0x19ab08=_0x18bb3a['diffData']?.[_0x182fc]?.['rootElementName']||'$root';_0x59c387=_0x38b243['addRoot'](_0x182fc,_0x19ab08);}const _0x2ad446=_0x3755e9[_0x182fc],_0x481a74=Object['keys'](_0x2ad446),_0x225646=_0x2629e5[_0x182fc];for(const _0x4dc595 of _0x59c387['getAttributeKeys']())_0x481a74['includes'](_0x4dc595)||_0x38b243['removeAttribute'](_0x4dc595,_0x59c387);for(const _0x132e14 of _0x481a74)_0x38b243['setAttribute'](_0x132e14,_0x3755e9[_0x182fc][_0x132e14],_0x59c387);_0x38b243['remove'](_0x38b243['createRangeIn'](_0x59c387)),_0x38b243['insert'](_0x32aeba['data']['parse'](_0x225646,_0x59c387),_0x59c387,0x0);}});const _0x4c5797=Rt(_0x32aeba['locale'],'Restored');if(_0x18bb3a['name'])_0x4c472c=-0x1==_0x18bb3a['name']['indexOf'](_0x4c5797)?_0x4c5797+':\x20'+_0x18bb3a['name']:_0x18bb3a['name'];else _0x4c472c=_0x4c5797+':\x20'+(_0x18bb3a['createdAt']['toLocaleDateString'](_0x32aeba['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x18bb3a['createdAt']['toLocaleTimeString'](_0x32aeba['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x158f4e['saveRevision']({'name':_0x4c472c}),_0x368aa2['isReady']=!0x0,_0x32aeba['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Lt as RestoreRevisionCommand,pt as Revision,hi as RevisionHistory,xt as RevisionHistoryUI,bt as RevisionHistoryUtils,kt as RevisionTracker,Ht as RevisionViewer,oi as RevisionViewerEditor,ai as RevisionViewerIntegration,jt as RevisionViewerLoadingOverlay,Gt as RevisionViewerUI,yt as RevisionsRepository,ti as RevisionsSidebar,Ft as ShowChangeCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-revision-history",
|
|
3
|
-
"version": "48.5.0-alpha.
|
|
3
|
+
"version": "48.5.0-alpha.3",
|
|
4
4
|
"description": "Document revision history feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ckeditor/ckeditor5-autosave": "48.5.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-collaboration-core": "48.5.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-comments": "48.5.0-alpha.
|
|
40
|
-
"@ckeditor/ckeditor5-core": "48.5.0-alpha.
|
|
41
|
-
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.
|
|
42
|
-
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.
|
|
43
|
-
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.
|
|
44
|
-
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.
|
|
45
|
-
"@ckeditor/ckeditor5-widget": "48.5.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-autosave": "48.5.0-alpha.3",
|
|
38
|
+
"@ckeditor/ckeditor5-collaboration-core": "48.5.0-alpha.3",
|
|
39
|
+
"@ckeditor/ckeditor5-comments": "48.5.0-alpha.3",
|
|
40
|
+
"@ckeditor/ckeditor5-core": "48.5.0-alpha.3",
|
|
41
|
+
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.3",
|
|
42
|
+
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.3",
|
|
43
|
+
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.3",
|
|
44
|
+
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.3",
|
|
45
|
+
"@ckeditor/ckeditor5-widget": "48.5.0-alpha.3",
|
|
46
46
|
"@types/luxon": "3.6.2",
|
|
47
47
|
"es-toolkit": "1.45.1",
|
|
48
48
|
"luxon": "3.6.1"
|