@ckeditor/ckeditor5-revision-history
Version:
Document revision history feature for CKEditor 5.
23 lines • 9.07 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0xfafc07=_0x4e46;function _0x4e46(_0x342b86,_0x5ec94c){const _0x104b00=_0x104b();return _0x4e46=function(_0x4e4629,_0x6a982e){_0x4e4629=_0x4e4629-0x166;let _0x490add=_0x104b00[_0x4e4629];return _0x490add;},_0x4e46(_0x342b86,_0x5ec94c);}function _0x104b(){const _0x4c5e1a=['RevisionHistoryUtils','htmlProcessor','domChildrenToView','viewChildrenToDom','length','75mSGvUA','childNodes','filter','attachChange','1179612GuOlur','_typeCharToViewClass','string','getFillerOffset','marked','domDocument','data','isPremiumPlugin','52590ZLUody','_getTypeCharForViewElement','collaboration.channelId','_appendChild','map','revision-end','config','div','toModel','loadRevisionData','from','459992ZUvmmS','children','forEach','startsWith','view','editing','518114jYTQqg','insertions','543741yGYKIa','attributes','399928CHzQip','revision-start','innerHTML','diffData','getRevisionDocumentData','document','9RcOsZq','_getViewFromDiffObj','831236vGRffZ','constructor','domConverter','attributesAfter','name','_setCustomProperty','editor','createElement','default','getRevision','processor','fillerOffset','isOfficialPlugin','_viewClassToTypeChar','get','render','_makeModelFromViewString','pluginName','customProperties','toData','_removeRevisionMarkers','type','append','useFillerType','data-revision-','parse','getRevisionRootsAttributes','isAttached'];_0x104b=function(){return _0x4c5e1a;};return _0x104b();}(function(_0x224321,_0x341e17){const _0x1f5a4e=_0x4e46,_0x1ff663=_0x224321();while(!![]){try{const _0x38decf=parseInt(_0x1f5a4e(0x1a5))/0x1+parseInt(_0x1f5a4e(0x1ab))/0x2+-parseInt(_0x1f5a4e(0x1ad))/0x3+-parseInt(_0x1f5a4e(0x192))/0x4+-parseInt(_0x1f5a4e(0x18e))/0x5*(parseInt(_0x1f5a4e(0x19a))/0x6)+parseInt(_0x1f5a4e(0x16d))/0x7+parseInt(_0x1f5a4e(0x1af))/0x8*(parseInt(_0x1f5a4e(0x16b))/0x9);if(_0x38decf===_0x341e17)break;else _0x1ff663['push'](_0x1ff663['shift']());}catch(_0x5ab682){_0x1ff663['push'](_0x1ff663['shift']());}}}(_0x104b,0x44663));import{Plugin as _0x2fd33c}from'ckeditor5/src/core.js';import{ViewDocumentFragment as _0x184938,ViewText as _0xc9e26b,ViewElement as _0x5a3b9b,ViewContainerElement as _0x197582,ViewAttributeElement as _0x4a69e7,ViewEmptyElement as _0x36cf33,ViewRawElement as _0x2e0a30,ViewUIElement as _0x25150a}from'ckeditor5/src/engine.js';export default class V extends _0x2fd33c{static get[_0xfafc07(0x17e)](){const _0x1ab0de=_0xfafc07;return _0x1ab0de(0x189);}static get[_0xfafc07(0x179)](){return!0x0;}static get[_0xfafc07(0x199)](){return!0x0;}[_0xfafc07(0x17a)]=new Map([[_0x197582,'c'],[_0x4a69e7,'a'],[_0x36cf33,'e'],[_0x2e0a30,'r'],[_0x25150a,'u']]);[_0xfafc07(0x193)]=new Map([['c',_0x197582],['a',_0x4a69e7],['e',_0x36cf33],['r',_0x2e0a30],['u',_0x25150a]]);async[_0xfafc07(0x1a3)](_0x2dfa1c,_0x587aff){const _0x5cf4f0=_0xfafc07;if(_0x2dfa1c[_0x5cf4f0(0x168)]||!_0x587aff)return;const _0x545524=this[_0x5cf4f0(0x173)][_0x5cf4f0(0x1a0)][_0x5cf4f0(0x17b)](_0x5cf4f0(0x19c)),_0x31e4b5=await _0x587aff[_0x5cf4f0(0x176)]({'channelId':_0x545524,'revisionId':_0x2dfa1c['id']});_0x2dfa1c[_0x5cf4f0(0x168)]=_0x31e4b5[_0x5cf4f0(0x168)];}[_0xfafc07(0x169)](_0x44ac5b){const _0x4c1f97=_0xfafc07,_0x535a37={};for(const _0x5a8113 in _0x44ac5b[_0x4c1f97(0x168)]){if(_0x44ac5b[_0x4c1f97(0x168)][_0x5a8113][_0x4c1f97(0x191)]&&!_0x44ac5b[_0x4c1f97(0x168)][_0x5a8113][_0x4c1f97(0x191)][_0x4c1f97(0x188)])continue;const _0x1508c9=this[_0x4c1f97(0x181)](JSON[_0x4c1f97(0x186)](_0x44ac5b[_0x4c1f97(0x168)][_0x5a8113][_0x4c1f97(0x1ac)])),_0x3204c5=this[_0x4c1f97(0x173)][_0x4c1f97(0x1aa)][_0x4c1f97(0x1a9)][_0x4c1f97(0x16a)],_0x2a2836=new _0x184938(_0x3204c5,_0x1508c9[_0x4c1f97(0x19e)](_0x30813f=>this[_0x4c1f97(0x16c)](_0x30813f,!0x1)));this[_0x4c1f97(0x173)][_0x4c1f97(0x198)][_0x4c1f97(0x177)][_0x4c1f97(0x184)](_0x4c1f97(0x196)),_0x535a37[_0x5a8113]=this[_0x4c1f97(0x173)][_0x4c1f97(0x198)][_0x4c1f97(0x177)][_0x4c1f97(0x180)](_0x2a2836),this[_0x4c1f97(0x173)][_0x4c1f97(0x198)][_0x4c1f97(0x177)][_0x4c1f97(0x184)](_0x4c1f97(0x175));}return _0x535a37;}[_0xfafc07(0x187)](_0xffbf90){const _0x5ad38f=_0xfafc07,_0x362216={};for(const _0x3e4a1c in _0xffbf90[_0x5ad38f(0x168)])_0xffbf90[_0x5ad38f(0x168)][_0x3e4a1c][_0x5ad38f(0x191)]&&!_0xffbf90[_0x5ad38f(0x168)][_0x3e4a1c][_0x5ad38f(0x191)][_0x5ad38f(0x188)]||(_0x362216[_0x3e4a1c]=_0xffbf90[_0x5ad38f(0x168)][_0x3e4a1c][_0x5ad38f(0x170)]||{});return _0x362216;}[_0xfafc07(0x19b)](_0x2a62b1){const _0x253a60=_0xfafc07;return this[_0x253a60(0x17a)][_0x253a60(0x17b)](_0x2a62b1[_0x253a60(0x16e)]);}[_0xfafc07(0x16c)](_0x195f38,_0x6cc3a3){const _0x37e032=_0xfafc07,_0x3b6ef3=this[_0x37e032(0x173)][_0x37e032(0x1aa)][_0x37e032(0x1a9)][_0x37e032(0x16a)];if(_0x37e032(0x194)==typeof _0x195f38)return new _0xc9e26b(_0x3b6ef3,_0x195f38);{let _0x36225d,_0x3295af;_0x3295af='u'==_0x195f38[_0x37e032(0x182)]||'r'==_0x195f38[_0x37e032(0x182)]?[]:_0x195f38[_0x37e032(0x1a6)][_0x37e032(0x19e)](_0x2bfcf2=>this[_0x37e032(0x16c)](_0x2bfcf2,_0x6cc3a3));const _0x109bcb=this[_0x37e032(0x193)][_0x37e032(0x17b)](_0x195f38[_0x37e032(0x182)])||_0x5a3b9b,_0x15cf55=this[_0x37e032(0x173)][_0x37e032(0x198)][_0x37e032(0x18a)][_0x37e032(0x16f)];if(_0x36225d=new _0x109bcb(_0x3b6ef3,_0x195f38[_0x37e032(0x171)],_0x195f38[_0x37e032(0x1ae)],_0x3295af),'u'==_0x195f38[_0x37e032(0x182)]&&_0x195f38[_0x37e032(0x1a6)][0x0]){const _0x2b1a16=_0x195f38[_0x37e032(0x1a6)][0x0];if(_0x36225d[_0x37e032(0x17c)]=function(_0x4cc35b){const _0x262ba6=_0x37e032,_0x185690=_0x4cc35b[_0x262ba6(0x174)](_0x262ba6(0x1a1));return _0x185690[_0x262ba6(0x167)]=_0x2b1a16,_0x185690[_0x262ba6(0x18f)][0x0];},_0x6cc3a3){const _0x2f9dd6=new _0x184938(_0x3b6ef3);_0x2f9dd6[_0x37e032(0x19d)](_0x36225d);const _0x388674=Array[_0x37e032(0x1a4)](_0x15cf55[_0x37e032(0x18c)](_0x2f9dd6,{'bind':!0x1})),_0x560958=_0x15cf55[_0x37e032(0x197)][_0x37e032(0x174)](_0x37e032(0x1a1));_0x560958[_0x37e032(0x183)](..._0x388674),_0x36225d=Array[_0x37e032(0x1a4)](_0x15cf55[_0x37e032(0x18b)](_0x560958))[0x0];}}else{if('r'==_0x195f38[_0x37e032(0x182)]&&_0x195f38[_0x37e032(0x1a6)][0x0]){const _0x3e7079=_0x195f38[_0x37e032(0x1a6)][0x0];if(_0x36225d[_0x37e032(0x17c)]=function(_0x2a6528){const _0x35cfaa=_0x37e032;_0x2a6528[_0x35cfaa(0x167)]=_0x3e7079;},_0x6cc3a3){const _0x5b5212=new _0x184938(_0x3b6ef3);_0x5b5212[_0x37e032(0x19d)](_0x36225d);const _0x591ab6=Array[_0x37e032(0x1a4)](_0x15cf55[_0x37e032(0x18c)](_0x5b5212,{'bind':!0x1})),_0x13c7a0=_0x15cf55[_0x37e032(0x197)][_0x37e032(0x174)](_0x37e032(0x1a1));_0x13c7a0[_0x37e032(0x183)](..._0x591ab6);const _0x168d5a=Array[_0x37e032(0x1a4)](_0x15cf55[_0x37e032(0x18b)](_0x13c7a0));_0x168d5a[_0x37e032(0x18d)]>0x1?_0x36225d[_0x37e032(0x19d)](_0x168d5a):_0x36225d=_0x168d5a[0x0];}}}if(_0x195f38[_0x37e032(0x17f)]){for(const [_0x245425,_0x3a8afd]of _0x195f38[_0x37e032(0x17f)])_0x36225d[_0x37e032(0x172)](_0x245425,_0x3a8afd);}const _0x47e42c=void 0x0===_0x195f38[_0x37e032(0x178)]?null:_0x195f38[_0x37e032(0x178)];return null!==_0x47e42c&&(_0x36225d[_0x37e032(0x195)]=()=>_0x47e42c),_0x36225d;}}[_0xfafc07(0x17d)](_0x4fd860){const _0x2e37ac=_0xfafc07,_0x82c6f9=JSON[_0x2e37ac(0x186)](_0x4fd860),_0x481950=this[_0x2e37ac(0x173)][_0x2e37ac(0x1aa)][_0x2e37ac(0x1a9)][_0x2e37ac(0x16a)],_0x92bd8f=new _0x184938(_0x481950,_0x82c6f9[_0x2e37ac(0x19e)](_0x5f3c0f=>this[_0x2e37ac(0x16c)](_0x5f3c0f,!0x0)));return this[_0x2e37ac(0x173)][_0x2e37ac(0x198)][_0x2e37ac(0x1a2)](_0x92bd8f);}[_0xfafc07(0x181)](_0x24cc45){const _0x358f33=_0xfafc07;return(_0x24cc45=_0x24cc45[_0x358f33(0x190)](_0x114388=>!_0x114388[_0x358f33(0x171)]||_0x358f33(0x166)!==_0x114388[_0x358f33(0x171)]&&_0x358f33(0x19f)!==_0x114388[_0x358f33(0x171)]))[_0x358f33(0x1a7)](_0xdcffd1=>{const _0x20c5f5=_0x358f33;_0x20c5f5(0x194)!=typeof _0xdcffd1&&(_0xdcffd1[_0x20c5f5(0x1a6)]=this[_0x20c5f5(0x181)](_0xdcffd1[_0x20c5f5(0x1a6)]),_0xdcffd1[_0x20c5f5(0x1ae)]=_0xdcffd1[_0x20c5f5(0x1ae)][_0x20c5f5(0x190)](_0x76d2dd=>!_0x76d2dd[0x0][_0x20c5f5(0x1a8)](_0x20c5f5(0x185))));}),_0x24cc45;}}