UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

24 lines • 9.41 kB
/* * 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 _0x240fcb=_0x2ec1;(function(_0xe55c0f,_0x522d04){const _0xe33f7b=_0x2ec1,_0x1e481e=_0xe55c0f();while(!![]){try{const _0x6530f5=-parseInt(_0xe33f7b(0x1d8))/0x1*(parseInt(_0xe33f7b(0x1b1))/0x2)+-parseInt(_0xe33f7b(0x1a0))/0x3*(-parseInt(_0xe33f7b(0x1c3))/0x4)+-parseInt(_0xe33f7b(0x1ba))/0x5*(parseInt(_0xe33f7b(0x1aa))/0x6)+-parseInt(_0xe33f7b(0x19b))/0x7+-parseInt(_0xe33f7b(0x1bc))/0x8*(parseInt(_0xe33f7b(0x1e4))/0x9)+-parseInt(_0xe33f7b(0x1c9))/0xa*(-parseInt(_0xe33f7b(0x1be))/0xb)+-parseInt(_0xe33f7b(0x19f))/0xc*(-parseInt(_0xe33f7b(0x1bd))/0xd);if(_0x6530f5===_0x522d04)break;else _0x1e481e['push'](_0x1e481e['shift']());}catch(_0x314187){_0x1e481e['push'](_0x1e481e['shift']());}}}(_0x1152,0x82185));function _0x1152(){const _0x91557b=['length','1803414bxwFcJ','previous','getFirstMarker','from','map','markers','decorate','isInContent','type','548510FGgxVz','getRange','8Wddlck','65yWjjlN','11BqrZud','getMultiRangeId','split','isIntersecting','getItems','12LQQuwd','creator','set','removeMarker','hasComments','_saved','2271290LEfLfY','getFirstRange','isExternal','add','onAccept','clear','delete','attributes','authoredAt','getContainedElement','change','filter','getRanges','removeAttribute','_onAttributesChange','1Cdsghw','addMarkerName','getAllAdjacentSuggestions','onDiscard','end','discard','reduce','suggestion:','_isDataLoaded','_model','addMarker','start','466857SVEAKG','accept','toJSON','isMultiRange','push','size','head','substr','nodeAfter','_onDiscard','onAttributesChange','1347745pRbkbU','data','removeMarkers','createdAt','4025772sAAEPB','213258gHjrHQ','get','isIntersectingWithRange','@external','getMarkerNames','subType','_markerNames','addRange','author','nodeBefore','24dxYleT','commentThread','_onAccept','next','getMarkers','setAttribute'];_0x1152=function(){return _0x91557b;};return _0x1152();}import{Element as _0x496a2c}from'ckeditor5/src/engine.js';import{ObservableMixin as _0x229d1d,uid as _0x5a4693}from'ckeditor5/src/utils.js';import{cloneDeep as _0x2270db,isEqual as _0x534f7c,set as _0x4f15b5,unset as _0x6c94eb}from'es-toolkit/compat';function _0x2ec1(_0x597042,_0x39ceba){const _0x11522c=_0x1152();return _0x2ec1=function(_0x2ec182,_0x117b33){_0x2ec182=_0x2ec182-0x192;let _0x3782d0=_0x11522c[_0x2ec182];return _0x3782d0;},_0x2ec1(_0x597042,_0x39ceba);}export default class o extends/* #__PURE__ -- @preserve */ _0x229d1d(){['id'];[_0x240fcb(0x1b9)];[_0x240fcb(0x1a5)];[_0x240fcb(0x1a8)];[_0x240fcb(0x1c4)];[_0x240fcb(0x1cb)];[_0x240fcb(0x19c)];[_0x240fcb(0x19e)];[_0x240fcb(0x1e0)]=!0x1;[_0x240fcb(0x1e1)];[_0x240fcb(0x1ac)];[_0x240fcb(0x199)];[_0x240fcb(0x1d7)];[_0x240fcb(0x1a6)];constructor(_0x32f4f1,_0x19b877){const _0x1989ab=_0x240fcb;super(),this['id']=_0x19b877['id'],this[_0x1989ab(0x1b9)]=_0x19b877[_0x1989ab(0x1b9)],this[_0x1989ab(0x1a5)]=_0x19b877[_0x1989ab(0x1a5)]||null,this[_0x1989ab(0x1a8)]=_0x19b877[_0x1989ab(0x1a8)],this[_0x1989ab(0x1c4)]=_0x19b877[_0x1989ab(0x1c4)]||_0x19b877[_0x1989ab(0x1a8)],this[_0x1989ab(0x1cb)]=Boolean(_0x19b877[_0x1989ab(0x1d0)]&&_0x19b877[_0x1989ab(0x1d0)][_0x1989ab(0x1a3)]),this[_0x1989ab(0x19c)]=null,this[_0x1989ab(0x1e1)]=_0x32f4f1,this[_0x1989ab(0x1ac)]=_0x19b877[_0x1989ab(0x1cd)],this[_0x1989ab(0x199)]=_0x19b877[_0x1989ab(0x1db)],this[_0x1989ab(0x1d7)]=_0x19b877[_0x1989ab(0x19a)],this[_0x1989ab(0x1a6)]=new Set(),this[_0x1989ab(0x19e)]=null,this[_0x1989ab(0x1c5)](_0x1989ab(0x1d1),null),this[_0x1989ab(0x1c5)](_0x1989ab(0x1d0),_0x19b877[_0x1989ab(0x1d0)]||{}),this[_0x1989ab(0x1c5)](_0x1989ab(0x1b2),null),this[_0x1989ab(0x1c5)](_0x1989ab(0x1ad),null),this[_0x1989ab(0x1c5)](_0x1989ab(0x1ab),null),this[_0x1989ab(0x1c5)](_0x1989ab(0x1c8),!0x1),this[_0x1989ab(0x1b7)](_0x1989ab(0x1e5)),this[_0x1989ab(0x1b7)](_0x1989ab(0x1dd));}get[_0x240fcb(0x196)](){const _0x26c925=_0x240fcb;let _0x2e54df=this;for(;_0x2e54df[_0x26c925(0x1b2)];)_0x2e54df=_0x2e54df[_0x26c925(0x1b2)];return _0x2e54df;}get[_0x240fcb(0x1c7)](){const _0x26f398=_0x240fcb;return!!this[_0x26f398(0x1ab)]&&this[_0x26f398(0x1ab)][_0x26f398(0x1b0)]>0x0;}get[_0x240fcb(0x193)](){const _0x4e245b=_0x240fcb;if(0x0==this[_0x4e245b(0x1a6)][_0x4e245b(0x195)])return!0x1;return 0x6==Array[_0x4e245b(0x1b4)](this[_0x4e245b(0x1a6)])[0x0][_0x4e245b(0x1c0)](':')[_0x4e245b(0x1b0)];}get[_0x240fcb(0x1b8)](){const _0x59d71d=_0x240fcb;return null!==this[_0x59d71d(0x1b3)]();}[_0x240fcb(0x1d9)](_0x133e0b){const _0x23bdb2=_0x240fcb;this[_0x23bdb2(0x1a6)][_0x23bdb2(0x1cc)](_0x133e0b);}[_0x240fcb(0x1a4)](){const _0x1512ee=_0x240fcb;return Array[_0x1512ee(0x1b4)](this[_0x1512ee(0x1a6)]);}[_0x240fcb(0x1ae)](){const _0x2cc08f=_0x240fcb;return this[_0x2cc08f(0x1a4)]()[_0x2cc08f(0x1b5)](_0x17f87e=>this[_0x2cc08f(0x1e1)][_0x2cc08f(0x1b6)][_0x2cc08f(0x1a1)](_0x17f87e))[_0x2cc08f(0x1d4)](_0x3adfa3=>_0x3adfa3);}[_0x240fcb(0x1b3)](){const _0x501919=_0x240fcb;return this[_0x501919(0x1ae)]()[0x0]||null;}[_0x240fcb(0x19d)](){const _0x519af5=_0x240fcb;this[_0x519af5(0x1e1)][_0x519af5(0x1d3)](_0x294fde=>{const _0x20d94d=_0x519af5;for(const _0xe56424 of this[_0x20d94d(0x1ae)]())_0x294fde[_0x20d94d(0x1c6)](_0xe56424);}),this[_0x519af5(0x1a6)][_0x519af5(0x1ce)]();}[_0x240fcb(0x1c6)](_0x432c1f){const _0x5bd002=_0x240fcb;this[_0x5bd002(0x1e1)][_0x5bd002(0x1d3)](_0x48e12d=>{const _0x39ed11=_0x5bd002;_0x48e12d[_0x39ed11(0x1c6)](_0x432c1f);}),this[_0x5bd002(0x1a6)][_0x5bd002(0x1cf)](_0x432c1f);}[_0x240fcb(0x1a7)](_0x49ef7c){const _0x162eb4=_0x240fcb,_0x281423=_0x162eb4(0x1df)+this[_0x162eb4(0x1b9)]+':'+this[_0x162eb4(0x1a5)]+':'+this['id']+':'+this[_0x162eb4(0x1c4)]['id']+':'+o[_0x162eb4(0x1bf)]();this[_0x162eb4(0x1d9)](_0x281423),this[_0x162eb4(0x1e1)][_0x162eb4(0x1d3)](_0x2f9aa5=>{const _0x3f3170=_0x162eb4;_0x2f9aa5[_0x3f3170(0x1e2)](_0x281423,{'range':_0x49ef7c,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x240fcb(0x1a2)](_0x4bec55){const _0x527bd1=_0x240fcb;for(const _0x25bc13 of this[_0x527bd1(0x1d5)]())if(_0x25bc13[_0x527bd1(0x1c1)](_0x4bec55))return!0x0;return!0x1;}[_0x240fcb(0x1d5)](){const _0x572332=_0x240fcb;return this[_0x572332(0x1ae)]()[_0x572332(0x1b5)](_0x5d5dd2=>_0x5d5dd2[_0x572332(0x1bb)]());}[_0x240fcb(0x1c2)](){const _0x352345=_0x240fcb;return this[_0x352345(0x1d5)]()[_0x352345(0x1de)]((_0x57b2c4,_0x143572)=>[..._0x57b2c4,..._0x143572[_0x352345(0x1c2)]()],[]);}[_0x240fcb(0x1ca)](){const _0x48c058=_0x240fcb;return this[_0x48c058(0x1b3)]()?.[_0x48c058(0x1bb)]()||null;}[_0x240fcb(0x1d2)](){const _0x6c96c6=_0x240fcb,_0x2a677a=this[_0x6c96c6(0x1d5)]();if(0x1!=_0x2a677a[_0x6c96c6(0x1b0)])return null;const _0x46de17=_0x2a677a[0x0],_0x463909=_0x46de17[_0x6c96c6(0x1e3)][_0x6c96c6(0x198)],_0x4ad8e0=_0x46de17[_0x6c96c6(0x1dc)][_0x6c96c6(0x1a9)];return _0x463909 instanceof _0x496a2c?_0x463909!=_0x4ad8e0?null:_0x463909:null;}[_0x240fcb(0x1e5)](){const _0x588076=_0x240fcb;this[_0x588076(0x1ac)](this[_0x588076(0x1d5)](),this[_0x588076(0x19c)],this[_0x588076(0x1d0)]),this[_0x588076(0x19d)]();}[_0x240fcb(0x1dd)](){const _0x1de271=_0x240fcb;this[_0x1de271(0x199)](this[_0x1de271(0x1d5)](),this[_0x1de271(0x19c)],this[_0x1de271(0x1d0)]),this[_0x1de271(0x19d)]();}[_0x240fcb(0x1da)](){const _0x52075e=_0x240fcb,_0x28822d=[];let _0x360cc8=this[_0x52075e(0x196)];for(;_0x360cc8;)_0x28822d[_0x52075e(0x194)](_0x360cc8),_0x360cc8=_0x360cc8[_0x52075e(0x1ad)];return _0x28822d;}[_0x240fcb(0x1af)](_0x5500ba,_0x1d8998){const _0x43d3ed=_0x240fcb,_0x53522=_0x2270db(this[_0x43d3ed(0x1d0)]);_0x4f15b5(_0x53522,_0x5500ba,_0x1d8998),_0x534f7c(_0x53522,this[_0x43d3ed(0x1d0)])||(this[_0x43d3ed(0x1d0)]=_0x53522,this[_0x43d3ed(0x1d7)](_0x53522));}[_0x240fcb(0x1d6)](_0x457950){const _0x2e6dc9=_0x240fcb,_0x230c60=_0x2270db(this[_0x2e6dc9(0x1d0)]);_0x6c94eb(_0x230c60,_0x457950),_0x534f7c(_0x230c60,this[_0x2e6dc9(0x1d0)])||(this[_0x2e6dc9(0x1d0)]=_0x230c60,this[_0x2e6dc9(0x1d7)](this[_0x2e6dc9(0x1d0)]));}[_0x240fcb(0x192)](){const _0x5d6dfa=_0x240fcb;return{'id':this['id'],'type':this[_0x5d6dfa(0x1a5)]?this[_0x5d6dfa(0x1b9)]+':'+this[_0x5d6dfa(0x1a5)]:this[_0x5d6dfa(0x1b9)],'authorId':this[_0x5d6dfa(0x1c4)]['id'],'createdAt':this[_0x5d6dfa(0x19e)],'hasComments':this[_0x5d6dfa(0x1c7)],'data':this[_0x5d6dfa(0x19c)],'attributes':this[_0x5d6dfa(0x1d0)]};}static[_0x240fcb(0x1bf)](){const _0x211f89=_0x240fcb;return _0x5a4693()[_0x211f89(0x197)](0x1,0x5);}}