@ckeditor/ckeditor5-revision-history 49.0.0-alpha.6 → 49.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0x29cb2f();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x14ce12){super(),this['id']=_0x14ce12['id']||_0x2e389d(),this['creator']=_0x14ce12['creator']||null,this['authors']=_0x14ce12['authors']||[],this['diffData']=_0x14ce12['diffData']||null,this['toVersion']=_0x14ce12['toVersion']||0x0,this['fromVersion']=_0x14ce12['fromVersion']||0x0,this['set']('name',_0x14ce12['name']||''),this['set']('createdAt',_0x14ce12['createdAt']||new Date()),this['set']('attributes',_0x14ce12['attributes']||{});}setName(_0x1d6c25){this['_update']({'name':_0x1d6c25});}setAttribute(_0x283dc6,_0x24695f){const _0x80b67c=_0x2fea7c(this['attributes']);_0x3540ab(_0x80b67c,_0x283dc6,_0x24695f),this['_update']({'attributes':_0x80b67c});}removeAttribute(_0x2cccda){const _0x40945f=_0x2fea7c(this['attributes']);_0x59f39b(_0x40945f,_0x2cccda),this['_update']({'attributes':_0x40945f});}_update(_0x160c0c,_0x3d59f9=!0x1){let _0x307661=!0x1;const _0x104852={'id':this['id']};for(const _0x4eaa3a of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x2c0030=_0x160c0c[_0x4eaa3a];void 0x0!==_0x2c0030&&_0x2c0030!==this[_0x4eaa3a]&&(this[_0x4eaa3a]=_0x2c0030,_0x104852[_0x4eaa3a]=_0x2c0030,_0x307661=!0x0);}_0x307661&&(_0x104852['authors']&&(_0x104852['authorsIds']=_0x104852['authors']['map'](_0x233c29=>_0x233c29['id']),delete _0x104852['authors']),this['fire']('_update',_0x104852,_0x3d59f9));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x307e40=>_0x307e40['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x34e937{['_revisions'];static get requires(){return[_0x3d100c];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x152b5a){super(_0x152b5a),this['_revisions']=new _0x54969b();}afterInit(){!async function(_0x79fcfa){const _0x3d3b02='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x18986c=0xeb829,_0x17242d=0x797a0,_0x139001={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x484aab(_0x4728a9){const _0x404f0a=new window['Promise'](_0x3b00fe=>{_0x4728a9['once']('ready',_0x3b00fe);}),_0x34fdcf=window['Date']['now'](),_0x370058=_0x4728a9['config']['get']('licenseKey');async function _0x8dca6d(){let _0x2fed06,_0x27d857=null,_0x29d37d=null;try{return'GPL'==_0x370058?'NotAllowed':(_0x2fed06=_0x16f850(),_0x2fed06?(_0x2fed06['usageEndpoint']&&(_0x29d37d=_0x33c72f(_0x2fed06['usageEndpoint'],_0x2fed06['jti'])),await _0x2e4a8a()?_0x2075d8()?_0x263c8f()?'Expired':_0x428275()?('evaluation'==_0x2fed06['licenseType']&&(_0x27d857=_0x401b3f('EvaluationLimit')),await _0x5ac510()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x263c8f(){const _0x55725f=['evaluation','trial']['includes'](_0x2fed06['licenseType'])?_0x34fdcf/0x3e8:0xe10*_0x17242d;return _0x2fed06['exp']<_0x55725f;}function _0x2075d8(){const _0x40da6b=_0x2fed06['features'];if(!_0x40da6b)return!0x1;if(_0x40da6b['includes']('*'))return!0x0;if(_0x40da6b['includes']('RH'))return!0x0;if(_0x40da6b['includes']('RRH')){if(_0x4cd6fc())return!0x0;if(_0x568793()||_0x1c4005())return!0x0;}return!0x1;}function _0x428275(){const _0x277e8b=_0x2fed06['licensedHosts'];if(!_0x277e8b||0x0==_0x277e8b['length'])return!0x0;const {hostname:_0x38d12f}=new URL(window['location']['href']);if(_0x277e8b['includes'](_0x38d12f))return!0x0;const _0x1afc78=_0x38d12f['split']('.');return _0x277e8b['filter'](_0x316460=>_0x316460['includes']('*'))['map'](_0x12d4c9=>_0x12d4c9['split']('.'))['filter'](_0x3e6b6f=>_0x3e6b6f['length']<=_0x1afc78['length'])['map'](_0x51fafd=>Array(_0x1afc78['length']-_0x51fafd['length'])['fill']('*'===_0x51fafd[0x0]?'*':'')['concat'](_0x51fafd))['some'](_0x474b8f=>_0x1afc78['every']((_0x3d5503,_0x18a4e7)=>_0x474b8f[_0x18a4e7]===_0x3d5503||'*'===_0x474b8f[_0x18a4e7]));}function _0x5ac510(){return _0x27d857&&_0x29d37d?new window['Promise']((_0x3f913c,_0x710969)=>{_0x27d857['then'](_0x3f913c,_0x710969),_0x29d37d['then'](_0xb276cd=>{'Valid'!=_0xb276cd&&_0x3f913c(_0xb276cd);},_0x710969);}):_0x27d857||_0x29d37d||'Valid';}}function _0x33c72f(_0x1a46e3,_0x5009cd){return new window['Promise'](_0x1b9871=>{if(_0x47332a())return _0x1b9871('Valid');_0x5aedba(),_0x4728a9['decorate']('_sendUsageRequest');let _0x266a7c=!0x1;const _0x240662=_0x2e389d();function _0x22dd36(_0x1f0993){return!!_0x1f0993&&('object'==typeof _0x1f0993||'function'==typeof _0x1f0993)&&'function'==typeof _0x1f0993['then']&&'function'==typeof _0x1f0993['catch'];}function _0x3bbce7(_0x28b67e){_0x4bb0fd(_0x28b67e)['then'](_0x50df29=>_0x50df29&&'ok'==_0x50df29['status']?_0x15cbad(_0x3b4882(_0x240662+_0x5009cd))!=_0x50df29['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x33ac55=>(_0x231d7e(),_0x33ac55),()=>{const _0x19aa7e=_0x50d009();return null==_0x19aa7e?(_0x231d7e(),'Valid'):_0x34fdcf-_0x19aa7e>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1b9871)['catch'](()=>{_0x1b9871('UsageLimit');});const _0x15ea04=0x36ee80;function _0x231d7e(){const _0x514c56='llct-'+_0x15cbad(_0x3b4882(_0x1a46e3)),_0x4c4e5e=_0x488f5e(_0x15cbad(window['Math']['ceil'](_0x34fdcf/_0x15ea04)));window['localStorage']['setItem'](_0x514c56,_0x4c4e5e);}function _0x50d009(){const _0x5a6d46='llct-'+_0x15cbad(_0x3b4882(_0x1a46e3)),_0x573164=window['localStorage']['getItem'](_0x5a6d46);return _0x573164?window['parseInt'](_0x488f5e(_0x573164),0x10)*_0x15ea04:null;}function _0x4bb0fd(_0x16651e){return new window['Promise']((_0x1dd232,_0x418978)=>{_0x16651e['then'](_0x1dd232,_0x418978),window['setTimeout'](_0x418978,0x1d4c0);});}}_0x4728a9['on']('_sendUsageRequest',(_0x24a0a1,_0x2af1de)=>{if(_0x2af1de[0x0]!=_0x1a46e3)return _0x1b9871('UsageLimit');_0x2af1de[0x1]={..._0x2af1de[0x1],'requestId':_0x240662};},{'priority':'high'}),_0x4728a9['on']('_sendUsageRequest',_0x282822=>{_0x22dd36(_0x282822['return'])&&(_0x266a7c=!0x0,_0x3bbce7(_0x282822['return']));},{'priority':'low'}),_0x404f0a['then'](()=>{_0x266a7c||_0x1b9871('UsageLimit');});});function _0x47332a(){return'auto'==_0x4728a9['editing']['view']['_overlayModeHint'];}function _0x5aedba(){_0x4728a9['editing']['view']['_overlayModeHint']='auto';}}function _0x401b3f(_0x5120db){const _0x54dfc3=[new window['Promise'](_0xf073e=>setTimeout(_0xf073e,0x93ecc)),_0x404f0a['then'](()=>new window['Promise'](_0xb804b8=>{const _0x575d4f=0x7,_0x4f38ac=_0x79fcfa['_revisions'];function _0x2ef18c(){_0x4f38ac['length']>=_0x575d4f&&_0xb804b8();}_0x2ef18c(),_0x4f38ac['on']('add',_0x2ef18c);})),new window['Promise'](_0x2127e5=>{function _0xdcb20d(){for(const _0x382db6 in window)if(window['Number']['isNaN'](window['Number'](_0x382db6))&&window[_0x382db6]==_0x18986c)return _0x2127e5();'destroyed'!=_0x4728a9['state']&&window['setTimeout'](_0xdcb20d,0x1388);}_0x51d6ec('RevisionViewer')&&_0xdcb20d();})];return window['Promise']['race'](_0x54dfc3)['then'](()=>_0x5120db);}async function _0x1b0a6e(){if(await _0x404f0a,_0x51d6ec('RevisionViewer')){const _0x455271=_0x79fcfa['getRevision'](0x0),_0x439ff6=_0x79fcfa['getEarlierVisibleRevision'](_0x455271['id']),_0x3842a2=_0x47efb8('RevisionViewer');return await _0x3842a2['compare'](_0x455271['id'],_0x439ff6?_0x439ff6['id']:null,!0x0),_0x3842a2['unbind']('isEnabled'),_0x3842a2['isEnabled']=!0x1,_0x3842a2['compare']=_0x4e94d3,void(_0x3842a2['_getDiff']=_0x4e94d3);}if(_0x51d6ec('RevisionTracker')){const _0x56ed29=_0x47efb8('RevisionTracker');_0x56ed29['unbind']('isEnabled'),_0x56ed29['isEnabled']=!0x1,_0x56ed29['update']=_0x4e94d3,_0x56ed29['saveRevision']=_0x4e94d3;}_0x4728a9['model']['change']=_0x4e94d3,_0x4728a9['model']['enqueueChange']=_0x4e94d3,_0x4728a9['enableReadOnlyMode']('model');}function _0x4cd6fc(){return _0x51d6ec('WebSocketGateway')&&'connected'==_0x47efb8('WebSocketGateway')['state'];}function _0x568793(){return _0x51d6ec('RevisionViewerIntegration');}function _0x1c4005(){return _0x51d6ec('TrackChangesDataGetter');}function _0x1b5bac(_0x115751){const _0x39da6c=_0x6bc7d4();_0x4728a9[_0x39da6c]='revisionHistoryLicenseKey'+_0x115751,_0x115751['endsWith']('Limit')&&(window[_0x6bc7d4()]=_0x18986c),'Valid'!=_0x115751&&_0x1b0a6e();}function _0x6bc7d4(){const _0x957a2d=window['String'](window['performance']['now']())['replace']('.','');let _0x43590f='N';for(let _0x38e204=0x0;_0x38e204<_0x957a2d['length'];_0x38e204+=0x2){let _0x16d316=window['parseInt'](_0x957a2d['substring'](_0x38e204,_0x38e204+0x2));_0x16d316>=0x3e&&(_0x16d316-=0x3e),_0x43590f+=_0x3d3b02[_0x16d316];}return _0x43590f;}function _0x16f850(){const _0x954401=_0x370058['split']('.');if(0x3!=_0x954401['length'])return null;return _0x1fe1e9(_0x954401[0x1]);function _0x1fe1e9(_0x54e5da){const _0x3aeb14=_0x491408(_0x54e5da);return _0x3aeb14&&_0x218c11()?_0x3aeb14:null;function _0x218c11(){const _0x6c7356=_0x3aeb14['jti'],_0x309ab1=window['parseInt'](_0x6c7356['substring'](_0x6c7356['length']-0x8),0x10),_0x1488b8={..._0x3aeb14,'jti':_0x6c7356['substring'](0x0,_0x6c7356['length']-0x8)};return delete _0x1488b8['vc'],_0x3b4882(_0x1488b8)==_0x309ab1;}}}async function _0x2e4a8a(){let _0x5c4c5f=!0x0;try{const [_0x384eb7,_0x2d67c7,_0x2577b8]=_0x370058['split']('.');return _0x3831be(_0x384eb7),await _0x4ae7c1(_0x384eb7,_0x2d67c7,_0x2577b8),_0x5c4c5f;}catch{return!0x1;}function _0x3831be(_0x5f074d){const _0x4f1eea=_0x491408(_0x5f074d);_0x4f1eea&&'ES256'==_0x4f1eea['alg']||(_0x5c4c5f=!0x1);}async function _0x4ae7c1(_0x40185e,_0x15f5ca,_0x4506af){const _0xf568cb=window['Uint8Array']['from'](_0x8597a1(_0x4506af),_0x3a0204=>_0x3a0204['charCodeAt'](0x0)),_0x346dd8=new window['TextEncoder']()['encode'](_0x40185e+'.'+_0x15f5ca),_0x460f96=window['crypto']['subtle'];if(!_0x460f96)return;const _0x326f01=await _0x460f96['importKey']('jwk',_0x139001,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x460f96['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x326f01,_0xf568cb,_0x346dd8)||(_0x5c4c5f=!0x1);}}function _0x491408(_0x5711c2){return _0x5711c2['startsWith']('ey')?JSON['parse'](_0x8597a1(_0x5711c2)):null;}function _0x8597a1(_0x501349){return window['atob'](_0x501349['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3b4882(_0x142a70){let _0x59082e=0x1505;function _0x26720a(_0x445aca){for(let _0x2f56d8=0x0;_0x2f56d8<_0x445aca['length'];_0x2f56d8++){const _0xaf89f7=_0x445aca['charCodeAt'](_0x2f56d8);_0x59082e=(_0x59082e<<0x5)+_0x59082e+_0xaf89f7,_0x59082e&=_0x59082e;}}function _0xbc354(_0x8da5f2){Array['isArray'](_0x8da5f2)?_0x8da5f2['forEach'](_0xbc354):_0x8da5f2&&'object'==typeof _0x8da5f2?Object['entries'](_0x8da5f2)['sort']()['forEach'](([_0x483cfe,_0x386fe7])=>{_0x26720a(_0x483cfe),_0xbc354(_0x386fe7);}):_0x26720a(window['String'](_0x8da5f2));}return _0xbc354(_0x142a70),_0x59082e>>>0x0;}function _0x15cbad(_0x3cdc8b){return _0x3cdc8b['toString'](0x10)['padStart'](0x8,'0');}function _0x488f5e(_0x476636){return _0x476636['split']('')['reverse']()['join']('');}function _0x51d6ec(_0x2a64ea){return _0x4728a9['plugins']['has'](_0x2a64ea);}function _0x47efb8(_0x307d5c){return _0x4728a9['plugins']['get'](_0x307d5c);}function _0x4e94d3(){}_0x1b5bac(await _0x8dca6d());}_0x484aab(_0x79fcfa['editor']);}(this);}createRevision(_0x6cff09){const _0x5bb2b2=this['editor']['plugins']['get']('Users');return new yt({'id':_0x6cff09['id'],'name':_0x6cff09['name'],'creator':_0x6cff09['creatorId']?_0x5bb2b2['getUser'](_0x6cff09['creatorId']):null,'diffData':_0x6cff09['diffData']||_0x6cff09['data'],'authors':_0x6cff09['authorsIds']['map'](_0x287904=>_0x5bb2b2['getUser'](_0x287904)),'createdAt':new Date(_0x6cff09['createdAt']),'attributes':_0x6cff09['attributes'],'fromVersion':_0x6cff09['fromVersion'],'toVersion':_0x6cff09['toVersion']});}['addRevision'](_0x177d87,_0x12baa6=0x0){this['_revisions']['add'](_0x177d87,_0x12baa6);}getRevision(_0x575092){return this['_revisions']['get'](_0x575092);}getRevisions(_0x183c8f={'toJSON':!0x1}){const _0x1689cb=Array['from'](this['_revisions']);return _0x1689cb['reverse'](),_0x183c8f['toJSON']?_0x1689cb['map'](_0x1a4cf0=>_0x1a4cf0['toJSON']()):_0x1689cb;}getIndex(_0x3019bf){return this['_revisions']['getIndex'](_0x3019bf);}getEarlierVisibleRevision(_0x4f60d2){const [,_0x278fe7]=this['getRevisionsIterator'](_0x4f60d2,{'direction':'earlier'});return _0x278fe7;}getLaterVisibleRevision(_0x5ad274){const [,_0x5099dd]=this['getRevisionsIterator'](_0x5ad274,{'direction':'later'});return _0x5099dd;}getRevisionsInDiff(_0x2e1294){const _0x3873db=[];for(const _0x4dc887 of this['getRevisionsIterator'](_0x2e1294['newRevisionId']))if(_0x3873db['push'](_0x4dc887),_0x4dc887['id']===_0x2e1294['oldRevisionId'])break;return _0x3873db;}*getRevisionsIterator(_0x3a2e68,{direction:_0x22c1e9='earlier',filter:_0x4917f0=()=>!0x0}={}){const _0x4915c8='earlier'===_0x22c1e9?0x1:-0x1;let _0x476f88=this['_revisions']['get'](_0x3a2e68),_0x1fe14a=this['getIndex'](_0x476f88);for(yield _0x476f88;_0x476f88;){if(_0x1fe14a+=_0x4915c8,_0x476f88=this['getRevision'](_0x1fe14a),!_0x476f88)return;_0x4917f0(_0x476f88)&&(yield _0x476f88);}}},Rt=class extends _0x34e937{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1aace8,'c'],[_0x3f1639,'a'],[_0x2e5aa0,'e'],[_0x549115,'r'],[_0x3d7f30,'u']]);_typeCharToViewClass=new Map([['c',_0x1aace8],['a',_0x3f1639],['e',_0x2e5aa0],['r',_0x549115],['u',_0x3d7f30]]);async loadRevisionData(_0x1045a6,_0x5c38e9){if(_0x1045a6['diffData']||!_0x5c38e9)return;const _0x25c3a2=this['editor']['config']['get']('collaboration.channelId');_0x1045a6['diffData']=(await _0x5c38e9['getRevision']({'channelId':_0x25c3a2,'revisionId':_0x1045a6['id']}))['diffData'];}getRevisionDocumentData(_0x5f49ce){const _0x17c557={};for(const _0x11eb5a in _0x5f49ce['diffData']){if(_0x5f49ce['diffData'][_0x11eb5a]['attachChange']&&!_0x5f49ce['diffData'][_0x11eb5a]['attachChange']['isAttached'])continue;const _0x54c3ac=this['_removeRevisionMarkers'](JSON['parse'](_0x5f49ce['diffData'][_0x11eb5a]['insertions'])),_0x5c8a69=this['editor']['editing']['view']['document'],_0xd685c2=new _0x4a5047(_0x5c8a69,_0x54c3ac['map'](_0x34d911=>this['_getViewFromDiffObj'](_0x34d911,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x17c557[_0x11eb5a]=this['editor']['data']['processor']['toData'](_0xd685c2),this['editor']['data']['processor']['useFillerType']('default');}return _0x17c557;}getRevisionRootsAttributes(_0x5ea83e){const _0x28fd15={};for(const _0x3b2484 in _0x5ea83e['diffData'])_0x5ea83e['diffData'][_0x3b2484]['attachChange']&&!_0x5ea83e['diffData'][_0x3b2484]['attachChange']['isAttached']||(_0x28fd15[_0x3b2484]=_0x5ea83e['diffData'][_0x3b2484]['attributesAfter']||{});return _0x28fd15;}getRevisionRootsModelElements(_0x4130a1){const _0x5e929b={};for(const _0x5b5cc2 in _0x4130a1['diffData']){if(_0x4130a1['diffData'][_0x5b5cc2]['attachChange']&&!_0x4130a1['diffData'][_0x5b5cc2]['attachChange']['isAttached'])continue;const _0x497f1e=_0x4130a1['diffData'][_0x5b5cc2]['rootElementName'];_0x497f1e&&(_0x5e929b[_0x5b5cc2]=_0x497f1e);}return _0x5e929b;}_getTypeCharForViewElement(_0x41032f){return this['_viewClassToTypeChar']['get'](_0x41032f['constructor']);}_getViewFromDiffObj(_0x5a167d,_0x5dae3f){const _0x26fbd0=this['editor']['editing']['view']['document'];if('string'==typeof _0x5a167d)return new _0x879112(_0x26fbd0,_0x5a167d);{let _0xc56e1,_0x3be87d;_0x3be87d='u'==_0x5a167d['type']||'r'==_0x5a167d['type']?[]:_0x5a167d['children']['map'](_0x45bdca=>this['_getViewFromDiffObj'](_0x45bdca,_0x5dae3f));const _0x4ac416=this['_typeCharToViewClass']['get'](_0x5a167d['type'])||_0x32c7fd,_0x325bac=this['editor']['data']['htmlProcessor']['domConverter'];if(_0xc56e1=new _0x4ac416(_0x26fbd0,_0x5a167d['name'],_0x5a167d['attributes'],_0x3be87d),'u'==_0x5a167d['type']&&_0x5a167d['children'][0x0]){const _0x19203d=_0x5a167d['children'][0x0];if(_0xc56e1['render']=function(_0x50962f){const _0x3bd61c=_0x50962f['createElement']('div');return _0x3bd61c['innerHTML']=_0x58c95d(_0x19203d),_0x3bd61c['childNodes'][0x0];},_0x5dae3f){const _0x269edc=new _0x4a5047(_0x26fbd0);_0x269edc['_appendChild'](_0xc56e1);const _0x3ac669=Array['from'](_0x325bac['viewChildrenToDom'](_0x269edc,{'bind':!0x1})),_0x26d1ba=_0x325bac['domDocument']['createElement']('div');_0x26d1ba['append'](..._0x3ac669),_0xc56e1=Array['from'](_0x325bac['domChildrenToView'](_0x26d1ba))[0x0];}}else{if('r'==_0x5a167d['type']&&_0x5a167d['children'][0x0]){const _0x1536b5=_0x5a167d['children'][0x0];if(_0xc56e1['render']=function(_0x2eed82){_0x2eed82['innerHTML']=_0x58c95d(_0x1536b5);},_0x5dae3f){const _0x3877ca=new _0x4a5047(_0x26fbd0);_0x3877ca['_appendChild'](_0xc56e1);const _0x5aa3fc=Array['from'](_0x325bac['viewChildrenToDom'](_0x3877ca,{'bind':!0x1})),_0x2d90d0=_0x325bac['domDocument']['createElement']('div');_0x2d90d0['append'](..._0x5aa3fc);const _0x30167d=Array['from'](_0x325bac['domChildrenToView'](_0x2d90d0));_0x30167d['length']>0x1?_0xc56e1['_appendChild'](_0x30167d):_0xc56e1=_0x30167d[0x0];}}}if(_0x5a167d['customProperties']){for(const [_0x5d92c8,_0x29f4f2]of _0x5a167d['customProperties'])_0xc56e1['_setCustomProperty'](_0x5d92c8,_0x29f4f2);}const _0x1ec52d=void 0x0===_0x5a167d['fillerOffset']?null:_0x5a167d['fillerOffset'];return null!==_0x1ec52d&&(_0xc56e1['getFillerOffset']=()=>_0x1ec52d),_0xc56e1;}}_makeModelFromViewString(_0x5b5a4b,_0x4b4644){const _0x57ff92=JSON['parse'](_0x5b5a4b),_0x2cacc7=this['editor']['editing']['view']['document'],_0x5a23e2=new _0x4a5047(_0x2cacc7,_0x57ff92['map'](_0x3ef33d=>this['_getViewFromDiffObj'](_0x3ef33d,!0x0))),_0x19d352=this['editor']['data']['toModel'](_0x5a23e2,_0x4b4644);return _0x19d352['name']=_0x4b4644,_0x19d352;}['_removeRevisionMarkers'](_0x404081){return(_0x404081=_0x404081['filter'](_0x2a4849=>!_0x2a4849['name']||'revision-start'!==_0x2a4849['name']&&'revision-end'!==_0x2a4849['name']))['forEach'](_0x374aaf=>{'string'!=typeof _0x374aaf&&(_0x374aaf['children']=this['_removeRevisionMarkers'](_0x374aaf['children']),_0x374aaf['attributes']=_0x374aaf['attributes']['filter'](_0x5988a5=>!_0x5988a5[0x0]['startsWith']('data-revision-')));}),_0x404081;}};function kt(_0x1f6a95,_0x14d242,_0x17b1a6){const t=_0x1f6a95['t'];switch(_0x14d242){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'},_0x17b1a6);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x17b1a6);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'},_0x17b1a6);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x17b1a6);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x17b1a6);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x34e937{['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[_0x3d100c,bt,Rt,_0x545396];}constructor(_0x9bb061){super(_0x9bb061),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3f8c9e=_0x2e389d();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3f8c9e},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 _0x382d8c=this['repository']['getRevision'](0x0),_0x50f410=_0x382d8c&&null===_0x382d8c['creator']?_0x382d8c:null;if(this['_continueCurrentRevision']=!!_0x50f410&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x57e67e=this['_source']['getCurrentRevisionId'](),_0x379b49=this['repository']['getRevision'](_0x57e67e);if(_0x379b49)this['_startingVersion']=_0x379b49['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3caf3e=this['_source']['history']['_operations']['find'](_0x27608e=>!_0x27608e['_isInit']),_0x27366d=_0x3caf3e?_0x3caf3e['baseVersion']:this['_source']['history']['version'];_0x382d8c?(_0x382d8c['toVersion']<_0x27366d&&_0x382d8c['_update']({'toVersion':_0x27366d}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x50f410['id'],this['_startingVersion']=_0x50f410['fromVersion']):(this['_startingVersion']=_0x382d8c['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x27366d,this['_continueCurrentRevision']=!0x1);}}else _0x50f410&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x50f410['toVersion'],this['editor']['model']['document']['history']['version']),_0x50f410['fromVersion']===_0x50f410['toVersion']?(0x0!==_0x50f410['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x50f410['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x50f410['id'],this['_startingVersion']=_0x50f410['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',_0x22ce01=>!_0x22ce01),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x117eb9=[this['editor']];for(const _0x247aab of _0x117eb9){let _0x2d7f13;for(const _0x27df68 in _0x247aab){const _0x1567a6=_0x27df68,_0x55c3cd=_0x247aab[_0x1567a6];if('revisionHistoryLicenseKeyValid'==_0x55c3cd||'revisionHistoryLicenseKeyInvalid'==_0x55c3cd||'revisionHistoryLicenseKeyExpired'==_0x55c3cd||'revisionHistoryLicenseKeyDomainLimit'==_0x55c3cd||'revisionHistoryLicenseKeyNotAllowed'==_0x55c3cd||'revisionHistoryLicenseKeyEvaluationLimit'==_0x55c3cd||'revisionHistoryLicenseKeyUsageLimit'==_0x55c3cd){delete _0x247aab[_0x1567a6],_0x2d7f13=_0x55c3cd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2d7f13&&_0x247aab['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2d7f13&&_0x247aab['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2d7f13&&_0x247aab['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2d7f13&&_0x247aab['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2d7f13&&_0x247aab['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2d7f13&&_0x247aab['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x15bf56=this['repository']['getRevision'](0x0),_0x17130e=await this['getRevisionDocumentData'](_0x15bf56),_0x3c503e=await this['getRevisionRootsAttributes'](_0x15bf56),_0x5a9ce7=this['_utils']['getRevisionRootsModelElements'](_0x15bf56);this['_replaceEditorDataWithRevisionData'](_0x17130e,_0x3c503e,_0x5a9ce7);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x209969){this['_source']=_0x209969;}async update(){const _0x4cf345=await this['_source']['getLatestVersion']();if(_0x4cf345>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1cc164=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4cf345});_0x1cc164['authors']=_0x1cc164['authorsIds']['map'](_0x4d7a76=>this['editor']['plugins']['get']('Users')['getUser'](_0x4d7a76)),this['currentRevision']['_update'](_0x1cc164);}}async['saveRevision'](_0x1a29c6={},_0x892f4f=null){const _0x13710c=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x892f4f>this['currentRevision']['toVersion']&&(_0x892f4f=null),null===_0x892f4f&&(_0x892f4f=await this['_source']['getLatestVersion']());const _0x41a208=this['_getFromVersion'](_0x892f4f),_0x488651=this['buildRevisionData']({'from':_0x41a208,'to':_0x892f4f});if(this['currentRevision']['toVersion']<_0x892f4f){const _0x31ea43=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x892f4f,'to':_0x892f4f});_0x31ea43['authors']=[],_0x31ea43['authorsIds']=[],_0x31ea43['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x31ea43,!0x0),delete _0x31ea43['authors'],_0x13710c['push'](_0x31ea43);}const _0x3995e2={..._0x1a29c6,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1a29c6['name']||null,'id':_0x1a29c6['id']||_0x2e389d(),..._0x488651,'attributes':{..._0x1a29c6['attributes'],..._0x488651['attributes']}},_0x53a3f7=this['addRevisionData'](_0x3995e2);_0x13710c['push'](_0x3995e2);const _0x37c28d=this['repository']['getIndex'](_0x53a3f7);if(0x0!==_0x37c28d){const _0x49ac3a=this['repository']['getRevision'](_0x37c28d-0x1);if(_0x49ac3a['fromVersion']!==_0x892f4f){const _0x147d13=this['_revisionDataBuilder']['getData'](_0x892f4f,_0x49ac3a['toVersion']),_0x5d13b1={'id':_0x49ac3a['id'],'diffData':_0x147d13['diffData'],'authorsIds':_0x147d13['authorsIds'],'authors':_0x147d13['authorsIds']['map'](_0x2e3a90=>this['editor']['plugins']['get']('Users')['getUser'](_0x2e3a90)),'fromVersion':_0x892f4f};this['_stampAiAttribute'](_0x5d13b1,_0x49ac3a,!!_0x147d13['hasAIChanges']),_0x49ac3a===this['currentRevision']&&(_0x5d13b1['createdAt']=new Date(_0x3995e2['createdAt']['getTime']()+0xa)),_0x49ac3a['_update'](_0x5d13b1,!0x0),delete _0x5d13b1['authors'],_0x13710c['push'](_0x5d13b1);}}if(this['adapter']){for(const _0x20b73d of _0x13710c)this['_bufferUpdate'](_0x20b73d['id'],_0x20b73d,!0x0);this['sendBufferedUpdates']();}return _0x53a3f7;}addRevisionData(_0x2a6601){const _0x452117=this['repository']['createRevision'](_0x2a6601);return this['adapter']&&_0x452117['on']('_update',(_0x4ae108,_0x41ab56,_0x374adf)=>{_0x374adf||(this['_bufferUpdate'](_0x41ab56['id'],_0x41ab56,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x452117,this['_findInsertionIndex'](_0x452117)),_0x452117;}async getRevisionDocumentData(_0x139b54){return await this['_utils']['loadRevisionData'](_0x139b54,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x139b54);}async getRevisionRootsAttributes(_0x3b09d2){return await this['_utils']['loadRevisionData'](_0x3b09d2,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3b09d2);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x261835=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3420d=0x0;_0x3420d<_0x261835['length'];_0x3420d++){const _0x121b35=_0x261835[_0x3420d];let _0x16351f=!0x1;for(const _0x3f42d7 of Object['keys'](_0x121b35))void 0x0===_0x121b35[_0x3f42d7]?delete _0x121b35[_0x3f42d7]:'id'!==_0x3f42d7&&(_0x16351f=!0x0);_0x16351f||(_0x261835[_0x3420d]=null);}if(_0x261835=_0x261835['filter'](_0x2bf1b2=>null!==_0x2bf1b2),!_0x261835['length'])return;for(let _0x1325c3=0x0;_0x1325c3<_0x261835['length'];_0x1325c3++){const _0x30d0f8=_0x261835[_0x1325c3];void 0x0!==_0x30d0f8['fromVersion']&&void 0x0===_0x30d0f8['toVersion']&&(_0x30d0f8['toVersion']=this['repository']['getRevision'](_0x30d0f8['id'])['toVersion']),void 0x0!==_0x30d0f8['toVersion']&&void 0x0===_0x30d0f8['fromVersion']&&(_0x30d0f8['fromVersion']=this['repository']['getRevision'](_0x30d0f8['id'])['fromVersion']);}const _0x712b6c=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x261835,_0x712b6c)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x578ca1=>{if(_0x578ca1){for(const _0xaf8032 of _0x578ca1)this['setRevisionData']({'id':_0xaf8032['id'],'createdAt':_0xaf8032['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x45e3cf,_0x2fb10c,_0x831142){if(_0x831142===(!!_0x2fb10c&&!!_0x2fb10c['attributes']['@ai']))return;const _0x59653c={..._0x2fb10c?_0x2fb10c['attributes']:{},..._0x45e3cf['attributes']};_0x831142?_0x59653c['@ai']=!0x0:delete _0x59653c['@ai'],_0x45e3cf['attributes']=_0x59653c;}buildRevisionData({revision:_0x1a48ed=null,from:_0x2e4aa3=null,to:_0x4f8485=null}){_0x2e4aa3=null!==_0x2e4aa3?_0x2e4aa3:_0x1a48ed['fromVersion'],_0x4f8485=null!==_0x4f8485?_0x4f8485:_0x1a48ed['toVersion'];const _0x4c04be=this['_revisionDataBuilder']['getData'](_0x2e4aa3,_0x4f8485),_0xefe3d9={'diffData':_0x4c04be['diffData'],'authorsIds':_0x4c04be['authorsIds'],'fromVersion':_0x2e4aa3,'toVersion':_0x4f8485};if(this['_stampAiAttribute'](_0xefe3d9,_0x1a48ed,!!_0x4c04be['hasAIChanges']),!_0x1a48ed||_0x4f8485!==_0x1a48ed['toVersion']){const _0x3f3660=_0x4f8485-0x1,_0x14ebec=this['_source']['history']['getOperation'](_0x3f3660);_0xefe3d9['createdAt']=_0x14ebec&&_0x14ebec['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2e4aa3===this['_loadedStateData']['fromVersion']){for(const _0xbe49f2 of this['_loadedStateData']['authors'])_0xefe3d9['authorsIds']['includes'](_0xbe49f2['id'])||_0xefe3d9['authorsIds']['push'](_0xbe49f2['id']);}return _0xefe3d9;}_bufferUpdate(_0x3f8bfa,_0x547944,_0x17b93c){if(this['_bufferedUpdates']['has'](_0x3f8bfa)){const _0x552a50=this['_bufferedUpdates']['get'](_0x3f8bfa);_0x547944=_0x17b93c?{..._0x552a50,..._0x547944}:{..._0x547944,..._0x552a50};}this['_bufferedUpdates']['set'](_0x3f8bfa,_0x547944);}setRevisionData(_0x4103c2){const _0x37b438=this['repository']['getRevision'](_0x4103c2['id']);if(_0x4103c2['createdAt']&&(_0x4103c2['createdAt']=new Date(_0x4103c2['createdAt'])),_0x4103c2['authorsIds']){const _0x403c63=this['editor']['plugins']['get']('Users');_0x4103c2['authors']=_0x4103c2['authorsIds']['map'](_0x916263=>_0x403c63['getUser'](_0x916263));}_0x37b438['_update'](_0x4103c2,!0x0);}_createInitialRevision(_0x1858dc){const _0x1d57df=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1d57df)this['_initialRevisionId']=_0x1d57df['id'];else{const _0x5328b8=!this['editor']['model']['document']['roots']['find'](_0x40ca42=>this['editor']['model']['hasContent'](_0x40ca42)),_0x2a778b=this['editor']['plugins']['get']('Users')['me']['id'],_0x1fdcc3=kt(this['editor']['locale'],_0x5328b8?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x1858dc,'to':_0x1858dc,'id':this['_initialRevisionId'],'name':_0x1fdcc3,'creatorId':_0x2a778b});}}_createCurrentRevision(_0x1c9fb1){const _0x3bf9db=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x3bf9db),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1c9fb1,'to':_0x1c9fb1,'id':_0x3bf9db,'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(_0x2dd577,_0x486058,_0x540586){const _0x259a4b={},_0x15113e={},_0x359b1={},_0x197490=this['editor']['config']['get']('roots')||{};for(const [_0x1bbb5b,_0x1a8122]of Object['entries'](_0x197490))_0x1a8122['lazyLoad']||(_0x259a4b[_0x1bbb5b]=_0x1a8122['initialData']??'',_0x15113e[_0x1bbb5b]=_0x1a8122['modelAttributes']||{},_0x1a8122['modelElement']&&(_0x359b1[_0x1bbb5b]=_0x1a8122['modelElement']));for(const _0x4fb0df of this['editor']['model']['document']['getRootNames']())_0x259a4b[_0x4fb0df]??='',_0x15113e[_0x4fb0df]??={};let _0xa2b126=!0x1;const _0x411f64=Object['keys'](_0x259a4b),_0x5889ae=Object['keys'](_0x2dd577);for(const _0x993fdc of _0x411f64){if(_0x259a4b[_0x993fdc]!==_0x2dd577[_0x993fdc]&&''!==_0x259a4b[_0x993fdc]['trim']()){_0xa2b126=!0x0;break;}if(!_0xa0ad2e(_0x15113e[_0x993fdc],_0x486058[_0x993fdc])&&Object['keys'](_0x15113e[_0x993fdc])['length']>0x0){_0xa2b126=!0x0;break;}const _0x302212=_0x359b1[_0x993fdc],_0x2e4336=_0x540586[_0x993fdc];if(_0x302212&&_0x2e4336&&_0x302212!==_0x2e4336){_0xa2b126=!0x0;break;}}_0xa2b126||(_0xa2b126=_0x5889ae['some'](_0x3dbdb2=>!this['editor']['model']['document']['getRoot'](_0x3dbdb2))),_0xa2b126&&_0x219979('editor-initial-data-replaced-with-revision-data',{'editorData':_0x259a4b,'editorRootsAttributes':_0x15113e,'editorRootsModelElements':_0x359b1,'revisionData':_0x2dd577,'revisionRootsAttributes':_0x486058,'revisionRootsModelElements':_0x540586});for(const [_0x47040c,_0x5a5e7a]of Object['entries'](_0x2dd577))this['editor']['config']['set']('roots.'+_0x47040c+'.initialData',_0x5a5e7a);for(const [_0x57dc7e,_0x33a95b]of Object['entries'](_0x486058))this['editor']['config']['set']('roots.'+_0x57dc7e+'.modelAttributes',_0x33a95b);const _0x3375ad=this['editor']['model']['document'];for(const [_0x106dfd,_0x42b8b7]of Object['entries'](_0x540586)){this['editor']['config']['set']('roots.'+_0x106dfd+'.modelElement',_0x42b8b7);const _0xb9a63e=_0x3375ad['getRoot'](_0x106dfd);_0xb9a63e&&_0xb9a63e['name']!==_0x42b8b7&&(_0x3375ad['roots']['remove'](_0x106dfd),_0x3375ad['createRoot'](_0x42b8b7,_0x106dfd));}}_addPendingAction(){if(!this['_pendingAction']){const _0x22b57c=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x22b57c['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x3a8e76){const _0x1fb855=this['repository']['getRevisions']();_0x1fb855['reverse']();let _0x565b66=0x0;for(;_0x565b66<_0x1fb855['length'];){const _0x1e818f=_0x1fb855[_0x565b66];if(_0x1e818f===this['currentRevision']){_0x565b66++;continue;}if(_0x1e818f['id']===this['_initialRevisionId'])break;const _0x27cb60=_0x3a8e76['toVersion']-_0x1e818f['toVersion']||_0x3a8e76['fromVersion']-_0x1e818f['fromVersion'];if(_0x27cb60>0x0)break;if(_0x27cb60<0x0)_0x565b66++;else{if(!_0x3a8e76['creator']&&_0x1e818f['creator'])break;if(_0x1e818f['creator']||!_0x3a8e76['creator']){if(_0x3a8e76['createdAt']>_0x1e818f['createdAt'])break;_0x565b66++;}else _0x565b66++;}}return _0x565b66;}_getFromVersion(_0x16d7f9){const _0x541ab0=this['repository']['getRevisions']();_0x541ab0['reverse'](),_0x541ab0['shift']();const _0xb2898c=_0x541ab0['find'](_0x2ee59e=>_0x2ee59e['toVersion']<=_0x16d7f9)['toVersion'];return _0xb2898c<this['_startingVersion']?this['_startingVersion']:_0xb2898c;}['_makeRevision']({name:_0x60e99e,from:_0x1e6a67,to:_0x4a2cea,creatorId:_0x4fc63f,id:_0x237c42}){const _0x2232d7=this['buildRevisionData']({'from':_0x1e6a67,'to':_0x4a2cea});_0x2232d7['name']=_0x60e99e,_0x2232d7['creatorId']=_0x4fc63f,_0x2232d7['id']=_0x237c42;const _0x9656de=this['addRevisionData'](_0x2232d7);return this['adapter']&&this['_bufferUpdate'](_0x2232d7['id'],_0x2232d7,!0x0),_0x9656de;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x5417ae){this['editor']=_0x5417ae,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(_0x20236d){this['source']=_0x20236d;const _0x103cac=new Map(),_0x2a4010=new Map(),_0x132492=this['editor']['model']['document']['roots']['map'](_0x5d54ab=>_0x5d54ab['rootName']);for(const _0x2d7006 of _0x132492){const _0x1445c8=this['editor']['model']['document']['getRoot'](_0x2d7006),_0x4f91eb=St(_0x1445c8);_0x103cac['set'](_0x2d7006,_0x4f91eb),_0x2a4010['set'](_0x2d7006,Object['fromEntries'](_0x1445c8['getAttributes']()));}const _0x38f3ef=Array['from'](this['editor']['model']['markers'])['map'](_0x24ff5c=>[_0x24ff5c['name'],_0x24ff5c['getRange']()]),_0x58ff20=this['source']['version'];this['_saveMetaData'](_0x58ff20,_0x103cac,_0x38f3ef,_0x2a4010),this['_startingRevisionId']=this['_revisionId'];const _0x4a6209=new Map(),_0x446f81=new Map();for(const _0x3802e7 of _0x132492){const _0x4f5fb2=Et(_0x3802e7,this['editor']['model']['document']['getRoot'](_0x3802e7)['name']);_0x4a6209['set'](_0x3802e7,_0x4f5fb2),_0x446f81['set'](_0x3802e7,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4a6209,[],_0x446f81);}getData(_0x1ba6b8,_0x50af46){if(this['_lastFrom']===_0x1ba6b8&&this['_lastTo']<=_0x50af46)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x50af46,!0x0);else{if(!this['_savedMetaData']['has'](_0x1ba6b8)){const _0x2d18cd=this['_getPreviousFrom'](_0x1ba6b8);this['_calculateMetaData'](_0x2d18cd,_0x1ba6b8,!0x1);}this['_calculateMetaData'](_0x1ba6b8,_0x50af46,!0x0);}return this['_lastFrom']=_0x1ba6b8,this['_lastTo']=_0x50af46,this['_getState']();}loadState(_0x4e98ca){if(!this['_savedMetaData']['has'](_0x4e98ca['fromVersion'])){const _0x403494=this['_getPreviousFrom'](_0x4e98ca['fromVersion']);this['_calculateMetaData'](_0x403494,_0x4e98ca['fromVersion'],!0x1);}this['_calculateMetaData'](_0x4e98ca['fromVersion'],_0x4e98ca['toVersion'],!0x1);const _0x5f4dd4=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4e98ca['fromVersion'],this['_lastTo']=_0x4e98ca['toVersion'];for(const _0x5ab031 in _0x4e98ca['diffData']){const _0x272176=_0x4e98ca['diffData'][_0x5ab031]['attachChange'],_0x5cd9ad=_0x2fea7c(_0x4e98ca['diffData'][_0x5ab031]['attributesBefore'])||{},_0x23c464=_0x4e98ca['diffData'][_0x5ab031],_0x22ff87=_0x5f4dd4['_makeModelFromViewString'](_0x23c464['deletions'],_0x23c464['rootElementName']||'$root');_0x22ff87['rootName']=_0x5ab031,_0x22ff87['_isAttached']=!_0x272176||!_0x272176['isAttached'],_0x22ff87['isAttached']=()=>_0x22ff87['_isAttached'],this['_baseRoots']['set'](_0x5ab031,_0x22ff87),this['_baseRootsAttributes']['set'](_0x5ab031,_0x5cd9ad),_0x272176&&this['_touchedRoots']['set'](_0x5ab031,_0x272176);const _0x2a5861=this['_makeIdsRoot'](_0x22ff87);this['_baseIdsRoots']['set'](_0x5ab031,_0x2a5861);for(const [_0x59c29f,_0x2c3a62]of _0x22ff87['markers']){if(!_0x59c29f['startsWith']('revision:'))continue;const _0x50412e=_0x59c29f['split'](':')[0x2],_0x5af5d5=_0x23c464['aiSources']?.[_0x59c29f]||null;for(const _0x3d57f2 of _0x2c3a62['getWalker']({'singleCharacters':!0x0})){const _0x42e669=this['_getVidAttributeName'](_0x3d57f2),_0x1bd352='elementEnd'==_0x3d57f2['type']?_0x3d57f2['previousPosition']['path']['slice'](0x0,-0x1):_0x3d57f2['previousPosition']['path'],_0xab778b=_0x2a5861['getNodeByPath'](_0x1bd352)['getAttribute'](_0x42e669);this['_touched']['set'](_0xab778b,{'userId':_0x50412e,'aiSource':_0x5af5d5});}_0x22ff87['markers']['delete'](_0x59c29f);}}this['_startingRevisionId']=this['_revisionId'];const _0x1c9c7e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0xfa042f=>!this['_touched']['has'](_0xfa042f));let _0x4ea82e=0x0;const _0x3f9b9e=new Map();for(const _0x5b0f7d in _0x4e98ca['diffData']){const _0xa60d25=_0x4e98ca['diffData'][_0x5b0f7d]['attachChange'],_0x5d90c9=_0x2fea7c(_0x4e98ca['diffData'][_0x5b0f7d]['attributesAfter'])||{},_0x13f505=_0x4e98ca['diffData'][_0x5b0f7d],_0x522d40=_0x5f4dd4['_makeModelFromViewString'](_0x13f505['insertions'],_0x13f505['rootElementName']||'$root');_0x522d40['rootName']=_0x5b0f7d,_0x522d40['_isAttached']=!_0xa60d25||_0xa60d25['isAttached'],_0x522d40['isAttached']=()=>_0x522d40['_isAttached'],this['_diffRoots']['set'](_0x5b0f7d,_0x522d40),this['_diffRootsAttributes']['set'](_0x5b0f7d,_0x5d90c9);const _0x5e0308=this['_makeIdsRoot'](_0x522d40,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5b0f7d,_0x5e0308),_0x3f9b9e['set'](_0x5b0f7d,_0x522d40['isAttached']()?_0x5d90c9:{});for(const [_0x323dba,_0x4f6e26]of _0x522d40['markers']){if(!_0x323dba['startsWith']('revision:'))continue;const _0x1ff08b=_0x323dba['split'](':')[0x2],_0x2b14a6=_0x13f505['aiSources']?.[_0x323dba]||null;for(const _0x1d2e61 of _0x4f6e26['getWalker']({'singleCharacters':!0x0})){const _0x4d0756=this['_getVidAttributeName'](_0x1d2e61),_0xd99d2=this['_revisionId']++,_0x588c2c='elementEnd'==_0x1d2e61['type']?_0x1d2e61['previousPosition']['path']['slice'](0x0,-0x1):_0x1d2e61['previousPosition']['path'];_0x5e0308['getNodeByPath'](_0x588c2c)['_setAttribute'](_0x4d0756,_0xd99d2),this['_touched']['set'](_0xd99d2,{'userId':_0x1ff08b,'aiSource':_0x2b14a6});}_0x522d40['markers']['delete'](_0x323dba);}for(const _0xc7fa7e of this['editor']['model']['createRangeIn'](_0x522d40)['getWalker']({'singleCharacters':!0x0})){const _0x24ee49=this['_getVidAttributeName'](_0xc7fa7e),_0x37a5c1='elementEnd'==_0xc7fa7e['type']?_0xc7fa7e['previousPosition']['path']['slice'](0x0,-0x1):_0xc7fa7e['previousPosition']['path'],_0x4d6a27=_0x5e0308['getNodeByPath'](_0x37a5c1);_0x4d6a27['getAttribute'](_0x24ee49)>0x0||_0x4d6a27['_setAttribute'](_0x24ee49,_0x1c9c7e[_0x4ea82e++]);}for(const [_0x488202,_0x5a5478]of _0x522d40['markers'])_0x488202['startsWith']('revision:')||this['_markers']['set'](_0x488202,_0x5a5478);}const {roots:_0x7bfd38}=this['_savedMetaData']['get'](_0x4e98ca['fromVersion']),{roots:_0xdeb981}=this['_savedMetaData']['get'](_0x4e98ca['toVersion']),_0x3b6650=St(_0x7bfd38['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x3b6650),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3b6650,Number['NEGATIVE_INFINITY']));const _0x5d5dcd=St(_0xdeb981['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x5d5dcd),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5d5dcd));const _0x5f9741=Array['from'](this['_diffRoots'])['map'](([_0x5c2157,_0x5cf10d])=>[_0x5c2157,St(_0x5cf10d)]);this['_saveMetaData'](this['_lastTo'],_0x5f9741,this['_markers'],_0x3f9b9e);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x3debb4,_0x1cc958,_0x4a3a82,_0x299255){const _0x2f693e=new Map(_0x1cc958),_0x2bbf01=new Map(_0x2fea7c(_0x299255)),_0x58f243=new Map();for(const [_0x2c2d48,_0x868d9e]of _0x4a3a82)_0x58f243['set'](_0x2c2d48,{'start':_0x868d9e['start']['clone'](),'end':_0x868d9e['end']['clone'](),'rootName':_0x868d9e['root']['rootName']});this['_savedMetaData']['set'](_0x3debb4,{'roots':_0x2f693e,'markers':_0x58f243,'rootsAttributes':_0x2bbf01});}_removeMetaData(_0x4b1e5c){this['_savedMetaData']['delete'](_0x4b1e5c);}_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(_0x39f2d0,_0x3fa56f=null){let _0x58bc22=null;_0x39f2d0['is']('documentFragment')||(_0x58bc22=new _0x1eeca3(_0x39f2d0['name'],{'vid_start':null===_0x3fa56f?this['_revisionId']++:_0x3fa56f++}));const _0x129418=[];for(const _0xe9ade7 of _0x39f2d0['getChildren']())if(_0xe9ade7['is']('element')){_0x129418['push'](this['_makeIdsRoot'](_0xe9ade7,_0x3fa56f));const _0x849170=_0x129418[_0x129418['length']-0x1];null!==_0x3fa56f&&(_0x3fa56f=_0x849170['is']('element','$text')?_0x849170['getAttribute']('vid')+0x1:_0x849170['getAttribute']('vid_end')+0x1);}else{for(let _0x159b28=0x0;_0x159b28<_0xe9ade7['offsetSize'];_0x159b28++)_0x129418['push'](new _0x1eeca3('$text',{'vid':null===_0x3fa56f?this['_revisionId']++:_0x3fa56f++}));}if(_0x39f2d0['is']('documentFragment')){const _0x561576=Et(_0x39f2d0['rootName'],_0x39f2d0['name']);return _0x561576['_insertChild'](0x0,_0x129418),_0x561576;}return _0x58bc22['_setAttribute']('vid_end',null===_0x3fa56f?this['_revisionId']++:_0x3fa56f),_0x58bc22['_insertChild'](0x0,_0x129418),_0x58bc22;}_calculateMetaData(_0x1d9606,_0x31162e,_0x46acd3){this['_reset']();const {roots:_0x5194b9,markers:_0x58d247,rootsAttributes:_0x26be4b}=this['_savedMetaData']['get'](_0x1d9606);this['_baseRoots']=new Map(_0x5194b9),this['_baseRootsAttributes']=new Map(_0x2fea7c(_0x26be4b));for(const [_0x1c2f85,_0x56ae08]of this['_baseRoots'])if('$graveyard'!==_0x1c2f85&&(this['_diffRoots']['set'](_0x1c2f85,St(_0x56ae08)),this['_diffRootsAttributes']=new Map(_0x2fea7c(_0x26be4b)),_0x46acd3)){const _0x4e9da0=this['_revisionId'];this['_idsRoots']['set'](_0x1c2f85,this['_makeIdsRoot'](_0x56ae08)),this['_baseIdsRoots']['set'](_0x1c2f85,this['_makeIdsRoot'](_0x56ae08,_0x4e9da0));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x46acd3&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x134f57,_0x1e5c30]of _0x58d247){const _0x26f6fd=this['_baseRoots']['get'](_0x1e5c30['rootName']),_0x581943=this['_diffRoots']['get'](_0x1e5c30['rootName']),_0x20f7ad=new _0x247601(_0x4a276e(_0x1e5c30['start'],_0x26f6fd),_0x4a276e(_0x1e5c30['end'],_0x26f6fd)),_0x5a905a=_0x440c70(_0x20f7ad,_0x581943);_0x26f6fd['markers']['set'](_0x134f57,_0x20f7ad),this['_markers']['set'](_0x134f57,_0x5a905a);}this['_applyOperations'](_0x1d9606,_0x31162e,_0x46acd3);}_applyOperations(_0x10fe96,_0x1974f9,_0x5768b2){for(const _0x3e6f35 of this['source']['getOperations'](_0x10fe96,_0x1974f9))this['_handleOperation'](_0x3e6f35,_0x5768b2);for(const _0x3d321c of this['_diffRoots']['values']())_0x3d321c['markers']['clear']();for(const [_0x1ea8d5,_0x5ae4fb]of this['_markers'])this['_diffRoots']['get'](_0x5ae4fb['root']['rootName'])['markers']['set'](_0x1ea8d5,_0x5ae4fb['clone']());const _0x5a4fc7=new Map(),_0x5e2a9c=new Map();for(const [_0x45faac,_0x652f56]of this['_diffRoots'])_0x5a4fc7['set'](_0x45faac,St(_0x652f56)),_0x5e2a9c['set'](_0x45faac,this['_diffRootsAttributes']['get'](_0x45faac));this['_saveMetaData'](_0x1974f9,_0x5a4fc7,this['_markers'],_0x5e2a9c);}_getPreviousFrom(_0x21eadc){const _0x245e9d=Array['from'](this['_savedMetaData']['keys']());_0x245e9d['sort']((_0x34ffed,_0x348685)=>_0x34ffed-_0x348685),_0x245e9d['reverse']();for(const _0x5485d8 of _0x245e9d)if(_0x5485d8<_0x21eadc)return _0x5485d8;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2dd8f6,_0xbe9d2a){const _0xd09b72=Array['from'](_0xbe9d2a['markers'])['map'](([_0x2c3779,_0x2f3701])=>[_0x2c3779,_0x440c70(_0x2f3701,_0x2dd8f6)]);_0x2dd8f6['markers']=new Map(_0xd09b72);}_transformMarkers(_0x1b8806){for(const _0x72299 of this['_markers']['values']()){const _0x429da9=_0x72299['getTransformedByOperation'](_0x1b8806),_0xfdcc49=_0x247601['_createFromRanges'](_0x429da9);_0x72299['start']=_0xfdcc49['start'],_0x72299['end']=_0xfdcc49['end'];}}_handleOperation(_0x3ad698,_0x3adb39){if('addRoot'!=_0x3ad698['type']&&'detachRoot'!=_0x3ad698['type']){if('insert'==_0x3ad698['type']){const _0x5e0492=_0x3ad698['position']['root'],_0x85a2bd=_0x5e0492['rootName'],_0xdb651d=_0x5e0492['name'];this['_diffRoots']['has'](_0x85a2bd)||(this['_diffRoots']['set'](_0x85a2bd,Et(_0x85a2bd,_0xdb651d,!0x0)),this['_diffRootsAttributes']['set'](_0x85a2bd,{}),_0x3adb39&&this['_idsRoots']['set'](_0x85a2bd,Et(_0x85a2bd,_0xdb651d,!0x0)));}else{if('addRootAttribute'==_0x3ad698['type']||'removeRootAttribute'==_0x3ad698['type']||'changeRootAttribute'==_0x3ad698['type'])return void this['_handleRootAttributeOperation'](_0x3ad698);'marker'==_0x3ad698['type']&&this['_handleMarkerOperation'](_0x3ad698);}if('marker'!==_0x3ad698['type']){const _0x914674=this['_cloneOperation'](_0x3ad698,this['_diffRoots']);_0x914674['_execute'](),this['_transformMarkers'](_0x914674);}if(_0x3adb39)switch(_0x3ad698['type']){case'insert':this['_handleInsertOperation'](_0x3ad698);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3ad698);break;case'merge':this['_handleMergeOperation'](_0x3ad698);break;case'split':this['_handleSplitOperation'](_0x3ad698);}}else this['_handleRootOperation'](_0x3ad698,_0x3adb39);}_cloneOperation(_0x529c13,_0x4dd33f){const _0x25df55=_0x529c13['clone']();return _0x25df55['_authorId']=_0x529c13['_authorId'],_0x25df55['_aiSource']=_0x529c13['_aiSource'],_0x25df55['baseVersion']=null,_0x2fc7d0(_0x25df55,_0x4dd33f),_0x25df55;}_getBaseVids(_0x2da4e1){return _0x2da4e1['map'](_0x5fed7a=>{const _0x371968=this['_getVidAttributeName'](_0x5fed7a);return Number(_0x5fed7a['item']['getAttribute'](_0x371968));});}_generateTape(_0x5be740,_0x1a1a8a){if(_0x5be740['is']('element','$text'))_0x1a1a8a['push']({'item':_0x5be740,'type':'text'});else{_0x5be740['is']('element')&&_0x1a1a8a['push']({'item':_0x5be740,'type':'elementStart'});for(const _0x2db828 of _0x5be740['getChildren']())this['_generateTape'](_0x2db828,_0x1a1a8a);_0x5be740['is']('element')&&_0x1a1a8a['push']({'item':_0x5be740,'type':'elementEnd'});}return _0x1a1a8a;}_getState(){const _0x5f119f=new Map(this['_touched']),_0x23b0e5=new Map(_0x5f119f),_0x22304d=new Map(),_0x3326ea={'insertions':{},'deletions':{}},_0x3285d4={'insertions':{},'deletions':{}},_0x1e8e77=new Map(),_0xb17fb1=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1e4584=new Map();_0xb17fb1['delete']('$graveyard');for(const _0x3bafe5 of _0xb17fb1){const _0x553584=(this['_diffRoots']['get'](_0x3bafe5)??this['_baseRoots']['get'](_0x3bafe5))['name'],_0x3a634f=this['_diffRoots']['get'](_0x3bafe5)||Et(_0x3bafe5,_0x553584,!0x1),_0x45f64f=this['_baseRoots']['get'](_0x3bafe5)||Et(_0x3bafe5,_0x553584,!0x1);_0x3a634f['isAttached']()||_0x45f64f['isAttached']()?(_0x1e4584['set'](_0x3bafe5,_0x553584),_0x3326ea['insertions'][_0x3bafe5]=St(_0x3a634f),_0x3326ea['deletions'][_0x3bafe5]=St(_0x45f64f),this['_copyMarkers'](_0x3326ea['deletions'][_0x3bafe5],_0x45f64f),this['_copyMarkers'](_0x3326ea['insertions'][_0x3bafe5],_0x3a634f),_0x3285d4['insertions'][_0x3bafe5]=this['_generateTape'](this['_idsRoots']['get'](_0x3bafe5),[]),_0x3285d4['deletions'][_0x3bafe5]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3bafe5)||Et(_0x3bafe5,_0x553584,!0x1),[])):_0xb17fb1['delete'](_0x3bafe5);}for(const _0x50919b of _0xb17fb1){const _0x348881=_0x3285d4['insertions'][_0x50919b];for(const _0x5cc4b4 of _0x348881){const _0x49e2a4=this['_getVidAttributeName'](_0x5cc4b4),_0x4cb841=_0x5cc4b4['item']['getAttribute'](_0x49e2a4);_0x23b0e5['delete'](_0x4cb841),_0x4cb841>=this['_startingRevisionId']&&_0x22304d['set'](_0x4cb841,_0x5f119f['get'](_0x4cb841));}}for(const _0x17df76 of _0xb17fb1){const _0x3c365c=_0x3285d4['insertions'][_0x17df76],_0x5ecea0=this['_getBaseVids'](_0x3285d4['deletions'][_0x17df76]);let _0x172820=0x0;for(const _0x1e7b92 of _0x3c365c){const _0x5860b9=this['_getVidAttributeName'](_0x1e7b92),_0x39c327=_0x1e7b92['item']['getAttribute'](_0x5860b9);if(!_0x22304d['has'](_0x39c327)&&!_0x1e8e77['has'](_0x39c327)){if(_0x23b0e5['has'](_0x39c327))_0x172820++;else{if(_0x39c327!=_0x5ecea0[_0x172820]){const _0xfc88e2=_0x5f119f['get'](_0x39c327)||_0x5f119f['get'](_0x5ecea0[_0x172820]);for(;_0x39c327!=_0x5ecea0[_0x172820];)_0x23b0e5['has'](_0x5ecea0[_0x172820])||(_0x1e8e77['set'](_0x5ecea0[_0x172820],_0xfc88e2),_0x5f119f['set'](_0x5ecea0[_0x172820],_0xfc88e2)),_0x172820++;}_0x172820++;}}}}for(const _0x4bdcb3 of _0xb17fb1){const _0x2629fa=_0x3285d4['insertions'][_0x4bdcb3];for(const _0x3831de of _0x2629fa){const _0x569625=this['_getVidAttributeName'](_0x3831de),_0x55e075=_0x3831de['item']['getAttribute'](_0x569625);if(_0x1e8e77['has'](_0x55e075)){const _0x3db02d=_0x1e8e77['get'](_0x55e075);_0x23b0e5['has'](_0x55e075)||_0x23b0e5['set'](_0x55e075,{..._0x3db02d}),_0x22304d['set'](_0x55e075,{..._0x3db02d});}}}for(const _0x1e033d of _0x23b0e5['keys']())_0x1e033d>=this['_startingRevisionId']&&_0x23b0e5['delete'](_0x1e033d);const _0x5b0dd2=new Map();for(const _0x370e43 of _0xb17fb1){let _0x1274a5=_0x3285d4['insertions'][_0x370e43];for(const _0x354279 of _0x1274a5)if(_0x354279['item']['is']('element','tableCell')){const _0x4a5d9f=this['_getVidAttributeName'](_0x354279),_0x57a6f7=_0x354279['item']['getAttribute'](_0x4a5d9f);if(_0x22304d['has'](_0x57a6f7)){const _0x1f8b73=_0x354279['item']['parent']['parent']['getAttribute']('vid_start'),_0x584c72=_0x22304d['get'](_0x57a6f7),_0x1f7c55=_0x5b0dd2['get'](_0x1f8b73)||{'users':new Set(),'aiSource':null};_0x1f7c55['users']['add'](_0x584c72['userId']),_0x1f7c55['aiSource']=_0x1f7c55['aiSource']||_0x584c72['aiSource']||null,_0x5b0dd2['set'](_0x1f8b73,_0x1f7c55);}}_0x1274a5=_0x3285d4['deletions'][_0x370e43];for(const _0x52d3b4 of _0x1274a5)if(_0x52d3b4['item']['is']('element','tableCell')){const _0x5024b9=this['_getVidAttributeName'](_0x52d3b4),_0x443d94=_0x52d3b4['item']['getAttribute'](_0x5024b9);if(_0x23b0e5['has'](_0x443d94)){const _0x14b00c=_0x52d3b4['item']['parent']['parent']['getAttribute']('vid_start'),_0xefc7ea=_0x23b0e5['get'](_0x443d94),_0x5cebdf=_0x5b0dd2['get'](_0x14b00c)||{'users':new Set(),'aiSource':null};_0x5cebdf['users']['add'](_0xefc7ea['userId']),_0x5cebdf['aiSource']=_0x5cebdf['aiSource']||_0xefc7ea['aiSource']||null,_0x5b0dd2['set'](_0x14b00c,_0x5cebdf);}}for(const _0xb41144 of _0x5b0dd2['keys']())(_0x22304d['has'](_0xb41144)||_0x23b0e5['has'](_0xb41144))&&_0x5b0dd2['delete'](_0xb41144);}for(const _0x2ad266 of _0xb17fb1){const _0x1285a3=_0x3285d4['insertions'][_0x2ad266];let _0x702d04=null,_0x4c3cfe=null,_0x4659ee=null;for(const _0x550c0c of _0x1285a3){const _0x23d7c1=this['_getVidAttributeName'](_0x550c0c),_0x58227d=_0x550c0c['item']['getAttribute'](_0x23d7c1),_0xa005b8=_0x5b0dd2['get'](_0x58227d);if(_0xa005b8&&'elementStart'==_0x550c0c['type']&&(_0x702d04=Array['from'](_0xa005b8['users'])[0x0],_0x4c3cfe=_0xa005b8['aiSource'],_0x4659ee=_0x550c0c['item']['getAttribute']('vid_end')),_0x702d04){const _0x8a0f30=_0x4c3cfe||_0x23b0e5['get'](_0x58227d)?.['aiSource']||null,_0xc63861=_0x4c3cfe||_0x22304d['get'](_0x58227d)?.['aiSource']||null;_0x23b0e5['set'](_0x58227d,{'userId':_0x702d04,'aiSource':_0x8a0f30}),_0x22304d['set'](_0x58227d,{'userId':_0x702d04,'aiSource':_0xc63861});}_0x58227d==_0x4659ee&&(_0x702d04=null,_0x4659ee=null);}}const _0x1247d2={},_0x488035=new Set();for(const _0x226d2a of _0xb17fb1){const _0x4c15dc=_0x3326ea['deletions'][_0x226d2a],_0x4819f4=_0x3326ea['insertions'][_0x226d2a];for(const {userId:_0x38b373}of this['_touchedMarkers']['values']())null!==_0x38b373&&_0x488035['add'](_0x38b373);for(const {userId:_0x292c65}of this['_touchedRoots']['values']())null!==_0x292c65&&_0x488035['add'](_0x292c65);const _0x104334={};this['_markChanges'](_0x4819f4,_0x3285d4['insertions'][_0x226d2a],_0x22304d,'insertion',_0x488035,_0x104334),this['_markChanges'](_0x4c15dc,_0x3285d4['deletions'][_0x226d2a],_0x23b0e5,'deletion',_0x488035,_0x104334),this['_collectSuggestionAiSources'](_0x4819f4,_0x104334),this['_collectSuggestionAiSources'](_0x4c15dc,_0x104334),_0x1247d2[_0x226d2a]={'insertions':this['_prepareViewToSave'](_0x4819f4),'deletions':this['_prepareViewToSave'](_0x4c15dc),'attachChange':this['_touchedRoots']['get'](_0x226d2a)||null,'attributesBefore':_0x2fea7c(this['_baseRootsAttributes']['get'](_0x226d2a))||{},'attributesAfter':_0x2fea7c(this['_diffRootsAttributes']['get'](_0x226d2a)),'rootElementName':_0x1e4584['get'](_0x226d2a),'aiSources':_0x104334};}const _0x4af4b1=Array['from'](_0x22304d['values']())['some'](_0x3067a6=>!(!_0x3067a6||!_0x3067a6['aiSource']))||Array['from'](_0x23b0e5['values']())['some'](_0x4596bf=>!(!_0x4596bf||!_0x4596bf['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x3dba36=>this['_aiTouchedMarkers']['has'](_0x3dba36));return{'diffData':_0x1247d2,'authorsIds':Array['from'](_0x488035),'hasAIChanges':_0x4af4b1};}_collectSuggestionAiSources(_0xcbbd29,_0x5b7c3e){const _0x108d8a=_0xcbbd29['markers'];for(const _0x1ae550 of _0x108d8a['keys']()){if(!_0x1ae550['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x1ae550))continue;const _0x29c323=this['_aiTouchedMarkers']['get'](_0x1ae550);_0x29c323&&(_0x5b7c3e[_0x1ae550]=_0x29c323);}}_processRootBeforeSave(_0x2c80ed){for(const [,_0x1414f5]of _0x2c80ed['markers']){const _0xcc5210=_0x1414f5['start']['getAncestors']()['filter'](_0x17cd6c=>'tableCell'==_0x17cd6c['name']);for(const _0x1a04a2 of _0xcc5210)0x1==_0x1a04a2['childCount']&&_0x1a04a2['getChild'](0x0)['is']('element','paragraph')&&_0x1a04a2['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x49ce59){this['_processRootBeforeSave'](_0x49ce59);const _0x4fc053=this['editor']['data']['toView'](_0x49ce59,{}),_0x376ba3=Array['from'](_0x4fc053['getChildren']())['map'](_0x29cf05=>this['_getViewJson'](_0x29cf05));return JSON['stringify'](_0x376ba3);}_getViewJson(_0x37e5f6){if(_0x37e5f6['is']('$text'))return _0x37e5f6['data'];{const _0x3f6c28=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x129332=_0x37e5f6,_0x5e3ddd=this['editor']['data']['htmlProcessor']['domConverter'],_0xfb1bb1={'type':_0x3f6c28['_getTypeCharForViewElement'](_0x129332),'name':_0x129332['name'],'attributes':Array['from'](_0x129332['getAttributes']()),'children':Array['from'](_0x129332['getChildren']())['map'](_0x463436=>this['_getViewJson'](_0x463436))};if(_0x37e5f6['is']('uiElement')&&'$comment'!=_0x37e5f6['name']){const _0x107889=_0x37e5f6['render'](_0x5e3ddd['domDocument'],_0x5e3ddd);_0xfb1bb1['children']['push'](_0x107889['outerHTML']);}else{if(_0x37e5f6['is']('rawElement')){const _0x2e43f3=_0x5e3ddd['domDocument']['createElement'](_0x129332['name']);_0x37e5f6['render'](_0x2e43f3,_0x5e3ddd),_0xfb1bb1['children']['push'](_0x2e43f3['innerHTML']);}}const _0x1692e6=Array['from'](_0x129332['getCustomProperties']());_0x1692e6['length']>0x0&&(_0xfb1bb1['customProperties']=_0x1692e6);const _0x4f004b=_0x129332['getFillerOffset']();return null!==_0x4f004b&&(_0xfb1bb1['fillerOffset']=_0x4f004b),_0xfb1bb1;}}['_markChanges'](_0x1ade96,_0x202ca7,_0x331e8c,_0x2dfc7c,_0x5e6eb5,_0x22d57d){let _0x45dcc7=null,_0x41f731=null,_0x1dc28e=0x0;const _0x54ade6=this['editor']['model'];for(let _0x170f6f=0x0;_0x170f6f<_0x202ca7['length'];_0x170f6f++){const _0x1e6401=this['_getVidAttributeName'](_0x202ca7[_0x170f6f]),_0x22d42e=_0x202ca7[_0x170f6f]['item']['getAttribute'](_0x1e6401),_0x3e91cd=_0x331e8c['get'](_0x22d42e),_0x119d30=_0x170f6f==_0x202ca7['length']-0x1;!_0x45dcc7&&_0x3e91cd&&(_0x45dcc7=_0x3e91cd,_0x41f731=_0x202ca7[_0x170f6f]);const _0x5b2909=!!_0x45dcc7&&!!_0x3e91cd&&_0x3e91cd['userId']!=_0x45dcc7['userId'],_0xe41f0c=!!_0x45dcc7&&!!_0x3e91cd&&_0x3e91cd['aiSource']!=_0x45dcc7['aiSource'];_0x45dcc7&&(!_0x3e91cd||_0x5b2909||_0xe41f0c)&&(_0xafa0b7(_0x3e91cd,Ot(_0x41f731,_0x1ade96,_0x54ade6),Ot(_0x202ca7[_0x170f6f],_0x1ade96,_0x54ade6)),_0x45dcc7=_0x3e91cd||null,_0x41f731=_0x3e91cd?_0x202ca7[_0x170f6f]:null),_0x45dcc7&&_0x119d30&&_0xafa0b7(_0x3e91cd,Ot(_0x41f731,_0x1ade96,_0x54ade6),Ct(_0x202ca7[_0x170f6f],_0x1ade96,_0x54ade6));}function _0xafa0b7(_0x12675e,_0x42cf26,_0x4c10a9){const _0x51e20d=_0x45dcc7['userId'],_0x620e7a=_0x45dcc7['aiSource'],_0x555527='revision:'+_0x2dfc7c+':'+_0x51e20d+':'+_0x1dc28e++,_0x9161e1=_0x54ade6['createRange'](_0x42cf26,_0x4c10a9);_0x1ade96['markers']['set'](_0x555527,_0x9161e1),_0x620e7a&&(_0x22d57d[_0x555527]=_0x620e7a),null!==_0x51e20d&&_0x5e6eb5['add'](_0x51e20d);}}_getVidAttributeName(_0x5679b8){switch(_0x5679b8['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x322e21){const _0x4b463f=this['_idsRoots']['get'](_0x322e21['position']['root']['rootName']),_0x49baab=_0x4a276e(_0x322e21['position'],_0x4b463f),_0x435614=null===_0x322e21['_authorId']?null:_0x322e21['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x309ee9=_0x322e21['_aiSource']||null,_0x45d39a=_0x49baab['parent'],_0x317054=this['_revisionId'],_0xf8db27=[];for(const _0x176df4 of _0x322e21['nodes'])if(_0x176df4['is']('element'))_0xf8db27['push'](this['_makeIdsRoot'](_0x176df4));else{for(let _0x2fca4e=0x0;_0x2fca4e<_0x176df4['offsetSize'];_0x2fca4e++)_0xf8db27['push'](new _0x1eeca3('$text',{'vid':this['_revisionId']++}));}const _0x3458af=this['_revisionId'];for(let _0x501c1d=_0x317054;_0x501c1d<_0x3458af;_0x501c1d++)this['_touched']['set'](_0x501c1d,{'userId':_0x435614,'aiSource':_0x309ee9});_0x45d39a['_insertChild'](_0x49baab['offset'],_0xf8db27);}_setTouched(_0x8af0bf,_0x55d4b,_0x4a3ec6){this['_touched']['set'](_0x8af0bf,{'userId':_0x55d4b,'aiSource':_0x4a3ec6||this['_touched']['get'](_0x8af0bf)?.['aiSource']||null});}_handleMoveOperation(_0x2efe78){(_0x2efe78=this['_cloneOperation'](_0x2efe78,this['_idsRoots']))['_execute']();const _0x1780fe=null===_0x2efe78['_authorId']?null:_0x2efe78['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5b373c=_0x2efe78['_aiSource']||null,_0x41587e=_0x2efe78['getMovedRangeStart'](),_0x4f37f8=_0x41587e['parent'],_0x50e114=_0x41587e['offset'],_0x8213a3=(_0x2ff81c,_0x3447f6,_0x111ad5)=>{for(let _0x6ce885=_0x3447f6;_0x6ce885<_0x111ad5;_0x6ce885++){const _0x75f419=_0x2ff81c['getChild'](_0x6ce885);_0x75f419['is']('element','$text')?this['_setTouched'](_0x75f419['getAttribute']('vid'),_0x1780fe,_0x5b373c):(this['_setTouched'](_0x75f419['getAttribute']('vid_start'),_0x1780fe,_0x5b373c),_0x8213a3(_0x75f419,0x0,_0x75f419['childCount']),this['_setTouched'](_0x75f419['getAttribute']('vid_end'),_0x1780fe,_0x5b373c));}};_0x8213a3(_0x4f37f8,_0x50e114,_0x50e114+_0x2efe78['howMany']);}_handleMergeOperation(_0x1f482d){const _0x3227bc=null===(_0x1f482d=this['_cloneOperation'](_0x1f482d,this['_idsRoots']))['_authorId']?null:_0x1f482d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x50d163=_0x1f482d['_aiSource']||null,_0x5e2617=_0x1f482d['targetPosition']['parent'],_0x516ff7=_0x1f482d['sourcePosition']['parent'],_0x1de041=_0x5e2617['getAttribute']('vid_end'),_0x107c04=_0x516ff7['getAttribute']('vid_start');_0x5e2617['_setAttribute']('vid_end',_0x516ff7['getAttribute']('vid_end')),_0x516ff7['_setAttribute']('vid_end',_0x1de041),this['_setTouched'](_0x107c04,_0x3227bc,_0x50d163),this['_setTouched'](_0x1de041,_0x3227bc,_0x50d163),_0x1f482d['_execute']();}_handleSplitOperation(_0x574b61){const _0x34619a=null===(_0x574b61=this['_cloneOperation'](_0x574b61,this['_idsRoots']))['_authorId']?null:_0x574b61['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x26db1a=_0x574b61['_aiSource']||null,_0x4b7eb8=_0x574b61['graveyardPosition'],_0x526f40=_0x574b61['splitPosition']['parent'];_0x574b61['_execute']();const _0x5568dd=_0x526f40['getAttribute']('vid_end'),_0x547fb0=_0x574b61['insertionPosition']['nodeAfter'];if(_0x4b7eb8){const _0x41a298=_0x547fb0['getAttribute']('vid_end'),_0x39035c=_0x526f40['getAttribute']('vid_end');_0x526f40['_setAttribute']('vid_end',_0x41a298),_0x547fb0['_setAttribute']('vid_end',_0x39035c),this['_setTouched'](_0x526f40['getAttribute']('vid_end'),_0x34619a,_0x26db1a),this['_setTouched'](_0x547fb0['getAttribute']('vid_start'),_0x34619a,_0x26db1a);}else{const _0x1a63ef=this['_revisionId']++,_0x3282fb=this['_revisionId']++;_0x526f40['_setAttribute']('vid_end',_0x1a63ef),_0x547fb0['_setAttribute']('vid_start',_0x3282fb),_0x547fb0['_setAttribute']('vid_end',_0x5568dd),this['_setTouched'](_0x1a63ef,_0x34619a,_0x26db1a),this['_setTouched'](_0x3282fb,_0x34619a,_0x26db1a);}}_handleMarkerOperation(_0x47250d){if(!_0x47250d['affectsData'])return;const _0x10239b=(_0x47250d=this['_cloneOperation'](_0x47250d,this['_diffRoots']))['oldRange']?_0x47250d['oldRange']['root']:null,_0x30399e=_0x47250d['newRange']?_0x47250d['newRange']['root']:null;_0x10239b&&this['_markers']['delete'](_0x47250d['name']),_0x30399e&&this['_markers']['set'](_0x47250d['name'],_0x47250d['newRange']['clone']());const _0x9381db=null===_0x47250d['_authorId']?null:_0x47250d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x38bb34=_0x47250d['name'];if(_0x47250d['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x38bb34,_0x47250d['_aiSource']),!this['_touchedMarkers']['has'](_0x38bb34))return void this['_touchedMarkers']['set'](_0x38bb34,{'range':_0x47250d['oldRange'],'userId':_0x9381db});const _0x5eca7f=this['_touchedMarkers']['get'](_0x38bb34),_0xb08dbb=_0x5eca7f['range'],_0x444f03=_0x47250d['newRange'];null==_0xb08dbb&&null==_0x444f03||_0xb08dbb&&_0x444f03&&_0xb08dbb['isEqual'](_0x444f03)?this['_touchedMarkers']['delete'](_0x47250d['name']):_0x5eca7f['userId']=_0x9381db;}_handleRootOperation(_0x5ae944,_0x1baa26){this['_diffRoots']['has'](_0x5ae944['rootName'])?this['_diffRoots']['get'](_0x5ae944['rootName'])['_isAttached']=_0x5ae944['isAdd']:(this['_diffRoots']['set'](_0x5ae944['rootName'],Et(_0x5ae944['rootName'],_0x5ae944['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5ae944['rootName'],{}),_0x1baa26&&this['_idsRoots']['set'](_0x5ae944['rootName'],Et(_0x5ae944['rootName'],_0x5ae944['elementName'],!0x0)));const _0x4b537a=null===_0x5ae944['_authorId']?null:_0x5ae944['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x428b6f=this['_touchedRoots']['get'](_0x5ae944['rootName']);_0x428b6f&&_0x428b6f['userId']===_0x4b537a?this['_touchedRoots']['delete'](_0x5ae944['rootName']):this['_touchedRoots']['set'](_0x5ae944['rootName'],{'userId':_0x4b537a,'isAttached':_0x5ae944['isAdd']});}_handleRootAttributeOperation(_0x5300a2){const _0x3cf7d1=this['_diffRootsAttributes']['get'](_0x5300a2['root']['rootName']);null===_0x5300a2['newValue']?delete _0x3cf7d1[_0x5300a2['key']]:_0x3cf7d1[_0x5300a2['key']]=_0x5300a2['newValue'];}};function St(_0x477c3b){const _0x2fd72b=Et(_0x477c3b['rootName'],_0x477c3b['name'],_0x477c3b['isAttached']());for(const _0x529bde of _0x477c3b['getChildren']()){const _0x3a9875=_0x529bde['_clone'](!0x0);_0x2fd72b['_appendChild'](_0x3a9875);}return _0x2fd72b;}function Et(_0x1fe935,_0x556e10,_0x5d9c0e=!0x0){const _0x4aefee=new _0x47bfc1();return _0x4aefee['rootName']=_0x1fe935,_0x4aefee['name']=_0x556e10,_0x4aefee['_isAttached']=_0x5d9c0e,_0x4aefee['isAttached']=()=>_0x4aefee['_isAttached'],_0x4aefee;}function Ot(_0x4b2e09,_0x5f29ba,_0x5e6e1e){const _0x1dd495='elementEnd'==_0x4b2e09['type']?_0x5e6e1e['createPositionAt'](_0x4b2e09['item'],'end'):_0x5e6e1e['createPositionBefore'](_0x4b2e09['item']);return _0x5e6e1e['createPositionFromPath'](_0x5f29ba,_0x1dd495['path'],_0x1dd495['stickiness']);}function Ct(_0x2928cc,_0x23be2c,_0x288dc3){const _0x56ee56='elementStart'==_0x2928cc['type']?_0x288dc3['createPositionAt'](_0x2928cc['item'],0x0):_0x288dc3['createPositionAfter'](_0x2928cc['item']);return _0x288dc3['createPositionFromPath'](_0x23be2c,_0x56ee56['path'],_0x56ee56['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x29cb2f();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x38c105){super(),this['id']=_0x38c105['id']||_0x2e389d(),this['author']=_0x38c105['author'],this['type']=_0x38c105['type'],this['data']=_0x38c105['data']||{},this['rootName']=_0x38c105['rootName'],this['set']('createdAt',_0x38c105['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x562499,_0x596471){this['newRevisionId']=_0x562499,this['oldRevisionId']=_0x596471,this['changes']=new _0x54969b();}_setChanges(_0xfc06bf){for(const _0x3f1723 of _0xfc06bf)this['changes']['add'](_0x3f1723);}},Pt=class extends _0x34e937{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[_0x3d100c,_0x3b69c4,bt,Rt];}constructor(_0x3cea64){super(_0x3cea64),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',(_0x5ea855,_0x23efcc,_0x3bb96a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x41b2e5=>{for(const _0x5c20c1 of this['editor']['editing']['view']['document']['roots'])_0x3bb96a?_0x41b2e5['removeClass']('ck-editor__editable__overlay',_0x5c20c1):_0x41b2e5['addClass']('ck-editor__editable__overlay',_0x5c20c1);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2e1079=>null!==_0x2e1079),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1e71b9,_0x6e5594,_0x47540f)=>_0x1e71b9&&_0x47540f?_0x6e5594['changes']['getIndex'](_0x47540f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3cf5e5,_0x34626d)=>_0x3cf5e5?_0x34626d['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3b69c4),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x362e21=this['editor'],_0x55bab3=new $t(_0x362e21,{'direction':'backward'}),_0x48202d=new $t(_0x362e21,{'direction':'forward'});_0x362e21['commands']['add']('showPreviousChange',_0x55bab3),_0x362e21['commands']['add']('showNextChange',_0x48202d),_0x362e21['commands']['add']('restoreRevision',new Ft(_0x362e21)),this['on']('change:numberOfChanges',()=>{_0x55bab3['refresh'](),_0x48202d['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x362e21['enableReadOnlyMode']('revision-viewer'),_0x362e21['plugins']['has']('WidgetToolbarRepository')&&_0x362e21['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x14ae54){return await this['_utils']['loadRevisionData'](_0x14ae54,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x14ae54);}async getRevisionRootsAttributes(_0xd30148){return await this['_utils']['loadRevisionData'](_0xd30148,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xd30148);}async['compare'](_0x355b82,_0x45328d,_0x5a6eea=!0x1){if(!this['isEnabled'])return;const _0xcbb4db=this['diff'],_0x5ab017=this['repository'],_0x1c04d1='string'==typeof _0x355b82?_0x5ab017['getRevision'](_0x355b82):_0x355b82,_0x176340='string'==typeof _0x45328d?_0x5ab017['getRevision'](_0x45328d):_0x45328d,_0x249ccd=_0x1c04d1['id'],_0x9e7d4c=_0x176340?_0x176340['id']:null;if(!_0x5a6eea&&this['diff']&&this['diff']['newRevisionId']===_0x249ccd&&this['diff']['oldRevisionId']===_0x9e7d4c)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x249ccd,_0x9e7d4c);const _0xb64b49=this['_getRevisionsRange'](_0x1c04d1,_0x176340,!0x0)['map'](_0x351e8c=>this['_utils']['loadRevisionData'](_0x351e8c,this['adapter']));return _0xb64b49['push'](new Promise(_0x323a42=>{setTimeout(_0x323a42,0x14);})),Promise['all'](_0xb64b49)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x5c2f31=this['_getDiff'](_0x249ccd,_0x9e7d4c);this['_cleanUpCommentMarkers'](_0x5c2f31);for(const _0x532848 of _0x5c2f31['changes'])this['_changeIdToChange']['set'](_0x532848['id'],_0x532848);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2b0455=>{for(const _0x3f7f70 of this['editor']['model']['document']['getRootNames']())_0x2b0455['detachRoot'](_0x3f7f70);for(const _0x39afec of Object['keys'](_0x5c2f31['model'])){const _0x5443af=_0x5c2f31['model'][_0x39afec]['name'],_0x163985=_0x2b0455['addRoot'](_0x39afec,_0x5443af);for(const _0x3f958a of Object['keys'](_0x5c2f31['attributes'][_0x39afec]))_0x2b0455['setAttribute'](_0x3f958a,_0x5c2f31['attributes'][_0x39afec][_0x3f958a],_0x163985);_0x2b0455['insert'](_0x5c2f31['model'][_0x39afec],_0x163985,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x5c2f31['changes'])),this['isReady']=!0x0;})['catch'](_0x5977fa=>{console['error'](_0x5977fa),this['_cleanUp'](),_0xcbb4db&&(this['diff']=_0xcbb4db),this['isReady']=!0x0;});}addRevisionData(_0x5975f8,_0x5c8e3d){const _0x355902=this['repository']['createRevision'](_0x5975f8);return _0x355902['on']('_update',(_0x4c6a40,_0x55523a,_0x2c5665)=>_0x5c8e3d(_0x55523a,_0x2c5665,_0x355902)),this['repository']['addRevision'](_0x355902),_0x355902;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x54dd67=>{for(const _0x34386e of this['editor']['model']['document']['getRootNames']())_0x54dd67['detachRoot'](_0x34386e);});}_cleanUpCommentMarkers(_0x5716f7){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x4ced9b=this['_getVisibleCommentThreadIds']();for(const _0x563c9b of Object['values'](_0x5716f7['model']))for(const _0x57c467 of Array['from'](_0x563c9b['markers']['keys']()))_0x57c467['startsWith']('revision-comment:')&&!_0x4ced9b['has'](Ut(_0x57c467))&&_0x563c9b['markers']['delete'](_0x57c467);}_sortAndFilterDiffChanges(_0x5ba19e){const _0x428499=[],_0x5ea8bf=new Map();for(const _0x3b5e87 of this['editor']['model']['document']['getRootNames']()){const _0x45be08=this['editor']['editing']['view']['getDomRoot'](_0x3b5e87);if(!_0x45be08)continue;const _0x11fea5=_0x45be08['getClientRects']()['item'](0x0);_0x11fea5&&(_0x428499['push'](_0x3b5e87),_0x5ea8bf['set'](_0x3b5e87,_0x11fea5));}return _0x428499['sort']((_0x117b79,_0x5411f7)=>{const _0x2f6d9a=_0x5ea8bf['get'](_0x117b79),_0x4fc5f6=_0x5ea8bf['get'](_0x5411f7);return _0x2f6d9a['y']-_0x4fc5f6['y']||_0x2f6d9a['x']-_0x4fc5f6['x'];}),(_0x5ba19e=_0x5ba19e['filter'](_0x23d5c1=>_0x428499['includes'](_0x23d5c1['rootName'])))['sort']((_0x4ef094,_0x59516b)=>_0x428499['indexOf'](_0x4ef094['rootName'])-_0x428499['indexOf'](_0x59516b['rootName'])),_0x5ba19e;}['_makeTape'](_0x531e6b,_0xa2387a={}){const _0x5570ac=Array['from'](_0x531e6b['markers'])['filter'](([_0x36201a,_0x1b63f7])=>_0x36201a['startsWith']('revision:')&&!_0x1b63f7['isCollapsed']),_0x132fd3=Array['from'](this['editor']['model']['createRangeIn'](_0x531e6b)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x5570ac['length'])for(const _0x89aa72 of _0x132fd3){const [_0x2a9ca1,_0x334051]=_0x5570ac[0x0],[,_0xe89908,_0x1a03ee]=_0x2a9ca1['split'](':'),_0x203e9e=_0xa2387a[_0x2a9ca1]||null;if(_0x334051['end']['isEqual'](_0x89aa72['nextPosition'])&&_0x5570ac['shift'](),(_0x89aa72['previousPosition']['isEqual'](_0x334051['start'])||_0x89aa72['previousPosition']['isAfter'](_0x334051['start']))&&('insertion'==_0xe89908?_0x89aa72['isAdded']={'userId':_0x1a03ee,'aiSource':_0x203e9e}:'deletion'==_0xe89908&&(_0x89aa72['isRemoved']={'userId':_0x1a03ee,'aiSource':_0x203e9e})),0x0==_0x5570ac['length'])break;}return _0x132fd3;}_refreshStartEndIndex(_0x30c8cc){const _0x32e986=new Map();for(let _0x213cd7=0x0;_0x213cd7<_0x30c8cc['length'];_0x213cd7++)'text'===_0x30c8cc[_0x213cd7]['type']?(_0x30c8cc[_0x213cd7]['item']['startIndex']=_0x213cd7,_0x30c8cc[_0x213cd7]['item']['endIndex']=_0x213cd7):('elementStart'===_0x30c8cc[_0x213cd7]['type']?_0x30c8cc[_0x213cd7]['item']['startIndex']=_0x213cd7:'elementEnd'===_0x30c8cc[_0x213cd7]['type']&&(_0x30c8cc[_0x213cd7]['item']['endIndex']=_0x213cd7),_0x32e986['set'](_0x30c8cc[_0x213cd7]['id'],_0x213cd7));for(const _0x286a21 of _0x32e986['values']())'elementStart'===_0x30c8cc[_0x286a21]['type']?_0x30c8cc[_0x286a21]['item']['endIndex']=_0x32e986['get'](_0x30c8cc[_0x286a21]['pairId']):'elementEnd'===_0x30c8cc[_0x286a21]['type']&&(_0x30c8cc[_0x286a21]['item']['startIndex']=_0x32e986['get'](_0x30c8cc[_0x286a21]['pairId']));}['_processTape'](_0x3a48ec){for(let _0x49b8c1=0x0;_0x49b8c1<_0x3a48ec['length'];_0x49b8c1++){if('elementStart'===_0x3a48ec[_0x49b8c1]['type'])_0x3a48ec[_0x49b8c1]['item']['startIndex']=_0x49b8c1;else{if('elementEnd'===_0x3a48ec[_0x49b8c1]['type']){_0x3a48ec[_0x49b8c1]['item']['endIndex']=_0x49b8c1;const _0x31320f=_0x3a48ec[_0x49b8c1]['item']['startIndex'];_0x3a48ec[_0x31320f]['pairId']=_0x3a48ec[_0x49b8c1]['id'],_0x3a48ec[_0x49b8c1]['pairId']=_0x3a48ec[_0x31320f]['id'];}else _0x3a48ec[_0x49b8c1]['item']['startIndex']=_0x49b8c1,_0x3a48ec[_0x49b8c1]['item']['endIndex']=_0x49b8c1,_0x3a48ec[_0x49b8c1]['pairId']=null;}_0x3a48ec[_0x49b8c1]['markersStart']||(_0x3a48ec[_0x49b8c1]['markersStart']=[],_0x3a48ec[_0x49b8c1]['markersEnd']=[]);}}_markInsertions(_0x15fb93,_0x5983fd){const _0x5934e1=_0x15fb93['filter'](_0x5f5341=>!_0x5f5341['isAdded']);for(let _0x26aa86=0x0;_0x26aa86<_0x5983fd['length'];_0x26aa86++)_0x5983fd[_0x26aa86]['isAdded']&&(_0x5934e1[_0x26aa86]['isAdded']=_0x5983fd[_0x26aa86]['isAdded']);}_getDiff(_0x13ad97,_0x418e71=null){const _0x5a8c7c=this['repository']['getRevision'](_0x13ad97),_0x21fa7d=_0x418e71?this['repository']['getRevision'](_0x418e71):null,_0x2482b5=this['_getRevisionsRange'](_0x5a8c7c,_0x21fa7d),_0x4e6eb0=_0x2482b5[_0x2482b5['length']-0x1],_0x576de7=new Map(),_0x3fd7da={'model':{},'attributes':{},'changes':[]},_0x3cb1eb=new Set(),_0x341a3d=new Map();for(let _0x5c1506=_0x2482b5['length']-0x1;_0x5c1506>=0x0;_0x5c1506--){const _0x5cfb80=_0x2482b5[_0x5c1506];for(const _0x1e1898 of Object['keys'](_0x5cfb80['diffData']))if(_0x5cfb80['diffData'][_0x1e1898]['attachChange']){const _0x2db427=_0x5cfb80['diffData'][_0x1e1898]['attachChange'];_0x2db427['isAttached']?(_0x3cb1eb['add'](_0x1e1898),_0x341a3d['has'](_0x1e1898)&&_0x341a3d['get'](_0x1e1898)['userId']==_0x2db427['userId']?_0x341a3d['delete'](_0x1e1898):_0x341a3d['set'](_0x1e1898,_0x2db427)):_0x341a3d['has'](_0x1e1898)?(_0x3cb1eb['delete'](_0x1e1898),_0x341a3d['delete'](_0x1e1898)):(_0x3cb1eb['add'](_0x1e1898),_0x341a3d['set'](_0x1e1898,_0x2db427));}else _0x3cb1eb['add'](_0x1e1898);}for(const _0xcc896e of _0x3cb1eb){const _0x29c434=_0x341a3d['has'](_0xcc896e)&&!_0x341a3d['get'](_0xcc896e)['isAttached'];let _0x512122=_0x29c434?_0x2482b5['length']-0x1:0x0;const _0x4de77d=_0x29c434?-0x1:0x1;for(;_0x2482b5[_0x512122];){const _0x5f40d5=_0x2482b5[_0x512122];if(_0x5f40d5['diffData'][_0xcc896e]){const _0x4651ce=_0x29c434?_0x5f40d5['diffData'][_0xcc896e]['attributesBefore']:_0x5f40d5['diffData'][_0xcc896e]['attributesAfter'];_0x3fd7da['attributes'][_0xcc896e]=_0x4651ce?_0x2fea7c(_0x4651ce):{};break;}_0x512122+=_0x4de77d;}}for(const _0x30e6cf of _0x2482b5){_0x30e6cf['model']={};for(const _0xa23d06 of _0x30e6cf['authors'])_0x576de7['set'](_0xa23d06['id'],_0xa23d06);for(const _0x589792 of _0x3cb1eb){const _0x398c54=_0x30e6cf['diffData'][_0x589792]?_0x30e6cf['diffData'][_0x589792]['insertions']:'[]',_0x374049=_0x30e6cf['diffData'][_0x589792]?_0x30e6cf['diffData'][_0x589792]['deletions']:'[]',_0x299107=_0x30e6cf['diffData'][_0x589792]?.['rootElementName']||'$root';_0x30e6cf['model'][_0x589792]={'insertions':this['_utils']['_makeModelFromViewString'](_0x398c54,_0x299107),'deletions':this['_utils']['_makeModelFromViewString'](_0x374049,_0x299107)};}}for(const _0x10f599 of _0x3cb1eb){let _0x402f71=null,_0x3c0860=0x0;const _0x4d5d82=_0x2482b5['map'](_0xaba3d0=>_0xaba3d0['diffData'][_0x10f599]?.['rootElementName'])['find'](_0x142727=>void 0x0!==_0x142727)||'$root',_0x46ec03=new Map(Array['from'](_0x5a8c7c['model'][_0x10f599]['insertions']['markers'])['filter'](([_0x108aba])=>!_0x108aba['startsWith']('revision:')));let _0x45eed9=0x0;for(const _0x5dfc5f of _0x2482b5){const _0x15618e=_0x5dfc5f['diffData'][_0x10f599]?.['aiSources']||{},_0x46a846=this['_makeTape'](_0x5dfc5f['model'][_0x10f599]['insertions'],_0x15618e);_0x5dfc5f==_0x5a8c7c?(_0x402f71=_0x46a846,_0x3c0860=_0x402f71['length'],_0x402f71['forEach'](_0x9804c1=>{_0x9804c1['id']=_0x45eed9++;}),this['_processTape'](_0x402f71)):this['_markInsertions'](_0x402f71,_0x46a846);const _0x491bdc=_0x402f71['filter'](_0x219908=>!_0x219908['isAdded'])['map'](_0x33121d=>_0x33121d['id']);let _0x3c85bd=0x0;const _0x173a55=this['_makeTape'](_0x5dfc5f['model'][_0x10f599]['deletions'],_0x15618e);_0x173a55['forEach'](_0x211543=>{_0x211543['isRemoved']?_0x211543['id']=_0x3c0860++:_0x211543['id']=_0x491bdc[_0x3c85bd++];}),this['_processTape'](_0x173a55),this['_setDistance'](_0x402f71,'isAdded'),this['_setDistance'](_0x173a55,'isRemoved'),_0x5dfc5f==_0x5a8c7c&&this['_markMarkers'](_0x402f71,_0x46ec03),_0x402f71=this['_joinTapes'](_0x402f71,_0x173a55),this['_refreshStartEndIndex'](_0x402f71),this['_setDistance'](_0x402f71,'isRemoved');}_0x402f71=_0x402f71['filter'](_0xeeb3f1=>!(_0xeeb3f1['isAdded']&&_0xeeb3f1['isRemoved']));const _0x5c6069=new Map(_0x4e6eb0['model'][_0x10f599]['deletions']['markers']),_0x10ded4=new Set(_0x46ec03['keys']());for(const _0x2a43a0 of _0x5c6069['keys']())_0x10ded4['delete'](_0x2a43a0);const _0x2ec5d0=Object['assign']({},..._0x2482b5['map'](_0x396788=>_0x396788['diffData'][_0x10f599]?.['aiSources']));this['_markSuggestions'](_0x402f71,_0x10ded4,_0x2ec5d0),this['_fixObsoleteTags'](_0x402f71),_0x402f71=this['_removeMissingPairs'](_0x402f71),_0x402f71=this['_markMismatchedRemovedTags'](_0x402f71),_0x402f71=this['_removeUnsupportedChanges'](_0x402f71);const {root:_0x3dda83,changes:_0x3cf30d}=this['_makeModelFromTape'](_0x402f71,_0x576de7,_0x10f599,_0x4d5d82);_0x3fd7da['model'][_0x10f599]=_0x3dda83;const _0x275fc0=_0x341a3d['get'](_0x10f599);if(_0x275fc0){const _0x18103d=_0x576de7['get'](_0x275fc0['userId']),_0x3adf60=new Mt({'author':_0x18103d,'type':_0x275fc0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x10f599});_0x3cf30d['unshift'](_0x3adf60),_0x3fd7da['attributes'][_0x10f599]['revisionHistoryAttachChange']=_0x3adf60['id'];}_0x3fd7da['changes']=_0x3fd7da['changes']['concat'](_0x3cf30d);}return _0x3fd7da;}['_markMarkers'](_0x63bb7b,_0x4e9d66){for(let _0x12b721=0x0;_0x12b721<_0x63bb7b['length'];_0x12b721++)for(const [_0x3a7ab5,_0x22c0b6]of _0x4e9d66)!_0x22c0b6['isCollapsed']&&_0x22c0b6['start']['isEqual'](_0x63bb7b[_0x12b721]['previousPosition'])&&_0x63bb7b[_0x12b721]['markersStart']['push'](_0x3a7ab5),_0x22c0b6['end']['isEqual'](_0x63bb7b[_0x12b721]['nextPosition'])&&_0x63bb7b[_0x12b721]['markersEnd']['push'](_0x3a7ab5);}['_joinTapes'](_0x527f0a,_0xb3bcb0){let _0x58643e=[],_0x5e0fdf=0x0,_0x442bd7=0x0;for(;_0x5e0fdf<_0x527f0a['length']||_0x442bd7<_0xb3bcb0['length'];){const _0x40f81c=_0x527f0a[_0x5e0fdf]||{},_0x5b629c=_0xb3bcb0[_0x442bd7]||{};if(_0x40f81c['id']==_0x5b629c['id'])_0x5e0fdf++,_0x442bd7++,_0x58643e['push'](_0x40f81c);else{if(_0x5b629c['isRemoved']&&_0x40f81c['isAdded']){const {commonTape:_0x807666,iEnd:_0x43955b,jEnd:_0x509f58}=this['_threeWayMerge'](_0x527f0a,_0x5e0fdf,_0xb3bcb0,_0x442bd7);_0x58643e=_0x58643e['concat'](_0x807666),_0x5e0fdf=_0x43955b,_0x442bd7=_0x509f58;}else _0x5b629c['isRemoved']?(_0x442bd7++,_0x58643e['push'](_0x5b629c)):(_0x5e0fdf++,_0x58643e['push'](_0x40f81c));}}return _0x58643e;}_markSuggestions(_0x12ade3,_0x13b560,_0x490bb4){const _0x51293a=[];for(let _0x3f9a79=0x0;_0x3f9a79<_0x12ade3['length'];_0x3f9a79++){for(let _0x498d23=0x0;_0x498d23<_0x12ade3[_0x3f9a79]['markersStart']['length'];_0x498d23++){const _0x20e58a=_0x12ade3[_0x3f9a79]['markersStart'][_0x498d23];if(!_0x13b560['has'](_0x20e58a))continue;const {group:_0x1c11c1,type:_0x2c6c2b,authorId:_0x341004}=_0xb76438(_0x20e58a);if('revision-suggestion'!=_0x1c11c1||'insertion'!=_0x2c6c2b&&'deletion'!=_0x2c6c2b)continue;const _0xffaecd=_0x490bb4['suggestion:'+_0x20e58a['slice'](0x14)]||null;_0x51293a['unshift']({'type':_0x2c6c2b,'name':_0x20e58a,'userId':_0x341004,'aiSource':_0xffaecd}),_0x12ade3[_0x3f9a79]['markersStart']['splice'](_0x498d23,0x1),_0x498d23--;}_0x1c2e65(_0x12ade3[_0x3f9a79]);for(let _0x59ad60=0x0;_0x59ad60<_0x12ade3[_0x3f9a79]['markersEnd']['length'];_0x59ad60++){const _0x22d663=_0x12ade3[_0x3f9a79]['markersEnd'][_0x59ad60];if(!_0x13b560['has'](_0x22d663))continue;const {group:_0x4aa8d0,type:_0xd6d731}=_0xb76438(_0x22d663);if('revision-suggestion'!=_0x4aa8d0||'insertion'!=_0xd6d731&&'deletion'!=_0xd6d731)continue;_0x12ade3[_0x3f9a79]['markersEnd']['splice'](_0x59ad60,0x1),_0x59ad60--;const _0x174ab6=_0x51293a['findIndex'](_0x3b4fef=>_0x3b4fef['name']==_0x22d663);_0x174ab6>-0x1&&_0x51293a['splice'](_0x174ab6,0x1);}}function _0xb76438(_0x4ec850){const _0x1b9246=_0x4ec850['split'](':');return{'group':_0x1b9246[0x0],'type':_0x1b9246[0x1],'subType':_0x1b9246['length']>=0x5?_0x1b9246[0x2]:null,'id':_0x1b9246['length']<0x5?_0x1b9246[0x2]:_0x1b9246[0x3],'authorId':_0x1b9246['length']<0x5?_0x1b9246[0x3]:_0x1b9246[0x4],'markerCount':0x6==_0x1b9246['length']?_0x1b9246[0x5]:null};}function _0x1c2e65(_0x2160cd){for(let _0x3994cc=0x0;_0x3994cc<_0x51293a['length'];_0x3994cc++){if(_0x2160cd['isAdded']&&'insertion'==_0x51293a[_0x3994cc]['type']&&_0x2160cd['isAdded']['userId']==_0x51293a[_0x3994cc]['userId'])return _0x2160cd['isAddSuggestion']={..._0x51293a[_0x3994cc],'aiSource':_0x2160cd['isAdded']['aiSource']||_0x51293a[_0x3994cc]['aiSource']},void delete _0x2160cd['isAdded'];if(!_0x2160cd['isAdded']&&!_0x2160cd['isRemoved']&&'deletion'==_0x51293a[_0x3994cc]['type'])return void(_0x2160cd['isRemoveSuggestion']=_0x51293a[_0x3994cc]);}}}_setDistance(_0xe9fbdc,_0x53b498){let _0x36fce6=0x0,_0x5e7130=!0x1;const _0x62da24=new Map();for(const _0x368c98 of _0xe9fbdc)_0x368c98[_0x53b498]?_0x5e7130&&(_0x36fce6++,_0x5e7130=!0x1):(_0x36fce6++,_0x5e7130=!0x0),_0x62da24['set'](_0x368c98['id'],_0x36fce6);for(let _0x31b498=0x0;_0x31b498<_0xe9fbdc['length'];_0x31b498++){if('isRemoved'==_0x53b498&&_0xe9fbdc[_0x31b498]['isAdded']||'isAdded'==_0x53b498&&_0xe9fbdc[_0x31b498]['isRemoved'])continue;if('text'==_0xe9fbdc[_0x31b498]['type']){_0xe9fbdc[_0x31b498]['distance']=0x0;continue;}const _0x380750=_0x62da24['get'](_0xe9fbdc[_0x31b498]['pairId']),_0x30fc9a=_0x62da24['get'](_0xe9fbdc[_0x31b498]['id']);_0xe9fbdc[_0x31b498]['distance']=_0x380750-_0x30fc9a;}}_getRevisionsRange(_0x114093,_0x944dc3,_0x4d35cc=!0x1){const _0x43558a=[];let _0x48e6b6=this['repository']['getIndex'](_0x114093),_0x213905=this['repository']['getIndex'](_0x944dc3);for(-0x1==_0x213905&&(_0x213905=this['repository']['_revisions']['length'],_0x4d35cc=!0x1);_0x48e6b6<_0x213905;)_0x43558a['push'](this['repository']['getRevision'](_0x48e6b6)),_0x48e6b6++;return _0x4d35cc&&_0x43558a['push'](this['repository']['getRevision'](_0x48e6b6)),_0x43558a;}_threeWayMerge(_0x2fe22b,_0x53c270,_0xb6bdbf,_0x265847){const _0x3befe9=this['editor']['model']['schema'];let _0x4a9c68=_0x53c270;for(;_0x2fe22b[_0x4a9c68]&&_0x2fe22b[_0x4a9c68]['isAdded'];)_0x4a9c68++;let _0x3d4314=_0x265847;for(;_0xb6bdbf[_0x3d4314]&&_0xb6bdbf[_0x3d4314]['isRemoved'];)_0x3d4314++;_0x392f91(_0x2fe22b,_0x53c270,_0x4a9c68),_0x392f91(_0xb6bdbf,_0x265847,_0x3d4314);const _0x1eb4be=_0xb6bdbf['slice'](_0x265847,_0x3d4314)['concat'](_0x2fe22b['slice'](_0x53c270,_0x4a9c68));return _0x1eb4be['sort']((_0x2c5d7b,_0x25fc16)=>_0x2c5d7b['side']!=_0x25fc16['side']?_0x2c5d7b['side']-_0x25fc16['side']:_0x2c5d7b['level']!=_0x25fc16['level']?_0x2c5d7b['level']-_0x25fc16['level']:_0x2c5d7b['distance']!=_0x25fc16['distance']?_0x25fc16['distance']-_0x2c5d7b['distance']:!!_0x2c5d7b['isAdded']!=!!_0x25fc16['isAdded']?-0x1==_0x2c5d7b['side']||0x0==_0x2c5d7b['side']?_0x2c5d7b['isAdded']?-0x1:0x1:_0x2c5d7b['isAdded']?0x1:-0x1:_0x2c5d7b['index']-_0x25fc16['index']),{'commonTape':_0x1eb4be,'iEnd':_0x4a9c68,'jEnd':_0x3d4314};function _0x392f91(_0x31af11,_0x46da0e,_0x275c35){let _0x3b791c=-0x1,_0x120673=Number['POSITIVE_INFINITY'],_0x15e001=!0x0;for(let _0x10ab9d=_0x46da0e;_0x10ab9d<_0x275c35;_0x10ab9d++)if(_0x3befe9['isInline'](_0x31af11[_0x10ab9d]['item'])||(_0x15e001=!0x1),_0x31af11[_0x10ab9d]['item']['startIndex']<_0x46da0e&&(_0x3b791c=_0x10ab9d),_0x31af11[_0x10ab9d]['item']['endIndex']>=_0x275c35){_0x120673=_0x10ab9d;break;}_0x15e001&&(_0x3b791c=_0x275c35-0x1);for(let _0x4652a2=_0x46da0e;_0x4652a2<_0x275c35;_0x4652a2++)_0x31af11[_0x4652a2]['side']=_0x4652a2<=_0x3b791c?-0x1:_0x4652a2<_0x120673?0x0:0x1,_0x31af11[_0x4652a2]['index']=_0x4652a2;let _0x3404cf=0x0;for(let _0x5e89a6=_0x46da0e;_0x5e89a6<=_0x3b791c;_0x5e89a6++)0x0==_0x31af11[_0x5e89a6]['distance']?_0x31af11[_0x5e89a6]['level']=_0x3404cf:(_0x3404cf++,_0x31af11[_0x5e89a6]['level']=_0x3404cf,_0x3404cf++);for(let _0x8289b=_0x46da0e;_0x8289b<_0x275c35;_0x8289b++)0x0==_0x31af11[_0x8289b]['side']&&(_0x31af11[_0x8289b]['level']=_0x3404cf);_0x3404cf=0x0;for(let _0x503cd1=_0x275c35-0x1;_0x503cd1>=_0x120673;_0x503cd1--)0x0==_0x31af11[_0x503cd1]['distance']?_0x31af11[_0x503cd1]['level']=_0x3404cf:(_0x3404cf--,_0x31af11[_0x503cd1]['level']=_0x3404cf,_0x3404cf--);}}_fixObsoleteTags(_0x51cadc){const _0x5e2990=new Map(),_0x5678d7=this['editor']['model']['schema'];for(let _0x10b078=0x1;_0x10b078<_0x51cadc['length'];_0x10b078++){let _0x8f994,_0x188743,_0x28187c;const _0x5c745b=_0x51cadc[_0x10b078],_0x1297c5=_0x51cadc[_0x10b078-0x1];if('text'==_0x5c745b['type'])continue;if(_0x5c745b['type']!=_0x1297c5['type'])continue;if(!_0x5678d7['isBlock'](_0x1297c5['item'])||_0x5678d7['isLimit'](_0x1297c5['item']))continue;if(!_0x5678d7['isBlock'](_0x5c745b['item'])||_0x5678d7['isLimit'](_0x5c745b['item']))continue;if((_0x51cadc[_0x10b078]['isAdded']||_0x51cadc[_0x10b078]['isAddSuggestion'])&&_0x51cadc[_0x10b078-0x1]['isRemoved'])_0x8f994=_0x51cadc[_0x10b078],_0x188743=_0x51cadc[_0x10b078-0x1],_0x28187c=_0x10b078-0x1;else{if(!_0x51cadc[_0x10b078]['isRemoved']||!_0x51cadc[_0x10b078-0x1]['isAdded']&&!_0x51cadc[_0x10b078-0x1]['isAddSuggestion'])continue;_0x8f994=_0x51cadc[_0x10b078-0x1],_0x188743=_0x51cadc[_0x10b078],_0x28187c=_0x10b078;}const _0x4ae33b=_0x8f994['level']==_0x188743['level'],_0x2c8769=Math['abs'](_0x8f994['level'])<Math['abs'](_0x188743['level'])&&0x0==_0x188743['distance'];(_0x4ae33b||_0x2c8769)&&(_0x5e2990['set'](_0x188743['id'],_0x8f994['id']),_0x51cadc['splice'](_0x28187c,0x1),_0x10b078--,_0x8f994['isAdded']=!0x1);}for(let _0x162c63=0x0;_0x162c63<_0x51cadc['length'];_0x162c63++)_0x5e2990['has'](_0x51cadc[_0x162c63]['pairId'])&&(_0x51cadc[_0x162c63]['pairId']=_0x5e2990['get'](_0x51cadc[_0x162c63]['pairId']));}['_removeMissingPairs'](_0x346c2a){const _0x3fe177=new Set(_0x346c2a['map'](_0x1c10e7=>_0x1c10e7['id']));for(let _0x4c4965=0x0;_0x4c4965<_0x346c2a['length'];_0x4c4965++)_0x3fe177['has'](_0x346c2a[_0x4c4965]['pairId'])||0x0==_0x346c2a[_0x4c4965]['distance']||(_0x346c2a[_0x4c4965]['isIncorrect']=!0x0);return _0x346c2a['filter'](_0x43cd54=>!_0x43cd54['isIncorrect']);}_markMismatchedRemovedTags(_0x3dacd5){const _0x201c40=new Set();for(let _0x40d7a0=0x0;_0x40d7a0<_0x3dacd5['length'];_0x40d7a0++){if(_0x201c40['has'](_0x3dacd5[_0x40d7a0]['id'])&&_0x3dacd5[_0x40d7a0]['isRemoved']&&(_0x3dacd5[_0x40d7a0]['isIncorrect']=!0x0),_0x3dacd5[_0x40d7a0]['isIncorrect'])continue;if(0x0==_0x3dacd5[_0x40d7a0]['distance'])continue;if('elementStart'!=_0x3dacd5[_0x40d7a0]['type'])continue;if(null==_0x3dacd5[_0x40d7a0]['pairId'])continue;let _0x354a38=_0x40d7a0+0x1,_0x1dfe6e=0x0;for(;_0x3dacd5[_0x354a38]['id']!=_0x3dacd5[_0x40d7a0]['pairId'];)'elementStart'==_0x3dacd5[_0x354a38]['type']?_0x1dfe6e++:'elementEnd'==_0x3dacd5[_0x354a38]['type']&&_0x1dfe6e--,_0x354a38++;if(0x0!=_0x1dfe6e){if(_0x3dacd5[_0x40d7a0]['isRemoved'])_0x3dacd5[_0x40d7a0]['isIncorrect']=!0x0;else{for(;_0x354a38!=_0x40d7a0;)_0x3dacd5[_0x354a38]['isRemoved']&&0x0!=_0x3dacd5[_0x354a38]['distance']&&(_0x3dacd5[_0x354a38]['isIncorrect']=!0x0,_0x201c40['add'](_0x3dacd5[_0x354a38]['pairId'])),_0x354a38--;}}}return _0x3dacd5['filter'](_0x2fbeba=>!_0x2fbeba['isIncorrect']);}_removeUnsupportedChanges(_0x479ccb){const _0x380bd9=this['editor']['model']['schema'];for(let _0x431968=0x0;_0x431968<_0x479ccb['length'];_0x431968++){if(!(_0x479ccb[_0x431968]['isAdded']||_0x479ccb[_0x431968]['isAddSuggestion']||_0x479ccb[_0x431968]['isRemoved']||_0x479ccb[_0x431968]['isRemoveSuggestion']))continue;if(0x0==_0x479ccb[_0x431968]['distance'])continue;const _0x5efb61=_0x479ccb[_0x431968]['item'];_0x380bd9['isBlock'](_0x5efb61)||_0x380bd9['isLimit'](_0x5efb61)||(_0x479ccb[_0x431968]['isAdded']&&delete _0x479ccb[_0x431968]['isAdded'],_0x479ccb[_0x431968]['isAddSuggestion']&&delete _0x479ccb[_0x431968]['isAddSuggestion'],_0x479ccb[_0x431968]['isRemoveSuggestion']&&delete _0x479ccb[_0x431968]['isRemoveSuggestion'],_0x479ccb[_0x431968]['isRemoved']&&(_0x479ccb[_0x431968]['isIncorrect']=!0x0));}return _0x479ccb['filter'](_0x599e98=>!_0x599e98['isIncorrect']);}['_makeModelFromTape'](_0x301d96,_0x1fbb63,_0x697104,_0x2c8c10){const _0x1b5c47=new _0x47bfc1(),_0x12c851=[],_0x434be6=new Map(),_0x565e9b=this['editor']['model'],_0x12e0e7=_0x565e9b['schema'],_0x3eb88d=[_0x1b5c47],_0x138da4={},_0x5d5784={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x1b5c47['name']=_0x2c8c10;let _0x53c1b3=null;const _0x45726a=[0x0];for(let _0x1e4360=0x0;_0x1e4360<_0x301d96['length'];_0x1e4360++)if('elementStart'===_0x301d96[_0x1e4360]['type']){_0x301d96[_0x1e4360]['previousPosition']=_0x565e9b['createPositionFromPath'](_0x1b5c47,_0x45726a);const _0x10e0d0=new _0x1eeca3(_0x301d96[_0x1e4360]['item']['name'],_0x301d96[_0x1e4360]['item']['getAttributes']());_0x3eb88d[0x0]['_appendChild'](_0x10e0d0),_0x45726a['push'](0x0),_0x3eb88d['unshift'](_0x10e0d0),_0x301d96[_0x1e4360]['nextPosition']=_0x565e9b['createPositionFromPath'](_0x1b5c47,_0x45726a);}else'elementEnd'===_0x301d96[_0x1e4360]['type']?(_0x3eb88d['shift'](),_0x301d96[_0x1e4360]['previousPosition']=_0x565e9b['createPositionFromPath'](_0x1b5c47,_0x45726a),_0x45726a['pop'](),_0x45726a[_0x45726a['length']-0x1]++,_0x301d96[_0x1e4360]['nextPosition']=_0x565e9b['createPositionFromPath'](_0x1b5c47,_0x45726a)):(_0x301d96[_0x1e4360]['previousPosition']=_0x565e9b['createPositionFromPath'](_0x1b5c47,_0x45726a),_0x53c1b3?_0x53c1b3['_data']+=_0x301d96[_0x1e4360]['item']['data']:_0x53c1b3=new _0x1644a6(_0x301d96[_0x1e4360]['item']['data'],_0x301d96[_0x1e4360]['item']['getAttributes']()),_0x301d96[_0x1e4360+0x1]&&'text'===_0x301d96[_0x1e4360+0x1]['type']&&_0x519675(_0x53c1b3,_0x301d96[_0x1e4360+0x1]['item'])||(_0x3eb88d[0x0]['_appendChild'](_0x53c1b3),_0x53c1b3=null),_0x45726a[_0x45726a['length']-0x1]+=_0x301d96[_0x1e4360]['item']['offsetSize'],_0x301d96[_0x1e4360]['nextPosition']=_0x565e9b['createPositionFromPath'](_0x1b5c47,_0x45726a));for(let _0x59c484=0x0;_0x59c484<_0x301d96['length'];_0x59c484++){const _0x3cc4e0=_0x301d96[_0x59c484]['previousPosition'],_0x578439=_0x301d96[_0x59c484]['nextPosition'];for(const _0x232383 of _0x301d96[_0x59c484]['markersStart'])_0x434be6['set'](_0x232383,{'start':_0x3cc4e0,'end':null});_0x28f68b('isRemoveSuggestion',_0x59c484,_0x3cc4e0,_0x578439),_0x28f68b('isAddSuggestion',_0x59c484,_0x3cc4e0,_0x578439),_0x28f68b('isRemoved',_0x59c484,_0x3cc4e0,_0x578439),_0x28f68b('isAdded',_0x59c484,_0x3cc4e0,_0x578439);for(const _0x2ec93d of _0x301d96[_0x59c484]['markersEnd']){const _0x12cb94=_0x434be6['get'](_0x2ec93d);_0x12cb94?_0x12cb94['end']=_0x578439:_0x434be6['set'](_0x2ec93d,{'start':_0x578439,'end':_0x578439});}}for(const [_0x4f0c6c,_0x15a8c4]of _0x434be6){const _0x42ccb1=this['editor']['model']['createRange'](_0x15a8c4['start'],_0x15a8c4['end']);_0x1b5c47['markers']['set'](_0x4f0c6c,_0x42ccb1);}return _0x12c851['sort']((_0x19d23e,_0x140517)=>{const _0x35de5e=_0x1b5c47['markers']['get']('revision:'+_0x19d23e['id']),_0x1d15fe=_0x1b5c47['markers']['get']('revision:'+_0x140517['id']);return _0x35de5e['start']['isBefore'](_0x1d15fe['start'])?-0x1:_0x35de5e['start']['isAfter'](_0x1d15fe['start'])?0x1:_0x35de5e['end']['isBefore'](_0x1d15fe['end'])?-0x1:_0x35de5e['end']['isAfter'](_0x1d15fe['end'])?0x1:'add'===_0x19d23e['type']?-0x1:0x1;}),{'root':_0x1b5c47,'changes':_0x12c851};function _0x28f68b(_0x46c866,_0x27c568,_0x465547,_0x2775a5){const _0x10fd5c=!!_0x301d96[_0x27c568][_0x46c866],_0x5a3df0=_0x10fd5c?_0x301d96[_0x27c568][_0x46c866]['userId']:null,_0x8af992=_0x10fd5c&&_0x301d96[_0x27c568][_0x46c866]['aiSource']||null,_0x30f092=_0x27c568===_0x301d96['length']-0x1,_0x594e64=_0x5d5784[_0x46c866][0x0],_0xccf582=_0x12e0e7['isObject'](_0x301d96[_0x27c568]['item']);!_0x138da4[_0x46c866]&&_0x10fd5c?_0x138da4[_0x46c866]={'start':_0x465547,'tapeItem':_0x301d96[_0x27c568],'userId':_0x5a3df0,'aiSource':_0x8af992,'type':_0x46c866}:_0x138da4[_0x46c866]&&!_0x10fd5c?(_0x138da4[_0x46c866]['end']=_0x465547,_0x515e66(_0x138da4[_0x46c866]),_0x138da4[_0x46c866]=null):_0x138da4[_0x46c866]&&_0x10fd5c&&(_0x138da4[_0x46c866]['userId']!==_0x5a3df0||_0x138da4[_0x46c866]['aiSource']!==_0x8af992)&&(_0x138da4[_0x46c866]['end']=_0x465547,_0x594e64&&_0x594e64['userId']===_0x138da4[_0x46c866]['userId']?_0x594e64['change']['aiSource']=_0x594e64['change']['aiSource']||_0x138da4[_0x46c866]['aiSource']:_0x515e66(_0x138da4[_0x46c866]),_0x138da4[_0x46c866]={'start':_0x465547,'tapeItem':_0x301d96[_0x27c568],'userId':_0x5a3df0,'aiSource':_0x8af992,'type':_0x46c866}),_0x138da4[_0x46c866]&&_0xccf582&&('elementStart'!==_0x301d96[_0x27c568]['type']||_0x594e64&&_0x594e64['userId']===_0x5a3df0||_0x5d5784[_0x46c866]['unshift']({'userId':_0x5a3df0,'object':_0x301d96[_0x27c568]['item'],'change':_0x138da4[_0x46c866]}),'elementEnd'===_0x301d96[_0x27c568]['type']&&_0x594e64&&_0x594e64['object']===_0x301d96[_0x27c568]['item']&&(_0x5d5784[_0x46c866]['shift'](),_0x138da4[_0x46c866]=_0x594e64['change'])),_0x138da4[_0x46c866]&&_0x30f092&&(_0x138da4[_0x46c866]['end']=_0x2775a5,_0x515e66(_0x138da4[_0x46c866]),_0x138da4[_0x46c866]=null);}function _0x515e66({start:_0x26ec3e,end:_0x564631,tapeItem:_0x276193,userId:_0x5a1bf4,aiSource:_0x256457,type:_0x197661}){const _0xee4d0d=_0x276193['item'],_0x272807=_0x565e9b['schema']['isBlock'](_0xee4d0d)&&!_0x565e9b['schema']['isLimit'](_0xee4d0d),_0x2efcf=_0x26ec3e['nodeAfter']==_0x564631['parent']&&_0x564631['isAtStart'];if(_0x272807&&_0x2efcf)return;const _0x14a2dc=_0x565e9b['createRange'](_0x26ec3e,_0x564631),_0x369d0b=_0x1fbb63['get'](_0x5a1bf4),_0x388aad=new Mt({'author':_0x369d0b,'type':'isAdded'==_0x197661||'isAddSuggestion'==_0x197661?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x197661||'isRemoveSuggestion'==_0x197661,'aiSource':_0x256457||null},'createdAt':new Date(),'rootName':_0x697104});_0x12c851['push'](_0x388aad),_0x1b5c47['markers']['set']('revision:'+_0x388aad['id'],_0x14a2dc);}function _0x519675(_0x277911,_0x24e92f){const _0x30982d=_0x277911['getAttributes'](),_0x1116c9=_0x24e92f['getAttributes']();for(const _0x3037be of _0x30982d){if(_0x3037be[0x1]!==_0x24e92f['getAttribute'](_0x3037be[0x0]))return!0x1;_0x1116c9['next']();}return _0x1116c9['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x512030=>{const _0x3b9ee6=_0x512030['markerName']['split'](':')[0x1],_0x1db3f3=this['_getChangeFromId'](_0x3b9ee6);if(!_0x1db3f3)return null;const _0x36c044='add'==_0x1db3f3['type']?'insertion':'deletion',_0x15148d=['ck-suggestion-marker','ck-suggestion-marker-'+_0x36c044];return _0x1db3f3['data']['isSuggestion']&&_0x15148d['push']('ck-suggestion-marker-'+_0x36c044+'-new'),this['activeChange']==_0x1db3f3&&_0x15148d['push']('ck-suggestion-marker--active'),{'classes':_0x15148d,'attributes':{'data-change-id':_0x3b9ee6}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x2b195a=>{_0x2b195a['on']('element:pre',(_0x230ce0,_0x449e1f,_0x54e85a)=>{const _0x59ff9d=_0x449e1f['viewItem']['getChild'](0x0);if(!_0x59ff9d||!_0x59ff9d['is']('element','code'))return;if(!_0x54e85a['consumable']['consume'](_0x59ff9d,{'attributes':['vid_start','vid_end']}))return;const _0x3414ba=_0x449e1f['modelRange']['start']['nodeAfter'];_0x54e85a['writer']['setAttribute']('vid_start',_0x59ff9d['getAttribute']('vid_start'),_0x3414ba),_0x54e85a['writer']['setAttribute']('vid_end',_0x59ff9d['getAttribute']('vid_end'),_0x3414ba);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1cde71=>{_0x1cde71['on']('element',(_0x3ac75f,_0x2e9cc6,_0x3610c1)=>{if(!_0x3610c1['consumable']['consume'](_0x2e9cc6['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2e9cc6['modelRange']['isCollapsed'])return;const _0x510839=_0x2e9cc6['modelRange']['start']['nodeAfter'];_0x510839['hasAttribute']('vid_start')||_0x510839['hasAttribute']('vid')||(_0x3610c1['writer']['setAttribute']('vid_start',_0x2e9cc6['viewItem']['getAttribute']('vid_start'),_0x510839),_0x3610c1['writer']['setAttribute']('vid_end',_0x2e9cc6['viewItem']['getAttribute']('vid_end'),_0x510839));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x169be6=>_0x169be6['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3f39a0,[,_0x1a5e21])=>{['vid_start','vid_end','vid']['includes'](_0x1a5e21)&&(_0x3f39a0['return']=!0x0,_0x3f39a0['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xaea1c0=>{_0xaea1c0['on']('attribute:vid',(_0x4aceea,_0x22df9b,_0x2aca99)=>{if('\x20'!=_0x22df9b['item']['data']||_0x22df9b['item']['parent']['maxOffset']>0x1)return;if(!_0x2aca99['consumable']['consume'](_0x22df9b['item'],_0x4aceea['name']))return;const _0x50ff9c=_0x2aca99['writer'],_0x40db64=_0x2aca99['mapper']['toViewRange'](_0x22df9b['range']);_0x50ff9c['wrap'](_0x40db64,_0x50ff9c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x32f6a5){const _0xcb2096=_0x32f6a5['plugins']['get']('RevisionViewer');return(_0x14c16b,_0x175673,_0x19ace5)=>{const _0x193cb7=_0x175673['markerName']['split'](':')[0x1],_0x274ade=_0xcb2096['_getChangeFromId'](_0x193cb7);if(!_0x274ade)return null;const _0x13864a='add'==_0x274ade['type']?'split':'merge';if(!_0x19ace5['consumable']['test'](_0x175673['markerRange'],_0x14c16b['name']))return;const _0x5b2726=_0x175673['markerRange']['getWalker'](),_0x352f36=_0x175673['markerRange']['start'],_0x1f7464=_0x32f6a5['model']['schema'];let _0x3cbf3e=null,_0x10ab66=null,_0x15cd61=!0x1,_0xfa61f9=!0x1;for(const _0x20a429 of _0x5b2726){const _0x1ec4bb=_0x20a429['item'];_0x15cd61=_0x15cd61||_0x1f7464['isContent'](_0x1ec4bb);const _0x18dde2=_0x19ace5['mapper']['toViewElement'](_0x1ec4bb);if(_0x18dde2&&_0x18dde2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x20a429['type']&&(_0x1f7464['isBlock'](_0x1ec4bb)&&!_0x1f7464['isLimit'](_0x1ec4bb)&&(_0x1ec4bb['nextSibling']||_0x352f36['isAtEnd']?_0x3cbf3e&&_0x3cbf3e['parent']==_0x1ec4bb||(_0x3cbf3e=_0x1ec4bb,_0x3d83b0(_0x20a429['previousPosition']),_0xfa61f9=!0x0):_0x10ab66=_0x10ab66||_0x20a429['previousPosition']));}function _0x3d83b0(_0x370325){const _0x157403=_0x19ace5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x13864a}),_0x5b7595=_0x19ace5['mapper']['toViewPosition'](_0x370325);_0x274ade['data']['isSuggestion']&&_0x19ace5['writer']['addClass']('ck-suggestion-marker-'+_0x13864a+'-new',_0x157403),_0xcb2096['activeChange']==_0x274ade&&_0x19ace5['writer']['addClass']('ck-suggestion-marker--active',_0x157403),_0x19ace5['writer']['insert'](_0x5b7595,_0x157403),_0x19ace5['mapper']['bindElementToMarker'](_0x157403,_0x175673['markerName']);}_0x15cd61||_0xfa61f9||!_0x10ab66||_0x3d83b0(_0x10ab66);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x512444,_0x189888,_0x5aa93c)=>{const _0x37f385=_0x5aa93c['mapper']['markerNameToElements'](_0x189888['markerName']);if(_0x37f385){for(const _0x65dd9a of _0x37f385)(_0x65dd9a['hasClass']('ck-suggestion-marker-split')||_0x65dd9a['hasClass']('ck-suggestion-marker-merge'))&&(_0x5aa93c['mapper']['unbindElementFromMarkerName'](_0x65dd9a,_0x189888['markerName']),_0x5aa93c['writer']['remove'](_0x65dd9a));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x334454,_0x74f9d3,_0x4f94ac)=>{const _0x64e61a=_0x74f9d3['markerName']['split'](':')[0x1],_0x1c6740=this['_getChangeFromId'](_0x64e61a);if(!_0x1c6740)return null;const _0x11065d='add'==_0x1c6740['type']?'split':'merge';if(_0x4f94ac['consumable']['test'](_0x74f9d3['markerRange'],_0x334454['name']))for(const _0x5144d1 of _0x74f9d3['markerRange']['getItems']()){if(!_0x5144d1['is']('element','softBreak'))continue;const _0x221fa7=_0x4f94ac['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x11065d}),_0x2d5675=_0x4f94ac['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5144d1));_0x1c6740['data']['isSuggestion']&&_0x4f94ac['writer']['addClass']('ck-suggestion-marker-'+_0x11065d+'-new',_0x221fa7),this['activeChange']==_0x1c6740&&_0x4f94ac['writer']['addClass']('ck-suggestion-marker--active',_0x221fa7),_0x4f94ac['writer']['insert'](_0x2d5675,_0x221fa7),_0x4f94ac['mapper']['bindElementToMarker'](_0x221fa7,_0x74f9d3['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x104793=>{for(const _0x2fb1e3 of this['editor']['model']['document']['getRootNames']()){const _0x23985e=this['editor']['model']['document']['getRoot'](_0x2fb1e3),_0x2e639f=this['editor']['editing']['view']['document']['getRoot'](_0x2fb1e3);if(_0x2e639f){const _0x47b90c=_0x23985e['getAttribute']('revisionHistoryAttachChange');if(_0x104793['removeAttribute']('data-change-id',_0x2e639f),_0x104793['removeClass']('ck-revision-history-root-add',_0x2e639f),_0x104793['removeClass']('ck-revision-history-root-remove',_0x2e639f),_0x104793['removeClass']('ck-revision-history-root--active',_0x2e639f),_0x47b90c){const _0x591c0b=this['_getChangeFromId'](_0x47b90c);if(!_0x591c0b)return null;_0x104793['setAttribute']('data-change-id',_0x47b90c,_0x2e639f),_0x104793['addClass']('ck-revision-history-root-'+_0x591c0b['type'],_0x2e639f),this['activeChange']==_0x591c0b&&_0x104793['addClass']('ck-revision-history-root--active',_0x2e639f);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x24029d=>'revision-comment:'+_0x24029d,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x3b0b06=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x3b0b06['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3a9814=>'revision-suggestion:'+_0x3a9814,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x499323=>({'name':'suggestion:'+_0x499323,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1ba9bb=>{const _0x3cc7f8=_0x1ba9bb['markerName']['split'](':')[0x1];return'insertion'!=_0x3cc7f8&&'deletion'!=_0x3cc7f8?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3cc7f8]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0xb0f5e4,_0x5bd037,_0x52bf75)=>{const _0x1e7887=_0x52bf75['mapper']['markerNameToElements'](_0x5bd037['markerName']);if(_0x1e7887){for(const _0x119e03 of _0x1e7887)_0x119e03['is']('uiElement')&&(_0x52bf75['mapper']['unbindElementFromMarkerName'](_0x119e03,_0x5bd037['markerName']),_0x52bf75['writer']['remove'](_0x119e03));}},{'priority':'high'});}_getChangeFromId(_0x45ba2c){return this['_changeIdToChange']['get'](_0x45ba2c);}_getViewForChange(_0x59dddb){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x59dddb,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x415454,_0x2538d9,_0x5720b7,_0x4f6fbb)=>{_0x4f6fbb&&this['_balloon']['remove'](_0x4f6fbb),_0x5720b7&&(this['_balloon']['add']({'view':_0x5720b7,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x24d097=this['editor']['editing'],_0x2d125f=this['_getChangeFromId'](_0x5720b7['changeId']);let _0x80406a;if(_0x2d125f['data']['isOnRoot']){const _0x2347a8=_0x24d097['view']['getDomRoot'](_0x2d125f['rootName']);_0x80406a=Array['from'](_0x2347a8['getClientRects']());}else{const _0x5422b5=this['editor']['model']['markers']['get']('revision:'+_0x5720b7['changeId']);_0x80406a=Array['from'](_0x24d097['mapper']['markerNameToElements'](_0x5422b5['name']))['map'](_0x567cd8=>_0x24d097['view']['domConverter']['mapViewToDom'](_0x567cd8))['map'](_0x5327fe=>Array['from'](_0x5327fe['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x80406a['find'](_0x4cebda=>_0x4cebda['top']-0x3<=this['_activeViewTarget']['y']&&_0x4cebda['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4cebda['left']-0x3<=this['_activeViewTarget']['x']&&_0x4cebda['right']+0x3>=this['_activeViewTarget']['x'])||_0x80406a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x47895d,_0x464f81,_0x1c26ac,_0x3ee5ff)=>{this['activeView']=_0x1c26ac?this['_getViewForChange'](_0x1c26ac):null,this['editor']['model']['change'](()=>{const _0x1c5213=this['editor']['editing'];_0x3ee5ff&&(_0x3ee5ff['data']['isOnRoot']?_0x1c5213['view']['change'](_0x140a7e=>{_0x140a7e['removeClass']('ck-revision-history-root--active',_0x1c5213['view']['document']['getRoot'](_0x3ee5ff['rootName']));}):_0x1c5213['reconvertMarker']('revision:'+_0x3ee5ff['id'])),_0x1c26ac&&(_0x1c26ac['data']['isOnRoot']?_0x1c5213['view']['change'](_0x2b3a2a=>{_0x2b3a2a['addClass']('ck-revision-history-root--active',_0x1c5213['view']['document']['getRoot'](_0x1c26ac['rootName']));}):_0x1c5213['reconvertMarker']('revision:'+_0x1c26ac['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x130105,_0xf914fa)=>{if(this['activeChange'])return;const _0x317773=this['_findChangeIdFromDomTarget'](_0xf914fa['target']),_0x1becab=this['_changeIdToChange']['get'](_0x317773);_0x1becab?(this['_activeViewTarget']={'x':_0xf914fa['domEvent']['x'],'y':_0xf914fa['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1becab)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x58cbdf,_0x2f3be2)=>{const _0x52b5b1=this['_findChangeIdFromDomTarget'](_0x2f3be2['target']),_0xb631da=this['_changeIdToChange']['get'](_0x52b5b1);_0xb631da?(this['_activeViewTarget']={'x':_0x2f3be2['domEvent']['x'],'y':_0x2f3be2['domEvent']['y']},_0xb631da===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0xb631da):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x56de3b){do{const _0x425552=_0x56de3b['getAttribute']('data-change-id');if(_0x425552)return _0x425552;_0x56de3b=_0x56de3b['parent'];}while(_0x56de3b);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5be86b=>{for(const _0x3b9164 of this['editor']['model']['markers'])_0x5be86b['removeMarker'](_0x3b9164);});}};function Ut(_0x3d5496){return _0x3d5496['split'](':')[0x1];}function Lt(_0x3c401b,_0x29b500){return(_0xaaf860,_0x5c4fd3,_0x40a66f)=>{if(!_0x40a66f['consumable']['test'](_0x5c4fd3['markerRange'],_0xaaf860['name']))return;const _0x2a50b3=_0x5c4fd3['markerRange']['getWalker'](),_0x5d8e51=_0x5c4fd3['markerRange']['start'],_0x4075f2=_0x3c401b['model']['schema'];let _0x42b50d=null,_0x281287=null,_0x42e349=!0x1,_0x26a9a9=!0x1;for(const _0x8047f5 of _0x2a50b3){const _0x23bf54=_0x8047f5['item'];_0x42e349=_0x42e349||_0x4075f2['isContent'](_0x23bf54);const _0x1a70d1=_0x40a66f['mapper']['toViewElement'](_0x23bf54);if(_0x1a70d1&&_0x1a70d1['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x8047f5['type']&&(_0x4075f2['isBlock'](_0x23bf54)&&!_0x4075f2['isLimit'](_0x23bf54)&&(_0x23bf54['nextSibling']||_0x5d8e51['isAtEnd']?_0x42b50d&&_0x42b50d['parent']==_0x23bf54||(_0x42b50d=_0x23bf54,_0x1c8ee6(_0x8047f5['previousPosition']),_0x26a9a9=!0x0):_0x281287=_0x281287||_0x8047f5['previousPosition']));}function _0x1c8ee6(_0x443cfb){const _0x2f52cd=_0x40a66f['mapper']['toViewPosition'](_0x443cfb),_0x5cb159=_0x40a66f['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x29b500});_0x40a66f['writer']['insert'](_0x2f52cd,_0x5cb159),_0x40a66f['mapper']['bindElementToMarker'](_0x5cb159,_0x5c4fd3['markerName']);}_0x42e349||_0x26a9a9||!_0x281287||_0x1c8ee6(_0x281287);};}var Ft=class extends _0x344a7d{constructor(_0xde1f98){super(_0xde1f98);const _0x3a1849=_0xde1f98['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x3a1849,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3a1849,'change:isEnabled',()=>this['refresh']());}execute(){const _0x48ee81=this['editor'],_0x465fc3=_0x48ee81['plugins']['get'](Pt),_0x9f40f5=_0x465fc3['isReady']?_0x465fc3['diff']['newRevisionId']:null;_0x48ee81['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x9f40f5);}['refresh'](){const {isReady:_0x4e6e0b,isEnabled:_0x4973c1,repository:_0xc38e2a,diff:_0x303cee}=this['editor']['plugins']['get'](Pt),_0x393ac6=_0x303cee&&_0xc38e2a['getLaterVisibleRevision'](_0x303cee['newRevisionId']);this['isEnabled']=_0x4e6e0b&&_0x4973c1&&Boolean(_0x393ac6);}},$t=class extends _0x344a7d{_step;constructor(_0x459a18,{direction:_0x29b31d}){super(_0x459a18);const _0x3b745c=_0x459a18['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x29b31d?0x1:-0x1,this['listenTo'](_0x3b745c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3b745c,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3b745c,'change:activeChange',()=>this['refresh']());}execute(){const _0xe951da=this['editor'],_0x1c66fa=_0xe951da['plugins']['get'](Pt),{isNavigationMode:_0x2e3e18,currentChangeNumber:_0x3cee3b}=_0x1c66fa;let _0x27f4f6;if(_0x1c66fa['activeChange']=_0x2e3e18?_0x1c66fa['diff']['changes']['get'](_0x3cee3b+this['_step']):_0x1c66fa['diff']['changes']['first'],_0x1c66fa['activeChange']['data']['isOnRoot'])_0x27f4f6=_0xe951da['editing']['view']['getDomRoot'](_0x1c66fa['activeChange']['rootName']);else{const _0x26afe3=_0xe951da['model']['markers']['get']('revision:'+_0x1c66fa['activeChange']['id']);_0x27f4f6=_0x2ef8ba(_0xe951da['editing'],_0x26afe3);}_0x86b708({'target':_0x27f4f6,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2d1470,currentChangeNumber:_0x463cf0,numberOfChanges:_0x10187a,isReady:_0xbc3c1d,isEnabled:_0x5b57b5}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x5b57b5&&_0xbc3c1d&&_0x10187a)&&(!_0x2d1470||(0x1===this['_step']?_0x463cf0<_0x10187a-0x1:_0x463cf0>0x0));}},Bt=class extends dt{constructor(_0x164f49){super(_0x164f49);const _0x14053e=this['bindTemplate'],_0x324479=new _0x10ef8c(_0x164f49),_0x2cc33c=new _0x10ef8c(_0x164f49);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',(_0x275815,_0x5c8576)=>_0x275815&&_0x5c8576>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4b2ec2,_0x2fd585,_0x3130e8,_0x50a719)=>{if(!_0x4b2ec2)return kt(_0x164f49,'Loading...');if(!_0x3130e8)return kt(_0x164f49,'No\x20changes');const _0x3c56f6=kt(_0x164f49,'NUMBER_OF_CHANGES',_0x3130e8);return _0x50a719?kt(_0x164f49,'X_OF_Y_CHANGES',[_0x2fd585+0x1,_0x3130e8]):_0x3c56f6;}),_0x324479['set']({'label':kt(_0x164f49,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x55d7ff}),_0x2cc33c['set']({'label':kt(_0x164f49,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xfe9cff}),_0x324479['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2cc33c['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x324479['on']('execute',()=>this['fire']('execute','backward')),_0x2cc33c['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',_0x14053e['if']('_isStatusLabelVisible','ck-hidden',_0x29d039=>!_0x29d039)]},'children':[{'text':_0x14053e['to']('isNavigationMode',_0x1e2f62=>_0x1e2f62?kt(_0x164f49,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x164f49,'Total')+':\x20')}]},{'text':_0x14053e['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x324479,_0x2cc33c]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x34e937{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x57a818=this['editor']['editing']['view'];_0x57a818['change'](_0x300a3d=>{for(const _0x576e7b of _0x57a818['document']['roots'])_0x300a3d['addClass'](jt,_0x576e7b);});}['hide'](){const _0x46d064=this['editor']['editing']['view'];_0x46d064['change'](_0x575fea=>{for(const _0x1ec435 of _0x46d064['document']['roots'])_0x575fea['removeClass'](jt,_0x1ec435);});}},Kt=class extends _0x34e937{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x3bbd50=this['editor'],_0x154b6e=_0x3bbd50['plugins']['get'](Pt),_0x3d3c73=_0x3bbd50['plugins']['get'](Gt);_0x3bbd50['ui']['componentFactory']['add']('exitToEditing',_0x2768b7=>{const _0x23dace=new _0x10ef8c(_0x2768b7);return _0x23dace['set']({'label':kt(_0x2768b7,'Back\x20to\x20editing'),'icon':_0x10a37d,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x23dace,'execute',()=>{_0x3bbd50['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x23dace;}),_0x3bbd50['ui']['componentFactory']['add']('restoreRevision',_0x47999f=>{const _0x275c18=new _0x10ef8c(_0x47999f);return _0x275c18['set']({'label':kt(_0x47999f,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x275c18['bind']('isEnabled')['to'](_0x3bbd50['commands']['get']('restoreRevision')),this['listenTo'](_0x275c18,'execute',()=>_0x3bbd50['execute']('restoreRevision')),_0x275c18;}),_0x3bbd50['ui']['componentFactory']['add']('changesNavigation',_0x26bd9a=>{const _0x5cce5a=new Bt(_0x26bd9a),_0x3aef5a=_0x3bbd50['commands']['get']('showPreviousChange'),_0x5e6656=_0x3bbd50['commands']['get']('showNextChange');return _0x5cce5a['bind']('isBackwardNavigationEnabled')['to'](_0x3aef5a,'isEnabled'),_0x5cce5a['bind']('isForwardNavigationEnabled')['to'](_0x5e6656,'isEnabled'),_0x5cce5a['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x154b6e),this['listenTo'](_0x5cce5a,'execute',(_0x1834be,_0x12b67c)=>{_0x3bbd50['execute']('forward'===_0x12b67c?'showNextChange':'showPreviousChange');}),_0x5cce5a;}),_0x3d3c73['show'](),_0x154b6e['on']('change:isReady',(_0x19374e,_0x5b517a,_0x255d63)=>{_0x255d63?_0x3d3c73['hide']():_0x3d3c73['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x40f404,_0x539dab){super(_0x40f404,_0x539dab);const _0x3374a8=this['bindTemplate'];this['set']({'label':kt(_0x40f404,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x40f404,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3374a8['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0xc8dcab(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x5056e5=this['fieldView']['element'];this['_tooltipString']=_0x5056e5['scrollWidth']>_0x5056e5['clientWidth']&&_0x5056e5['value']||'';}},Yt=class extends dt{constructor(_0x57e45f,_0x210269,_0x369399){super(_0x57e45f);const _0x828f96=new _0x295852();_0x828f96['set']({'content':_0x484934,'viewBox':'0\x200\x2011\x2010'});const _0x164c93=['ck','ck-revision-history-sidebar__revision-author'];_0x369399&&_0x164c93['push']('ck-revision-history-sidebar__revision-author_creator');const _0x27f34a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x57e45f,_0x369399?'Revision\x20creator':'Revision\x20author')},'children':[_0x828f96,_0x210269['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x164c93},'children':_0x27f34a});}};function Jt(_0x1c153e,_0x186e47){const _0x3072f3=_0x1c153e['bindTemplate'],_0x2ec36d=_0x1c153e['locale'],_0x3add34=vt(_0x2ec36d);_0x3add34['panelPosition']='sw';const _0x4904d9=function(_0x3d467f,_0x2fe3c9){const _0x55b0d0=function(_0x38f182,_0x11b48b){const _0x481116=_0x38f182['locale'],_0x16d4a8={'Compare\x20against\x20selected':kt(_0x481116,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x481116,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x481116,'Restore\x20this\x20revision')};return _0x11b48b['map'](_0x38ca9d=>{const _0x1c9e88=_0x16d4a8[_0x38ca9d['name']];return _0x1c9e88&&_0x1c9e88!==_0x38ca9d['name']&&(_0x38ca9d['name']=_0x1c9e88),_0x38ca9d;});}(_0x3d467f,_0x2fe3c9),_0x464d8c=new _0x54969b();for(const _0x22b9a5 of _0x55b0d0){const _0x1d2fc1={'type':'button','model':new ut({'label':_0x22b9a5['name'],'class':_0x22b9a5['class'],'withText':!0x0,'role':'menuitem','_action':_0x22b9a5['action']})};_0x1d2fc1['model']['bind']('isEnabled')['to'](_0x3d467f,'isActionsDropdownOpen',_0x5b0db5=>'function'!=typeof _0x22b9a5['isEnabled']||(!_0x5b0db5||_0x22b9a5['isEnabled'](_0x3d467f))),_0x464d8c['add'](_0x1d2fc1);}return _0x464d8c;}(_0x1c153e,_0x186e47);return _0x1c153e['bind']('isActionsDropdownOpen')['to'](_0x3add34,'isOpen'),_0x3add34['buttonView']['set']({'label':kt(_0x2ec36d,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x22c4c4}),_0x3add34['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3072f3['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3072f3['to'](_0x3a9d29=>_0x3a9d29['stopPropagation']())}}),_0x3add34['on']('execute',_0x586d39=>{_0x1c153e['isReady']&&'function'==typeof _0x586d39['source']['_action']&&_0x586d39['source']['_action'](_0x1c153e);}),ft(_0x3add34,_0x4904d9,{'role':'menu'}),_0x3add34['listenTo'](_0x1c153e,'change:isActionsDropdownOpen',(_0x4acedf,_0x359126,_0x491124)=>{if(_0x491124)for(const _0x49dac8 of _0x3add34['listView']['items']){const _0x373f98=_0x49dac8['children']['first'],_0x1ec583=_0x186e47['find'](_0x534193=>_0x534193['action']===_0x373f98['_action'])['isVisible'];_0x49dac8['isVisible']=void 0x0===_0x1ec583||_0x1ec583(_0x1c153e);}}),_0x3add34;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x281a56,Collection as _0x2a4b06,ElementReplacer as _0x436e9b,FocusTracker as _0x541e8f,KeystrokeHandler as _0x366a0f,ObservableMixin as _0x4d35f,ResizeObserver as _0x18d8d0,logWarning as _0x222a9a,scrollViewportToShowTarget as _0x478df5,trustedHtml as _0x4a8697,uid as _0x27f7da}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x1721d7,isEqual as _0x219ba7,set as _0x178a34,unset as _0x3c216b}from'es-toolkit/compat';import{Command as _0x37a0c7,Editor as _0x55a2d6,ElementApiMixin as _0x5b3859,PendingActions as _0x1c18b9,Plugin as _0xc765d1}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x392924,PillView as _0x290ede,Users as _0x369e38,getMarkerDomElement as _0x5f2ed6,reRootOperation as _0x3f34c4,reRootPosition as _0x46ca69,reRootRange as _0x4446b6,sanitizeEditorConfig as _0x160cfa}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x48b379,ModelElement as _0x329f01,ModelRange as _0x2a2117,ModelText as _0xfbffed,ViewAttributeElement as _0x286dcb,ViewContainerElement as _0x358c6f,ViewDocumentFragment as _0x5681f3,ViewElement as _0x7f263c,ViewEmptyElement as _0x149753,ViewRawElement as _0x417f3b,ViewText as _0x100f15,ViewUIElement as _0x348b27}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x5a61ed,IconChevronUp as _0x9f76c9,IconHistory as _0x51ea7f,IconSparkle as _0x15811d,IconThreeVerticalDots as _0x1eb543,IconUndo as _0x391628,IconUser as _0x2a0aef}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x43e091,ButtonView as _0xd113c4,ContextualBalloon as _0x196835,CssTransitionDisablerMixin as _0x520fa1,EditorUI as _0x44c02d,IconView as _0xa758d2,InlineEditableUIView as tt,LabeledFieldView as it,ListItemView as et,ListView as st,MenuBarMenuListItemButtonView as nt,MenuBarMenuListItemView as ot,MenuBarMenuListView as rt,MenuBarMenuView as at,StickyPanelView as ht,ToolbarSeparatorView as ct,ToolbarView as lt,UIModel as ut,View as dt,addListToDropdown as ft,createDropdown as vt,createLabeledInputText as gt,normalizeToolbarConfig as mt,submitHandler as _t}from'@ckeditor/ckeditor5-ui';import{DateTime as wt}from'luxon';const pt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4d35f();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x1737f7){super(),this['id']=_0x1737f7['id']||_0x27f7da(),this['creator']=_0x1737f7['creator']||null,this['authors']=_0x1737f7['authors']||[],this['diffData']=_0x1737f7['diffData']||null,this['toVersion']=_0x1737f7['toVersion']||0x0,this['fromVersion']=_0x1737f7['fromVersion']||0x0,this['set']('name',_0x1737f7['name']||''),this['set']('createdAt',_0x1737f7['createdAt']||new Date()),this['set']('attributes',_0x1737f7['attributes']||{});}setName(_0x20d02f){this['_update']({'name':_0x20d02f});}setAttribute(_0x3c8417,_0x1c38be){const _0x19b1b0=_0x1721d7(this['attributes']);_0x178a34(_0x19b1b0,_0x3c8417,_0x1c38be),this['_update']({'attributes':_0x19b1b0});}removeAttribute(_0x2d4732){const _0x31d7cc=_0x1721d7(this['attributes']);_0x3c216b(_0x31d7cc,_0x2d4732),this['_update']({'attributes':_0x31d7cc});}_update(_0x4dac7b,_0x3e0fd3=!0x1){let _0xb3847f=!0x1;const _0x28ca0f={'id':this['id']};for(const _0x3a6942 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x24a80e=_0x4dac7b[_0x3a6942];void 0x0!==_0x24a80e&&_0x24a80e!==this[_0x3a6942]&&(this[_0x3a6942]=_0x24a80e,_0x28ca0f[_0x3a6942]=_0x24a80e,_0xb3847f=!0x0);}_0xb3847f&&(_0x28ca0f['authors']&&(_0x28ca0f['authorsIds']=_0x28ca0f['authors']['map'](_0x3853d3=>_0x3853d3['id']),delete _0x28ca0f['authors']),this['fire']('_update',_0x28ca0f,_0x3e0fd3));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2e9965=>_0x2e9965['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0xc765d1{['_revisions'];static get requires(){return[_0x369e38];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x13c792){super(_0x13c792),this['_revisions']=new _0x2a4b06();}afterInit(){!async function(_0xc716e7){const _0x5add18='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x1ea3b0=0xeb829,_0x44b5aa=0x797a0,_0x571352={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x407059(_0x1ee10f){const _0x1ec9a5=new window['Promise'](_0x185a85=>{_0x1ee10f['once']('ready',_0x185a85);}),_0x3ad451=window['Date']['now'](),_0x54b43e=_0x1ee10f['config']['get']('licenseKey');async function _0x3c836d(){let _0x4c4637,_0x7c893f=null,_0x51824e=null;try{return'GPL'==_0x54b43e?'NotAllowed':(_0x4c4637=_0x1ca048(),_0x4c4637?(_0x4c4637['usageEndpoint']&&(_0x51824e=_0x32001c(_0x4c4637['usageEndpoint'],_0x4c4637['jti'])),await _0xe02d2e()?_0x575ac3()?_0x56175d()?'Expired':_0x362e2f()?('evaluation'==_0x4c4637['licenseType']&&(_0x7c893f=_0x4c5ab6('EvaluationLimit')),await _0x2a241e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x56175d(){const _0x2fa9cc=['evaluation','trial']['includes'](_0x4c4637['licenseType'])?_0x3ad451/0x3e8:0xe10*_0x44b5aa;return _0x4c4637['exp']<_0x2fa9cc;}function _0x575ac3(){const _0x19bd88=_0x4c4637['features'];if(!_0x19bd88)return!0x1;if(_0x19bd88['includes']('*'))return!0x0;if(_0x19bd88['includes']('RH'))return!0x0;if(_0x19bd88['includes']('RRH')){if(_0x4a072e())return!0x0;if(_0x21d642()||_0x5d044f())return!0x0;}return!0x1;}function _0x362e2f(){const _0x1b749c=_0x4c4637['licensedHosts'];if(!_0x1b749c||0x0==_0x1b749c['length'])return!0x0;const {hostname:_0x341fd0}=new URL(window['location']['href']);if(_0x1b749c['includes'](_0x341fd0))return!0x0;const _0x1cbb56=_0x341fd0['split']('.');return _0x1b749c['filter'](_0x31fa45=>_0x31fa45['includes']('*'))['map'](_0x8ed5a5=>_0x8ed5a5['split']('.'))['filter'](_0x2ec206=>_0x2ec206['length']<=_0x1cbb56['length'])['map'](_0x15e116=>Array(_0x1cbb56['length']-_0x15e116['length'])['fill']('*'===_0x15e116[0x0]?'*':'')['concat'](_0x15e116))['some'](_0x227a75=>_0x1cbb56['every']((_0x1dc47f,_0x55ca7f)=>_0x227a75[_0x55ca7f]===_0x1dc47f||'*'===_0x227a75[_0x55ca7f]));}function _0x2a241e(){return _0x7c893f&&_0x51824e?new window['Promise']((_0x520a89,_0x9a02fc)=>{_0x7c893f['then'](_0x520a89,_0x9a02fc),_0x51824e['then'](_0x277d40=>{'Valid'!=_0x277d40&&_0x520a89(_0x277d40);},_0x9a02fc);}):_0x7c893f||_0x51824e||'Valid';}}function _0x32001c(_0x315539,_0x46491a){return new window['Promise'](_0x2dac7e=>{if(_0x4d901b())return _0x2dac7e('Valid');_0x55ad1c(),_0x1ee10f['decorate']('_sendUsageRequest');let _0x5e5d36=!0x1;const _0x4b7ad1=_0x27f7da();function _0x507a16(_0x5a4b2f){return!!_0x5a4b2f&&('object'==typeof _0x5a4b2f||'function'==typeof _0x5a4b2f)&&'function'==typeof _0x5a4b2f['then']&&'function'==typeof _0x5a4b2f['catch'];}function _0x134bdf(_0x175809){_0x207f19(_0x175809)['then'](_0xc7d31a=>_0xc7d31a&&'ok'==_0xc7d31a['status']?_0x34b3b7(_0x3a1b45(_0x4b7ad1+_0x46491a))!=_0xc7d31a['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x390397=>(_0x5bd4e6(),_0x390397),()=>{const _0x305487=_0xe9a11b();return null==_0x305487?(_0x5bd4e6(),'Valid'):_0x3ad451-_0x305487>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2dac7e)['catch'](()=>{_0x2dac7e('UsageLimit');});const _0x4053d2=0x36ee80;function _0x5bd4e6(){const _0x53e90f='llct-'+_0x34b3b7(_0x3a1b45(_0x315539)),_0x53878d=_0x2633c2(_0x34b3b7(window['Math']['ceil'](_0x3ad451/_0x4053d2)));window['localStorage']['setItem'](_0x53e90f,_0x53878d);}function _0xe9a11b(){const _0x45ebc7='llct-'+_0x34b3b7(_0x3a1b45(_0x315539)),_0x9f7b9c=window['localStorage']['getItem'](_0x45ebc7);return _0x9f7b9c?window['parseInt'](_0x2633c2(_0x9f7b9c),0x10)*_0x4053d2:null;}function _0x207f19(_0x181094){return new window['Promise']((_0x55c832,_0x568a90)=>{_0x181094['then'](_0x55c832,_0x568a90),window['setTimeout'](_0x568a90,0x1d4c0);});}}_0x1ee10f['on']('_sendUsageRequest',(_0x49d624,_0x1a2143)=>{if(_0x1a2143[0x0]!=_0x315539)return _0x2dac7e('UsageLimit');_0x1a2143[0x1]={..._0x1a2143[0x1],'requestId':_0x4b7ad1};},{'priority':'high'}),_0x1ee10f['on']('_sendUsageRequest',_0x2a370d=>{_0x507a16(_0x2a370d['return'])&&(_0x5e5d36=!0x0,_0x134bdf(_0x2a370d['return']));},{'priority':'low'}),_0x1ec9a5['then'](()=>{_0x5e5d36||_0x2dac7e('UsageLimit');});});function _0x4d901b(){return'auto'==_0x1ee10f['editing']['view']['_overlayModeHint'];}function _0x55ad1c(){_0x1ee10f['editing']['view']['_overlayModeHint']='auto';}}function _0x4c5ab6(_0x5bab8f){const _0x2761bf=[new window['Promise'](_0x34b0f4=>setTimeout(_0x34b0f4,0x93ecc)),_0x1ec9a5['then'](()=>new window['Promise'](_0x2014b9=>{const _0x257b7e=0x7,_0x4c0c69=_0xc716e7['_revisions'];function _0x3b992c(){_0x4c0c69['length']>=_0x257b7e&&_0x2014b9();}_0x3b992c(),_0x4c0c69['on']('add',_0x3b992c);})),new window['Promise'](_0x18a36b=>{function _0x4bbf42(){for(const _0x3f2b30 in window)if(window['Number']['isNaN'](window['Number'](_0x3f2b30))&&window[_0x3f2b30]==_0x1ea3b0)return _0x18a36b();'destroyed'!=_0x1ee10f['state']&&window['setTimeout'](_0x4bbf42,0x1388);}_0x262777('RevisionViewer')&&_0x4bbf42();})];return window['Promise']['race'](_0x2761bf)['then'](()=>_0x5bab8f);}async function _0x3b21df(){if(await _0x1ec9a5,_0x262777('RevisionViewer')){const _0x19f96e=_0xc716e7['getRevision'](0x0),_0x39e928=_0xc716e7['getEarlierVisibleRevision'](_0x19f96e['id']),_0x2810a2=_0x4edb9a('RevisionViewer');return await _0x2810a2['compare'](_0x19f96e['id'],_0x39e928?_0x39e928['id']:null,!0x0),_0x2810a2['unbind']('isEnabled'),_0x2810a2['isEnabled']=!0x1,_0x2810a2['compare']=_0x2f2680,void(_0x2810a2['_getDiff']=_0x2f2680);}if(_0x262777('RevisionTracker')){const _0x373713=_0x4edb9a('RevisionTracker');_0x373713['unbind']('isEnabled'),_0x373713['isEnabled']=!0x1,_0x373713['update']=_0x2f2680,_0x373713['saveRevision']=_0x2f2680;}_0x1ee10f['model']['change']=_0x2f2680,_0x1ee10f['model']['enqueueChange']=_0x2f2680,_0x1ee10f['enableReadOnlyMode']('model');}function _0x4a072e(){return _0x262777('WebSocketGateway')&&'connected'==_0x4edb9a('WebSocketGateway')['state'];}function _0x21d642(){return _0x262777('RevisionViewerIntegration');}function _0x5d044f(){return _0x262777('TrackChangesDataGetter');}function _0x588ab5(_0x1acd95){const _0x165f08=_0x197dce();_0x1ee10f[_0x165f08]='revisionHistoryLicenseKey'+_0x1acd95,_0x1acd95['endsWith']('Limit')&&(window[_0x197dce()]=_0x1ea3b0),'Valid'!=_0x1acd95&&_0x3b21df();}function _0x197dce(){const _0xdc78a7=window['String'](window['performance']['now']())['replace']('.','');let _0x917510='N';for(let _0x3c67f6=0x0;_0x3c67f6<_0xdc78a7['length'];_0x3c67f6+=0x2){let _0x29bf75=window['parseInt'](_0xdc78a7['substring'](_0x3c67f6,_0x3c67f6+0x2));_0x29bf75>=0x3e&&(_0x29bf75-=0x3e),_0x917510+=_0x5add18[_0x29bf75];}return _0x917510;}function _0x1ca048(){const _0x39175a=_0x54b43e['split']('.');if(0x3!=_0x39175a['length'])return null;return _0x22f0fd(_0x39175a[0x1]);function _0x22f0fd(_0x1aee99){const _0x5d9fe6=_0x8a3881(_0x1aee99);return _0x5d9fe6&&_0xf22722()?_0x5d9fe6:null;function _0xf22722(){const _0x851a4c=_0x5d9fe6['jti'],_0x556d1b=window['parseInt'](_0x851a4c['substring'](_0x851a4c['length']-0x8),0x10),_0x3fb3eb={..._0x5d9fe6,'jti':_0x851a4c['substring'](0x0,_0x851a4c['length']-0x8)};return delete _0x3fb3eb['vc'],_0x3a1b45(_0x3fb3eb)==_0x556d1b;}}}async function _0xe02d2e(){let _0xec73c8=!0x0;try{const [_0xf347fe,_0x471eaa,_0xe08d21]=_0x54b43e['split']('.');return _0x93dab2(_0xf347fe),await _0x13db09(_0xf347fe,_0x471eaa,_0xe08d21),_0xec73c8;}catch{return!0x1;}function _0x93dab2(_0x1e183c){const _0x34ea09=_0x8a3881(_0x1e183c);_0x34ea09&&'ES256'==_0x34ea09['alg']||(_0xec73c8=!0x1);}async function _0x13db09(_0x12fa1c,_0x248c3b,_0x524e10){const _0x3f0772=window['Uint8Array']['from'](_0x3bc4bd(_0x524e10),_0x159d17=>_0x159d17['charCodeAt'](0x0)),_0x1fcd00=new window['TextEncoder']()['encode'](_0x12fa1c+'.'+_0x248c3b),_0x3633c1=window['crypto']['subtle'];if(!_0x3633c1)return;const _0x4f84ee=await _0x3633c1['importKey']('jwk',_0x571352,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3633c1['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4f84ee,_0x3f0772,_0x1fcd00)||(_0xec73c8=!0x1);}}function _0x8a3881(_0x1f589e){return _0x1f589e['startsWith']('ey')?JSON['parse'](_0x3bc4bd(_0x1f589e)):null;}function _0x3bc4bd(_0x5dc1e3){return window['atob'](_0x5dc1e3['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3a1b45(_0x5157b4){let _0x50e274=0x1505;function _0xa7ed37(_0x42fa09){for(let _0xe89442=0x0;_0xe89442<_0x42fa09['length'];_0xe89442++){const _0x827cc7=_0x42fa09['charCodeAt'](_0xe89442);_0x50e274=(_0x50e274<<0x5)+_0x50e274+_0x827cc7,_0x50e274&=_0x50e274;}}function _0x427874(_0x58ae87){Array['isArray'](_0x58ae87)?_0x58ae87['forEach'](_0x427874):_0x58ae87&&'object'==typeof _0x58ae87?Object['entries'](_0x58ae87)['sort']()['forEach'](([_0xdc598f,_0x168882])=>{_0xa7ed37(_0xdc598f),_0x427874(_0x168882);}):_0xa7ed37(window['String'](_0x58ae87));}return _0x427874(_0x5157b4),_0x50e274>>>0x0;}function _0x34b3b7(_0x123f08){return _0x123f08['toString'](0x10)['padStart'](0x8,'0');}function _0x2633c2(_0x324b09){return _0x324b09['split']('')['reverse']()['join']('');}function _0x262777(_0x4435c3){return _0x1ee10f['plugins']['has'](_0x4435c3);}function _0x4edb9a(_0x2ed267){return _0x1ee10f['plugins']['get'](_0x2ed267);}function _0x2f2680(){}_0x588ab5(await _0x3c836d());}_0x407059(_0xc716e7['editor']);}(this);}createRevision(_0x440c11){const _0x2176c5=this['editor']['plugins']['get']('Users');return new yt({'id':_0x440c11['id'],'name':_0x440c11['name'],'creator':_0x440c11['creatorId']?_0x2176c5['getUser'](_0x440c11['creatorId']):null,'diffData':_0x440c11['diffData']||_0x440c11['data'],'authors':_0x440c11['authorsIds']['map'](_0x5f19f3=>_0x2176c5['getUser'](_0x5f19f3)),'createdAt':new Date(_0x440c11['createdAt']),'attributes':_0x440c11['attributes'],'fromVersion':_0x440c11['fromVersion'],'toVersion':_0x440c11['toVersion']});}['addRevision'](_0x1a1eb2,_0x4a34a6=0x0){this['_revisions']['add'](_0x1a1eb2,_0x4a34a6);}getRevision(_0x18e89d){return this['_revisions']['get'](_0x18e89d);}getRevisions(_0x2f8205={'toJSON':!0x1}){const _0x4cc02c=Array['from'](this['_revisions']);return _0x4cc02c['reverse'](),_0x2f8205['toJSON']?_0x4cc02c['map'](_0x36279c=>_0x36279c['toJSON']()):_0x4cc02c;}getIndex(_0x52794c){return this['_revisions']['getIndex'](_0x52794c);}getEarlierVisibleRevision(_0xcaf411){const [,_0xb692c9]=this['getRevisionsIterator'](_0xcaf411,{'direction':'earlier'});return _0xb692c9;}getLaterVisibleRevision(_0x233885){const [,_0x5ddc59]=this['getRevisionsIterator'](_0x233885,{'direction':'later'});return _0x5ddc59;}getRevisionsInDiff(_0x420636){const _0x875f7c=[];for(const _0x2e2ce8 of this['getRevisionsIterator'](_0x420636['newRevisionId']))if(_0x875f7c['push'](_0x2e2ce8),_0x2e2ce8['id']===_0x420636['oldRevisionId'])break;return _0x875f7c;}*getRevisionsIterator(_0x26b6f8,{direction:_0x168ed0='earlier',filter:_0x55bb44=()=>!0x0}={}){const _0x3bc71d='earlier'===_0x168ed0?0x1:-0x1;let _0x35c025=this['_revisions']['get'](_0x26b6f8),_0x242173=this['getIndex'](_0x35c025);for(yield _0x35c025;_0x35c025;){if(_0x242173+=_0x3bc71d,_0x35c025=this['getRevision'](_0x242173),!_0x35c025)return;_0x55bb44(_0x35c025)&&(yield _0x35c025);}}},Rt=class extends _0xc765d1{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x358c6f,'c'],[_0x286dcb,'a'],[_0x149753,'e'],[_0x417f3b,'r'],[_0x348b27,'u']]);_typeCharToViewClass=new Map([['c',_0x358c6f],['a',_0x286dcb],['e',_0x149753],['r',_0x417f3b],['u',_0x348b27]]);async loadRevisionData(_0x23a068,_0x42d7b0){if(_0x23a068['diffData']||!_0x42d7b0)return;const _0x766125=this['editor']['config']['get']('collaboration.channelId');_0x23a068['diffData']=(await _0x42d7b0['getRevision']({'channelId':_0x766125,'revisionId':_0x23a068['id']}))['diffData'];}getRevisionDocumentData(_0x333407){const _0x1167c4={};for(const _0x57a94c in _0x333407['diffData']){if(_0x333407['diffData'][_0x57a94c]['attachChange']&&!_0x333407['diffData'][_0x57a94c]['attachChange']['isAttached'])continue;const _0x44c678=this['_removeRevisionMarkers'](JSON['parse'](_0x333407['diffData'][_0x57a94c]['insertions'])),_0x53531c=this['editor']['editing']['view']['document'],_0x530687=new _0x5681f3(_0x53531c,_0x44c678['map'](_0x44cd6b=>this['_getViewFromDiffObj'](_0x44cd6b,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1167c4[_0x57a94c]=this['editor']['data']['processor']['toData'](_0x530687),this['editor']['data']['processor']['useFillerType']('default');}return _0x1167c4;}getRevisionRootsAttributes(_0x4b4cdc){const _0x44314d={};for(const _0xebe7d9 in _0x4b4cdc['diffData'])_0x4b4cdc['diffData'][_0xebe7d9]['attachChange']&&!_0x4b4cdc['diffData'][_0xebe7d9]['attachChange']['isAttached']||(_0x44314d[_0xebe7d9]=_0x4b4cdc['diffData'][_0xebe7d9]['attributesAfter']||{});return _0x44314d;}getRevisionRootsModelElements(_0x2fe588){const _0xd8a08b={};for(const _0x2e3640 in _0x2fe588['diffData']){if(_0x2fe588['diffData'][_0x2e3640]['attachChange']&&!_0x2fe588['diffData'][_0x2e3640]['attachChange']['isAttached'])continue;const _0x16f90e=_0x2fe588['diffData'][_0x2e3640]['rootElementName'];_0x16f90e&&(_0xd8a08b[_0x2e3640]=_0x16f90e);}return _0xd8a08b;}_getTypeCharForViewElement(_0x5a6442){return this['_viewClassToTypeChar']['get'](_0x5a6442['constructor']);}_getViewFromDiffObj(_0x543b91,_0x55425e){const _0x42b843=this['editor']['editing']['view']['document'];if('string'==typeof _0x543b91)return new _0x100f15(_0x42b843,_0x543b91);{let _0x443f4c,_0x109edd;_0x109edd='u'==_0x543b91['type']||'r'==_0x543b91['type']?[]:_0x543b91['children']['map'](_0x4509d2=>this['_getViewFromDiffObj'](_0x4509d2,_0x55425e));const _0x58508e=this['_typeCharToViewClass']['get'](_0x543b91['type'])||_0x7f263c,_0x5a7dcb=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x443f4c=new _0x58508e(_0x42b843,_0x543b91['name'],_0x543b91['attributes'],_0x109edd),'u'==_0x543b91['type']&&_0x543b91['children'][0x0]){const _0x2b7857=_0x543b91['children'][0x0];if(_0x443f4c['render']=function(_0x213a04){const _0x4d5e2b=_0x213a04['createElement']('div');return _0x4d5e2b['innerHTML']=_0x4a8697(_0x2b7857),_0x4d5e2b['childNodes'][0x0];},_0x55425e){const _0x2a3d09=new _0x5681f3(_0x42b843);_0x2a3d09['_appendChild'](_0x443f4c);const _0x21322a=Array['from'](_0x5a7dcb['viewChildrenToDom'](_0x2a3d09,{'bind':!0x1})),_0x2d4af3=_0x5a7dcb['domDocument']['createElement']('div');_0x2d4af3['append'](..._0x21322a),_0x443f4c=Array['from'](_0x5a7dcb['domChildrenToView'](_0x2d4af3))[0x0];}}else{if('r'==_0x543b91['type']&&_0x543b91['children'][0x0]){const _0x5adf91=_0x543b91['children'][0x0];if(_0x443f4c['render']=function(_0x3b1508){_0x3b1508['innerHTML']=_0x4a8697(_0x5adf91);},_0x55425e){const _0xba3e42=new _0x5681f3(_0x42b843);_0xba3e42['_appendChild'](_0x443f4c);const _0x2af10d=Array['from'](_0x5a7dcb['viewChildrenToDom'](_0xba3e42,{'bind':!0x1})),_0x3bd38b=_0x5a7dcb['domDocument']['createElement']('div');_0x3bd38b['append'](..._0x2af10d);const _0x26a439=Array['from'](_0x5a7dcb['domChildrenToView'](_0x3bd38b));_0x26a439['length']>0x1?_0x443f4c['_appendChild'](_0x26a439):_0x443f4c=_0x26a439[0x0];}}}if(_0x543b91['customProperties']){for(const [_0x213470,_0x5ec26f]of _0x543b91['customProperties'])_0x443f4c['_setCustomProperty'](_0x213470,_0x5ec26f);}const _0x5d350a=void 0x0===_0x543b91['fillerOffset']?null:_0x543b91['fillerOffset'];return null!==_0x5d350a&&(_0x443f4c['getFillerOffset']=()=>_0x5d350a),_0x443f4c;}}_makeModelFromViewString(_0x3fb957,_0x22abb0){const _0x7c3970=JSON['parse'](_0x3fb957),_0x24abaf=this['editor']['editing']['view']['document'],_0x18f1d0=new _0x5681f3(_0x24abaf,_0x7c3970['map'](_0x346d90=>this['_getViewFromDiffObj'](_0x346d90,!0x0))),_0x573af3=this['editor']['data']['toModel'](_0x18f1d0,_0x22abb0);return _0x573af3['name']=_0x22abb0,_0x573af3;}['_removeRevisionMarkers'](_0xf6dd5e){return(_0xf6dd5e=_0xf6dd5e['filter'](_0x2af2aa=>!_0x2af2aa['name']||'revision-start'!==_0x2af2aa['name']&&'revision-end'!==_0x2af2aa['name']))['forEach'](_0x41f071=>{'string'!=typeof _0x41f071&&(_0x41f071['children']=this['_removeRevisionMarkers'](_0x41f071['children']),_0x41f071['attributes']=_0x41f071['attributes']['filter'](_0x54f4a2=>!_0x54f4a2[0x0]['startsWith']('data-revision-')));}),_0xf6dd5e;}};function kt(_0x5a2dec,_0x2e6b3f,_0x50c4cd){const t=_0x5a2dec['t'];switch(_0x2e6b3f){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'},_0x50c4cd);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x50c4cd);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'},_0x50c4cd);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x50c4cd);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x50c4cd);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0xc765d1{['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[_0x369e38,bt,Rt,_0x1c18b9];}constructor(_0x9ffac5){super(_0x9ffac5),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x40759c=_0x27f7da();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x40759c},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 _0xf536b5=this['repository']['getRevision'](0x0),_0x5e8b62=_0xf536b5&&null===_0xf536b5['creator']?_0xf536b5:null;if(this['_continueCurrentRevision']=!!_0x5e8b62&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x511184=this['_source']['getCurrentRevisionId'](),_0x571324=this['repository']['getRevision'](_0x511184);if(_0x571324)this['_startingVersion']=_0x571324['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1419ee=this['_source']['history']['_operations']['find'](_0x2d3278=>!_0x2d3278['_isInit']),_0x187a0b=_0x1419ee?_0x1419ee['baseVersion']:this['_source']['history']['version'];_0xf536b5?(_0xf536b5['toVersion']<_0x187a0b&&_0xf536b5['_update']({'toVersion':_0x187a0b}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5e8b62['id'],this['_startingVersion']=_0x5e8b62['fromVersion']):(this['_startingVersion']=_0xf536b5['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x187a0b,this['_continueCurrentRevision']=!0x1);}}else _0x5e8b62&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5e8b62['toVersion'],this['editor']['model']['document']['history']['version']),_0x5e8b62['fromVersion']===_0x5e8b62['toVersion']?(0x0!==_0x5e8b62['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5e8b62['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5e8b62['id'],this['_startingVersion']=_0x5e8b62['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',_0x573b77=>!_0x573b77),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x527e73=[this['editor']];for(const _0x321119 of _0x527e73){let _0x2873d2;for(const _0x499c2a in _0x321119){const _0x13d9d2=_0x499c2a,_0x37e281=_0x321119[_0x13d9d2];if('revisionHistoryLicenseKeyValid'==_0x37e281||'revisionHistoryLicenseKeyInvalid'==_0x37e281||'revisionHistoryLicenseKeyExpired'==_0x37e281||'revisionHistoryLicenseKeyDomainLimit'==_0x37e281||'revisionHistoryLicenseKeyNotAllowed'==_0x37e281||'revisionHistoryLicenseKeyEvaluationLimit'==_0x37e281||'revisionHistoryLicenseKeyUsageLimit'==_0x37e281){delete _0x321119[_0x13d9d2],_0x2873d2=_0x37e281,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2873d2&&_0x321119['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2873d2&&_0x321119['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2873d2&&_0x321119['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2873d2&&_0x321119['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2873d2&&_0x321119['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2873d2&&_0x321119['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x4fb07d=this['repository']['getRevision'](0x0),_0x5e95b0=await this['getRevisionDocumentData'](_0x4fb07d),_0x359a11=await this['getRevisionRootsAttributes'](_0x4fb07d),_0x1c4f6d=this['_utils']['getRevisionRootsModelElements'](_0x4fb07d);this['_replaceEditorDataWithRevisionData'](_0x5e95b0,_0x359a11,_0x1c4f6d);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x138dda){this['_source']=_0x138dda;}async update(){const _0x14d7a1=await this['_source']['getLatestVersion']();if(_0x14d7a1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x13dc72=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x14d7a1});_0x13dc72['authors']=_0x13dc72['authorsIds']['map'](_0x1c9fea=>this['editor']['plugins']['get']('Users')['getUser'](_0x1c9fea)),this['currentRevision']['_update'](_0x13dc72);}}async['saveRevision'](_0x1922c7={},_0x20533d=null){const _0x3a1714=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x20533d>this['currentRevision']['toVersion']&&(_0x20533d=null),null===_0x20533d&&(_0x20533d=await this['_source']['getLatestVersion']());const _0x5468d9=this['_getFromVersion'](_0x20533d),_0x508b94=this['buildRevisionData']({'from':_0x5468d9,'to':_0x20533d});if(this['currentRevision']['toVersion']<_0x20533d){const _0x2d6027=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x20533d,'to':_0x20533d});_0x2d6027['authors']=[],_0x2d6027['authorsIds']=[],_0x2d6027['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2d6027,!0x0),delete _0x2d6027['authors'],_0x3a1714['push'](_0x2d6027);}const _0x262b01={..._0x1922c7,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1922c7['name']||null,'id':_0x1922c7['id']||_0x27f7da(),..._0x508b94,'attributes':{..._0x1922c7['attributes'],..._0x508b94['attributes']}},_0x56ebe6=this['addRevisionData'](_0x262b01);_0x3a1714['push'](_0x262b01);const _0x25817e=this['repository']['getIndex'](_0x56ebe6);if(0x0!==_0x25817e){const _0x56cd1c=this['repository']['getRevision'](_0x25817e-0x1);if(_0x56cd1c['fromVersion']!==_0x20533d){const _0x2d717a=this['_revisionDataBuilder']['getData'](_0x20533d,_0x56cd1c['toVersion']),_0x4d3d0e={'id':_0x56cd1c['id'],'diffData':_0x2d717a['diffData'],'authorsIds':_0x2d717a['authorsIds'],'authors':_0x2d717a['authorsIds']['map'](_0x2a34fc=>this['editor']['plugins']['get']('Users')['getUser'](_0x2a34fc)),'fromVersion':_0x20533d};this['_stampAiAttribute'](_0x4d3d0e,_0x56cd1c,!!_0x2d717a['hasAIChanges']),_0x56cd1c===this['currentRevision']&&(_0x4d3d0e['createdAt']=new Date(_0x262b01['createdAt']['getTime']()+0xa)),_0x56cd1c['_update'](_0x4d3d0e,!0x0),delete _0x4d3d0e['authors'],_0x3a1714['push'](_0x4d3d0e);}}if(this['adapter']){for(const _0x174c62 of _0x3a1714)this['_bufferUpdate'](_0x174c62['id'],_0x174c62,!0x0);this['sendBufferedUpdates']();}return _0x56ebe6;}addRevisionData(_0x20926b){const _0x149e84=this['repository']['createRevision'](_0x20926b);return this['adapter']&&_0x149e84['on']('_update',(_0x25eb5f,_0x9b07c0,_0x45a1c6)=>{_0x45a1c6||(this['_bufferUpdate'](_0x9b07c0['id'],_0x9b07c0,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x149e84,this['_findInsertionIndex'](_0x149e84)),_0x149e84;}async getRevisionDocumentData(_0x1c59a9){return await this['_utils']['loadRevisionData'](_0x1c59a9,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1c59a9);}async getRevisionRootsAttributes(_0x15b8eb){return await this['_utils']['loadRevisionData'](_0x15b8eb,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x15b8eb);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5aabdd=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3d6942=0x0;_0x3d6942<_0x5aabdd['length'];_0x3d6942++){const _0x29fe48=_0x5aabdd[_0x3d6942];let _0x21940c=!0x1;for(const _0x148916 of Object['keys'](_0x29fe48))void 0x0===_0x29fe48[_0x148916]?delete _0x29fe48[_0x148916]:'id'!==_0x148916&&(_0x21940c=!0x0);_0x21940c||(_0x5aabdd[_0x3d6942]=null);}if(_0x5aabdd=_0x5aabdd['filter'](_0x24be3d=>null!==_0x24be3d),!_0x5aabdd['length'])return;for(let _0x308646=0x0;_0x308646<_0x5aabdd['length'];_0x308646++){const _0x392783=_0x5aabdd[_0x308646];void 0x0!==_0x392783['fromVersion']&&void 0x0===_0x392783['toVersion']&&(_0x392783['toVersion']=this['repository']['getRevision'](_0x392783['id'])['toVersion']),void 0x0!==_0x392783['toVersion']&&void 0x0===_0x392783['fromVersion']&&(_0x392783['fromVersion']=this['repository']['getRevision'](_0x392783['id'])['fromVersion']);}const _0x89efd5=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5aabdd,_0x89efd5)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x390ea2=>{if(_0x390ea2){for(const _0x5115da of _0x390ea2)this['setRevisionData']({'id':_0x5115da['id'],'createdAt':_0x5115da['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x5a463e,_0x2481de,_0x42537e){if(_0x42537e===(!!_0x2481de&&!!_0x2481de['attributes']['@ai']))return;const _0x535802={..._0x2481de?_0x2481de['attributes']:{},..._0x5a463e['attributes']};_0x42537e?_0x535802['@ai']=!0x0:delete _0x535802['@ai'],_0x5a463e['attributes']=_0x535802;}buildRevisionData({revision:_0xb5bc40=null,from:_0xb8e77a=null,to:_0x118b9a=null}){_0xb8e77a=null!==_0xb8e77a?_0xb8e77a:_0xb5bc40['fromVersion'],_0x118b9a=null!==_0x118b9a?_0x118b9a:_0xb5bc40['toVersion'];const _0x56af57=this['_revisionDataBuilder']['getData'](_0xb8e77a,_0x118b9a),_0xa7f106={'diffData':_0x56af57['diffData'],'authorsIds':_0x56af57['authorsIds'],'fromVersion':_0xb8e77a,'toVersion':_0x118b9a};if(this['_stampAiAttribute'](_0xa7f106,_0xb5bc40,!!_0x56af57['hasAIChanges']),!_0xb5bc40||_0x118b9a!==_0xb5bc40['toVersion']){const _0x5a2129=_0x118b9a-0x1,_0x2eea5a=this['_source']['history']['getOperation'](_0x5a2129);_0xa7f106['createdAt']=_0x2eea5a&&_0x2eea5a['createdAt']||new Date();}if(this['_loadedStateData']&&_0xb8e77a===this['_loadedStateData']['fromVersion']){for(const _0x3c1550 of this['_loadedStateData']['authors'])_0xa7f106['authorsIds']['includes'](_0x3c1550['id'])||_0xa7f106['authorsIds']['push'](_0x3c1550['id']);}return _0xa7f106;}_bufferUpdate(_0x5984c2,_0x257822,_0x2f148b){if(this['_bufferedUpdates']['has'](_0x5984c2)){const _0x371c46=this['_bufferedUpdates']['get'](_0x5984c2);_0x257822=_0x2f148b?{..._0x371c46,..._0x257822}:{..._0x257822,..._0x371c46};}this['_bufferedUpdates']['set'](_0x5984c2,_0x257822);}setRevisionData(_0x5ccb38){const _0x4086c2=this['repository']['getRevision'](_0x5ccb38['id']);if(_0x5ccb38['createdAt']&&(_0x5ccb38['createdAt']=new Date(_0x5ccb38['createdAt'])),_0x5ccb38['authorsIds']){const _0x14ca34=this['editor']['plugins']['get']('Users');_0x5ccb38['authors']=_0x5ccb38['authorsIds']['map'](_0x3a1c6f=>_0x14ca34['getUser'](_0x3a1c6f));}_0x4086c2['_update'](_0x5ccb38,!0x0);}_createInitialRevision(_0x34bf59){const _0x5ae224=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5ae224)this['_initialRevisionId']=_0x5ae224['id'];else{const _0x3e7b44=!this['editor']['model']['document']['roots']['find'](_0x2c112e=>this['editor']['model']['hasContent'](_0x2c112e)),_0x737b9e=this['editor']['plugins']['get']('Users')['me']['id'],_0x39562a=kt(this['editor']['locale'],_0x3e7b44?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x34bf59,'to':_0x34bf59,'id':this['_initialRevisionId'],'name':_0x39562a,'creatorId':_0x737b9e});}}_createCurrentRevision(_0x5786af){const _0xcb2c7a=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xcb2c7a),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5786af,'to':_0x5786af,'id':_0xcb2c7a,'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(_0x48d4f7,_0xb19d5c,_0x258e11){const _0x4dab5f={},_0x73cf97={},_0x1c0543={},_0x14168b=this['editor']['config']['get']('roots')||{};for(const [_0x5d9161,_0x17e0dd]of Object['entries'](_0x14168b))_0x17e0dd['lazyLoad']||(_0x4dab5f[_0x5d9161]=_0x17e0dd['initialData']??'',_0x73cf97[_0x5d9161]=_0x17e0dd['modelAttributes']||{},_0x17e0dd['modelElement']&&(_0x1c0543[_0x5d9161]=_0x17e0dd['modelElement']));for(const _0x50fbc0 of this['editor']['model']['document']['getRootNames']())_0x4dab5f[_0x50fbc0]??='',_0x73cf97[_0x50fbc0]??={};let _0x308c30=!0x1;const _0x84600b=Object['keys'](_0x4dab5f),_0x4acbc8=Object['keys'](_0x48d4f7);for(const _0x26745c of _0x84600b){if(_0x4dab5f[_0x26745c]!==_0x48d4f7[_0x26745c]&&''!==_0x4dab5f[_0x26745c]['trim']()){_0x308c30=!0x0;break;}if(!_0x219ba7(_0x73cf97[_0x26745c],_0xb19d5c[_0x26745c])&&Object['keys'](_0x73cf97[_0x26745c])['length']>0x0){_0x308c30=!0x0;break;}const _0x5f2106=_0x1c0543[_0x26745c],_0x12c377=_0x258e11[_0x26745c];if(_0x5f2106&&_0x12c377&&_0x5f2106!==_0x12c377){_0x308c30=!0x0;break;}}_0x308c30||(_0x308c30=_0x4acbc8['some'](_0x1e3c9d=>!this['editor']['model']['document']['getRoot'](_0x1e3c9d))),_0x308c30&&_0x222a9a('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4dab5f,'editorRootsAttributes':_0x73cf97,'editorRootsModelElements':_0x1c0543,'revisionData':_0x48d4f7,'revisionRootsAttributes':_0xb19d5c,'revisionRootsModelElements':_0x258e11});for(const [_0x6e72a9,_0x5401f3]of Object['entries'](_0x48d4f7))this['editor']['config']['set']('roots.'+_0x6e72a9+'.initialData',_0x5401f3);for(const [_0x2e4401,_0x4c6fc9]of Object['entries'](_0xb19d5c))this['editor']['config']['set']('roots.'+_0x2e4401+'.modelAttributes',_0x4c6fc9);const _0x1ab7a6=this['editor']['model']['document'];for(const [_0x1b0d3c,_0x400d88]of Object['entries'](_0x258e11)){this['editor']['config']['set']('roots.'+_0x1b0d3c+'.modelElement',_0x400d88);const _0x536076=_0x1ab7a6['getRoot'](_0x1b0d3c);_0x536076&&_0x536076['name']!==_0x400d88&&(_0x1ab7a6['roots']['remove'](_0x1b0d3c),_0x1ab7a6['createRoot'](_0x400d88,_0x1b0d3c));}}_addPendingAction(){if(!this['_pendingAction']){const _0x4d092d=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4d092d['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x4b83f3){const _0x519f77=this['repository']['getRevisions']();_0x519f77['reverse']();let _0x31017e=0x0;for(;_0x31017e<_0x519f77['length'];){const _0x138389=_0x519f77[_0x31017e];if(_0x138389===this['currentRevision']){_0x31017e++;continue;}if(_0x138389['id']===this['_initialRevisionId'])break;const _0x17a3ca=_0x4b83f3['toVersion']-_0x138389['toVersion']||_0x4b83f3['fromVersion']-_0x138389['fromVersion'];if(_0x17a3ca>0x0)break;if(_0x17a3ca<0x0)_0x31017e++;else{if(!_0x4b83f3['creator']&&_0x138389['creator'])break;if(_0x138389['creator']||!_0x4b83f3['creator']){if(_0x4b83f3['createdAt']>_0x138389['createdAt'])break;_0x31017e++;}else _0x31017e++;}}return _0x31017e;}_getFromVersion(_0x39dca9){const _0x326dd5=this['repository']['getRevisions']();_0x326dd5['reverse'](),_0x326dd5['shift']();const _0x28447f=_0x326dd5['find'](_0x346223=>_0x346223['toVersion']<=_0x39dca9)['toVersion'];return _0x28447f<this['_startingVersion']?this['_startingVersion']:_0x28447f;}['_makeRevision']({name:_0x8dff40,from:_0x2078ac,to:_0x33dcb2,creatorId:_0x4c22d6,id:_0x289bfd}){const _0x160d58=this['buildRevisionData']({'from':_0x2078ac,'to':_0x33dcb2});_0x160d58['name']=_0x8dff40,_0x160d58['creatorId']=_0x4c22d6,_0x160d58['id']=_0x289bfd;const _0x1044ed=this['addRevisionData'](_0x160d58);return this['adapter']&&this['_bufferUpdate'](_0x160d58['id'],_0x160d58,!0x0),_0x1044ed;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x212e3d){this['editor']=_0x212e3d,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(_0x2ca1ca){this['source']=_0x2ca1ca;const _0x58a7bc=new Map(),_0xa9f5da=new Map(),_0xd1ca33=this['editor']['model']['document']['roots']['map'](_0x1ff163=>_0x1ff163['rootName']);for(const _0x19b387 of _0xd1ca33){const _0x18654c=this['editor']['model']['document']['getRoot'](_0x19b387),_0x473979=St(_0x18654c);_0x58a7bc['set'](_0x19b387,_0x473979),_0xa9f5da['set'](_0x19b387,Object['fromEntries'](_0x18654c['getAttributes']()));}const _0x44b29c=Array['from'](this['editor']['model']['markers'])['map'](_0x164448=>[_0x164448['name'],_0x164448['getRange']()]),_0x5bf137=this['source']['version'];this['_saveMetaData'](_0x5bf137,_0x58a7bc,_0x44b29c,_0xa9f5da),this['_startingRevisionId']=this['_revisionId'];const _0x46e0bb=new Map(),_0x1c828e=new Map();for(const _0x5acdc8 of _0xd1ca33){const _0x49296d=Et(_0x5acdc8,this['editor']['model']['document']['getRoot'](_0x5acdc8)['name']);_0x46e0bb['set'](_0x5acdc8,_0x49296d),_0x1c828e['set'](_0x5acdc8,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x46e0bb,[],_0x1c828e);}getData(_0x382f76,_0x3af607){if(this['_lastFrom']===_0x382f76&&this['_lastTo']<=_0x3af607)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3af607,!0x0);else{if(!this['_savedMetaData']['has'](_0x382f76)){const _0x2e8202=this['_getPreviousFrom'](_0x382f76);this['_calculateMetaData'](_0x2e8202,_0x382f76,!0x1);}this['_calculateMetaData'](_0x382f76,_0x3af607,!0x0);}return this['_lastFrom']=_0x382f76,this['_lastTo']=_0x3af607,this['_getState']();}loadState(_0x5c0742){if(!this['_savedMetaData']['has'](_0x5c0742['fromVersion'])){const _0x39af52=this['_getPreviousFrom'](_0x5c0742['fromVersion']);this['_calculateMetaData'](_0x39af52,_0x5c0742['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5c0742['fromVersion'],_0x5c0742['toVersion'],!0x1);const _0x2be870=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5c0742['fromVersion'],this['_lastTo']=_0x5c0742['toVersion'];for(const _0x40fd58 in _0x5c0742['diffData']){const _0x409d5c=_0x5c0742['diffData'][_0x40fd58]['attachChange'],_0x1f2e25=_0x1721d7(_0x5c0742['diffData'][_0x40fd58]['attributesBefore'])||{},_0x5651b4=_0x5c0742['diffData'][_0x40fd58],_0x1bf291=_0x2be870['_makeModelFromViewString'](_0x5651b4['deletions'],_0x5651b4['rootElementName']||'$root');_0x1bf291['rootName']=_0x40fd58,_0x1bf291['_isAttached']=!_0x409d5c||!_0x409d5c['isAttached'],_0x1bf291['isAttached']=()=>_0x1bf291['_isAttached'],this['_baseRoots']['set'](_0x40fd58,_0x1bf291),this['_baseRootsAttributes']['set'](_0x40fd58,_0x1f2e25),_0x409d5c&&this['_touchedRoots']['set'](_0x40fd58,_0x409d5c);const _0x1c532b=this['_makeIdsRoot'](_0x1bf291);this['_baseIdsRoots']['set'](_0x40fd58,_0x1c532b);for(const [_0x44c5d4,_0x244b0e]of _0x1bf291['markers']){if(!_0x44c5d4['startsWith']('revision:'))continue;const _0x48f694=_0x44c5d4['split'](':')[0x2],_0x4d2738=_0x5651b4['aiSources']?.[_0x44c5d4]||null;for(const _0x26f7b7 of _0x244b0e['getWalker']({'singleCharacters':!0x0})){const _0x1b0858=this['_getVidAttributeName'](_0x26f7b7),_0x5d464a='elementEnd'==_0x26f7b7['type']?_0x26f7b7['previousPosition']['path']['slice'](0x0,-0x1):_0x26f7b7['previousPosition']['path'],_0x44b29a=_0x1c532b['getNodeByPath'](_0x5d464a)['getAttribute'](_0x1b0858);this['_touched']['set'](_0x44b29a,{'userId':_0x48f694,'aiSource':_0x4d2738});}_0x1bf291['markers']['delete'](_0x44c5d4);}}this['_startingRevisionId']=this['_revisionId'];const _0x3ce78c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x23a434=>!this['_touched']['has'](_0x23a434));let _0x40d901=0x0;const _0x462d99=new Map();for(const _0x2709b6 in _0x5c0742['diffData']){const _0x3c1691=_0x5c0742['diffData'][_0x2709b6]['attachChange'],_0x31b882=_0x1721d7(_0x5c0742['diffData'][_0x2709b6]['attributesAfter'])||{},_0x52fdde=_0x5c0742['diffData'][_0x2709b6],_0x4aafe9=_0x2be870['_makeModelFromViewString'](_0x52fdde['insertions'],_0x52fdde['rootElementName']||'$root');_0x4aafe9['rootName']=_0x2709b6,_0x4aafe9['_isAttached']=!_0x3c1691||_0x3c1691['isAttached'],_0x4aafe9['isAttached']=()=>_0x4aafe9['_isAttached'],this['_diffRoots']['set'](_0x2709b6,_0x4aafe9),this['_diffRootsAttributes']['set'](_0x2709b6,_0x31b882);const _0x3e8a04=this['_makeIdsRoot'](_0x4aafe9,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2709b6,_0x3e8a04),_0x462d99['set'](_0x2709b6,_0x4aafe9['isAttached']()?_0x31b882:{});for(const [_0x565c51,_0x447d94]of _0x4aafe9['markers']){if(!_0x565c51['startsWith']('revision:'))continue;const _0x1a614d=_0x565c51['split'](':')[0x2],_0xf8a6ae=_0x52fdde['aiSources']?.[_0x565c51]||null;for(const _0x5a884c of _0x447d94['getWalker']({'singleCharacters':!0x0})){const _0x1bb1e3=this['_getVidAttributeName'](_0x5a884c),_0x3ec883=this['_revisionId']++,_0x23fcd9='elementEnd'==_0x5a884c['type']?_0x5a884c['previousPosition']['path']['slice'](0x0,-0x1):_0x5a884c['previousPosition']['path'];_0x3e8a04['getNodeByPath'](_0x23fcd9)['_setAttribute'](_0x1bb1e3,_0x3ec883),this['_touched']['set'](_0x3ec883,{'userId':_0x1a614d,'aiSource':_0xf8a6ae});}_0x4aafe9['markers']['delete'](_0x565c51);}for(const _0x253c08 of this['editor']['model']['createRangeIn'](_0x4aafe9)['getWalker']({'singleCharacters':!0x0})){const _0xfdd53b=this['_getVidAttributeName'](_0x253c08),_0x17829e='elementEnd'==_0x253c08['type']?_0x253c08['previousPosition']['path']['slice'](0x0,-0x1):_0x253c08['previousPosition']['path'],_0x55b4cd=_0x3e8a04['getNodeByPath'](_0x17829e);_0x55b4cd['getAttribute'](_0xfdd53b)>0x0||_0x55b4cd['_setAttribute'](_0xfdd53b,_0x3ce78c[_0x40d901++]);}for(const [_0x181538,_0x2fda6a]of _0x4aafe9['markers'])_0x181538['startsWith']('revision:')||this['_markers']['set'](_0x181538,_0x2fda6a);}const {roots:_0x41f005}=this['_savedMetaData']['get'](_0x5c0742['fromVersion']),{roots:_0x3e1ced}=this['_savedMetaData']['get'](_0x5c0742['toVersion']),_0x322c81=St(_0x41f005['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x322c81),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x322c81,Number['NEGATIVE_INFINITY']));const _0x2a4502=St(_0x3e1ced['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2a4502),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2a4502));const _0x174402=Array['from'](this['_diffRoots'])['map'](([_0x3e06e5,_0x13a60f])=>[_0x3e06e5,St(_0x13a60f)]);this['_saveMetaData'](this['_lastTo'],_0x174402,this['_markers'],_0x462d99);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x597273,_0x40ac08,_0x105baf,_0x33c66f){const _0x322033=new Map(_0x40ac08),_0xc5e318=new Map(_0x1721d7(_0x33c66f)),_0x4d77fd=new Map();for(const [_0x255f72,_0x4c91bc]of _0x105baf)_0x4d77fd['set'](_0x255f72,{'start':_0x4c91bc['start']['clone'](),'end':_0x4c91bc['end']['clone'](),'rootName':_0x4c91bc['root']['rootName']});this['_savedMetaData']['set'](_0x597273,{'roots':_0x322033,'markers':_0x4d77fd,'rootsAttributes':_0xc5e318});}_removeMetaData(_0x58d19a){this['_savedMetaData']['delete'](_0x58d19a);}_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(_0x3a8b35,_0x34caa7=null){let _0x555bc5=null;_0x3a8b35['is']('documentFragment')||(_0x555bc5=new _0x329f01(_0x3a8b35['name'],{'vid_start':null===_0x34caa7?this['_revisionId']++:_0x34caa7++}));const _0x2657bb=[];for(const _0x44b5f8 of _0x3a8b35['getChildren']())if(_0x44b5f8['is']('element')){_0x2657bb['push'](this['_makeIdsRoot'](_0x44b5f8,_0x34caa7));const _0x474cb7=_0x2657bb[_0x2657bb['length']-0x1];null!==_0x34caa7&&(_0x34caa7=_0x474cb7['is']('element','$text')?_0x474cb7['getAttribute']('vid')+0x1:_0x474cb7['getAttribute']('vid_end')+0x1);}else{for(let _0x399663=0x0;_0x399663<_0x44b5f8['offsetSize'];_0x399663++)_0x2657bb['push'](new _0x329f01('$text',{'vid':null===_0x34caa7?this['_revisionId']++:_0x34caa7++}));}if(_0x3a8b35['is']('documentFragment')){const _0x1d92bd=Et(_0x3a8b35['rootName'],_0x3a8b35['name']);return _0x1d92bd['_insertChild'](0x0,_0x2657bb),_0x1d92bd;}return _0x555bc5['_setAttribute']('vid_end',null===_0x34caa7?this['_revisionId']++:_0x34caa7),_0x555bc5['_insertChild'](0x0,_0x2657bb),_0x555bc5;}_calculateMetaData(_0x3d9d0d,_0x32e0b8,_0x52b6db){this['_reset']();const {roots:_0x45bb2e,markers:_0x45604f,rootsAttributes:_0x2cad3e}=this['_savedMetaData']['get'](_0x3d9d0d);this['_baseRoots']=new Map(_0x45bb2e),this['_baseRootsAttributes']=new Map(_0x1721d7(_0x2cad3e));for(const [_0x20a1da,_0x5961c1]of this['_baseRoots'])if('$graveyard'!==_0x20a1da&&(this['_diffRoots']['set'](_0x20a1da,St(_0x5961c1)),this['_diffRootsAttributes']=new Map(_0x1721d7(_0x2cad3e)),_0x52b6db)){const _0x18630a=this['_revisionId'];this['_idsRoots']['set'](_0x20a1da,this['_makeIdsRoot'](_0x5961c1)),this['_baseIdsRoots']['set'](_0x20a1da,this['_makeIdsRoot'](_0x5961c1,_0x18630a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x52b6db&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x17081d,_0x493781]of _0x45604f){const _0x365575=this['_baseRoots']['get'](_0x493781['rootName']),_0x2882cb=this['_diffRoots']['get'](_0x493781['rootName']),_0x11b784=new _0x2a2117(_0x46ca69(_0x493781['start'],_0x365575),_0x46ca69(_0x493781['end'],_0x365575)),_0x526605=_0x4446b6(_0x11b784,_0x2882cb);_0x365575['markers']['set'](_0x17081d,_0x11b784),this['_markers']['set'](_0x17081d,_0x526605);}this['_applyOperations'](_0x3d9d0d,_0x32e0b8,_0x52b6db);}_applyOperations(_0x1aebe1,_0x42938a,_0x373726){for(const _0x3b8f6c of this['source']['getOperations'](_0x1aebe1,_0x42938a))this['_handleOperation'](_0x3b8f6c,_0x373726);for(const _0x418ce7 of this['_diffRoots']['values']())_0x418ce7['markers']['clear']();for(const [_0x3f6197,_0x2637bb]of this['_markers'])this['_diffRoots']['get'](_0x2637bb['root']['rootName'])['markers']['set'](_0x3f6197,_0x2637bb['clone']());const _0x50d940=new Map(),_0xdb8469=new Map();for(const [_0x329f7f,_0x596327]of this['_diffRoots'])_0x50d940['set'](_0x329f7f,St(_0x596327)),_0xdb8469['set'](_0x329f7f,this['_diffRootsAttributes']['get'](_0x329f7f));this['_saveMetaData'](_0x42938a,_0x50d940,this['_markers'],_0xdb8469);}_getPreviousFrom(_0x1e4ef7){const _0x55a758=Array['from'](this['_savedMetaData']['keys']());_0x55a758['sort']((_0x80deab,_0x2a5409)=>_0x80deab-_0x2a5409),_0x55a758['reverse']();for(const _0x50fe96 of _0x55a758)if(_0x50fe96<_0x1e4ef7)return _0x50fe96;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5c208f,_0x5542fd){const _0x208e53=Array['from'](_0x5542fd['markers'])['map'](([_0x244a5a,_0x4a0d71])=>[_0x244a5a,_0x4446b6(_0x4a0d71,_0x5c208f)]);_0x5c208f['markers']=new Map(_0x208e53);}_transformMarkers(_0x5dd9d8){for(const _0x44c5a0 of this['_markers']['values']()){const _0x418f4=_0x44c5a0['getTransformedByOperation'](_0x5dd9d8),_0x26dee2=_0x2a2117['_createFromRanges'](_0x418f4);_0x44c5a0['start']=_0x26dee2['start'],_0x44c5a0['end']=_0x26dee2['end'];}}_handleOperation(_0x8ec928,_0x40201f){if('addRoot'!=_0x8ec928['type']&&'detachRoot'!=_0x8ec928['type']){if('insert'==_0x8ec928['type']){const _0x264478=_0x8ec928['position']['root'],_0x24d7f1=_0x264478['rootName'],_0x33d1bf=_0x264478['name'];this['_diffRoots']['has'](_0x24d7f1)||(this['_diffRoots']['set'](_0x24d7f1,Et(_0x24d7f1,_0x33d1bf,!0x0)),this['_diffRootsAttributes']['set'](_0x24d7f1,{}),_0x40201f&&this['_idsRoots']['set'](_0x24d7f1,Et(_0x24d7f1,_0x33d1bf,!0x0)));}else{if('addRootAttribute'==_0x8ec928['type']||'removeRootAttribute'==_0x8ec928['type']||'changeRootAttribute'==_0x8ec928['type'])return void this['_handleRootAttributeOperation'](_0x8ec928);'marker'==_0x8ec928['type']&&this['_handleMarkerOperation'](_0x8ec928);}if('marker'!==_0x8ec928['type']){const _0x11413a=this['_cloneOperation'](_0x8ec928,this['_diffRoots']);_0x11413a['_execute'](),this['_transformMarkers'](_0x11413a);}if(_0x40201f)switch(_0x8ec928['type']){case'insert':this['_handleInsertOperation'](_0x8ec928);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x8ec928);break;case'merge':this['_handleMergeOperation'](_0x8ec928);break;case'split':this['_handleSplitOperation'](_0x8ec928);}}else this['_handleRootOperation'](_0x8ec928,_0x40201f);}_cloneOperation(_0xa05859,_0x3ce0c0){const _0x4240bc=_0xa05859['clone']();return _0x4240bc['_authorId']=_0xa05859['_authorId'],_0x4240bc['_aiSource']=_0xa05859['_aiSource'],_0x4240bc['baseVersion']=null,_0x3f34c4(_0x4240bc,_0x3ce0c0),_0x4240bc;}_getBaseVids(_0x454166){return _0x454166['map'](_0x532bee=>{const _0x57cbb6=this['_getVidAttributeName'](_0x532bee);return Number(_0x532bee['item']['getAttribute'](_0x57cbb6));});}_generateTape(_0x5433fa,_0x3011b5){if(_0x5433fa['is']('element','$text'))_0x3011b5['push']({'item':_0x5433fa,'type':'text'});else{_0x5433fa['is']('element')&&_0x3011b5['push']({'item':_0x5433fa,'type':'elementStart'});for(const _0x4fb466 of _0x5433fa['getChildren']())this['_generateTape'](_0x4fb466,_0x3011b5);_0x5433fa['is']('element')&&_0x3011b5['push']({'item':_0x5433fa,'type':'elementEnd'});}return _0x3011b5;}_getState(){const _0x4c1903=new Map(this['_touched']),_0x5d06e0=new Map(_0x4c1903),_0xb65d49=new Map(),_0x470e38={'insertions':{},'deletions':{}},_0x51fc34={'insertions':{},'deletions':{}},_0x1113b7=new Map(),_0x53324a=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1aea6d=new Map();_0x53324a['delete']('$graveyard');for(const _0x163ef2 of _0x53324a){const _0x356d9b=(this['_diffRoots']['get'](_0x163ef2)??this['_baseRoots']['get'](_0x163ef2))['name'],_0x30bbef=this['_diffRoots']['get'](_0x163ef2)||Et(_0x163ef2,_0x356d9b,!0x1),_0x2d3caf=this['_baseRoots']['get'](_0x163ef2)||Et(_0x163ef2,_0x356d9b,!0x1);_0x30bbef['isAttached']()||_0x2d3caf['isAttached']()?(_0x1aea6d['set'](_0x163ef2,_0x356d9b),_0x470e38['insertions'][_0x163ef2]=St(_0x30bbef),_0x470e38['deletions'][_0x163ef2]=St(_0x2d3caf),this['_copyMarkers'](_0x470e38['deletions'][_0x163ef2],_0x2d3caf),this['_copyMarkers'](_0x470e38['insertions'][_0x163ef2],_0x30bbef),_0x51fc34['insertions'][_0x163ef2]=this['_generateTape'](this['_idsRoots']['get'](_0x163ef2),[]),_0x51fc34['deletions'][_0x163ef2]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x163ef2)||Et(_0x163ef2,_0x356d9b,!0x1),[])):_0x53324a['delete'](_0x163ef2);}for(const _0x5de441 of _0x53324a){const _0x2748d5=_0x51fc34['insertions'][_0x5de441];for(const _0x14784 of _0x2748d5){const _0x226b9d=this['_getVidAttributeName'](_0x14784),_0x2dc1fc=_0x14784['item']['getAttribute'](_0x226b9d);_0x5d06e0['delete'](_0x2dc1fc),_0x2dc1fc>=this['_startingRevisionId']&&_0xb65d49['set'](_0x2dc1fc,_0x4c1903['get'](_0x2dc1fc));}}for(const _0x444ce5 of _0x53324a){const _0x259013=_0x51fc34['insertions'][_0x444ce5],_0x2c7ddc=this['_getBaseVids'](_0x51fc34['deletions'][_0x444ce5]);let _0x898f1e=0x0;for(const _0xde00e2 of _0x259013){const _0xad91b7=this['_getVidAttributeName'](_0xde00e2),_0x579bb6=_0xde00e2['item']['getAttribute'](_0xad91b7);if(!_0xb65d49['has'](_0x579bb6)&&!_0x1113b7['has'](_0x579bb6)){if(_0x5d06e0['has'](_0x579bb6))_0x898f1e++;else{if(_0x579bb6!=_0x2c7ddc[_0x898f1e]){const _0x4fab81=_0x4c1903['get'](_0x579bb6)||_0x4c1903['get'](_0x2c7ddc[_0x898f1e]);for(;_0x579bb6!=_0x2c7ddc[_0x898f1e];)_0x5d06e0['has'](_0x2c7ddc[_0x898f1e])||(_0x1113b7['set'](_0x2c7ddc[_0x898f1e],_0x4fab81),_0x4c1903['set'](_0x2c7ddc[_0x898f1e],_0x4fab81)),_0x898f1e++;}_0x898f1e++;}}}}for(const _0x290c4d of _0x53324a){const _0x3b244c=_0x51fc34['insertions'][_0x290c4d];for(const _0x43841a of _0x3b244c){const _0x3244b0=this['_getVidAttributeName'](_0x43841a),_0x59b95e=_0x43841a['item']['getAttribute'](_0x3244b0);if(_0x1113b7['has'](_0x59b95e)){const _0x501665=_0x1113b7['get'](_0x59b95e);_0x5d06e0['has'](_0x59b95e)||_0x5d06e0['set'](_0x59b95e,{..._0x501665}),_0xb65d49['set'](_0x59b95e,{..._0x501665});}}}for(const _0x4ff56c of _0x5d06e0['keys']())_0x4ff56c>=this['_startingRevisionId']&&_0x5d06e0['delete'](_0x4ff56c);const _0x890bda=new Map();for(const _0x3fdb48 of _0x53324a){let _0x5e28cb=_0x51fc34['insertions'][_0x3fdb48];for(const _0x3b7fe6 of _0x5e28cb)if(_0x3b7fe6['item']['is']('element','tableCell')){const _0x2fc627=this['_getVidAttributeName'](_0x3b7fe6),_0x46a0b0=_0x3b7fe6['item']['getAttribute'](_0x2fc627);if(_0xb65d49['has'](_0x46a0b0)){const _0x561a1b=_0x3b7fe6['item']['parent']['parent']['getAttribute']('vid_start'),_0x4bde7b=_0xb65d49['get'](_0x46a0b0),_0x232c44=_0x890bda['get'](_0x561a1b)||{'users':new Set(),'aiSource':null};_0x232c44['users']['add'](_0x4bde7b['userId']),_0x232c44['aiSource']=_0x232c44['aiSource']||_0x4bde7b['aiSource']||null,_0x890bda['set'](_0x561a1b,_0x232c44);}}_0x5e28cb=_0x51fc34['deletions'][_0x3fdb48];for(const _0x33dde9 of _0x5e28cb)if(_0x33dde9['item']['is']('element','tableCell')){const _0x310b6d=this['_getVidAttributeName'](_0x33dde9),_0x36626d=_0x33dde9['item']['getAttribute'](_0x310b6d);if(_0x5d06e0['has'](_0x36626d)){const _0x19b773=_0x33dde9['item']['parent']['parent']['getAttribute']('vid_start'),_0x3676c4=_0x5d06e0['get'](_0x36626d),_0x55f4ce=_0x890bda['get'](_0x19b773)||{'users':new Set(),'aiSource':null};_0x55f4ce['users']['add'](_0x3676c4['userId']),_0x55f4ce['aiSource']=_0x55f4ce['aiSource']||_0x3676c4['aiSource']||null,_0x890bda['set'](_0x19b773,_0x55f4ce);}}for(const _0x38594d of _0x890bda['keys']())(_0xb65d49['has'](_0x38594d)||_0x5d06e0['has'](_0x38594d))&&_0x890bda['delete'](_0x38594d);}for(const _0x105785 of _0x53324a){const _0x31420a=_0x51fc34['insertions'][_0x105785];let _0x3b169b=null,_0x279eb3=null,_0x47e198=null;for(const _0xcbbd19 of _0x31420a){const _0x2fe391=this['_getVidAttributeName'](_0xcbbd19),_0x192103=_0xcbbd19['item']['getAttribute'](_0x2fe391),_0x10230c=_0x890bda['get'](_0x192103);if(_0x10230c&&'elementStart'==_0xcbbd19['type']&&(_0x3b169b=Array['from'](_0x10230c['users'])[0x0],_0x279eb3=_0x10230c['aiSource'],_0x47e198=_0xcbbd19['item']['getAttribute']('vid_end')),_0x3b169b){const _0x12942f=_0x279eb3||_0x5d06e0['get'](_0x192103)?.['aiSource']||null,_0x188b36=_0x279eb3||_0xb65d49['get'](_0x192103)?.['aiSource']||null;_0x5d06e0['set'](_0x192103,{'userId':_0x3b169b,'aiSource':_0x12942f}),_0xb65d49['set'](_0x192103,{'userId':_0x3b169b,'aiSource':_0x188b36});}_0x192103==_0x47e198&&(_0x3b169b=null,_0x47e198=null);}}const _0x47c861={},_0x5b500e=new Set();for(const _0x13bb4d of _0x53324a){const _0x3e5f33=_0x470e38['deletions'][_0x13bb4d],_0xc39824=_0x470e38['insertions'][_0x13bb4d];for(const {userId:_0x5669b4}of this['_touchedMarkers']['values']())null!==_0x5669b4&&_0x5b500e['add'](_0x5669b4);for(const {userId:_0x44429e}of this['_touchedRoots']['values']())null!==_0x44429e&&_0x5b500e['add'](_0x44429e);const _0x1286d7={};this['_markChanges'](_0xc39824,_0x51fc34['insertions'][_0x13bb4d],_0xb65d49,'insertion',_0x5b500e,_0x1286d7),this['_markChanges'](_0x3e5f33,_0x51fc34['deletions'][_0x13bb4d],_0x5d06e0,'deletion',_0x5b500e,_0x1286d7),this['_collectSuggestionAiSources'](_0xc39824,_0x1286d7),this['_collectSuggestionAiSources'](_0x3e5f33,_0x1286d7),_0x47c861[_0x13bb4d]={'insertions':this['_prepareViewToSave'](_0xc39824),'deletions':this['_prepareViewToSave'](_0x3e5f33),'attachChange':this['_touchedRoots']['get'](_0x13bb4d)||null,'attributesBefore':_0x1721d7(this['_baseRootsAttributes']['get'](_0x13bb4d))||{},'attributesAfter':_0x1721d7(this['_diffRootsAttributes']['get'](_0x13bb4d)),'rootElementName':_0x1aea6d['get'](_0x13bb4d),'aiSources':_0x1286d7};}const _0x839ab9=Array['from'](_0xb65d49['values']())['some'](_0x2ceb91=>!(!_0x2ceb91||!_0x2ceb91['aiSource']))||Array['from'](_0x5d06e0['values']())['some'](_0x4e5c5f=>!(!_0x4e5c5f||!_0x4e5c5f['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x3cc76a=>this['_aiTouchedMarkers']['has'](_0x3cc76a));return{'diffData':_0x47c861,'authorsIds':Array['from'](_0x5b500e),'hasAIChanges':_0x839ab9};}_collectSuggestionAiSources(_0x509374,_0x389b10){const _0x376f30=_0x509374['markers'];for(const _0x135b49 of _0x376f30['keys']()){if(!_0x135b49['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x135b49))continue;const _0x26d6e9=this['_aiTouchedMarkers']['get'](_0x135b49);_0x26d6e9&&(_0x389b10[_0x135b49]=_0x26d6e9);}}_processRootBeforeSave(_0x5bf943){for(const [,_0x28285f]of _0x5bf943['markers']){const _0x10a623=_0x28285f['start']['getAncestors']()['filter'](_0x50e8b5=>'tableCell'==_0x50e8b5['name']);for(const _0x27b519 of _0x10a623)0x1==_0x27b519['childCount']&&_0x27b519['getChild'](0x0)['is']('element','paragraph')&&_0x27b519['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5037a2){this['_processRootBeforeSave'](_0x5037a2);const _0x6e7334=this['editor']['data']['toView'](_0x5037a2,{}),_0x277972=Array['from'](_0x6e7334['getChildren']())['map'](_0x39fe3b=>this['_getViewJson'](_0x39fe3b));return JSON['stringify'](_0x277972);}_getViewJson(_0x301b6f){if(_0x301b6f['is']('$text'))return _0x301b6f['data'];{const _0x5df9bc=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x411df7=_0x301b6f,_0x7c1e73=this['editor']['data']['htmlProcessor']['domConverter'],_0x3d71c7={'type':_0x5df9bc['_getTypeCharForViewElement'](_0x411df7),'name':_0x411df7['name'],'attributes':Array['from'](_0x411df7['getAttributes']()),'children':Array['from'](_0x411df7['getChildren']())['map'](_0x2a3ffe=>this['_getViewJson'](_0x2a3ffe))};if(_0x301b6f['is']('uiElement')&&'$comment'!=_0x301b6f['name']){const _0x27e0c3=_0x301b6f['render'](_0x7c1e73['domDocument'],_0x7c1e73);_0x3d71c7['children']['push'](_0x27e0c3['outerHTML']);}else{if(_0x301b6f['is']('rawElement')){const _0x53af15=_0x7c1e73['domDocument']['createElement'](_0x411df7['name']);_0x301b6f['render'](_0x53af15,_0x7c1e73),_0x3d71c7['children']['push'](_0x53af15['innerHTML']);}}const _0x52781f=Array['from'](_0x411df7['getCustomProperties']());_0x52781f['length']>0x0&&(_0x3d71c7['customProperties']=_0x52781f);const _0xb713e3=_0x411df7['getFillerOffset']();return null!==_0xb713e3&&(_0x3d71c7['fillerOffset']=_0xb713e3),_0x3d71c7;}}['_markChanges'](_0xf1520b,_0x37ecce,_0x2acc40,_0x5a50df,_0x21cd35,_0x380e54){let _0x3c5ecd=null,_0x3a9669=null,_0x3516cb=0x0;const _0x31fb29=this['editor']['model'];for(let _0x26ce26=0x0;_0x26ce26<_0x37ecce['length'];_0x26ce26++){const _0x2db7a6=this['_getVidAttributeName'](_0x37ecce[_0x26ce26]),_0x57ca45=_0x37ecce[_0x26ce26]['item']['getAttribute'](_0x2db7a6),_0x2856d5=_0x2acc40['get'](_0x57ca45),_0x5927c1=_0x26ce26==_0x37ecce['length']-0x1;!_0x3c5ecd&&_0x2856d5&&(_0x3c5ecd=_0x2856d5,_0x3a9669=_0x37ecce[_0x26ce26]);const _0x34e60c=!!_0x3c5ecd&&!!_0x2856d5&&_0x2856d5['userId']!=_0x3c5ecd['userId'],_0x48b60d=!!_0x3c5ecd&&!!_0x2856d5&&_0x2856d5['aiSource']!=_0x3c5ecd['aiSource'];_0x3c5ecd&&(!_0x2856d5||_0x34e60c||_0x48b60d)&&(_0x1ad959(_0x2856d5,Ot(_0x3a9669,_0xf1520b,_0x31fb29),Ot(_0x37ecce[_0x26ce26],_0xf1520b,_0x31fb29)),_0x3c5ecd=_0x2856d5||null,_0x3a9669=_0x2856d5?_0x37ecce[_0x26ce26]:null),_0x3c5ecd&&_0x5927c1&&_0x1ad959(_0x2856d5,Ot(_0x3a9669,_0xf1520b,_0x31fb29),Ct(_0x37ecce[_0x26ce26],_0xf1520b,_0x31fb29));}function _0x1ad959(_0x51f2e6,_0x239115,_0x1bd9cb){const _0x4f43c9=_0x3c5ecd['userId'],_0x25f4b8=_0x3c5ecd['aiSource'],_0x24fcdc='revision:'+_0x5a50df+':'+_0x4f43c9+':'+_0x3516cb++,_0x32ed0f=_0x31fb29['createRange'](_0x239115,_0x1bd9cb);_0xf1520b['markers']['set'](_0x24fcdc,_0x32ed0f),_0x25f4b8&&(_0x380e54[_0x24fcdc]=_0x25f4b8),null!==_0x4f43c9&&_0x21cd35['add'](_0x4f43c9);}}_getVidAttributeName(_0x4f1808){switch(_0x4f1808['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x4c9495){const _0xd3bdb=this['_idsRoots']['get'](_0x4c9495['position']['root']['rootName']),_0x41c163=_0x46ca69(_0x4c9495['position'],_0xd3bdb),_0x1ef4a0=null===_0x4c9495['_authorId']?null:_0x4c9495['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x345510=_0x4c9495['_aiSource']||null,_0x2b1f97=_0x41c163['parent'],_0x511a61=this['_revisionId'],_0x228c4b=[];for(const _0x4c2845 of _0x4c9495['nodes'])if(_0x4c2845['is']('element'))_0x228c4b['push'](this['_makeIdsRoot'](_0x4c2845));else{for(let _0x1e9bba=0x0;_0x1e9bba<_0x4c2845['offsetSize'];_0x1e9bba++)_0x228c4b['push'](new _0x329f01('$text',{'vid':this['_revisionId']++}));}const _0x7a30df=this['_revisionId'];for(let _0x2b4e67=_0x511a61;_0x2b4e67<_0x7a30df;_0x2b4e67++)this['_touched']['set'](_0x2b4e67,{'userId':_0x1ef4a0,'aiSource':_0x345510});_0x2b1f97['_insertChild'](_0x41c163['offset'],_0x228c4b);}_setTouched(_0x203f85,_0x5f0e72,_0x5e8c57){this['_touched']['set'](_0x203f85,{'userId':_0x5f0e72,'aiSource':_0x5e8c57||this['_touched']['get'](_0x203f85)?.['aiSource']||null});}_handleMoveOperation(_0x21d9b8){(_0x21d9b8=this['_cloneOperation'](_0x21d9b8,this['_idsRoots']))['_execute']();const _0x30e2fd=null===_0x21d9b8['_authorId']?null:_0x21d9b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31f727=_0x21d9b8['_aiSource']||null,_0x36502a=_0x21d9b8['getMovedRangeStart'](),_0x31f5f2=_0x36502a['parent'],_0x828cb5=_0x36502a['offset'],_0x5aa67e=(_0x33cbe5,_0x11763d,_0x15483a)=>{for(let _0x1bccb2=_0x11763d;_0x1bccb2<_0x15483a;_0x1bccb2++){const _0x2d7886=_0x33cbe5['getChild'](_0x1bccb2);_0x2d7886['is']('element','$text')?this['_setTouched'](_0x2d7886['getAttribute']('vid'),_0x30e2fd,_0x31f727):(this['_setTouched'](_0x2d7886['getAttribute']('vid_start'),_0x30e2fd,_0x31f727),_0x5aa67e(_0x2d7886,0x0,_0x2d7886['childCount']),this['_setTouched'](_0x2d7886['getAttribute']('vid_end'),_0x30e2fd,_0x31f727));}};_0x5aa67e(_0x31f5f2,_0x828cb5,_0x828cb5+_0x21d9b8['howMany']);}_handleMergeOperation(_0x12b999){const _0x41c129=null===(_0x12b999=this['_cloneOperation'](_0x12b999,this['_idsRoots']))['_authorId']?null:_0x12b999['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x625b72=_0x12b999['_aiSource']||null,_0xbe7fcc=_0x12b999['targetPosition']['parent'],_0x1dd235=_0x12b999['sourcePosition']['parent'],_0x3d2647=_0xbe7fcc['getAttribute']('vid_end'),_0x261a76=_0x1dd235['getAttribute']('vid_start');_0xbe7fcc['_setAttribute']('vid_end',_0x1dd235['getAttribute']('vid_end')),_0x1dd235['_setAttribute']('vid_end',_0x3d2647),this['_setTouched'](_0x261a76,_0x41c129,_0x625b72),this['_setTouched'](_0x3d2647,_0x41c129,_0x625b72),_0x12b999['_execute']();}_handleSplitOperation(_0x432479){const _0x39f0cb=null===(_0x432479=this['_cloneOperation'](_0x432479,this['_idsRoots']))['_authorId']?null:_0x432479['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2a663b=_0x432479['_aiSource']||null,_0x447782=_0x432479['graveyardPosition'],_0x5b64d5=_0x432479['splitPosition']['parent'];_0x432479['_execute']();const _0x3de6e9=_0x5b64d5['getAttribute']('vid_end'),_0x36ea8a=_0x432479['insertionPosition']['nodeAfter'];if(_0x447782){const _0x210e33=_0x36ea8a['getAttribute']('vid_end'),_0x59c726=_0x5b64d5['getAttribute']('vid_end');_0x5b64d5['_setAttribute']('vid_end',_0x210e33),_0x36ea8a['_setAttribute']('vid_end',_0x59c726),this['_setTouched'](_0x5b64d5['getAttribute']('vid_end'),_0x39f0cb,_0x2a663b),this['_setTouched'](_0x36ea8a['getAttribute']('vid_start'),_0x39f0cb,_0x2a663b);}else{const _0x5676e4=this['_revisionId']++,_0x29f8d1=this['_revisionId']++;_0x5b64d5['_setAttribute']('vid_end',_0x5676e4),_0x36ea8a['_setAttribute']('vid_start',_0x29f8d1),_0x36ea8a['_setAttribute']('vid_end',_0x3de6e9),this['_setTouched'](_0x5676e4,_0x39f0cb,_0x2a663b),this['_setTouched'](_0x29f8d1,_0x39f0cb,_0x2a663b);}}_handleMarkerOperation(_0x4d74d8){if(!_0x4d74d8['affectsData'])return;const _0x12b768=(_0x4d74d8=this['_cloneOperation'](_0x4d74d8,this['_diffRoots']))['oldRange']?_0x4d74d8['oldRange']['root']:null,_0x32cdf6=_0x4d74d8['newRange']?_0x4d74d8['newRange']['root']:null;_0x12b768&&this['_markers']['delete'](_0x4d74d8['name']),_0x32cdf6&&this['_markers']['set'](_0x4d74d8['name'],_0x4d74d8['newRange']['clone']());const _0x2c442c=null===_0x4d74d8['_authorId']?null:_0x4d74d8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x474902=_0x4d74d8['name'];if(_0x4d74d8['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x474902,_0x4d74d8['_aiSource']),!this['_touchedMarkers']['has'](_0x474902))return void this['_touchedMarkers']['set'](_0x474902,{'range':_0x4d74d8['oldRange'],'userId':_0x2c442c});const _0x5868ed=this['_touchedMarkers']['get'](_0x474902),_0x11d0a8=_0x5868ed['range'],_0x4a3e79=_0x4d74d8['newRange'];null==_0x11d0a8&&null==_0x4a3e79||_0x11d0a8&&_0x4a3e79&&_0x11d0a8['isEqual'](_0x4a3e79)?this['_touchedMarkers']['delete'](_0x4d74d8['name']):_0x5868ed['userId']=_0x2c442c;}_handleRootOperation(_0x30f9b9,_0x6bbf07){this['_diffRoots']['has'](_0x30f9b9['rootName'])?this['_diffRoots']['get'](_0x30f9b9['rootName'])['_isAttached']=_0x30f9b9['isAdd']:(this['_diffRoots']['set'](_0x30f9b9['rootName'],Et(_0x30f9b9['rootName'],_0x30f9b9['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x30f9b9['rootName'],{}),_0x6bbf07&&this['_idsRoots']['set'](_0x30f9b9['rootName'],Et(_0x30f9b9['rootName'],_0x30f9b9['elementName'],!0x0)));const _0xa9197c=null===_0x30f9b9['_authorId']?null:_0x30f9b9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3f083e=this['_touchedRoots']['get'](_0x30f9b9['rootName']);_0x3f083e&&_0x3f083e['userId']===_0xa9197c?this['_touchedRoots']['delete'](_0x30f9b9['rootName']):this['_touchedRoots']['set'](_0x30f9b9['rootName'],{'userId':_0xa9197c,'isAttached':_0x30f9b9['isAdd']});}_handleRootAttributeOperation(_0x4cd417){const _0x34cf02=this['_diffRootsAttributes']['get'](_0x4cd417['root']['rootName']);null===_0x4cd417['newValue']?delete _0x34cf02[_0x4cd417['key']]:_0x34cf02[_0x4cd417['key']]=_0x4cd417['newValue'];}};function St(_0x18a756){const _0x2f5cf1=Et(_0x18a756['rootName'],_0x18a756['name'],_0x18a756['isAttached']());for(const _0x47f147 of _0x18a756['getChildren']()){const _0x6b3d25=_0x47f147['_clone'](!0x0);_0x2f5cf1['_appendChild'](_0x6b3d25);}return _0x2f5cf1;}function Et(_0x26504f,_0x4271a8,_0x15faee=!0x0){const _0x452ad2=new _0x48b379();return _0x452ad2['rootName']=_0x26504f,_0x452ad2['name']=_0x4271a8,_0x452ad2['_isAttached']=_0x15faee,_0x452ad2['isAttached']=()=>_0x452ad2['_isAttached'],_0x452ad2;}function Ot(_0x2f2c17,_0x541c67,_0x3729bf){const _0xc31c6c='elementEnd'==_0x2f2c17['type']?_0x3729bf['createPositionAt'](_0x2f2c17['item'],'end'):_0x3729bf['createPositionBefore'](_0x2f2c17['item']);return _0x3729bf['createPositionFromPath'](_0x541c67,_0xc31c6c['path'],_0xc31c6c['stickiness']);}function Ct(_0x2d0879,_0x5184e6,_0x245d29){const _0x548f4c='elementStart'==_0x2d0879['type']?_0x245d29['createPositionAt'](_0x2d0879['item'],0x0):_0x245d29['createPositionAfter'](_0x2d0879['item']);return _0x245d29['createPositionFromPath'](_0x5184e6,_0x548f4c['path'],_0x548f4c['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x520fa1(dt);var xt=class extends Nt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x2f8b4b,_0x487f65){super(_0x2f8b4b),this['focusTracker']=new _0x541e8f(),this['keystrokes']=new _0x366a0f(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x487f65),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_t({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x1bcad2=_0x34f76c=>_0x34f76c['stopPropagation']();this['keystrokes']['set']('arrowright',_0x1bcad2),this['keystrokes']['set']('arrowleft',_0x1bcad2),this['keystrokes']['set']('arrowup',_0x1bcad2),this['keystrokes']['set']('arrowdown',_0x1bcad2);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x56b63a){this['revisionNameInputView']['fieldView']['element']['value']=_0x56b63a['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x47d741){const _0x58e195=new it(this['locale'],gt),_0x4174c4=_0x58e195['fieldView'];_0x4174c4['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1359c7=kt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x47d741&&(_0x1359c7+='\x20('+kt(this['locale'],'optional')+')'),(_0x58e195['label']=_0x1359c7,_0x4174c4['on']('input',()=>{this['revisionNameInputValue']=_0x4174c4['element']['value']['trim']();}),_0x58e195);}},Dt=class extends _0xc765d1{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At];}['_saveRevisionFormView'];init(){const _0x303ea1=this['editor'],_0x40d186=_0x303ea1['plugins']['get']('RevisionTracker');_0x303ea1['ui']['componentFactory']['add']('revisionHistory',_0x43a98e=>{const _0x56d461=vt(_0x43a98e),_0x219d35=_0x56d461['panelView']['children'],_0x4af73f=new st(_0x43a98e),_0x4c7318=new et(_0x43a98e),_0x39f89d=this['_createSaveRevisionButton'](_0xd113c4),_0x5ce81c=new et(_0x43a98e),_0x1a6fbc=this['_createOpenRevisionButton'](_0xd113c4);return _0x56d461['bind']('isEnabled')['to'](_0x40d186,'isReady',_0x40d186,'isEnabled',_0x303ea1,'isReadOnly',(_0x90817f,_0x1ea381,_0x34245f)=>_0x90817f&&_0x1ea381&&!_0x34245f),_0x56d461['buttonView']['set']({'icon':_0x51ea7f,'label':kt(_0x43a98e,'Revision\x20history'),'tooltip':!0x0}),_0x39f89d['set']({'withText':!0x0,'role':'menuitem'}),_0x1a6fbc['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x1a6fbc,'execute',()=>{_0x56d461['isOpen']=!0x1,_0x303ea1['editing']['view']['focus']();},{'priority':'low'}),_0x4c7318['children']['add'](_0x39f89d),_0x5ce81c['children']['add'](_0x1a6fbc),_0x4af73f['role']='menu',_0x4af73f['items']['addMany']([_0x4c7318,_0x5ce81c]),_0x219d35['add'](_0x4af73f),_0x56d461;}),_0x303ea1['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x3c66df=this['editor'],_0x4ffb40=_0x3c66df['locale'],_0x129e62=_0x3c66df['plugins']['get']('RevisionTracker'),_0x4c91f3=new at(_0x4ffb40),_0x1dc81f=new rt(_0x4ffb40);_0x4c91f3['bind']('isEnabled')['to'](_0x129e62,'isReady',_0x129e62,'isEnabled',_0x3c66df,'isReadOnly',(_0x3f2ac4,_0x22562e,_0xc48f12)=>_0x3f2ac4&&_0x22562e&&!_0xc48f12),_0x4c91f3['buttonView']['set']({'icon':_0x51ea7f,'label':kt(_0x4ffb40,'Revision\x20history')});const _0x526141=new ot(_0x4ffb40,_0x4c91f3),_0x1d5980=this['_createSaveRevisionButton'](nt);_0x1d5980['delegate']('execute')['to'](_0x4c91f3),_0x526141['children']['add'](_0x1d5980),_0x1dc81f['items']['add'](_0x526141);const _0x36a529=new ot(_0x4ffb40,_0x4c91f3),_0x3cf03a=this['_createOpenRevisionButton'](nt);return _0x3cf03a['delegate']('execute')['to'](_0x4c91f3),_0x36a529['children']['add'](_0x3cf03a),_0x1dc81f['items']['add'](_0x36a529),_0x4c91f3['panelView']['children']['add'](_0x1dc81f),_0x4c91f3;}_createSaveRevisionButton(_0x11eb61){const _0x347dcf=this['editor'],_0x2f0c10=_0x347dcf['plugins']['get']('RevisionTracker'),_0x4351dd=new _0x11eb61(_0x347dcf['locale']);return _0x4351dd['set']({'label':kt(_0x347dcf['locale'],'Save\x20current\x20revision')}),_0x4351dd['bind']('isEnabled')['to'](_0x2f0c10,'isReady',_0x2f0c10,'isEnabled',_0x347dcf,'isReadOnly',(_0x55f95c,_0x4bdcf7,_0x43884d)=>_0x55f95c&&_0x4bdcf7&&!_0x43884d),this['listenTo'](_0x4351dd,'execute',()=>{this['_showDialog']();}),_0x4351dd;}_createOpenRevisionButton(_0x3bb5c1){const _0x4e0211=this['editor'],_0x3ad7ed=_0x4e0211['plugins']['get']('RevisionTracker'),_0x3f5b49=new _0x3bb5c1(_0x4e0211['locale']);return _0x3f5b49['set']({'label':kt(_0x4e0211['locale'],'Open\x20revision\x20history')}),_0x3f5b49['bind']('isEnabled')['to'](_0x3ad7ed,'isReady',_0x4e0211,'isReadOnly',(_0x44b715,_0x2abd07)=>_0x44b715&&!_0x2abd07),this['listenTo'](_0x3f5b49,'execute',()=>{_0x4e0211['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3f5b49;}['_showDialog'](){const _0x2749fc=this['editor'],_0x2c5fa9=_0x2749fc['locale'],_0x3b02fa=_0x2749fc['plugins']['get']('Dialog'),_0x1f275b=_0x2749fc['plugins']['get']('RevisionTracker');function _0x5562a3(_0x1babbd){_0x2749fc['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1babbd['revisionName']?_0x1babbd['revisionNameInputView']['errorText']=kt(_0x2c5fa9,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2749fc['plugins']['get'](At)['saveRevision']({'name':_0x1babbd['revisionName']}),_0x3b02fa['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5562a3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3b02fa['show']({'id':'revisionSave','title':kt(_0x2c5fa9,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':kt(_0x2749fc['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3b02fa['hide']()},{'label':kt(_0x2749fc['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x130c6e){_0x130c6e['bind']('isEnabled')['to'](_0x1f275b,'isReady',_0x1f275b,'isEnabled',_0x2749fc,'isReadOnly',(_0x2f3513,_0x1835fa,_0x3a8ca6)=>_0x2f3513&&_0x1835fa&&!_0x3a8ca6);},'onExecute':()=>_0x5562a3(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x56060e=this['editor'],_0x420fd9=_0x56060e['locale'];this['_saveRevisionFormView']=new xt(_0x420fd9,_0x56060e['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Vt=class extends dt{['changeId'];['_model'];constructor(_0x436e4d,_0x2973d1,_0xd5dc54=!0x1){super(_0x436e4d),this['_model']=_0x2973d1,this['changeId']=_0x2973d1['id'];const _0x2abaae=this['bindTemplate'],_0x2b279a=_0xd5dc54&&!!_0x2973d1['data']['aiSource'],_0xaf6d13=_0x2b279a?this['_createAiIconView'](_0x436e4d):null;this['set']('type',_0x2973d1['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x2abaae['to']('type',_0x326eaf=>'ck-revision-change__'+_0x326eaf),..._0x2b279a?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x2b279a?[this['_createAiDescriptionView'](_0x436e4d,_0x2973d1),_0xaf6d13]:this['_getDescriptionChildren'](_0x436e4d,_0x2973d1)}]});}_getDescriptionChildren(_0x59714c,_0x4778a5){let _0x35a71b='Removed\x20by';return _0x4778a5['data']['isSuggestion']?_0x35a71b='Suggested\x20by':'add'==_0x4778a5['type']&&(_0x35a71b='Added\x20by'),[this['_createLabel'](kt(_0x59714c,_0x35a71b)),{'text':'\x20'+_0x4778a5['author']['name']}];}_createAiDescriptionView(_0x43fc38,_0x4e8c7a){let _0x537d7c='AI_SOURCE_REMOVED_BY';_0x4e8c7a['data']['isSuggestion']?_0x537d7c='AI_SOURCE_SUGGESTED_BY':'add'==_0x4e8c7a['type']&&(_0x537d7c='AI_SOURCE_ADDED_BY');const _0xe84718=new dt(_0x43fc38);return _0xe84718['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0xe84718['render'](),_0xe84718['element']['innerHTML']=_0x4a8697(kt(_0x43fc38,_0x537d7c,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+kt(_0x43fc38,'AI_SOURCE_AI')+'</span>'])),_0xe84718['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x4e8c7a['author']['name'],_0xe84718;}_createLabel(_0x51ba35){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x51ba35}]};}_createAiIconView(_0x41098e){const _0xae1ee1=new _0xa758d2();return _0xae1ee1['content']=_0x15811d,_0xae1ee1['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':kt(_0x41098e,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0xae1ee1;}['focus'](){this['element']['focus']();}};const Tt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x4d35f();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x1362eb){super(),this['id']=_0x1362eb['id']||_0x27f7da(),this['author']=_0x1362eb['author'],this['type']=_0x1362eb['type'],this['data']=_0x1362eb['data']||{},this['rootName']=_0x1362eb['rootName'],this['set']('createdAt',_0x1362eb['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x427604,_0x580788){this['newRevisionId']=_0x427604,this['oldRevisionId']=_0x580788,this['changes']=new _0x2a4b06();}_setChanges(_0x432080){for(const _0x1714e7 of _0x432080)this['changes']['add'](_0x1714e7);}},Pt=class extends _0xc765d1{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[_0x369e38,_0x196835,bt,Rt];}constructor(_0x7d6da){super(_0x7d6da),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',(_0x473f8f,_0xcdeeec,_0x1f2d56)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x277a4f=>{for(const _0x4aec25 of this['editor']['editing']['view']['document']['roots'])_0x1f2d56?_0x277a4f['removeClass']('ck-editor__editable__overlay',_0x4aec25):_0x277a4f['addClass']('ck-editor__editable__overlay',_0x4aec25);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xfd1a0b=>null!==_0xfd1a0b),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x122ed6,_0x3e78be,_0x52bbd8)=>_0x122ed6&&_0x52bbd8?_0x3e78be['changes']['getIndex'](_0x52bbd8):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1b3981,_0x1a1f38)=>_0x1b3981?_0x1a1f38['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x196835),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x38a70f=this['editor'],_0x399f92=new $t(_0x38a70f,{'direction':'backward'}),_0x4b2e13=new $t(_0x38a70f,{'direction':'forward'});_0x38a70f['commands']['add']('showPreviousChange',_0x399f92),_0x38a70f['commands']['add']('showNextChange',_0x4b2e13),_0x38a70f['commands']['add']('restoreRevision',new Ft(_0x38a70f)),this['on']('change:numberOfChanges',()=>{_0x399f92['refresh'](),_0x4b2e13['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x38a70f['enableReadOnlyMode']('revision-viewer'),_0x38a70f['plugins']['has']('WidgetToolbarRepository')&&_0x38a70f['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x1312e5){return await this['_utils']['loadRevisionData'](_0x1312e5,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1312e5);}async getRevisionRootsAttributes(_0x2d9fc4){return await this['_utils']['loadRevisionData'](_0x2d9fc4,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2d9fc4);}async['compare'](_0x2eeda3,_0x5bc00d,_0x515baf=!0x1){if(!this['isEnabled'])return;const _0x1b69a4=this['diff'],_0x21ed31=this['repository'],_0x4d32a7='string'==typeof _0x2eeda3?_0x21ed31['getRevision'](_0x2eeda3):_0x2eeda3,_0x4e6400='string'==typeof _0x5bc00d?_0x21ed31['getRevision'](_0x5bc00d):_0x5bc00d,_0xe7abd6=_0x4d32a7['id'],_0x3bbebf=_0x4e6400?_0x4e6400['id']:null;if(!_0x515baf&&this['diff']&&this['diff']['newRevisionId']===_0xe7abd6&&this['diff']['oldRevisionId']===_0x3bbebf)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0xe7abd6,_0x3bbebf);const _0x5923bb=this['_getRevisionsRange'](_0x4d32a7,_0x4e6400,!0x0)['map'](_0x2aacc7=>this['_utils']['loadRevisionData'](_0x2aacc7,this['adapter']));return _0x5923bb['push'](new Promise(_0xebc8cb=>{setTimeout(_0xebc8cb,0x14);})),Promise['all'](_0x5923bb)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2671fc=this['_getDiff'](_0xe7abd6,_0x3bbebf);this['_cleanUpCommentMarkers'](_0x2671fc);for(const _0xd6f025 of _0x2671fc['changes'])this['_changeIdToChange']['set'](_0xd6f025['id'],_0xd6f025);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1575cc=>{for(const _0x351899 of this['editor']['model']['document']['getRootNames']())_0x1575cc['detachRoot'](_0x351899);for(const _0xa98e43 of Object['keys'](_0x2671fc['model'])){const _0x12a899=_0x2671fc['model'][_0xa98e43]['name'],_0xfd6013=_0x1575cc['addRoot'](_0xa98e43,_0x12a899);for(const _0x4bab08 of Object['keys'](_0x2671fc['attributes'][_0xa98e43]))_0x1575cc['setAttribute'](_0x4bab08,_0x2671fc['attributes'][_0xa98e43][_0x4bab08],_0xfd6013);_0x1575cc['insert'](_0x2671fc['model'][_0xa98e43],_0xfd6013,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2671fc['changes'])),this['isReady']=!0x0;})['catch'](_0x2c55c3=>{console['error'](_0x2c55c3),this['_cleanUp'](),_0x1b69a4&&(this['diff']=_0x1b69a4),this['isReady']=!0x0;});}addRevisionData(_0x333c08,_0x2db8c4){const _0x5d6ac7=this['repository']['createRevision'](_0x333c08);return _0x5d6ac7['on']('_update',(_0x36bfab,_0x1d7b01,_0x5cd0d4)=>_0x2db8c4(_0x1d7b01,_0x5cd0d4,_0x5d6ac7)),this['repository']['addRevision'](_0x5d6ac7),_0x5d6ac7;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x296a14=>{for(const _0x29f697 of this['editor']['model']['document']['getRootNames']())_0x296a14['detachRoot'](_0x29f697);});}_cleanUpCommentMarkers(_0x366461){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x507d02=this['_getVisibleCommentThreadIds']();for(const _0xee6b53 of Object['values'](_0x366461['model']))for(const _0x4a82fb of Array['from'](_0xee6b53['markers']['keys']()))_0x4a82fb['startsWith']('revision-comment:')&&!_0x507d02['has'](Ut(_0x4a82fb))&&_0xee6b53['markers']['delete'](_0x4a82fb);}_sortAndFilterDiffChanges(_0x44871f){const _0x1e2552=[],_0x409530=new Map();for(const _0x2fd3aa of this['editor']['model']['document']['getRootNames']()){const _0x495ec8=this['editor']['editing']['view']['getDomRoot'](_0x2fd3aa);if(!_0x495ec8)continue;const _0x23a053=_0x495ec8['getClientRects']()['item'](0x0);_0x23a053&&(_0x1e2552['push'](_0x2fd3aa),_0x409530['set'](_0x2fd3aa,_0x23a053));}return _0x1e2552['sort']((_0x574ebb,_0x592357)=>{const _0x3dd2e7=_0x409530['get'](_0x574ebb),_0x49a9ba=_0x409530['get'](_0x592357);return _0x3dd2e7['y']-_0x49a9ba['y']||_0x3dd2e7['x']-_0x49a9ba['x'];}),(_0x44871f=_0x44871f['filter'](_0x53da01=>_0x1e2552['includes'](_0x53da01['rootName'])))['sort']((_0x39c60e,_0x34231c)=>_0x1e2552['indexOf'](_0x39c60e['rootName'])-_0x1e2552['indexOf'](_0x34231c['rootName'])),_0x44871f;}['_makeTape'](_0x8123ec,_0x461213={}){const _0x3ca1f9=Array['from'](_0x8123ec['markers'])['filter'](([_0x2fbfc3,_0xe4edf])=>_0x2fbfc3['startsWith']('revision:')&&!_0xe4edf['isCollapsed']),_0x2cf13d=Array['from'](this['editor']['model']['createRangeIn'](_0x8123ec)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3ca1f9['length'])for(const _0xaa62aa of _0x2cf13d){const [_0x2867d4,_0x3b77ad]=_0x3ca1f9[0x0],[,_0x5b0a4f,_0x416736]=_0x2867d4['split'](':'),_0x499f6b=_0x461213[_0x2867d4]||null;if(_0x3b77ad['end']['isEqual'](_0xaa62aa['nextPosition'])&&_0x3ca1f9['shift'](),(_0xaa62aa['previousPosition']['isEqual'](_0x3b77ad['start'])||_0xaa62aa['previousPosition']['isAfter'](_0x3b77ad['start']))&&('insertion'==_0x5b0a4f?_0xaa62aa['isAdded']={'userId':_0x416736,'aiSource':_0x499f6b}:'deletion'==_0x5b0a4f&&(_0xaa62aa['isRemoved']={'userId':_0x416736,'aiSource':_0x499f6b})),0x0==_0x3ca1f9['length'])break;}return _0x2cf13d;}_refreshStartEndIndex(_0x507c74){const _0xd392f9=new Map();for(let _0x432329=0x0;_0x432329<_0x507c74['length'];_0x432329++)'text'===_0x507c74[_0x432329]['type']?(_0x507c74[_0x432329]['item']['startIndex']=_0x432329,_0x507c74[_0x432329]['item']['endIndex']=_0x432329):('elementStart'===_0x507c74[_0x432329]['type']?_0x507c74[_0x432329]['item']['startIndex']=_0x432329:'elementEnd'===_0x507c74[_0x432329]['type']&&(_0x507c74[_0x432329]['item']['endIndex']=_0x432329),_0xd392f9['set'](_0x507c74[_0x432329]['id'],_0x432329));for(const _0x3f0eb5 of _0xd392f9['values']())'elementStart'===_0x507c74[_0x3f0eb5]['type']?_0x507c74[_0x3f0eb5]['item']['endIndex']=_0xd392f9['get'](_0x507c74[_0x3f0eb5]['pairId']):'elementEnd'===_0x507c74[_0x3f0eb5]['type']&&(_0x507c74[_0x3f0eb5]['item']['startIndex']=_0xd392f9['get'](_0x507c74[_0x3f0eb5]['pairId']));}['_processTape'](_0x4c31c7){for(let _0x4d326f=0x0;_0x4d326f<_0x4c31c7['length'];_0x4d326f++){if('elementStart'===_0x4c31c7[_0x4d326f]['type'])_0x4c31c7[_0x4d326f]['item']['startIndex']=_0x4d326f;else{if('elementEnd'===_0x4c31c7[_0x4d326f]['type']){_0x4c31c7[_0x4d326f]['item']['endIndex']=_0x4d326f;const _0x3ebcef=_0x4c31c7[_0x4d326f]['item']['startIndex'];_0x4c31c7[_0x3ebcef]['pairId']=_0x4c31c7[_0x4d326f]['id'],_0x4c31c7[_0x4d326f]['pairId']=_0x4c31c7[_0x3ebcef]['id'];}else _0x4c31c7[_0x4d326f]['item']['startIndex']=_0x4d326f,_0x4c31c7[_0x4d326f]['item']['endIndex']=_0x4d326f,_0x4c31c7[_0x4d326f]['pairId']=null;}_0x4c31c7[_0x4d326f]['markersStart']||(_0x4c31c7[_0x4d326f]['markersStart']=[],_0x4c31c7[_0x4d326f]['markersEnd']=[]);}}_markInsertions(_0x20ee82,_0x443e66){const _0x4f170d=_0x20ee82['filter'](_0x1c59d4=>!_0x1c59d4['isAdded']);for(let _0x10b54d=0x0;_0x10b54d<_0x443e66['length'];_0x10b54d++)_0x443e66[_0x10b54d]['isAdded']&&(_0x4f170d[_0x10b54d]['isAdded']=_0x443e66[_0x10b54d]['isAdded']);}_getDiff(_0x140c94,_0xca09cb=null){const _0x564325=this['repository']['getRevision'](_0x140c94),_0x37f831=_0xca09cb?this['repository']['getRevision'](_0xca09cb):null,_0x4ce38c=this['_getRevisionsRange'](_0x564325,_0x37f831),_0x48d5c3=_0x4ce38c[_0x4ce38c['length']-0x1],_0x64926=new Map(),_0x4529cf={'model':{},'attributes':{},'changes':[]},_0x2842f4=new Set(),_0x5b1252=new Map();for(let _0xd8a12f=_0x4ce38c['length']-0x1;_0xd8a12f>=0x0;_0xd8a12f--){const _0x392010=_0x4ce38c[_0xd8a12f];for(const _0x2bce30 of Object['keys'](_0x392010['diffData']))if(_0x392010['diffData'][_0x2bce30]['attachChange']){const _0x31f5d5=_0x392010['diffData'][_0x2bce30]['attachChange'];_0x31f5d5['isAttached']?(_0x2842f4['add'](_0x2bce30),_0x5b1252['has'](_0x2bce30)&&_0x5b1252['get'](_0x2bce30)['userId']==_0x31f5d5['userId']?_0x5b1252['delete'](_0x2bce30):_0x5b1252['set'](_0x2bce30,_0x31f5d5)):_0x5b1252['has'](_0x2bce30)?(_0x2842f4['delete'](_0x2bce30),_0x5b1252['delete'](_0x2bce30)):(_0x2842f4['add'](_0x2bce30),_0x5b1252['set'](_0x2bce30,_0x31f5d5));}else _0x2842f4['add'](_0x2bce30);}for(const _0x142569 of _0x2842f4){const _0x2b00fa=_0x5b1252['has'](_0x142569)&&!_0x5b1252['get'](_0x142569)['isAttached'];let _0x1e4226=_0x2b00fa?_0x4ce38c['length']-0x1:0x0;const _0x45177e=_0x2b00fa?-0x1:0x1;for(;_0x4ce38c[_0x1e4226];){const _0x586e63=_0x4ce38c[_0x1e4226];if(_0x586e63['diffData'][_0x142569]){const _0x316e31=_0x2b00fa?_0x586e63['diffData'][_0x142569]['attributesBefore']:_0x586e63['diffData'][_0x142569]['attributesAfter'];_0x4529cf['attributes'][_0x142569]=_0x316e31?_0x1721d7(_0x316e31):{};break;}_0x1e4226+=_0x45177e;}}for(const _0x197dd6 of _0x4ce38c){_0x197dd6['model']={};for(const _0x49583e of _0x197dd6['authors'])_0x64926['set'](_0x49583e['id'],_0x49583e);for(const _0x5c870a of _0x2842f4){const _0x53f5fe=_0x197dd6['diffData'][_0x5c870a]?_0x197dd6['diffData'][_0x5c870a]['insertions']:'[]',_0x1df740=_0x197dd6['diffData'][_0x5c870a]?_0x197dd6['diffData'][_0x5c870a]['deletions']:'[]',_0x587278=_0x197dd6['diffData'][_0x5c870a]?.['rootElementName']||'$root';_0x197dd6['model'][_0x5c870a]={'insertions':this['_utils']['_makeModelFromViewString'](_0x53f5fe,_0x587278),'deletions':this['_utils']['_makeModelFromViewString'](_0x1df740,_0x587278)};}}for(const _0x35adbd of _0x2842f4){let _0x53402e=null,_0x3e4c1e=0x0;const _0x302de7=_0x4ce38c['map'](_0x451fc0=>_0x451fc0['diffData'][_0x35adbd]?.['rootElementName'])['find'](_0x19741e=>void 0x0!==_0x19741e)||'$root',_0x36b08c=new Map(Array['from'](_0x564325['model'][_0x35adbd]['insertions']['markers'])['filter'](([_0x2c3cf3])=>!_0x2c3cf3['startsWith']('revision:')));let _0x4b20c4=0x0;for(const _0x13f0ab of _0x4ce38c){const _0x906b5c=_0x13f0ab['diffData'][_0x35adbd]?.['aiSources']||{},_0x5c7fef=this['_makeTape'](_0x13f0ab['model'][_0x35adbd]['insertions'],_0x906b5c);_0x13f0ab==_0x564325?(_0x53402e=_0x5c7fef,_0x3e4c1e=_0x53402e['length'],_0x53402e['forEach'](_0x1eaecc=>{_0x1eaecc['id']=_0x4b20c4++;}),this['_processTape'](_0x53402e)):this['_markInsertions'](_0x53402e,_0x5c7fef);const _0x5ecf25=_0x53402e['filter'](_0x308339=>!_0x308339['isAdded'])['map'](_0x3184c2=>_0x3184c2['id']);let _0x2aae6c=0x0;const _0x5ea161=this['_makeTape'](_0x13f0ab['model'][_0x35adbd]['deletions'],_0x906b5c);_0x5ea161['forEach'](_0x5a9119=>{_0x5a9119['isRemoved']?_0x5a9119['id']=_0x3e4c1e++:_0x5a9119['id']=_0x5ecf25[_0x2aae6c++];}),this['_processTape'](_0x5ea161),this['_setDistance'](_0x53402e,'isAdded'),this['_setDistance'](_0x5ea161,'isRemoved'),_0x13f0ab==_0x564325&&this['_markMarkers'](_0x53402e,_0x36b08c),_0x53402e=this['_joinTapes'](_0x53402e,_0x5ea161),this['_refreshStartEndIndex'](_0x53402e),this['_setDistance'](_0x53402e,'isRemoved');}_0x53402e=_0x53402e['filter'](_0x2f480f=>!(_0x2f480f['isAdded']&&_0x2f480f['isRemoved']));const _0x50b770=new Map(_0x48d5c3['model'][_0x35adbd]['deletions']['markers']),_0x25a985=new Set(_0x36b08c['keys']());for(const _0x63e997 of _0x50b770['keys']())_0x25a985['delete'](_0x63e997);const _0x275bca=Object['assign']({},..._0x4ce38c['map'](_0x3ad9f6=>_0x3ad9f6['diffData'][_0x35adbd]?.['aiSources']));this['_markSuggestions'](_0x53402e,_0x25a985,_0x275bca),this['_fixObsoleteTags'](_0x53402e),_0x53402e=this['_removeMissingPairs'](_0x53402e),_0x53402e=this['_markMismatchedRemovedTags'](_0x53402e),_0x53402e=this['_removeUnsupportedChanges'](_0x53402e);const {root:_0x2f40a2,changes:_0x12650b}=this['_makeModelFromTape'](_0x53402e,_0x64926,_0x35adbd,_0x302de7);_0x4529cf['model'][_0x35adbd]=_0x2f40a2;const _0x14f2b2=_0x5b1252['get'](_0x35adbd);if(_0x14f2b2){const _0x3036ea=_0x64926['get'](_0x14f2b2['userId']),_0x4f2eb0=new Mt({'author':_0x3036ea,'type':_0x14f2b2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x35adbd});_0x12650b['unshift'](_0x4f2eb0),_0x4529cf['attributes'][_0x35adbd]['revisionHistoryAttachChange']=_0x4f2eb0['id'];}_0x4529cf['changes']=_0x4529cf['changes']['concat'](_0x12650b);}return _0x4529cf;}['_markMarkers'](_0x57fc97,_0x3cbf9b){for(let _0x518326=0x0;_0x518326<_0x57fc97['length'];_0x518326++)for(const [_0x5455cc,_0x2dd263]of _0x3cbf9b)!_0x2dd263['isCollapsed']&&_0x2dd263['start']['isEqual'](_0x57fc97[_0x518326]['previousPosition'])&&_0x57fc97[_0x518326]['markersStart']['push'](_0x5455cc),_0x2dd263['end']['isEqual'](_0x57fc97[_0x518326]['nextPosition'])&&_0x57fc97[_0x518326]['markersEnd']['push'](_0x5455cc);}['_joinTapes'](_0x2fc682,_0x481ebb){let _0x1209b7=[],_0x1c9507=0x0,_0x520aec=0x0;for(;_0x1c9507<_0x2fc682['length']||_0x520aec<_0x481ebb['length'];){const _0x233407=_0x2fc682[_0x1c9507]||{},_0x6a7c2d=_0x481ebb[_0x520aec]||{};if(_0x233407['id']==_0x6a7c2d['id'])_0x1c9507++,_0x520aec++,_0x1209b7['push'](_0x233407);else{if(_0x6a7c2d['isRemoved']&&_0x233407['isAdded']){const {commonTape:_0x1f46f5,iEnd:_0x3980a1,jEnd:_0x248a17}=this['_threeWayMerge'](_0x2fc682,_0x1c9507,_0x481ebb,_0x520aec);_0x1209b7=_0x1209b7['concat'](_0x1f46f5),_0x1c9507=_0x3980a1,_0x520aec=_0x248a17;}else _0x6a7c2d['isRemoved']?(_0x520aec++,_0x1209b7['push'](_0x6a7c2d)):(_0x1c9507++,_0x1209b7['push'](_0x233407));}}return _0x1209b7;}_markSuggestions(_0x2a1cd9,_0x39432d,_0x4781a6){const _0xebcc27=[];for(let _0x25b8ca=0x0;_0x25b8ca<_0x2a1cd9['length'];_0x25b8ca++){for(let _0x206f0a=0x0;_0x206f0a<_0x2a1cd9[_0x25b8ca]['markersStart']['length'];_0x206f0a++){const _0x4d41d4=_0x2a1cd9[_0x25b8ca]['markersStart'][_0x206f0a];if(!_0x39432d['has'](_0x4d41d4))continue;const {group:_0x28f66b,type:_0x5f3b82,authorId:_0x83b315}=_0x4be76a(_0x4d41d4);if('revision-suggestion'!=_0x28f66b||'insertion'!=_0x5f3b82&&'deletion'!=_0x5f3b82)continue;const _0x4399b8=_0x4781a6['suggestion:'+_0x4d41d4['slice'](0x14)]||null;_0xebcc27['unshift']({'type':_0x5f3b82,'name':_0x4d41d4,'userId':_0x83b315,'aiSource':_0x4399b8}),_0x2a1cd9[_0x25b8ca]['markersStart']['splice'](_0x206f0a,0x1),_0x206f0a--;}_0x4e2a30(_0x2a1cd9[_0x25b8ca]);for(let _0x38a4b3=0x0;_0x38a4b3<_0x2a1cd9[_0x25b8ca]['markersEnd']['length'];_0x38a4b3++){const _0x375d42=_0x2a1cd9[_0x25b8ca]['markersEnd'][_0x38a4b3];if(!_0x39432d['has'](_0x375d42))continue;const {group:_0x4c3710,type:_0x57cc4f}=_0x4be76a(_0x375d42);if('revision-suggestion'!=_0x4c3710||'insertion'!=_0x57cc4f&&'deletion'!=_0x57cc4f)continue;_0x2a1cd9[_0x25b8ca]['markersEnd']['splice'](_0x38a4b3,0x1),_0x38a4b3--;const _0x3996fe=_0xebcc27['findIndex'](_0x40835e=>_0x40835e['name']==_0x375d42);_0x3996fe>-0x1&&_0xebcc27['splice'](_0x3996fe,0x1);}}function _0x4be76a(_0x6bfc4){const _0x101fa1=_0x6bfc4['split'](':');return{'group':_0x101fa1[0x0],'type':_0x101fa1[0x1],'subType':_0x101fa1['length']>=0x5?_0x101fa1[0x2]:null,'id':_0x101fa1['length']<0x5?_0x101fa1[0x2]:_0x101fa1[0x3],'authorId':_0x101fa1['length']<0x5?_0x101fa1[0x3]:_0x101fa1[0x4],'markerCount':0x6==_0x101fa1['length']?_0x101fa1[0x5]:null};}function _0x4e2a30(_0x2e2366){for(let _0x25a597=0x0;_0x25a597<_0xebcc27['length'];_0x25a597++){if(_0x2e2366['isAdded']&&'insertion'==_0xebcc27[_0x25a597]['type']&&_0x2e2366['isAdded']['userId']==_0xebcc27[_0x25a597]['userId'])return _0x2e2366['isAddSuggestion']={..._0xebcc27[_0x25a597],'aiSource':_0x2e2366['isAdded']['aiSource']||_0xebcc27[_0x25a597]['aiSource']},void delete _0x2e2366['isAdded'];if(!_0x2e2366['isAdded']&&!_0x2e2366['isRemoved']&&'deletion'==_0xebcc27[_0x25a597]['type'])return void(_0x2e2366['isRemoveSuggestion']=_0xebcc27[_0x25a597]);}}}_setDistance(_0xd506be,_0x162994){let _0xbea2ce=0x0,_0x2c6f66=!0x1;const _0x2ac7ec=new Map();for(const _0x4ef8bf of _0xd506be)_0x4ef8bf[_0x162994]?_0x2c6f66&&(_0xbea2ce++,_0x2c6f66=!0x1):(_0xbea2ce++,_0x2c6f66=!0x0),_0x2ac7ec['set'](_0x4ef8bf['id'],_0xbea2ce);for(let _0x12f100=0x0;_0x12f100<_0xd506be['length'];_0x12f100++){if('isRemoved'==_0x162994&&_0xd506be[_0x12f100]['isAdded']||'isAdded'==_0x162994&&_0xd506be[_0x12f100]['isRemoved'])continue;if('text'==_0xd506be[_0x12f100]['type']){_0xd506be[_0x12f100]['distance']=0x0;continue;}const _0x579839=_0x2ac7ec['get'](_0xd506be[_0x12f100]['pairId']),_0x33827b=_0x2ac7ec['get'](_0xd506be[_0x12f100]['id']);_0xd506be[_0x12f100]['distance']=_0x579839-_0x33827b;}}_getRevisionsRange(_0x55c368,_0x3c07ad,_0x493094=!0x1){const _0x33baf7=[];let _0x35c792=this['repository']['getIndex'](_0x55c368),_0x2aed9c=this['repository']['getIndex'](_0x3c07ad);for(-0x1==_0x2aed9c&&(_0x2aed9c=this['repository']['_revisions']['length'],_0x493094=!0x1);_0x35c792<_0x2aed9c;)_0x33baf7['push'](this['repository']['getRevision'](_0x35c792)),_0x35c792++;return _0x493094&&_0x33baf7['push'](this['repository']['getRevision'](_0x35c792)),_0x33baf7;}_threeWayMerge(_0x570eef,_0x218280,_0x568d96,_0x1ff6b7){const _0x393944=this['editor']['model']['schema'];let _0x201a5c=_0x218280;for(;_0x570eef[_0x201a5c]&&_0x570eef[_0x201a5c]['isAdded'];)_0x201a5c++;let _0x1a4051=_0x1ff6b7;for(;_0x568d96[_0x1a4051]&&_0x568d96[_0x1a4051]['isRemoved'];)_0x1a4051++;_0x538681(_0x570eef,_0x218280,_0x201a5c),_0x538681(_0x568d96,_0x1ff6b7,_0x1a4051);const _0x375642=_0x568d96['slice'](_0x1ff6b7,_0x1a4051)['concat'](_0x570eef['slice'](_0x218280,_0x201a5c));return _0x375642['sort']((_0x2d77a0,_0x11f7e9)=>_0x2d77a0['side']!=_0x11f7e9['side']?_0x2d77a0['side']-_0x11f7e9['side']:_0x2d77a0['level']!=_0x11f7e9['level']?_0x2d77a0['level']-_0x11f7e9['level']:_0x2d77a0['distance']!=_0x11f7e9['distance']?_0x11f7e9['distance']-_0x2d77a0['distance']:!!_0x2d77a0['isAdded']!=!!_0x11f7e9['isAdded']?-0x1==_0x2d77a0['side']||0x0==_0x2d77a0['side']?_0x2d77a0['isAdded']?-0x1:0x1:_0x2d77a0['isAdded']?0x1:-0x1:_0x2d77a0['index']-_0x11f7e9['index']),{'commonTape':_0x375642,'iEnd':_0x201a5c,'jEnd':_0x1a4051};function _0x538681(_0x525765,_0x503e7f,_0x1af27a){let _0x278576=-0x1,_0xadebac=Number['POSITIVE_INFINITY'],_0x1f86b8=!0x0;for(let _0x40a1f6=_0x503e7f;_0x40a1f6<_0x1af27a;_0x40a1f6++)if(_0x393944['isInline'](_0x525765[_0x40a1f6]['item'])||(_0x1f86b8=!0x1),_0x525765[_0x40a1f6]['item']['startIndex']<_0x503e7f&&(_0x278576=_0x40a1f6),_0x525765[_0x40a1f6]['item']['endIndex']>=_0x1af27a){_0xadebac=_0x40a1f6;break;}_0x1f86b8&&(_0x278576=_0x1af27a-0x1);for(let _0x50fdea=_0x503e7f;_0x50fdea<_0x1af27a;_0x50fdea++)_0x525765[_0x50fdea]['side']=_0x50fdea<=_0x278576?-0x1:_0x50fdea<_0xadebac?0x0:0x1,_0x525765[_0x50fdea]['index']=_0x50fdea;let _0x55e9d5=0x0;for(let _0xca8680=_0x503e7f;_0xca8680<=_0x278576;_0xca8680++)0x0==_0x525765[_0xca8680]['distance']?_0x525765[_0xca8680]['level']=_0x55e9d5:(_0x55e9d5++,_0x525765[_0xca8680]['level']=_0x55e9d5,_0x55e9d5++);for(let _0xb49400=_0x503e7f;_0xb49400<_0x1af27a;_0xb49400++)0x0==_0x525765[_0xb49400]['side']&&(_0x525765[_0xb49400]['level']=_0x55e9d5);_0x55e9d5=0x0;for(let _0x5dc9ed=_0x1af27a-0x1;_0x5dc9ed>=_0xadebac;_0x5dc9ed--)0x0==_0x525765[_0x5dc9ed]['distance']?_0x525765[_0x5dc9ed]['level']=_0x55e9d5:(_0x55e9d5--,_0x525765[_0x5dc9ed]['level']=_0x55e9d5,_0x55e9d5--);}}_fixObsoleteTags(_0x4198de){const _0x256ba3=new Map(),_0x2e81f0=this['editor']['model']['schema'];for(let _0x23a9e2=0x1;_0x23a9e2<_0x4198de['length'];_0x23a9e2++){let _0x2f2f64,_0x4984a0,_0x35c9e1;const _0x5ae0d0=_0x4198de[_0x23a9e2],_0x3257d2=_0x4198de[_0x23a9e2-0x1];if('text'==_0x5ae0d0['type'])continue;if(_0x5ae0d0['type']!=_0x3257d2['type'])continue;if(!_0x2e81f0['isBlock'](_0x3257d2['item'])||_0x2e81f0['isLimit'](_0x3257d2['item']))continue;if(!_0x2e81f0['isBlock'](_0x5ae0d0['item'])||_0x2e81f0['isLimit'](_0x5ae0d0['item']))continue;if((_0x4198de[_0x23a9e2]['isAdded']||_0x4198de[_0x23a9e2]['isAddSuggestion'])&&_0x4198de[_0x23a9e2-0x1]['isRemoved'])_0x2f2f64=_0x4198de[_0x23a9e2],_0x4984a0=_0x4198de[_0x23a9e2-0x1],_0x35c9e1=_0x23a9e2-0x1;else{if(!_0x4198de[_0x23a9e2]['isRemoved']||!_0x4198de[_0x23a9e2-0x1]['isAdded']&&!_0x4198de[_0x23a9e2-0x1]['isAddSuggestion'])continue;_0x2f2f64=_0x4198de[_0x23a9e2-0x1],_0x4984a0=_0x4198de[_0x23a9e2],_0x35c9e1=_0x23a9e2;}const _0x3afcf3=_0x2f2f64['level']==_0x4984a0['level'],_0x585788=Math['abs'](_0x2f2f64['level'])<Math['abs'](_0x4984a0['level'])&&0x0==_0x4984a0['distance'];(_0x3afcf3||_0x585788)&&(_0x256ba3['set'](_0x4984a0['id'],_0x2f2f64['id']),_0x4198de['splice'](_0x35c9e1,0x1),_0x23a9e2--,_0x2f2f64['isAdded']=!0x1);}for(let _0x534624=0x0;_0x534624<_0x4198de['length'];_0x534624++)_0x256ba3['has'](_0x4198de[_0x534624]['pairId'])&&(_0x4198de[_0x534624]['pairId']=_0x256ba3['get'](_0x4198de[_0x534624]['pairId']));}['_removeMissingPairs'](_0xf9c7c2){const _0x19a3b8=new Set(_0xf9c7c2['map'](_0x2444c9=>_0x2444c9['id']));for(let _0x55bd2f=0x0;_0x55bd2f<_0xf9c7c2['length'];_0x55bd2f++)_0x19a3b8['has'](_0xf9c7c2[_0x55bd2f]['pairId'])||0x0==_0xf9c7c2[_0x55bd2f]['distance']||(_0xf9c7c2[_0x55bd2f]['isIncorrect']=!0x0);return _0xf9c7c2['filter'](_0xb3564e=>!_0xb3564e['isIncorrect']);}_markMismatchedRemovedTags(_0x1cf3cc){const _0x4b0a33=new Set();for(let _0x24b444=0x0;_0x24b444<_0x1cf3cc['length'];_0x24b444++){if(_0x4b0a33['has'](_0x1cf3cc[_0x24b444]['id'])&&_0x1cf3cc[_0x24b444]['isRemoved']&&(_0x1cf3cc[_0x24b444]['isIncorrect']=!0x0),_0x1cf3cc[_0x24b444]['isIncorrect'])continue;if(0x0==_0x1cf3cc[_0x24b444]['distance'])continue;if('elementStart'!=_0x1cf3cc[_0x24b444]['type'])continue;if(null==_0x1cf3cc[_0x24b444]['pairId'])continue;let _0x1bd1f9=_0x24b444+0x1,_0x1e083a=0x0;for(;_0x1cf3cc[_0x1bd1f9]['id']!=_0x1cf3cc[_0x24b444]['pairId'];)'elementStart'==_0x1cf3cc[_0x1bd1f9]['type']?_0x1e083a++:'elementEnd'==_0x1cf3cc[_0x1bd1f9]['type']&&_0x1e083a--,_0x1bd1f9++;if(0x0!=_0x1e083a){if(_0x1cf3cc[_0x24b444]['isRemoved'])_0x1cf3cc[_0x24b444]['isIncorrect']=!0x0;else{for(;_0x1bd1f9!=_0x24b444;)_0x1cf3cc[_0x1bd1f9]['isRemoved']&&0x0!=_0x1cf3cc[_0x1bd1f9]['distance']&&(_0x1cf3cc[_0x1bd1f9]['isIncorrect']=!0x0,_0x4b0a33['add'](_0x1cf3cc[_0x1bd1f9]['pairId'])),_0x1bd1f9--;}}}return _0x1cf3cc['filter'](_0x311754=>!_0x311754['isIncorrect']);}_removeUnsupportedChanges(_0x4c91f7){const _0x200254=this['editor']['model']['schema'];for(let _0x2c9073=0x0;_0x2c9073<_0x4c91f7['length'];_0x2c9073++){if(!(_0x4c91f7[_0x2c9073]['isAdded']||_0x4c91f7[_0x2c9073]['isAddSuggestion']||_0x4c91f7[_0x2c9073]['isRemoved']||_0x4c91f7[_0x2c9073]['isRemoveSuggestion']))continue;if(0x0==_0x4c91f7[_0x2c9073]['distance'])continue;const _0x51f771=_0x4c91f7[_0x2c9073]['item'];_0x200254['isBlock'](_0x51f771)||_0x200254['isLimit'](_0x51f771)||(_0x4c91f7[_0x2c9073]['isAdded']&&delete _0x4c91f7[_0x2c9073]['isAdded'],_0x4c91f7[_0x2c9073]['isAddSuggestion']&&delete _0x4c91f7[_0x2c9073]['isAddSuggestion'],_0x4c91f7[_0x2c9073]['isRemoveSuggestion']&&delete _0x4c91f7[_0x2c9073]['isRemoveSuggestion'],_0x4c91f7[_0x2c9073]['isRemoved']&&(_0x4c91f7[_0x2c9073]['isIncorrect']=!0x0));}return _0x4c91f7['filter'](_0x2e9d72=>!_0x2e9d72['isIncorrect']);}['_makeModelFromTape'](_0x455f6e,_0x5f181b,_0x570257,_0xfeb5cc){const _0x2e9921=new _0x48b379(),_0x462eb6=[],_0x42d467=new Map(),_0x40ce54=this['editor']['model'],_0x240188=_0x40ce54['schema'],_0x18ca94=[_0x2e9921],_0x4440fb={},_0x899b90={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2e9921['name']=_0xfeb5cc;let _0x1d12e9=null;const _0x1395a4=[0x0];for(let _0x11da7e=0x0;_0x11da7e<_0x455f6e['length'];_0x11da7e++)if('elementStart'===_0x455f6e[_0x11da7e]['type']){_0x455f6e[_0x11da7e]['previousPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4);const _0x770c1a=new _0x329f01(_0x455f6e[_0x11da7e]['item']['name'],_0x455f6e[_0x11da7e]['item']['getAttributes']());_0x18ca94[0x0]['_appendChild'](_0x770c1a),_0x1395a4['push'](0x0),_0x18ca94['unshift'](_0x770c1a),_0x455f6e[_0x11da7e]['nextPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4);}else'elementEnd'===_0x455f6e[_0x11da7e]['type']?(_0x18ca94['shift'](),_0x455f6e[_0x11da7e]['previousPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4),_0x1395a4['pop'](),_0x1395a4[_0x1395a4['length']-0x1]++,_0x455f6e[_0x11da7e]['nextPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4)):(_0x455f6e[_0x11da7e]['previousPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4),_0x1d12e9?_0x1d12e9['_data']+=_0x455f6e[_0x11da7e]['item']['data']:_0x1d12e9=new _0xfbffed(_0x455f6e[_0x11da7e]['item']['data'],_0x455f6e[_0x11da7e]['item']['getAttributes']()),_0x455f6e[_0x11da7e+0x1]&&'text'===_0x455f6e[_0x11da7e+0x1]['type']&&_0xffe481(_0x1d12e9,_0x455f6e[_0x11da7e+0x1]['item'])||(_0x18ca94[0x0]['_appendChild'](_0x1d12e9),_0x1d12e9=null),_0x1395a4[_0x1395a4['length']-0x1]+=_0x455f6e[_0x11da7e]['item']['offsetSize'],_0x455f6e[_0x11da7e]['nextPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4));for(let _0x31d9e7=0x0;_0x31d9e7<_0x455f6e['length'];_0x31d9e7++){const _0x2dd645=_0x455f6e[_0x31d9e7]['previousPosition'],_0x27fcea=_0x455f6e[_0x31d9e7]['nextPosition'];for(const _0x315bf8 of _0x455f6e[_0x31d9e7]['markersStart'])_0x42d467['set'](_0x315bf8,{'start':_0x2dd645,'end':null});_0x45a058('isRemoveSuggestion',_0x31d9e7,_0x2dd645,_0x27fcea),_0x45a058('isAddSuggestion',_0x31d9e7,_0x2dd645,_0x27fcea),_0x45a058('isRemoved',_0x31d9e7,_0x2dd645,_0x27fcea),_0x45a058('isAdded',_0x31d9e7,_0x2dd645,_0x27fcea);for(const _0x3d3215 of _0x455f6e[_0x31d9e7]['markersEnd']){const _0x3ff884=_0x42d467['get'](_0x3d3215);_0x3ff884?_0x3ff884['end']=_0x27fcea:_0x42d467['set'](_0x3d3215,{'start':_0x27fcea,'end':_0x27fcea});}}for(const [_0x5332ec,_0x3bae96]of _0x42d467){const _0x4a3a64=this['editor']['model']['createRange'](_0x3bae96['start'],_0x3bae96['end']);_0x2e9921['markers']['set'](_0x5332ec,_0x4a3a64);}return _0x462eb6['sort']((_0x54c4aa,_0x3ac490)=>{const _0x2685b2=_0x2e9921['markers']['get']('revision:'+_0x54c4aa['id']),_0x4eb352=_0x2e9921['markers']['get']('revision:'+_0x3ac490['id']);return _0x2685b2['start']['isBefore'](_0x4eb352['start'])?-0x1:_0x2685b2['start']['isAfter'](_0x4eb352['start'])?0x1:_0x2685b2['end']['isBefore'](_0x4eb352['end'])?-0x1:_0x2685b2['end']['isAfter'](_0x4eb352['end'])?0x1:'add'===_0x54c4aa['type']?-0x1:0x1;}),{'root':_0x2e9921,'changes':_0x462eb6};function _0x45a058(_0x42fe32,_0x94bcbe,_0x19b436,_0x3b3c22){const _0x4d53e9=!!_0x455f6e[_0x94bcbe][_0x42fe32],_0x2d2ae2=_0x4d53e9?_0x455f6e[_0x94bcbe][_0x42fe32]['userId']:null,_0x3609d5=_0x4d53e9&&_0x455f6e[_0x94bcbe][_0x42fe32]['aiSource']||null,_0x8d029a=_0x94bcbe===_0x455f6e['length']-0x1,_0x4b9bb3=_0x899b90[_0x42fe32][0x0],_0x2f2bbe=_0x240188['isObject'](_0x455f6e[_0x94bcbe]['item']);!_0x4440fb[_0x42fe32]&&_0x4d53e9?_0x4440fb[_0x42fe32]={'start':_0x19b436,'tapeItem':_0x455f6e[_0x94bcbe],'userId':_0x2d2ae2,'aiSource':_0x3609d5,'type':_0x42fe32}:_0x4440fb[_0x42fe32]&&!_0x4d53e9?(_0x4440fb[_0x42fe32]['end']=_0x19b436,_0x3750d7(_0x4440fb[_0x42fe32]),_0x4440fb[_0x42fe32]=null):_0x4440fb[_0x42fe32]&&_0x4d53e9&&(_0x4440fb[_0x42fe32]['userId']!==_0x2d2ae2||_0x4440fb[_0x42fe32]['aiSource']!==_0x3609d5)&&(_0x4440fb[_0x42fe32]['end']=_0x19b436,_0x4b9bb3&&_0x4b9bb3['userId']===_0x4440fb[_0x42fe32]['userId']?_0x4b9bb3['change']['aiSource']=_0x4b9bb3['change']['aiSource']||_0x4440fb[_0x42fe32]['aiSource']:_0x3750d7(_0x4440fb[_0x42fe32]),_0x4440fb[_0x42fe32]={'start':_0x19b436,'tapeItem':_0x455f6e[_0x94bcbe],'userId':_0x2d2ae2,'aiSource':_0x3609d5,'type':_0x42fe32}),_0x4440fb[_0x42fe32]&&_0x2f2bbe&&('elementStart'!==_0x455f6e[_0x94bcbe]['type']||_0x4b9bb3&&_0x4b9bb3['userId']===_0x2d2ae2||_0x899b90[_0x42fe32]['unshift']({'userId':_0x2d2ae2,'object':_0x455f6e[_0x94bcbe]['item'],'change':_0x4440fb[_0x42fe32]}),'elementEnd'===_0x455f6e[_0x94bcbe]['type']&&_0x4b9bb3&&_0x4b9bb3['object']===_0x455f6e[_0x94bcbe]['item']&&(_0x899b90[_0x42fe32]['shift'](),_0x4440fb[_0x42fe32]=_0x4b9bb3['change'])),_0x4440fb[_0x42fe32]&&_0x8d029a&&(_0x4440fb[_0x42fe32]['end']=_0x3b3c22,_0x3750d7(_0x4440fb[_0x42fe32]),_0x4440fb[_0x42fe32]=null);}function _0x3750d7({start:_0x19ecb4,end:_0x59c9f6,tapeItem:_0x5da591,userId:_0x55905f,aiSource:_0x245c88,type:_0x1499e5}){const _0x18a946=_0x5da591['item'],_0x52580e=_0x40ce54['schema']['isBlock'](_0x18a946)&&!_0x40ce54['schema']['isLimit'](_0x18a946),_0x1f412d=_0x19ecb4['nodeAfter']==_0x59c9f6['parent']&&_0x59c9f6['isAtStart'];if(_0x52580e&&_0x1f412d)return;const _0x5c32b2=_0x40ce54['createRange'](_0x19ecb4,_0x59c9f6),_0x2da639=_0x5f181b['get'](_0x55905f),_0x23be03=new Mt({'author':_0x2da639,'type':'isAdded'==_0x1499e5||'isAddSuggestion'==_0x1499e5?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1499e5||'isRemoveSuggestion'==_0x1499e5,'aiSource':_0x245c88||null},'createdAt':new Date(),'rootName':_0x570257});_0x462eb6['push'](_0x23be03),_0x2e9921['markers']['set']('revision:'+_0x23be03['id'],_0x5c32b2);}function _0xffe481(_0x1919c1,_0x888c28){const _0x587efd=_0x1919c1['getAttributes'](),_0x34d68b=_0x888c28['getAttributes']();for(const _0x34c4c1 of _0x587efd){if(_0x34c4c1[0x1]!==_0x888c28['getAttribute'](_0x34c4c1[0x0]))return!0x1;_0x34d68b['next']();}return _0x34d68b['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3ede90=>{const _0x2c6d2c=_0x3ede90['markerName']['split'](':')[0x1],_0x3abd8c=this['_getChangeFromId'](_0x2c6d2c);if(!_0x3abd8c)return null;const _0x3c39fd='add'==_0x3abd8c['type']?'insertion':'deletion',_0x13590d=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3c39fd];return _0x3abd8c['data']['isSuggestion']&&_0x13590d['push']('ck-suggestion-marker-'+_0x3c39fd+'-new'),this['activeChange']==_0x3abd8c&&_0x13590d['push']('ck-suggestion-marker--active'),{'classes':_0x13590d,'attributes':{'data-change-id':_0x2c6d2c}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x33a19c=>{_0x33a19c['on']('element:pre',(_0x15ff8b,_0x229280,_0x3e35c3)=>{const _0x3d6e71=_0x229280['viewItem']['getChild'](0x0);if(!_0x3d6e71||!_0x3d6e71['is']('element','code'))return;if(!_0x3e35c3['consumable']['consume'](_0x3d6e71,{'attributes':['vid_start','vid_end']}))return;const _0x5d3940=_0x229280['modelRange']['start']['nodeAfter'];_0x3e35c3['writer']['setAttribute']('vid_start',_0x3d6e71['getAttribute']('vid_start'),_0x5d3940),_0x3e35c3['writer']['setAttribute']('vid_end',_0x3d6e71['getAttribute']('vid_end'),_0x5d3940);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x28cc86=>{_0x28cc86['on']('element',(_0x3ec8a1,_0x5bb55c,_0x39cbd8)=>{if(!_0x39cbd8['consumable']['consume'](_0x5bb55c['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5bb55c['modelRange']['isCollapsed'])return;const _0x56720b=_0x5bb55c['modelRange']['start']['nodeAfter'];_0x56720b['hasAttribute']('vid_start')||_0x56720b['hasAttribute']('vid')||(_0x39cbd8['writer']['setAttribute']('vid_start',_0x5bb55c['viewItem']['getAttribute']('vid_start'),_0x56720b),_0x39cbd8['writer']['setAttribute']('vid_end',_0x5bb55c['viewItem']['getAttribute']('vid_end'),_0x56720b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x246933=>_0x246933['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x460d7d,[,_0x140ca1])=>{['vid_start','vid_end','vid']['includes'](_0x140ca1)&&(_0x460d7d['return']=!0x0,_0x460d7d['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xce6e63=>{_0xce6e63['on']('attribute:vid',(_0x26f858,_0x4f212b,_0x2e78c3)=>{if('\x20'!=_0x4f212b['item']['data']||_0x4f212b['item']['parent']['maxOffset']>0x1)return;if(!_0x2e78c3['consumable']['consume'](_0x4f212b['item'],_0x26f858['name']))return;const _0x4d06d4=_0x2e78c3['writer'],_0x28fc10=_0x2e78c3['mapper']['toViewRange'](_0x4f212b['range']);_0x4d06d4['wrap'](_0x28fc10,_0x4d06d4['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2deb9f){const _0x163eec=_0x2deb9f['plugins']['get']('RevisionViewer');return(_0x586226,_0x3d1066,_0x2a516b)=>{const _0x21f060=_0x3d1066['markerName']['split'](':')[0x1],_0x45493e=_0x163eec['_getChangeFromId'](_0x21f060);if(!_0x45493e)return null;const _0x5825bc='add'==_0x45493e['type']?'split':'merge';if(!_0x2a516b['consumable']['test'](_0x3d1066['markerRange'],_0x586226['name']))return;const _0x266f0a=_0x3d1066['markerRange']['getWalker'](),_0xa94980=_0x3d1066['markerRange']['start'],_0xc887f9=_0x2deb9f['model']['schema'];let _0x49b955=null,_0x30ee59=null,_0x279937=!0x1,_0x39fecf=!0x1;for(const _0x233262 of _0x266f0a){const _0x1f03df=_0x233262['item'];_0x279937=_0x279937||_0xc887f9['isContent'](_0x1f03df);const _0x4eb54d=_0x2a516b['mapper']['toViewElement'](_0x1f03df);if(_0x4eb54d&&_0x4eb54d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x233262['type']&&(_0xc887f9['isBlock'](_0x1f03df)&&!_0xc887f9['isLimit'](_0x1f03df)&&(_0x1f03df['nextSibling']||_0xa94980['isAtEnd']?_0x49b955&&_0x49b955['parent']==_0x1f03df||(_0x49b955=_0x1f03df,_0x432193(_0x233262['previousPosition']),_0x39fecf=!0x0):_0x30ee59=_0x30ee59||_0x233262['previousPosition']));}function _0x432193(_0x4cbcb2){const _0x533d78=_0x2a516b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5825bc}),_0x147f5a=_0x2a516b['mapper']['toViewPosition'](_0x4cbcb2);_0x45493e['data']['isSuggestion']&&_0x2a516b['writer']['addClass']('ck-suggestion-marker-'+_0x5825bc+'-new',_0x533d78),_0x163eec['activeChange']==_0x45493e&&_0x2a516b['writer']['addClass']('ck-suggestion-marker--active',_0x533d78),_0x2a516b['writer']['insert'](_0x147f5a,_0x533d78),_0x2a516b['mapper']['bindElementToMarker'](_0x533d78,_0x3d1066['markerName']);}_0x279937||_0x39fecf||!_0x30ee59||_0x432193(_0x30ee59);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x542f25,_0x598747,_0x81cacb)=>{const _0x8713d1=_0x81cacb['mapper']['markerNameToElements'](_0x598747['markerName']);if(_0x8713d1){for(const _0x818ea3 of _0x8713d1)(_0x818ea3['hasClass']('ck-suggestion-marker-split')||_0x818ea3['hasClass']('ck-suggestion-marker-merge'))&&(_0x81cacb['mapper']['unbindElementFromMarkerName'](_0x818ea3,_0x598747['markerName']),_0x81cacb['writer']['remove'](_0x818ea3));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4933cb,_0x34cbce,_0x2a9a99)=>{const _0x32cd7d=_0x34cbce['markerName']['split'](':')[0x1],_0x3ae466=this['_getChangeFromId'](_0x32cd7d);if(!_0x3ae466)return null;const _0x5f491c='add'==_0x3ae466['type']?'split':'merge';if(_0x2a9a99['consumable']['test'](_0x34cbce['markerRange'],_0x4933cb['name']))for(const _0x21d879 of _0x34cbce['markerRange']['getItems']()){if(!_0x21d879['is']('element','softBreak'))continue;const _0x4d3c34=_0x2a9a99['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5f491c}),_0x219aae=_0x2a9a99['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x21d879));_0x3ae466['data']['isSuggestion']&&_0x2a9a99['writer']['addClass']('ck-suggestion-marker-'+_0x5f491c+'-new',_0x4d3c34),this['activeChange']==_0x3ae466&&_0x2a9a99['writer']['addClass']('ck-suggestion-marker--active',_0x4d3c34),_0x2a9a99['writer']['insert'](_0x219aae,_0x4d3c34),_0x2a9a99['mapper']['bindElementToMarker'](_0x4d3c34,_0x34cbce['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x46e964=>{for(const _0x1a535d of this['editor']['model']['document']['getRootNames']()){const _0x4fc1aa=this['editor']['model']['document']['getRoot'](_0x1a535d),_0x13dd31=this['editor']['editing']['view']['document']['getRoot'](_0x1a535d);if(_0x13dd31){const _0x45524e=_0x4fc1aa['getAttribute']('revisionHistoryAttachChange');if(_0x46e964['removeAttribute']('data-change-id',_0x13dd31),_0x46e964['removeClass']('ck-revision-history-root-add',_0x13dd31),_0x46e964['removeClass']('ck-revision-history-root-remove',_0x13dd31),_0x46e964['removeClass']('ck-revision-history-root--active',_0x13dd31),_0x45524e){const _0x1b086f=this['_getChangeFromId'](_0x45524e);if(!_0x1b086f)return null;_0x46e964['setAttribute']('data-change-id',_0x45524e,_0x13dd31),_0x46e964['addClass']('ck-revision-history-root-'+_0x1b086f['type'],_0x13dd31),this['activeChange']==_0x1b086f&&_0x46e964['addClass']('ck-revision-history-root--active',_0x13dd31);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2b4325=>'revision-comment:'+_0x2b4325,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x55c7cc=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x55c7cc['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x51e9af=>'revision-suggestion:'+_0x51e9af,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x22c50f=>({'name':'suggestion:'+_0x22c50f,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4a6662=>{const _0x5650df=_0x4a6662['markerName']['split'](':')[0x1];return'insertion'!=_0x5650df&&'deletion'!=_0x5650df?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5650df]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2f9cef,_0x380f88,_0x35f9ac)=>{const _0x4496cb=_0x35f9ac['mapper']['markerNameToElements'](_0x380f88['markerName']);if(_0x4496cb){for(const _0x1ae4b1 of _0x4496cb)_0x1ae4b1['is']('uiElement')&&(_0x35f9ac['mapper']['unbindElementFromMarkerName'](_0x1ae4b1,_0x380f88['markerName']),_0x35f9ac['writer']['remove'](_0x1ae4b1));}},{'priority':'high'});}_getChangeFromId(_0x220809){return this['_changeIdToChange']['get'](_0x220809);}_getViewForChange(_0x48ebef){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x48ebef,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xd2733d,_0x5ca516,_0x54d3c4,_0x235615)=>{_0x235615&&this['_balloon']['remove'](_0x235615),_0x54d3c4&&(this['_balloon']['add']({'view':_0x54d3c4,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5314d1=this['editor']['editing'],_0x34264f=this['_getChangeFromId'](_0x54d3c4['changeId']);let _0xc88fc1;if(_0x34264f['data']['isOnRoot']){const _0x24a1e9=_0x5314d1['view']['getDomRoot'](_0x34264f['rootName']);_0xc88fc1=Array['from'](_0x24a1e9['getClientRects']());}else{const _0x410496=this['editor']['model']['markers']['get']('revision:'+_0x54d3c4['changeId']);_0xc88fc1=Array['from'](_0x5314d1['mapper']['markerNameToElements'](_0x410496['name']))['map'](_0x42a124=>_0x5314d1['view']['domConverter']['mapViewToDom'](_0x42a124))['map'](_0x3ee9c0=>Array['from'](_0x3ee9c0['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0xc88fc1['find'](_0x15f280=>_0x15f280['top']-0x3<=this['_activeViewTarget']['y']&&_0x15f280['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x15f280['left']-0x3<=this['_activeViewTarget']['x']&&_0x15f280['right']+0x3>=this['_activeViewTarget']['x'])||_0xc88fc1[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x18ea16,_0x25989b,_0x1dd22b,_0x45f675)=>{this['activeView']=_0x1dd22b?this['_getViewForChange'](_0x1dd22b):null,this['editor']['model']['change'](()=>{const _0x25c754=this['editor']['editing'];_0x45f675&&(_0x45f675['data']['isOnRoot']?_0x25c754['view']['change'](_0x53e7fd=>{_0x53e7fd['removeClass']('ck-revision-history-root--active',_0x25c754['view']['document']['getRoot'](_0x45f675['rootName']));}):_0x25c754['reconvertMarker']('revision:'+_0x45f675['id'])),_0x1dd22b&&(_0x1dd22b['data']['isOnRoot']?_0x25c754['view']['change'](_0x3c7f90=>{_0x3c7f90['addClass']('ck-revision-history-root--active',_0x25c754['view']['document']['getRoot'](_0x1dd22b['rootName']));}):_0x25c754['reconvertMarker']('revision:'+_0x1dd22b['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x37a214,_0x3adcc3)=>{if(this['activeChange'])return;const _0x1e1cad=this['_findChangeIdFromDomTarget'](_0x3adcc3['target']),_0x10d39a=this['_changeIdToChange']['get'](_0x1e1cad);_0x10d39a?(this['_activeViewTarget']={'x':_0x3adcc3['domEvent']['x'],'y':_0x3adcc3['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x10d39a)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x12c690,_0x57ba92)=>{const _0x5f4a35=this['_findChangeIdFromDomTarget'](_0x57ba92['target']),_0x1a2fb0=this['_changeIdToChange']['get'](_0x5f4a35);_0x1a2fb0?(this['_activeViewTarget']={'x':_0x57ba92['domEvent']['x'],'y':_0x57ba92['domEvent']['y']},_0x1a2fb0===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1a2fb0):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x19f92f){do{const _0x30ed51=_0x19f92f['getAttribute']('data-change-id');if(_0x30ed51)return _0x30ed51;_0x19f92f=_0x19f92f['parent'];}while(_0x19f92f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x471749=>{for(const _0x85398a of this['editor']['model']['markers'])_0x471749['removeMarker'](_0x85398a);});}};function Ut(_0x2cb38b){return _0x2cb38b['split'](':')[0x1];}function Lt(_0x468407,_0xaeda49){return(_0xba1b2,_0x225d07,_0x47b502)=>{if(!_0x47b502['consumable']['test'](_0x225d07['markerRange'],_0xba1b2['name']))return;const _0x5a6ce4=_0x225d07['markerRange']['getWalker'](),_0x2a5419=_0x225d07['markerRange']['start'],_0x7b7ebb=_0x468407['model']['schema'];let _0x4c1f16=null,_0x7acf07=null,_0x4af062=!0x1,_0x227162=!0x1;for(const _0x225405 of _0x5a6ce4){const _0x7107e8=_0x225405['item'];_0x4af062=_0x4af062||_0x7b7ebb['isContent'](_0x7107e8);const _0x284894=_0x47b502['mapper']['toViewElement'](_0x7107e8);if(_0x284894&&_0x284894['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x225405['type']&&(_0x7b7ebb['isBlock'](_0x7107e8)&&!_0x7b7ebb['isLimit'](_0x7107e8)&&(_0x7107e8['nextSibling']||_0x2a5419['isAtEnd']?_0x4c1f16&&_0x4c1f16['parent']==_0x7107e8||(_0x4c1f16=_0x7107e8,_0x194a05(_0x225405['previousPosition']),_0x227162=!0x0):_0x7acf07=_0x7acf07||_0x225405['previousPosition']));}function _0x194a05(_0x6550d4){const _0x196944=_0x47b502['mapper']['toViewPosition'](_0x6550d4),_0x25ffd=_0x47b502['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xaeda49});_0x47b502['writer']['insert'](_0x196944,_0x25ffd),_0x47b502['mapper']['bindElementToMarker'](_0x25ffd,_0x225d07['markerName']);}_0x4af062||_0x227162||!_0x7acf07||_0x194a05(_0x7acf07);};}var Ft=class extends _0x37a0c7{constructor(_0x31c093){super(_0x31c093);const _0xc4c00c=_0x31c093['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0xc4c00c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xc4c00c,'change:isEnabled',()=>this['refresh']());}execute(){const _0x27c109=this['editor'],_0x2b631c=_0x27c109['plugins']['get'](Pt),_0x6bd5cf=_0x2b631c['isReady']?_0x2b631c['diff']['newRevisionId']:null;_0x27c109['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x6bd5cf);}['refresh'](){const {isReady:_0x4cf695,isEnabled:_0x595f81,repository:_0x224b53,diff:_0x33e1f5}=this['editor']['plugins']['get'](Pt),_0x611a80=_0x33e1f5&&_0x224b53['getLaterVisibleRevision'](_0x33e1f5['newRevisionId']);this['isEnabled']=_0x4cf695&&_0x595f81&&Boolean(_0x611a80);}},$t=class extends _0x37a0c7{_step;constructor(_0x3b7cfe,{direction:_0x1d21db}){super(_0x3b7cfe);const _0x3235c3=_0x3b7cfe['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x1d21db?0x1:-0x1,this['listenTo'](_0x3235c3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3235c3,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3235c3,'change:activeChange',()=>this['refresh']());}execute(){const _0xc9d827=this['editor'],_0x12f025=_0xc9d827['plugins']['get'](Pt),{isNavigationMode:_0x55f244,currentChangeNumber:_0x278da2}=_0x12f025;let _0x24ee07;if(_0x12f025['activeChange']=_0x55f244?_0x12f025['diff']['changes']['get'](_0x278da2+this['_step']):_0x12f025['diff']['changes']['first'],_0x12f025['activeChange']['data']['isOnRoot'])_0x24ee07=_0xc9d827['editing']['view']['getDomRoot'](_0x12f025['activeChange']['rootName']);else{const _0x11f1e6=_0xc9d827['model']['markers']['get']('revision:'+_0x12f025['activeChange']['id']);_0x24ee07=_0x5f2ed6(_0xc9d827['editing'],_0x11f1e6);}_0x478df5({'target':_0x24ee07,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x25da3e,currentChangeNumber:_0x16ad1f,numberOfChanges:_0x1ecb74,isReady:_0x50ea27,isEnabled:_0x4a0ba1}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x4a0ba1&&_0x50ea27&&_0x1ecb74)&&(!_0x25da3e||(0x1===this['_step']?_0x16ad1f<_0x1ecb74-0x1:_0x16ad1f>0x0));}},Bt=class extends dt{constructor(_0x36acd2){super(_0x36acd2);const _0x1fce4d=this['bindTemplate'],_0x15b75e=new _0xd113c4(_0x36acd2),_0x53abc1=new _0xd113c4(_0x36acd2);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',(_0x5bf09e,_0x15849d)=>_0x5bf09e&&_0x15849d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x237b19,_0x196e3d,_0x4bb05d,_0x49bab8)=>{if(!_0x237b19)return kt(_0x36acd2,'Loading...');if(!_0x4bb05d)return kt(_0x36acd2,'No\x20changes');const _0x1e96f9=kt(_0x36acd2,'NUMBER_OF_CHANGES',_0x4bb05d);return _0x49bab8?kt(_0x36acd2,'X_OF_Y_CHANGES',[_0x196e3d+0x1,_0x4bb05d]):_0x1e96f9;}),_0x15b75e['set']({'label':kt(_0x36acd2,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x9f76c9}),_0x53abc1['set']({'label':kt(_0x36acd2,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5a61ed}),_0x15b75e['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x53abc1['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x15b75e['on']('execute',()=>this['fire']('execute','backward')),_0x53abc1['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',_0x1fce4d['if']('_isStatusLabelVisible','ck-hidden',_0xd9cd73=>!_0xd9cd73)]},'children':[{'text':_0x1fce4d['to']('isNavigationMode',_0x18c1fd=>_0x18c1fd?kt(_0x36acd2,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x36acd2,'Total')+':\x20')}]},{'text':_0x1fce4d['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x15b75e,_0x53abc1]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0xc765d1{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x31e77c=this['editor']['editing']['view'];_0x31e77c['change'](_0x1cb563=>{for(const _0x2a0578 of _0x31e77c['document']['roots'])_0x1cb563['addClass'](jt,_0x2a0578);});}['hide'](){const _0x569e21=this['editor']['editing']['view'];_0x569e21['change'](_0x3afa3f=>{for(const _0x3f4757 of _0x569e21['document']['roots'])_0x3afa3f['removeClass'](jt,_0x3f4757);});}},Kt=class extends _0xc765d1{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x2c238d=this['editor'],_0x2a8188=_0x2c238d['plugins']['get'](Pt),_0x4c2dcc=_0x2c238d['plugins']['get'](Gt);_0x2c238d['ui']['componentFactory']['add']('exitToEditing',_0x247c57=>{const _0x14102e=new _0xd113c4(_0x247c57);return _0x14102e['set']({'label':kt(_0x247c57,'Back\x20to\x20editing'),'icon':_0x391628,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x14102e,'execute',()=>{_0x2c238d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x14102e;}),_0x2c238d['ui']['componentFactory']['add']('restoreRevision',_0x5a1595=>{const _0x1d8f6d=new _0xd113c4(_0x5a1595);return _0x1d8f6d['set']({'label':kt(_0x5a1595,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1d8f6d['bind']('isEnabled')['to'](_0x2c238d['commands']['get']('restoreRevision')),this['listenTo'](_0x1d8f6d,'execute',()=>_0x2c238d['execute']('restoreRevision')),_0x1d8f6d;}),_0x2c238d['ui']['componentFactory']['add']('changesNavigation',_0x5e960c=>{const _0x2afd62=new Bt(_0x5e960c),_0x4491e2=_0x2c238d['commands']['get']('showPreviousChange'),_0xb931a1=_0x2c238d['commands']['get']('showNextChange');return _0x2afd62['bind']('isBackwardNavigationEnabled')['to'](_0x4491e2,'isEnabled'),_0x2afd62['bind']('isForwardNavigationEnabled')['to'](_0xb931a1,'isEnabled'),_0x2afd62['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2a8188),this['listenTo'](_0x2afd62,'execute',(_0x51f67f,_0x14eddd)=>{_0x2c238d['execute']('forward'===_0x14eddd?'showNextChange':'showPreviousChange');}),_0x2afd62;}),_0x4c2dcc['show'](),_0x2a8188['on']('change:isReady',(_0x576234,_0x1a5b70,_0x203457)=>{_0x203457?_0x4c2dcc['hide']():_0x4c2dcc['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x55213b,_0x2240e9){super(_0x55213b,_0x2240e9);const _0x17ef30=this['bindTemplate'];this['set']({'label':kt(_0x55213b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x55213b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x17ef30['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x18d8d0(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x393976=this['fieldView']['element'];this['_tooltipString']=_0x393976['scrollWidth']>_0x393976['clientWidth']&&_0x393976['value']||'';}},Yt=class extends dt{constructor(_0x2fc264,_0x117435,_0x58ec39){super(_0x2fc264);const _0x2ae016=new _0xa758d2();_0x2ae016['set']({'content':_0x2a0aef,'viewBox':'0\x200\x2011\x2010'});const _0xb854cf=['ck','ck-revision-history-sidebar__revision-author'];_0x58ec39&&_0xb854cf['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3f7e62=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x2fc264,_0x58ec39?'Revision\x20creator':'Revision\x20author')},'children':[_0x2ae016,_0x117435['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xb854cf},'children':_0x3f7e62});}};function Jt(_0x299d93,_0x171065){const _0x8e27d8=_0x299d93['bindTemplate'],_0x2ea47b=_0x299d93['locale'],_0x1c1b0a=vt(_0x2ea47b);_0x1c1b0a['panelPosition']='sw';const _0x54e7aa=function(_0x2f39b1,_0x3c0b63){const _0x489410=function(_0x5c7b2f,_0xbd11c0){const _0x2e55ea=_0x5c7b2f['locale'],_0x52b9b1={'Compare\x20against\x20selected':kt(_0x2e55ea,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x2e55ea,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x2e55ea,'Restore\x20this\x20revision')};return _0xbd11c0['map'](_0x325499=>{const _0x19abaf=_0x52b9b1[_0x325499['name']];return _0x19abaf&&_0x19abaf!==_0x325499['name']&&(_0x325499['name']=_0x19abaf),_0x325499;});}(_0x2f39b1,_0x3c0b63),_0x4bcef7=new _0x2a4b06();for(const _0x356fb3 of _0x489410){const _0x1a84f7={'type':'button','model':new ut({'label':_0x356fb3['name'],'class':_0x356fb3['class'],'withText':!0x0,'role':'menuitem','_action':_0x356fb3['action']})};_0x1a84f7['model']['bind']('isEnabled')['to'](_0x2f39b1,'isActionsDropdownOpen',_0x52c9c1=>'function'!=typeof _0x356fb3['isEnabled']||(!_0x52c9c1||_0x356fb3['isEnabled'](_0x2f39b1))),_0x4bcef7['add'](_0x1a84f7);}return _0x4bcef7;}(_0x299d93,_0x171065);return _0x299d93['bind']('isActionsDropdownOpen')['to'](_0x1c1b0a,'isOpen'),_0x1c1b0a['buttonView']['set']({'label':kt(_0x2ea47b,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1eb543}),_0x1c1b0a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x8e27d8['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x8e27d8['to'](_0x338d2f=>_0x338d2f['stopPropagation']())}}),_0x1c1b0a['on']('execute',_0xf2e8b1=>{_0x299d93['isReady']&&'function'==typeof _0xf2e8b1['source']['_action']&&_0xf2e8b1['source']['_action'](_0x299d93);}),ft(_0x1c1b0a,_0x54e7aa,{'role':'menu'}),_0x1c1b0a['listenTo'](_0x299d93,'change:isActionsDropdownOpen',(_0x14920e,_0x5c1a91,_0x51b80b)=>{if(_0x51b80b)for(const _0x1377ba of _0x1c1b0a['listView']['items']){const _0x106a57=_0x1377ba['children']['first'],_0x3e8776=_0x171065['find'](_0x2f60bb=>_0x2f60bb['action']===_0x106a57['_action'])['isVisible'];_0x1377ba['isVisible']=void 0x0===_0x3e8776||_0x3e8776(_0x299d93);}}),_0x1c1b0a;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x392924(dt);var Xt=class extends Wt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0x2c2a72,_0x5e0577,_0x54e744,_0x5acdd4,_0x2f914d=!0x1){super(_0x2c2a72);const _0x3686ef=this['bindTemplate'],_0x33bcda=function(_0x4cfc67,_0x48308e){const _0x38d9bb=Array['from'](_0x48308e['authors'])['filter'](_0x4cd8aa=>_0x4cd8aa!=_0x48308e['creator']);return _0x48308e['creator']&&_0x38d9bb['unshift'](_0x48308e['creator']),_0x38d9bb['map'](_0x4447b1=>new Yt(_0x4cfc67,_0x4447b1,_0x4447b1==_0x48308e['creator']));}(_0x2c2a72,_0x5e0577);this['id']=_0x5e0577['id'],this['_revision']=_0x5e0577,this['_requireRevisionName']=_0x5acdd4,this['bind']('_isAiGenerated')['to'](_0x5e0577,'attributes',_0x303b48=>!(!_0x303b48||!_0x303b48['@ai'])),this['bind']('name','createdAt')['to'](_0x5e0577),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x32f804=>{return _0x2fcce4=_0x2c2a72['uiLanguage'],(_0x59a7a5=_0x32f804)['toLocaleDateString'](_0x2fcce4,{'month':'long','day':'numeric'})+',\x20'+_0x59a7a5['toLocaleTimeString'](_0x2fcce4,{'hour':'numeric','minute':'numeric'});var _0x2fcce4,_0x59a7a5;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new qt(_0x2c2a72,gt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x38b54d=>_0x38b54d||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x2a690f,_0x16f8f0)=>_0x2a690f&&_0x16f8f0),this['revisionActionsView']=_0x54e744&&_0x54e744['length']?Jt(this,_0x54e744):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x2f914d?this['_createAiPillView'](_0x2c2a72):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x3686ef['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x3686ef['if']('isEnabled','ck-disabled',_0x345de6=>!_0x345de6),_0x3686ef['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x3686ef['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x3686ef['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':_0x3686ef['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':_0x33bcda}]},..._0x2f914d?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x3686ef['if']('_isAiGenerated','ck-hidden',_0x466d7e=>!_0x466d7e)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x3686ef['to'](_0x334dd8=>{_0x334dd8['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x204206){const _0x3f624e=new _0x290ede(_0x204206);return _0x3f624e['set']({'icon':_0x15811d,'label':kt(_0x204206,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':kt(_0x204206,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x3f624e['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x3f624e;}['render'](){super['render']();const _0x274ad9=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x274ad9,'change',()=>{this['_requireRevisionName']&&!_0x274ad9['value']||this['fire']('setName',{'id':this['id'],'name':_0x274ad9['value']}),_0x274ad9['value']||(_0x274ad9['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Qt(_0x551f10,_0xe8864a){const _0x223f64=wt['fromJSDate'](_0x551f10)['setLocale'](_0xe8864a),_0x25a6fd=wt['local'](),_0xd8b585=_0x25a6fd['minus']({'days':0x1})['startOf']('day');let _0x1ee81e,_0x1f2f24;return _0x223f64['hasSame'](_0x25a6fd,'day')?(_0x1ee81e=_0x223f64['startOf']('day')['toJSDate'](),_0x1f2f24=_0x223f64['toRelativeCalendar']()):_0x223f64['hasSame'](_0xd8b585,'day')?(_0x1ee81e=_0xd8b585['toJSDate'](),_0x1f2f24=_0x223f64['toRelativeCalendar']()):_0x223f64['hasSame'](_0x25a6fd,'week')?(_0x1ee81e=_0x223f64['startOf']('week')['toJSDate'](),_0x1f2f24=_0x223f64['weekdayLong']||''):_0x223f64['hasSame'](_0x25a6fd,'year')?(_0x1ee81e=_0x223f64['startOf']('month')['toJSDate'](),_0x1f2f24=_0x223f64['monthLong']||''):(_0x1ee81e=_0x223f64['startOf']('year')['toJSDate'](),_0x1f2f24=String(_0x223f64['year'])),{'startDate':_0x1ee81e,'localizedPeriodName':_0x1f2f24};}var zt=class extends dt{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x4a3ad4,_0x4be0ea,_0x261206,_0x15b18d,_0x51ea77){super(_0x4a3ad4);const _0x34eeac=Qt(_0x4be0ea,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4be0ea,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x261206,this['_requireRevisionName']=_0x15b18d,this['_showAISource']=_0x51ea77,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':_0x34eeac}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x4dce9a){const _0x233a7f=new Xt(this['locale'],_0x4dce9a,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x233a7f);}['removeRevision'](_0x2e5619){const _0x433fa1=this['revisionViews']['find'](_0x2c7b1b=>_0x2c7b1b['id']===_0x2e5619['id']);this['revisionViews']['remove'](_0x433fa1);}},Zt=class extends dt{constructor(_0x47ebb6){super(_0x47ebb6);const _0x2883d2=new _0xa758d2();_0x2883d2['content']=_0x51ea7f,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2883d2,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[kt(_0x47ebb6,'Revision\x20history')]}]});}},ti=class extends dt{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x478036,_0x4a060a,_0x483dc3,_0x19274c,_0x51c903){super(_0x478036);const _0x4a55dd=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4a060a,this['_revisionActions']=_0x483dc3,this['_requireRevisionName']=_0x19274c,this['_showAISource']=_0x51c903,this['on']('select',(_0x37b011,_0x22c9b1)=>{this['fire']('revisionSelected',_0x22c9b1);}),this['on']('setName',(_0x2e9371,_0x5920b0)=>{this['fire']('revisionSetName',_0x5920b0);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Zt(_0x478036),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4a55dd['if']('isEnabled','ck-disabled',_0x3042dd=>!_0x3042dd)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3e9f47 of this['_revisions'])this['_addRevision'](_0x3e9f47);this['_revisions']['on']('add',(_0x2103ef,_0x5b177a)=>{this['_addRevision'](_0x5b177a);}),this['_revisions']['on']('remove',(_0x297a47,_0x3b8332)=>{this['_removeRevision'](_0x3b8332);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x393502=>_0x393502['revisionViews']['map'](_0x4b88bc=>_0x4b88bc))['flat']();}selectRevision(_0x5d3690){for(const _0x2a811e of this['revisionViews'])_0x5d3690&&_0x5d3690['id']===_0x2a811e['id']?_0x2a811e['select']():_0x2a811e['deselect']();}highlightRevisions(_0x54908e){for(const _0x54dd7d of this['revisionViews'])_0x54908e['some'](({id:_0x4d20d1})=>_0x4d20d1===_0x54dd7d['id'])?_0x54dd7d['highlight']():_0x54dd7d['unhighlight']();}['_addRevision'](_0x5711c0){const _0x2e712f=Qt(_0x5711c0['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x3f9e8c=this['_getTimePeriodViewByStartDate'](_0x2e712f);_0x3f9e8c||(_0x3f9e8c=new zt(this['locale'],_0x2e712f,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x3f9e8c)),_0x3f9e8c['addRevision'](_0x5711c0);}['_removeRevision'](_0x285de4){const _0x53d21e=Qt(_0x285de4['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x53d21e)['removeRevision'](_0x285de4);}_getTimePeriodViewByStartDate(_0x4d0cd4){return this['timePeriodViews']['find'](_0x14f360=>_0x14f360['startDate']['getTime']()===_0x4d0cd4['getTime']());}},ii=class RevisionsSidebar extends _0xc765d1{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(
|
|
30
|
-
_0x197ec5(_0x20294c);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1b253d,_0x1c0d17){super(_0x1c0d17),this['sourceElement']=_0x1b253d,this['model']['document']['createRoot']();const _0x3a2f90=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x3a2f90);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x1fa2cf,_0x5bca0a){const _0x43f4d8=new this(_0x1fa2cf,_0x5bca0a);return await _0x43f4d8['initPlugins'](),await _0x43f4d8['ui']['init'](_0x1fa2cf),await _0x43f4d8['data']['init'](_0x43f4d8['config']['get']('initialData')||''),_0x43f4d8['fire']('ready'),_0x43f4d8;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x34e937{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f7b09){super(_0x3f7b09),this['result']='end',_0x3f7b09['editing']['view']['_overlayModeHint']='auto',_0x3f7b09['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x34e937{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x5539d1){if(super(_0x5539d1),!this['editor']['config']['get']('revisionHistory'))throw new _0x2da882('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xe1757a=>this['_showRevisionViewer']({..._0xe1757a,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1354ad=>this['_closeRevisionViewer'](_0x1354ad)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x406d78=>this['_restoreRevision'](_0x406d78)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x24d0e7){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x24d0e7;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x166505){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x166505);}getRevision(_0x259e63){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x259e63);}getRevisions(_0x69d1af){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x69d1af||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x3bcf8b=this['editor'],_0x4027c8=_0x907eda(_0x3bcf8b,ai),_0x2f49b9=_0x3bcf8b['plugins']['get']('RevisionTracker'),_0x3f05f6=_0x3bcf8b['plugins']['get'](_0x3d100c)['users'];return _0x4027c8['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4027c8['lazyRoots'],(_0x4027c8['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x34e937{static get requires(){return[Pt,_0x3d100c];}init(){const _0x4efb33=this['editor']['plugins']['get'](_0x3d100c);for(const _0x520c55 of _0x3f05f6)_0x520c55['isAnonymous']||_0x4efb33['getUser'](_0x520c55['id'])||_0x4efb33['addUser'](_0x520c55);const _0x97a95a=_0x2f49b9['repository']['getRevisions']();let _0x12df29=null;const _0x2f1d58=this['editor']['plugins']['get']('RevisionViewer');if(_0x2f1d58['adapter']=_0x2f49b9['adapter'],_0x2f1d58['bind']('isEnabled')['to'](_0x2f49b9),_0x3bcf8b['plugins']['has']('CommentsRepository')){const _0x339de9=_0x3bcf8b['plugins']['get']('CommentsRepository');_0x2f1d58['_getVisibleCommentThreadIds']=()=>new Set(_0x339de9['getCommentThreads']()['filter'](_0x53ecb6=>!_0x53ecb6['isResolved'])['map'](_0x4650f2=>_0x4650f2['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x3bcf8b,'isReadOnly',_0x2a1985=>!_0x2a1985);for(const _0x1a6e3b of _0x97a95a){const _0x57c532=null===_0x1a6e3b['creator'];if(_0x57c532&&_0x1a6e3b['toVersion']===_0x1a6e3b['fromVersion'])continue;const _0x1c9457=_0x1a6e3b['toJSON']();_0x2f1d58['addRevisionData'](_0x1c9457,(_0xa99c82,_0x11ccd3,_0x5504ee)=>{if(_0x57c532){if(_0x12df29)_0x12df29['_update'](_0xa99c82,_0x11ccd3);else{if(!_0x11ccd3){const _0x1d9904=_0x5504ee['toJSON']();_0x1d9904['id']=_0x2e389d(),_0x2f49b9['saveRevision'](_0x1d9904,_0x5504ee['toVersion'])['then'](_0x53b670=>{_0x12df29=_0x53b670;});}}}else _0x1a6e3b['_update'](_0xa99c82,_0x11ccd3);});}}},ii),_0x4027c8);}['_enhanceShowRevisionViewerCallback'](){const _0x1da99b=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x10a132=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x10a132['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x75f8ec=this['editor']['plugins']['get']('Dialog');_0x75f8ec['isOpen']&&_0x75f8ec['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x34fff1=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3e2ae9 of _0x34fff1)_0x3e2ae9['class']=_0x3e2ae9['class']?_0x3e2ae9['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x5daaaf=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5daaaf&&_0x5daaaf['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x569362=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x569362&&_0x569362['setAttribute']('tabindex','-1');}}const _0x3143e8=this['_getRevisionViewerEditorConfig']();return _0x1da99b(_0x3143e8)['then'](_0x1c5650=>(this['_viewerEditor']=_0x1c5650,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'),_0x1c5650))['catch'](_0xc54b9f=>(console['error'](_0xc54b9f),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x20553e=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 _0xb8015e=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xdddce3 of _0xb8015e)_0xdddce3['class']='ck-tab-panel_disabled'===_0xdddce3['class']?'':_0xdddce3['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x225e20=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x225e20&&_0x225e20['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x8ba58c=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x8ba58c&&_0x8ba58c['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x20553e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xc5a11=this['editor']['plugins']['get']('Annotations');_0xc5a11['refreshVisibility'](),_0xc5a11['refreshPositioning']();}});});}['_showRevisionViewer'](_0x37ab70){const _0x1b3fa4=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1d322d=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x24400c=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x24400c,_0x37ab70)['then'](_0x2d9983=>(_0x1d322d['style']['display']='block',_0x1b3fa4['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2d9983));}['_closeRevisionViewer'](_0xd90cf6){const _0x313e59=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x313e59['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xd90cf6['destroy']();}async _restoreRevision(_0x4b5916){const _0x7a6df1=this['editor'],_0x274d5e=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x259272=_0x7a6df1['plugins']['get']('RevisionTracker'),_0x1dd4c9=_0x7a6df1['plugins']['get']('RevisionHistoryUtils'),_0x78cba4=_0x274d5e['repository']['getRevision'](_0x4b5916);let _0x2e6ebd,_0x492430,_0x35721f;try{await _0x1dd4c9['loadRevisionData'](_0x78cba4,this['adapter']),_0x2e6ebd=_0x1dd4c9['getRevisionDocumentData'](_0x78cba4),_0x492430=_0x1dd4c9['getRevisionRootsAttributes'](_0x78cba4);}catch(_0x55b4e0){return void console['error'](_0x55b4e0);}_0x7a6df1['model']['change'](_0x542243=>{for(const _0x3f9ca9 of Array['from'](_0x7a6df1['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x542243['removeMarker'](_0x3f9ca9);}),_0x274d5e['isReady']=!0x1,_0x7a6df1['model']['enqueueChange'](_0x5a3088=>{_0x5a3088['setSelection'](null),_0x5a3088['removeSelectionAttribute'](_0x7a6df1['model']['document']['selection']['getAttributeKeys']());const _0x178926=Object['keys'](_0x2e6ebd);for(const _0x4d4dc3 of _0x7a6df1['model']['document']['roots'])'$graveyard'!=_0x4d4dc3['rootName']&&_0x4d4dc3['isAttached']()&&!_0x178926['includes'](_0x4d4dc3['rootName'])&&_0x5a3088['detachRoot'](_0x4d4dc3);for(const _0x42d6a8 of _0x178926){let _0x48568b=_0x7a6df1['model']['document']['getRoot'](_0x42d6a8);if(!_0x48568b||!_0x48568b['isAttached']()){const _0x99e946=_0x78cba4['diffData']?.[_0x42d6a8]?.['rootElementName']||'$root';_0x48568b=_0x5a3088['addRoot'](_0x42d6a8,_0x99e946);}const _0x1c2096=_0x492430[_0x42d6a8],_0x41cf86=Object['keys'](_0x1c2096),_0x179547=_0x2e6ebd[_0x42d6a8];for(const _0x1a195b of _0x48568b['getAttributeKeys']())_0x41cf86['includes'](_0x1a195b)||_0x5a3088['removeAttribute'](_0x1a195b,_0x48568b);for(const _0xe7093d of _0x41cf86)_0x5a3088['setAttribute'](_0xe7093d,_0x492430[_0x42d6a8][_0xe7093d],_0x48568b);_0x5a3088['remove'](_0x5a3088['createRangeIn'](_0x48568b)),_0x5a3088['insert'](_0x7a6df1['data']['parse'](_0x179547,_0x48568b),_0x48568b,0x0);}});const _0x4c6ca2=kt(_0x7a6df1['locale'],'Restored');if(_0x78cba4['name'])_0x35721f=-0x1==_0x78cba4['name']['indexOf'](_0x4c6ca2)?_0x4c6ca2+':\x20'+_0x78cba4['name']:_0x78cba4['name'];else _0x35721f=_0x4c6ca2+':\x20'+(_0x78cba4['createdAt']['toLocaleDateString'](_0x7a6df1['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x78cba4['createdAt']['toLocaleTimeString'](_0x7a6df1['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x259272['saveRevision']({'name':_0x35721f}),_0x274d5e['isReady']=!0x0,_0x7a6df1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|
|
29
|
+
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(_0x4ca87e){super(_0x4ca87e),this['_revisionViewer']=_0x4ca87e['plugins']['get'](Pt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x118986=this['_revisionsRepository']['_revisions'],_0x44f976=this['_createRevisionActions'](),_0x37f3d9=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ti(this['editor']['locale'],_0x118986,_0x44f976,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',(_0x16a032,_0x5e08be)=>{_0x5e08be['revisionViews']['on']('add',(_0x79f633,_0x59ba83)=>{_0x59ba83['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)),_0x37f3d9['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x5e34d2=this['_revisionsRepository']['getRevision'](0x0);if(_0x5e34d2){const _0x32979f=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5e34d2['id']);this['_revisionViewer']['compare'](_0x5e34d2,_0x32979f);}}_handleRevisionSelected(_0x4520c3,_0x241367){const _0x4639c5=this['_revisionsRepository']['getRevision'](_0x241367['id']),_0x507d1a=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4639c5['id']);this['_revisionViewer']['compare'](_0x4639c5,_0x507d1a);}_handleRevisionSetName(_0x490edd,_0x21174b){this['_revisionsRepository']['getRevision'](_0x21174b['id'])['setName'](_0x21174b['name']);}['_handleDiffChange'](_0x3b974e,_0x99e2b0,_0x419cb3){const _0x25abda=this['_revisionsRepository']['getRevisionsInDiff'](_0x419cb3);_0x25abda['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x25abda),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x25abda[0x0]));}_createRevisionActions(){const _0x502663=this['editor'],_0x1396d4=RevisionsSidebar['availableRevisionActions'],_0x3c75bc=_0x502663['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x3c75bc['length'])return _0x3c75bc['map'](_0x17fa27=>{const _0x5c77a7='string'==typeof _0x17fa27?Object['assign']({},_0x1396d4[_0x17fa27]):_0x17fa27;return _0x5c77a7['action']=_0x5c77a7['action']['bind'](this,_0x502663),_0x5c77a7['isVisible']&&(_0x5c77a7['isVisible']=_0x5c77a7['isVisible']['bind'](this,_0x502663)),_0x5c77a7;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x423012},_0x502866)=>{const _0x2eb4e5=_0x423012['get'](Pt),_0x4ca119=_0x2eb4e5['repository'];let _0x36cb3d=_0x2eb4e5['diff']['newRevisionId'],_0x180cc2=_0x502866['id'];_0x4ca119['getIndex'](_0x36cb3d)>_0x4ca119['getIndex'](_0x180cc2)&&([_0x36cb3d,_0x180cc2]=[_0x180cc2,_0x36cb3d]),_0x2eb4e5['compare'](_0x36cb3d,_0x180cc2);},'isVisible':({plugins:_0x5e9af0},_0x548cac)=>{const _0x255789=_0x5e9af0['get'](Pt);return!(_0x255789['repository']['getRevisionsInDiff'](_0x255789['diff'])['length']>0x2)&&!_0x548cac['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x242719,{id:_0x330621})=>{_0x242719['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x330621);},'isVisible':({plugins:_0x5116db},_0x570d1a)=>!!_0x5116db['get'](Pt)['repository']['getLaterVisibleRevision'](_0x570d1a['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x2230c6},{id:_0x4e76c7,revisionNameView:_0x3c13fa})=>{const _0x25bd78=_0x2230c6['get'](Pt),_0x11eb04=_0x25bd78['repository']['getEarlierVisibleRevision'](_0x4e76c7);_0x25bd78['compare'](_0x4e76c7,_0x11eb04),_0x3c13fa['focus'](),_0x3c13fa['fieldView']['select']();}}};}var si=class extends _0x44c02d{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x8f0c31,_0x4e5bb7){super(_0x8f0c31),this['_view']=_0x4e5bb7,this['_toolbarConfig']=mt(_0x8f0c31['config']['get']('toolbar')),this['_elementReplacer']=new _0x436e9b();}get element(){return this['view']['element'];}init(_0x305e14){const _0xa4b900=this['editor'],_0x1d958e=this['view'],_0x5b982c=_0xa4b900['editing']['view'],_0x3e0778=_0x1d958e['editable'];_0x3e0778['name']=_0x5b982c['document']['getRoot']()['rootName'],_0x3e0778['isMainFrameEditingRoot']=!0x0,_0x1d958e['render']();const _0x26d60c=_0x3e0778['element'];this['setEditableElement'](_0x3e0778['name'],_0x26d60c),_0x1d958e['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5b982c['attachDomRoot'](_0x26d60c),this['_elementReplacer']['replace'](_0x305e14,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x16c64d=this['view'],_0x56e663=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x56e663['detachDomRoot'](_0x16c64d['editable']['name']),_0x16c64d['destroy']();}_initToolbar(){const _0x585bf6=this['view'];_0x585bf6['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x585bf6['stickyPanel']['limiterElement']=_0x585bf6['element'],_0x585bf6['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x438670})=>_0x438670),_0x585bf6['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x585bf6['toolbar']);}},ni=class extends _0x43e091{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x3e0ea0,_0x5cccc2,_0x45cec4={}){super(_0x3e0ea0),this['stickyPanel']=new ht(_0x3e0ea0),this['toolbar']=new lt(_0x3e0ea0,{'shouldGroupWhenFull':_0x45cec4['shouldToolbarGroupWhenFull']}),this['_editable']=new tt(_0x3e0ea0,_0x5cccc2);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const oi=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x5b3859(_0x55a2d6);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4e4804,_0x4b70dd){super(_0x4b70dd),this['sourceElement']=_0x4e4804,this['model']['document']['createRoot']();const _0x3b4694=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x3b4694);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x1716dc,_0x1c081d){const _0x48611d=new this(_0x1716dc,_0x1c081d);return await _0x48611d['initPlugins'](),await _0x48611d['ui']['init'](_0x1716dc),await _0x48611d['data']['init'](_0x48611d['config']['get']('initialData')||''),_0x48611d['fire']('ready'),_0x48611d;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0xc765d1{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x36d022){super(_0x36d022),this['result']='end',_0x36d022['editing']['view']['_overlayModeHint']='auto',_0x36d022['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0xc765d1{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x35c8e4){if(super(_0x35c8e4),!this['editor']['config']['get']('revisionHistory'))throw new _0x281a56('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x5a5178=>this['_showRevisionViewer']({..._0x5a5178,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x52477d=>this['_closeRevisionViewer'](_0x52477d)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x231f07=>this['_restoreRevision'](_0x231f07)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0xb5adfc){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0xb5adfc;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x2f43a1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x2f43a1);}getRevision(_0x5dd474){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5dd474);}getRevisions(_0x47a9ca){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x47a9ca||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x6d1b16=this['editor'],_0x15124b=_0x160cfa(_0x6d1b16,ai),_0x543288=_0x6d1b16['plugins']['get']('RevisionTracker'),_0xa0c815=_0x6d1b16['plugins']['get'](_0x369e38)['users'];return _0x15124b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x15124b['lazyRoots'],(_0x15124b['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0xc765d1{static get requires(){return[Pt,_0x369e38];}init(){const _0x3d3a2d=this['editor']['plugins']['get'](_0x369e38);for(const _0x1af7e6 of _0xa0c815)_0x1af7e6['isAnonymous']||_0x3d3a2d['getUser'](_0x1af7e6['id'])||_0x3d3a2d['addUser'](_0x1af7e6);const _0x35d18f=_0x543288['repository']['getRevisions']();let _0x334351=null;const _0x3b1b8b=this['editor']['plugins']['get']('RevisionViewer');if(_0x3b1b8b['adapter']=_0x543288['adapter'],_0x3b1b8b['bind']('isEnabled')['to'](_0x543288),_0x6d1b16['plugins']['has']('CommentsRepository')){const _0x2e95e5=_0x6d1b16['plugins']['get']('CommentsRepository');_0x3b1b8b['_getVisibleCommentThreadIds']=()=>new Set(_0x2e95e5['getCommentThreads']()['filter'](_0x5b6822=>!_0x5b6822['isResolved'])['map'](_0x326f48=>_0x326f48['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x6d1b16,'isReadOnly',_0x1d0003=>!_0x1d0003);for(const _0x3ee69f of _0x35d18f){const _0x206171=null===_0x3ee69f['creator'];if(_0x206171&&_0x3ee69f['toVersion']===_0x3ee69f['fromVersion'])continue;const _0x244f35=_0x3ee69f['toJSON']();_0x3b1b8b['addRevisionData'](_0x244f35,(_0x27ccd0,_0x49bc72,_0x32541c)=>{if(_0x206171){if(_0x334351)_0x334351['_update'](_0x27ccd0,_0x49bc72);else{if(!_0x49bc72){const _0x2df943=_0x32541c['toJSON']();_0x2df943['id']=_0x27f7da(),_0x543288['saveRevision'](_0x2df943,_0x32541c['toVersion'])['then'](_0x48dc03=>{_0x334351=_0x48dc03;});}}}else _0x3ee69f['_update'](_0x27ccd0,_0x49bc72);});}}},ii),_0x15124b);}['_enhanceShowRevisionViewerCallback'](){const _0x1a6868=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x438e52=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x438e52['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5b17f7=this['editor']['plugins']['get']('Dialog');_0x5b17f7['isOpen']&&_0x5b17f7['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5f07b2=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x30cbf1 of _0x5f07b2)_0x30cbf1['class']=_0x30cbf1['class']?_0x30cbf1['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x21c6c9=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x21c6c9&&_0x21c6c9['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x21ee03=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x21ee03&&_0x21ee03['setAttribute']('tabindex','-1');}}const _0x39e32a=this['_getRevisionViewerEditorConfig']();return _0x1a6868(_0x39e32a)['then'](_0xa32abf=>(this['_viewerEditor']=_0xa32abf,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'),_0xa32abf))['catch'](_0x130df5=>(console['error'](_0x130df5),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x319f55=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 _0x5a73f8=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x5981e6 of _0x5a73f8)_0x5981e6['class']='ck-tab-panel_disabled'===_0x5981e6['class']?'':_0x5981e6['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x246980=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x246980&&_0x246980['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x9c880a=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x9c880a&&_0x9c880a['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x319f55(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x157228=this['editor']['plugins']['get']('Annotations');_0x157228['refreshVisibility'](),_0x157228['refreshPositioning']();}});});}['_showRevisionViewer'](_0x52f06e){const _0x5ee7e8=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xd75202=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3be389=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x3be389,_0x52f06e)['then'](_0x3a315d=>(_0xd75202['style']['display']='block',_0x5ee7e8['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3a315d));}['_closeRevisionViewer'](_0x201513){const _0x3fd3f7=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3fd3f7['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x201513['destroy']();}async _restoreRevision(_0x101a2c){const _0x398fc9=this['editor'],_0x4ab284=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3faff8=_0x398fc9['plugins']['get']('RevisionTracker'),_0x63a06e=_0x398fc9['plugins']['get']('RevisionHistoryUtils'),_0x243c5a=_0x4ab284['repository']['getRevision'](_0x101a2c);let _0x5a9b48,_0x25d2bd,_0x23f7e9;try{await _0x63a06e['loadRevisionData'](_0x243c5a,this['adapter']),_0x5a9b48=_0x63a06e['getRevisionDocumentData'](_0x243c5a),_0x25d2bd=_0x63a06e['getRevisionRootsAttributes'](_0x243c5a);}catch(_0x3f912c){return void console['error'](_0x3f912c);}_0x398fc9['model']['change'](_0xe409d6=>{for(const _0x25a467 of Array['from'](_0x398fc9['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xe409d6['removeMarker'](_0x25a467);}),_0x4ab284['isReady']=!0x1,_0x398fc9['model']['enqueueChange'](_0x1c9145=>{_0x1c9145['setSelection'](null),_0x1c9145['removeSelectionAttribute'](_0x398fc9['model']['document']['selection']['getAttributeKeys']());const _0xe7a21b=Object['keys'](_0x5a9b48);for(const _0x29ab9f of _0x398fc9['model']['document']['roots'])'$graveyard'!=_0x29ab9f['rootName']&&_0x29ab9f['isAttached']()&&!_0xe7a21b['includes'](_0x29ab9f['rootName'])&&_0x1c9145['detachRoot'](_0x29ab9f);for(const _0xaf3b4c of _0xe7a21b){let _0x1a91c8=_0x398fc9['model']['document']['getRoot'](_0xaf3b4c);if(!_0x1a91c8||!_0x1a91c8['isAttached']()){const _0x2b15a2=_0x243c5a['diffData']?.[_0xaf3b4c]?.['rootElementName']||'$root';_0x1a91c8=_0x1c9145['addRoot'](_0xaf3b4c,_0x2b15a2);}const _0x1bd96e=_0x25d2bd[_0xaf3b4c],_0x1696a8=Object['keys'](_0x1bd96e),_0x3479f6=_0x5a9b48[_0xaf3b4c];for(const _0x1e945e of _0x1a91c8['getAttributeKeys']())_0x1696a8['includes'](_0x1e945e)||_0x1c9145['removeAttribute'](_0x1e945e,_0x1a91c8);for(const _0x483ee9 of _0x1696a8)_0x1c9145['setAttribute'](_0x483ee9,_0x25d2bd[_0xaf3b4c][_0x483ee9],_0x1a91c8);_0x1c9145['remove'](_0x1c9145['createRangeIn'](_0x1a91c8)),_0x1c9145['insert'](_0x398fc9['data']['parse'](_0x3479f6,_0x1a91c8),_0x1a91c8,0x0);}});const _0x52bdd7=kt(_0x398fc9['locale'],'Restored');if(_0x243c5a['name'])_0x23f7e9=-0x1==_0x243c5a['name']['indexOf'](_0x52bdd7)?_0x52bdd7+':\x20'+_0x243c5a['name']:_0x243c5a['name'];else _0x23f7e9=_0x52bdd7+':\x20'+(_0x243c5a['createdAt']['toLocaleDateString'](_0x398fc9['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x243c5a['createdAt']['toLocaleTimeString'](_0x398fc9['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3faff8['saveRevision']({'name':_0x23f7e9}),_0x4ab284['isReady']=!0x0,_0x398fc9['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|