UNPKG

@ckeditor/ckeditor5-real-time-collaboration

Version:

A set of CKEditor 5 features enabling real-time collaboration within the editor using CKEditor Cloud Services.

24 lines • 37.4 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 _0xe0519b=_0x34bc;(function(_0x10f11b,_0x183fc1){const _0x232087=_0x34bc,_0x59fe8e=_0x10f11b();while(!![]){try{const _0x4a8f80=-parseInt(_0x232087(0x219))/0x1*(parseInt(_0x232087(0x18c))/0x2)+parseInt(_0x232087(0x1d5))/0x3+parseInt(_0x232087(0x171))/0x4*(parseInt(_0x232087(0x194))/0x5)+-parseInt(_0x232087(0x1a8))/0x6*(-parseInt(_0x232087(0x23b))/0x7)+parseInt(_0x232087(0x18f))/0x8*(-parseInt(_0x232087(0x1f1))/0x9)+parseInt(_0x232087(0x228))/0xa*(-parseInt(_0x232087(0x1e8))/0xb)+parseInt(_0x232087(0x237))/0xc*(parseInt(_0x232087(0x1bb))/0xd);if(_0x4a8f80===_0x183fc1)break;else _0x59fe8e['push'](_0x59fe8e['shift']());}catch(_0x493945){_0x59fe8e['push'](_0x59fe8e['shift']());}}}(_0x3300,0xc7b43));import{Plugin as _0x40c0be,PendingActions as _0x282206}from'ckeditor5/src/core.js';import{CKEditorError as _0x3b39b4,version as _0x5e98a7,uid as _0x2ff451}from'ckeditor5/src/utils.js';import{Notification as _0x2ca677}from'ckeditor5/src/ui.js';import{transformOperationSets as _0x5237f5,NoOperation as _0x21af05,InsertOperation as _0x2fc6c0,MarkerOperation as _0x5a1137,RootAttributeOperation as _0x49c7b1,OperationFactory as _0x36fc84,History as _0xc1ea5d}from'ckeditor5/src/engine.js';import{WebSocketGateway as _0x52e86}from'./websocketgateway.js';import{Sessions as _0x49d947}from'./sessions.js';import{UserMarkers as _0x36c06e}from'./usermarkers.js';import{getTranslation as _0x4f1b52}from'../common-translations.js';import{Compressor as _0x34ca56}from'@ckeditor/ckeditor5-operations-compressor';import{Users as _0xf72583}from'ckeditor5-collaboration/src/collaboration-core.js';import{User as _0x3ad33f,CollaborativeEditingService as _0xdd9628}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';let Q=0x1;class l extends _0x40c0be{static [_0xe0519b(0x225)]=/* #__PURE__ -- @preserve */ ((()=>_0xdd9628)());[_0xe0519b(0x230)];[_0xe0519b(0x166)];[_0xe0519b(0x23f)];[_0xe0519b(0x1fa)];[_0xe0519b(0x1d6)];[_0xe0519b(0x167)];[_0xe0519b(0x19a)];[_0xe0519b(0x1a6)];[_0xe0519b(0x224)];[_0xe0519b(0x1ef)];[_0xe0519b(0x15a)];[_0xe0519b(0x1d1)];[_0xe0519b(0x1cc)];[_0xe0519b(0x1be)];[_0xe0519b(0x20e)];[_0xe0519b(0x168)];[_0xe0519b(0x1ed)];[_0xe0519b(0x21f)];static get[_0xe0519b(0x222)](){return[_0x52e86,_0x49d947,_0x36c06e,_0x282206,_0xf72583,_0x2ca677];}static get[_0xe0519b(0x255)](){const _0x4d3b72=_0xe0519b;return _0x4d3b72(0x215);}static get[_0xe0519b(0x22b)](){return!0x0;}static get[_0xe0519b(0x163)](){return!0x0;}get[_0xe0519b(0x220)](){const _0x2b570d=_0xe0519b;return this[_0x2b570d(0x17e)]+this[_0x2b570d(0x230)];}get[_0xe0519b(0x17e)](){const _0x47287f=_0xe0519b;return this[_0x47287f(0x23f)][_0x47287f(0x1eb)]-this[_0x47287f(0x230)];}get[_0xe0519b(0x1aa)](){const _0x2e2e80=_0xe0519b,_0x166fe7=this[_0x2e2e80(0x23f)][_0x2e2e80(0x1f8)]();for(let _0x2f6173=_0x166fe7[_0x2e2e80(0x1e7)]-0x1;_0x2f6173>=0x0;_0x2f6173--){const _0x497cfa=_0x166fe7[_0x2f6173];if(!this[_0x2e2e80(0x1ed)][_0x2e2e80(0x1da)](_0x497cfa))return _0x497cfa[_0x2e2e80(0x1ff)]+0x1-this[_0x2e2e80(0x230)];}return 0x0;}constructor(_0x563fde){const _0x3e3e2b=_0xe0519b;if(super(_0x563fde),this[_0x3e3e2b(0x230)]=0x0,this[_0x3e3e2b(0x166)]=null,this[_0x3e3e2b(0x23f)]=new _0xc1ea5d(),this[_0x3e3e2b(0x1ba)][_0x3e3e2b(0x15c)][_0x3e3e2b(0x17c)](_0x3e3e2b(0x195),{}),this[_0x3e3e2b(0x1fa)]=this[_0x3e3e2b(0x1ba)][_0x3e3e2b(0x15c)][_0x3e3e2b(0x1c4)](_0x3e3e2b(0x1c2)),!this[_0x3e3e2b(0x1fa)])throw new _0x3b39b4(_0x3e3e2b(0x1b9),this);const _0x28d116=_0x563fde[_0x3e3e2b(0x15c)][_0x3e3e2b(0x1c4)](_0x3e3e2b(0x1d4))||_0x5e98a7;this[_0x3e3e2b(0x1d6)]=new l[(_0x3e3e2b(0x225))](_0x28d116,this[_0x3e3e2b(0x1fa)]),this[_0x3e3e2b(0x167)]=this[_0x3e3e2b(0x1ba)][_0x3e3e2b(0x1ee)][_0x3e3e2b(0x1fd)],this[_0x3e3e2b(0x19a)]=new _0x34ca56(),this[_0x3e3e2b(0x1a6)]=[],this[_0x3e3e2b(0x224)]=new WeakSet(),this[_0x3e3e2b(0x1ef)]=new Set(),this[_0x3e3e2b(0x16f)](_0x3e3e2b(0x1b7),!0x1),this[_0x3e3e2b(0x16f)](_0x3e3e2b(0x1fc),!0x1),this[_0x3e3e2b(0x15a)]=null,this[_0x3e3e2b(0x1d1)]=!0x1,this[_0x3e3e2b(0x1cc)]=null,this[_0x3e3e2b(0x1be)]=0x12c,this[_0x3e3e2b(0x20e)]=this[_0x3e3e2b(0x1be)],this[_0x3e3e2b(0x168)]=null,this[_0x3e3e2b(0x1ed)]=new WeakSet(),this[_0x3e3e2b(0x21f)]=new Z(this[_0x3e3e2b(0x1ed)]);}[_0xe0519b(0x212)](){const _0x4de95b=_0xe0519b,_0x43b1ce=this[_0x4de95b(0x1ba)],_0x369528=_0x43b1ce[_0x4de95b(0x158)][_0x4de95b(0x1c4)](_0xf72583),_0x5ef239=_0x43b1ce[_0x4de95b(0x158)][_0x4de95b(0x1c4)](_0x52e86);this[_0x4de95b(0x1dc)](_0x369528,_0x4de95b(0x1c9),(_0x4a29fe,_0x20203f)=>{const _0x9a2880=_0x4de95b,_0x2049f2=_0x20203f[0x0];_0x2049f2[_0x9a2880(0x210)]&&(_0x4a29fe[_0x9a2880(0x186)]=_0x369528[_0x9a2880(0x25a)](_0x2049f2[_0x9a2880(0x210)]),_0x4a29fe[_0x9a2880(0x1e1)]()),null===_0x2049f2[_0x9a2880(0x210)]&&(_0x4a29fe[_0x9a2880(0x186)]=null,_0x4a29fe[_0x9a2880(0x1e1)]());},{'priority':_0x4de95b(0x199)}),this[_0x4de95b(0x1dc)](_0x43b1ce[_0x4de95b(0x1ee)][_0x4de95b(0x1fd)][_0x4de95b(0x175)],_0x4de95b(0x249),(_0x18e009,_0x239027)=>{const _0x5b6d38=_0x4de95b;_0x239027[_0x5b6d38(0x157)]&&this[_0x5b6d38(0x1de)]();}),this[_0x4de95b(0x1dc)](_0x43b1ce[_0x4de95b(0x18d)][_0x4de95b(0x20d)],_0x4de95b(0x1cf),()=>{const _0x5c4fe5=_0x4de95b;this[_0x5c4fe5(0x1de)]();}),this[_0x4de95b(0x259)](),_0x43b1ce[_0x4de95b(0x1ee)]['on'](_0x4de95b(0x245),(_0x41efce,_0x3aa8cd)=>{const _0x10376c=_0x4de95b,_0x51caf6=_0x3aa8cd[0x0];_0x51caf6[_0x10376c(0x21a)]&&(this[_0x10376c(0x1c6)](_0x51caf6),this[_0x10376c(0x17d)]()&&this[_0x10376c(0x241)]());}),this[_0x4de95b(0x1d7)](),this[_0x4de95b(0x240)](_0x4de95b(0x22c))['to'](_0x5ef239,_0x4de95b(0x204),this,_0x4de95b(0x1fc),(_0x593355,_0x184402)=>_0x4de95b(0x239)===_0x593355&&!_0x184402),this['on'](_0x4de95b(0x23d),()=>{const _0x24d8b6=_0x4de95b;this[_0x24d8b6(0x22c)]?_0x43b1ce[_0x24d8b6(0x1bd)](_0x24d8b6(0x1ca)):_0x43b1ce[_0x24d8b6(0x233)](_0x24d8b6(0x1ca));}),this[_0x4de95b(0x22c)]?_0x43b1ce[_0x4de95b(0x1bd)](_0x4de95b(0x1ca)):_0x43b1ce[_0x4de95b(0x233)](_0x4de95b(0x1ca)),this[_0x4de95b(0x16f)](_0x4de95b(0x161),!0x1);}async[_0xe0519b(0x207)](){const _0x5eebeb=_0xe0519b,_0x3066e7=this[_0x5eebeb(0x1ba)][_0x5eebeb(0x158)][_0x5eebeb(0x1c4)](_0x49d947),_0xc2f55e=this[_0x5eebeb(0x1ba)][_0x5eebeb(0x158)][_0x5eebeb(0x1c4)](_0x52e86);try{this[_0x5eebeb(0x1b7)]=!0x0,_0x3066e7[_0x5eebeb(0x197)](this[_0x5eebeb(0x1fa)]);const _0x930bd5=await this[_0x5eebeb(0x1d6)][_0x5eebeb(0x207)](_0xc2f55e[_0x5eebeb(0x246)],this[_0x5eebeb(0x1aa)]);await this[_0x5eebeb(0x217)](_0x930bd5)&&(this[_0x5eebeb(0x1b7)]=!0x1,this[_0x5eebeb(0x205)]());const _0x31b073=await this[_0x5eebeb(0x1d6)][_0x5eebeb(0x213)]();_0x3066e7[_0x5eebeb(0x173)](this[_0x5eebeb(0x1fa)],_0x31b073),this[_0x5eebeb(0x22a)](),this[_0x5eebeb(0x161)]=!0x0;}catch(_0x18135c){if(function(_0x79d480){const _0x59c6fc=_0x5eebeb;return _0x59c6fc(0x1e9)===_0x79d480[_0x59c6fc(0x18e)];}(_0x18135c)&&this[_0x5eebeb(0x166)])await this[_0x5eebeb(0x214)]();else{if(function(_0x55e682){const _0x375820=_0x5eebeb;return _0x375820(0x1b3)===_0x55e682[_0x375820(0x18e)];}(_0x18135c)){const _0x48ace1=_0x4f1b52(this[_0x5eebeb(0x1ba)][_0x5eebeb(0x22e)],_0x5eebeb(0x176));this[_0x5eebeb(0x16a)](_0x48ace1);}else{if(!(_0x18135c instanceof X))throw _0x18135c;this[_0x5eebeb(0x16a)]();}}}}[_0xe0519b(0x21b)](){const _0x37b3d0=_0xe0519b,_0x5d77f2=this[_0x37b3d0(0x1ba)][_0x37b3d0(0x158)][_0x37b3d0(0x1c4)](_0x52e86),_0x5d7fa4=this[_0x37b3d0(0x1ba)][_0x37b3d0(0x158)][_0x37b3d0(0x1c4)](_0x49d947);this[_0x37b3d0(0x1ba)][_0x37b3d0(0x233)](_0x37b3d0(0x19f)),_0x5d7fa4[_0x37b3d0(0x22f)][_0x37b3d0(0x1da)](this[_0x37b3d0(0x1fa)])&&_0x5d7fa4[_0x37b3d0(0x197)](this[_0x37b3d0(0x1fa)]),_0x5d77f2[_0x37b3d0(0x169)](this),this[_0x37b3d0(0x226)](),super[_0x37b3d0(0x21b)]();}async[_0xe0519b(0x217)](_0x29a9aa){const _0x1942d1=_0xe0519b;if(this[_0x1942d1(0x166)]!==_0x29a9aa[_0x1942d1(0x166)]&&this[_0x1942d1(0x168)]!==_0x29a9aa[_0x1942d1(0x23a)])throw new X();return this[_0x1942d1(0x166)]=_0x29a9aa[_0x1942d1(0x166)],this[_0x1942d1(0x190)]([],{..._0x29a9aa,'wereChangesApplied':!0x1,'data':_0x29a9aa[_0x1942d1(0x234)]},_0x1942d1(0x207));}async[_0xe0519b(0x1e4)](_0x5e8b6c,_0x4da091=!0x1){const _0x4e0a72=_0xe0519b,{connection:_0x1ef003}=this[_0x4e0a72(0x1ba)][_0x4e0a72(0x158)][_0x4e0a72(0x1c4)](_0x52e86);l[_0x4e0a72(0x225)][_0x4e0a72(0x213)](_0x1ef003,this[_0x4e0a72(0x1fa)])[_0x4e0a72(0x238)](_0x334775=>this[_0x4e0a72(0x1c0)](_0x334775))[_0x4e0a72(0x1af)](_0x2a6859=>{const _0x17dac7=_0x4e0a72;this[_0x17dac7(0x251)](_0x17dac7(0x1a4),_0x2a6859);}),this[_0x4e0a72(0x1dc)](this[_0x4e0a72(0x1d6)],_0x4e0a72(0x192),this[_0x4e0a72(0x1ea)][_0x4e0a72(0x240)](this)),this[_0x4e0a72(0x1dc)](this[_0x4e0a72(0x1d6)],_0x4e0a72(0x16e),(_0x701a9e,_0x981547)=>{const _0x4e3969=_0x4e0a72;this[_0x4e3969(0x251)](_0x4e3969(0x25d),_0x981547);}),this[_0x4e0a72(0x1dc)](this[_0x4e0a72(0x1d6)],_0x4e0a72(0x198),()=>{const _0x518591=_0x4e0a72;this[_0x518591(0x161)]=!0x1;});const _0x337cea=this[_0x4e0a72(0x21f)][_0x4e0a72(0x187)](_0x5e8b6c);this[_0x4e0a72(0x1b7)]=!0x0;const _0xa26447=await this[_0x4e0a72(0x1d6)][_0x4e0a72(0x164)](_0x1ef003,this[_0x4e0a72(0x23e)](_0x5e8b6c),_0x337cea);if(this[_0x4e0a72(0x166)]=_0xa26447[_0x4e0a72(0x166)],_0x4da091){if(!_0xa26447[_0x4e0a72(0x1a9)])return void this[_0x4e0a72(0x16a)]();this[_0x4e0a72(0x1b7)]=!0x1,this[_0x4e0a72(0x205)](),this[_0x4e0a72(0x23f)][_0x4e0a72(0x209)](),this[_0x4e0a72(0x230)]=_0xa26447[_0x4e0a72(0x188)],this[_0x4e0a72(0x23f)][_0x4e0a72(0x1eb)]=this[_0x4e0a72(0x230)],await this[_0x4e0a72(0x190)](_0x5e8b6c,_0xa26447,_0x4e0a72(0x21d));}else await this[_0x4e0a72(0x1a7)](_0xa26447,_0x5e8b6c);this[_0x4e0a72(0x22a)](),this[_0x4e0a72(0x161)]=!0x0;}[_0xe0519b(0x22a)](){const _0x37e96c=_0xe0519b,_0x3a8a9b=this[_0x37e96c(0x1ba)][_0x37e96c(0x158)][_0x37e96c(0x1c4)](_0x49d947),_0x1dccc8=this[_0x37e96c(0x1ba)][_0x37e96c(0x158)][_0x37e96c(0x1c4)](_0x36c06e),_0x247053=_0x3a8a9b[_0x37e96c(0x22f)][_0x37e96c(0x1c4)](this[_0x37e96c(0x1fa)]);_0x247053&&_0x247053[_0x37e96c(0x1e7)]>0x1?_0x1dccc8[_0x37e96c(0x1d8)]():this[_0x37e96c(0x1dc)](_0x3a8a9b,_0x37e96c(0x1ec)+this[_0x37e96c(0x1fa)],()=>{const _0x6f109a=_0x37e96c;0x2===_0x3a8a9b[_0x6f109a(0x22f)][_0x6f109a(0x1c4)](this[_0x6f109a(0x1fa)])[_0x6f109a(0x1e7)]&&_0x1dccc8[_0x6f109a(0x1d8)]();});}async[_0xe0519b(0x1ea)](_0x54ca49,_0x4be32a,_0x3594d7,_0x4930ac){const _0x44e02f=_0xe0519b;if(!this[_0x44e02f(0x1b7)]&&this[_0x44e02f(0x167)][_0x44e02f(0x1eb)]==_0x4be32a){const _0x31c6fd=this[_0x44e02f(0x160)](_0x3594d7,_0x4930ac);await this[_0x44e02f(0x229)](_0x31c6fd),this[_0x44e02f(0x1fe)](_0x31c6fd,_0x4be32a,_0x3594d7[_0x44e02f(0x23a)])||this[_0x44e02f(0x251)](_0x44e02f(0x181));}}async[_0xe0519b(0x214)](){const _0x1ee751=_0xe0519b;this[_0x1ee751(0x226)]();const {locale:_0x1cd3b2}=this[_0x1ee751(0x1ba)];let _0x54a39b;try{_0x54a39b=await this[_0x1ee751(0x1d6)][_0x1ee751(0x19e)]();}catch{const _0x389cf7=_0x4f1b52(_0x1cd3b2,_0x1ee751(0x1c7));return void this[_0x1ee751(0x16a)](_0x389cf7);}const _0x97d026=_0x54a39b[_0x1ee751(0x165)]||_0x54a39b[_0x1ee751(0x242)];if(this[_0x1ee751(0x168)]!==_0x97d026[_0x1ee751(0x23a)]){const _0xdb81e1=_0x4f1b52(_0x1cd3b2,_0x1ee751(0x24d));return void this[_0x1ee751(0x16a)](_0xdb81e1);}await this[_0x1ee751(0x1e4)](this[_0x1ee751(0x1ba)][_0x1ee751(0x1ee)][_0x1ee751(0x1fd)][_0x1ee751(0x159)][_0x1ee751(0x1f8)](),!0x0);}[_0xe0519b(0x226)](){const _0x307f3d=_0xe0519b;this[_0x307f3d(0x1d6)][_0x307f3d(0x1a3)](),this[_0x307f3d(0x1a6)]=[],clearTimeout(this[_0x307f3d(0x1cc)]),this[_0x307f3d(0x15f)](this[_0x307f3d(0x1d6)]);}[_0xe0519b(0x1c0)](_0x200171){const _0x17d2d0=_0xe0519b,_0x20dde0=this[_0x17d2d0(0x1ba)][_0x17d2d0(0x158)][_0x17d2d0(0x1c4)](_0x49d947);this[_0x17d2d0(0x1dc)](_0x20dde0,_0x17d2d0(0x1ec)+this[_0x17d2d0(0x1fa)],(_0x3e59f0,{session:_0x29a3be})=>{const _0x4421f3=_0x17d2d0;if(_0x29a3be['id']===_0x20dde0[_0x4421f3(0x25c)]){_0x3e59f0[_0x4421f3(0x1ae)]();const _0x13a02e=this[_0x4421f3(0x1ba)][_0x4421f3(0x158)][_0x4421f3(0x1da)](_0x4421f3(0x1f3))&&this[_0x4421f3(0x1ba)][_0x4421f3(0x158)][_0x4421f3(0x1c4)](_0x4421f3(0x1f3));let _0x5c8976=_0x29a3be[_0x4421f3(0x18a)];_0x13a02e&&_0x13a02e[_0x4421f3(0x201)]&&(_0x5c8976=_0x5c8976[_0x4421f3(0x227)](_0x114617=>_0x4421f3(0x1f6)!==_0x114617)),this[_0x4421f3(0x1ba)][_0x4421f3(0x158)][_0x4421f3(0x1c4)](_0x4421f3(0x24a))[_0x4421f3(0x247)](_0x5c8976,this[_0x4421f3(0x1fa)]);}}),_0x20dde0[_0x17d2d0(0x173)](this[_0x17d2d0(0x1fa)],_0x200171);}[_0xe0519b(0x259)](){const _0x38993a=_0xe0519b,_0x2d7f8e=this[_0x38993a(0x1ba)][_0x38993a(0x234)][_0x38993a(0x16f)];this[_0x38993a(0x1ba)][_0x38993a(0x234)][_0x38993a(0x16f)]=(..._0x461206)=>{const _0x1116d2=_0x38993a;if(!_0x461206[_0x461206[_0x1116d2(0x1e7)]-0x1][_0x1116d2(0x1b8)])throw new _0x3b39b4(_0x1116d2(0x1db),this);_0x2d7f8e[_0x1116d2(0x17b)](this[_0x1116d2(0x1ba)][_0x1116d2(0x234)],_0x461206);};}[_0xe0519b(0x1d7)](){const _0x5e37f1=_0xe0519b;this[_0x5e37f1(0x1ba)][_0x5e37f1(0x234)]['on'](_0x5e37f1(0x212),(_0x11b1a1,[_0x36cabb])=>{const _0x4510f3=_0x5e37f1;if(this[_0x4510f3(0x167)][_0x4510f3(0x1eb)])throw new _0x3b39b4(_0x4510f3(0x25b),this);_0x11b1a1[_0x4510f3(0x1e1)](),this[_0x4510f3(0x1cd)]();const _0x51e456=this[_0x4510f3(0x1ba)][_0x4510f3(0x15c)][_0x4510f3(0x1c4)](_0x4510f3(0x18b)),_0x290c6e=this[_0x4510f3(0x216)](_0x36cabb,_0x51e456);0x0==_0x290c6e[_0x4510f3(0x1e7)]&&_0x290c6e[_0x4510f3(0x24c)](new _0x21af05(0x0)),_0x11b1a1[_0x4510f3(0x186)]=this[_0x4510f3(0x1e4)](_0x290c6e)[_0x4510f3(0x238)](()=>{const _0x4da691=_0x4510f3;this[_0x4da691(0x1ba)][_0x4da691(0x158)][_0x4da691(0x1c4)](_0x52e86)[_0x4da691(0x1e0)](this),this[_0x4da691(0x1ba)][_0x4da691(0x234)][_0x4da691(0x15d)](_0x4da691(0x180));})[_0x4510f3(0x1af)](_0x298be2=>this[_0x4510f3(0x251)](_0x4510f3(0x1b5),_0x298be2))[_0x4510f3(0x19b)](()=>this[_0x4510f3(0x205)]());},{'priority':_0x5e37f1(0x199)}),this[_0x5e37f1(0x1ba)]['on'](_0x5e37f1(0x208),async(_0x9a264,[_0x21b04d,_0x406b56])=>{const _0xfc1112=_0x5e37f1;_0x9a264[_0xfc1112(0x1e1)]();const _0x1e72ac=this[_0xfc1112(0x1ba)][_0xfc1112(0x1ee)][_0xfc1112(0x1fd)][_0xfc1112(0x1f4)](_0x21b04d);if(!this[_0xfc1112(0x1ef)][_0xfc1112(0x1da)](_0x21b04d)){const _0x377a80=_0x406b56&&_0x406b56[_0xfc1112(0x234)]?_0x406b56[_0xfc1112(0x234)]:'',_0x56f4d4=_0x406b56&&_0x406b56[_0xfc1112(0x1e5)]?_0x406b56[_0xfc1112(0x1e5)]:{};await this[_0xfc1112(0x248)](_0x21b04d,_0x377a80,_0x56f4d4);}this[_0xfc1112(0x1ba)][_0xfc1112(0x1ee)][_0xfc1112(0x1fb)]({'isUndoable':!0x1},()=>{const _0x55d406=_0xfc1112;_0x1e72ac[_0x55d406(0x191)]=!0x0,this[_0x55d406(0x1ba)][_0x55d406(0x1ee)][_0x55d406(0x1fd)][_0x55d406(0x184)][_0x55d406(0x243)](_0x1e72ac);});},{'priority':_0x5e37f1(0x199)});}async[_0xe0519b(0x229)](_0x2141b6){const _0x5db0a1=_0xe0519b,_0x5e460d=this[_0x5db0a1(0x1ba)][_0x5db0a1(0x158)][_0x5db0a1(0x1c4)](_0xf72583),{connection:_0x964605}=this[_0x5db0a1(0x1ba)][_0x5db0a1(0x158)][_0x5db0a1(0x1c4)](_0x52e86),_0x41ee81=new Set();for(const _0x1a88ba of _0x2141b6){const _0x573673=_0x1a88ba[_0x5db0a1(0x210)];_0x573673&&!_0x5e460d[_0x5db0a1(0x25a)](_0x573673)&&_0x41ee81[_0x5db0a1(0x1bc)](_0x573673);}if(0x0===_0x41ee81[_0x5db0a1(0x231)])return;const _0x4aef82=await _0x3ad33f[_0x5db0a1(0x258)](_0x964605,Array[_0x5db0a1(0x162)](_0x41ee81));for(const _0x1a22af of _0x4aef82)_0x5e460d[_0x5db0a1(0x25a)](_0x1a22af['id'])||_0x5e460d[_0x5db0a1(0x196)](_0x1a22af);}[_0xe0519b(0x216)](_0x549017,_0x2cc445={}){const _0x39f3ca=_0xe0519b,_0x442264=this[_0x39f3ca(0x1ba)][_0x39f3ca(0x1ee)],_0x594434=[];let _0x339c5e=0x0;const _0x3a504e=_0x39f3ca(0x253)==typeof _0x549017?{'main':_0x549017}:_0x549017;for(const _0x3da2ee of Object[_0x39f3ca(0x15e)](_0x3a504e)){if(!this[_0x39f3ca(0x167)][_0x39f3ca(0x1b4)][_0x39f3ca(0x1da)](_0x3da2ee))throw new _0x3b39b4(_0x39f3ca(0x211),this);const _0x3f0e48=this[_0x39f3ca(0x1ba)][_0x39f3ca(0x234)][_0x39f3ca(0x1b6)](_0x3a504e[_0x3da2ee]),_0x2ae2de=this[_0x39f3ca(0x167)][_0x39f3ca(0x1f4)](_0x3da2ee),_0x2dd9c9=new _0x2fc6c0(_0x442264[_0x39f3ca(0x170)](_0x2ae2de,0x0),_0x3f0e48,_0x339c5e++);_0x594434[_0x39f3ca(0x24c)](_0x2dd9c9);for(const [_0xb8dc9a,_0x5e4b79]of _0x3f0e48[_0x39f3ca(0x16b)]){const _0x7917d1=_0x442264[_0x39f3ca(0x19d)](_0x442264[_0x39f3ca(0x172)](_0x2ae2de,_0x5e4b79[_0x39f3ca(0x1f9)][_0x39f3ca(0x185)][_0x39f3ca(0x221)]()),_0x442264[_0x39f3ca(0x172)](_0x2ae2de,_0x5e4b79[_0x39f3ca(0x1b0)][_0x39f3ca(0x185)][_0x39f3ca(0x221)]())),_0x486a0d=new _0x5a1137(_0xb8dc9a,null,_0x7917d1,_0x442264[_0x39f3ca(0x16b)],!0x0,_0x339c5e++);_0x594434[_0x39f3ca(0x24c)](_0x486a0d);}}if(_0x2cc445)for(const [_0x16d9b6,_0x1fafed]of Object[_0x39f3ca(0x1b1)](_0x2cc445)){const _0x3c6c80=_0x442264[_0x39f3ca(0x1fd)][_0x39f3ca(0x1f4)](_0x16d9b6);if(!_0x3c6c80)throw new _0x3b39b4(_0x39f3ca(0x20c),null);for(const [_0x41dcef,_0x152437]of Object[_0x39f3ca(0x1b1)](_0x1fafed))if(null!==_0x152437){const _0x4eaf72=new _0x49c7b1(_0x3c6c80,_0x41dcef,null,_0x152437,_0x339c5e++);_0x594434[_0x39f3ca(0x24c)](_0x4eaf72);}}return _0x594434;}async[_0xe0519b(0x248)](_0x102eba,_0x599209,_0x47b16a){const _0x59c71a=_0xe0519b;this[_0x59c71a(0x216)]({[_0x102eba]:_0x599209},{[_0x102eba]:_0x47b16a})[_0x59c71a(0x20a)]((_0x324c93,_0x17ca0c)=>{const _0x409a45=_0x59c71a;_0x324c93[_0x409a45(0x1ff)]=this[_0x409a45(0x167)][_0x409a45(0x1eb)]+_0x17ca0c,_0x324c93[_0x409a45(0x1c8)]=!0x0,this[_0x409a45(0x1c6)](_0x324c93);}),this[_0x59c71a(0x241)](),await this[_0x59c71a(0x1f5)]();}async[_0xe0519b(0x1a7)](_0x373757,_0x530d0a){const _0x4a1645=_0xe0519b;let _0x41b182;this[_0x4a1645(0x230)]=_0x373757[_0x4a1645(0x188)];const _0x260daa=_0x373757[_0x4a1645(0x1a9)]&&!_0x373757[_0x4a1645(0x1e2)],_0x39e10c=_0x260daa?0x0:_0x373757[_0x4a1645(0x234)][_0x4a1645(0x1ff)];if(_0x530d0a[_0x4a1645(0x20a)](_0xed36a=>{const _0x33931f=_0x4a1645;_0xed36a[_0x33931f(0x1c8)]=!0x0,_0xed36a[_0x33931f(0x1c5)]=_0x373757[_0x33931f(0x236)],_0xed36a[_0x33931f(0x210)]=null;}),_0x260daa)_0x41b182=_0x530d0a,this[_0x4a1645(0x257)](_0x41b182,_0x260daa);else{if(_0x373757[_0x4a1645(0x1e2)]){const _0x18afe2=this[_0x4a1645(0x216)](_0x373757[_0x4a1645(0x1e2)]);this[_0x4a1645(0x167)][_0x4a1645(0x159)][_0x4a1645(0x1eb)]=-_0x18afe2[_0x4a1645(0x1e7)],_0x18afe2[_0x4a1645(0x20a)](_0x5c30e1=>{const _0x393474=_0x4a1645;_0x5c30e1[_0x393474(0x1ff)]-=_0x18afe2[_0x393474(0x1e7)],_0x5c30e1[_0x393474(0x1c5)]=_0x373757[_0x393474(0x236)],_0x5c30e1[_0x393474(0x1c8)]=!0x0,_0x5c30e1[_0x393474(0x210)]=null;}),this[_0x4a1645(0x257)](_0x18afe2,!0x0),this[_0x4a1645(0x23f)][_0x4a1645(0x1eb)]=-_0x18afe2[_0x4a1645(0x1e7)]+this[_0x4a1645(0x230)],this[_0x4a1645(0x1e6)](_0x18afe2);}this[_0x4a1645(0x167)][_0x4a1645(0x159)][_0x4a1645(0x1eb)]=_0x39e10c,_0x41b182=this[_0x4a1645(0x160)](_0x373757[_0x4a1645(0x234)],_0x373757[_0x4a1645(0x232)]),await this[_0x4a1645(0x229)](_0x41b182),this[_0x4a1645(0x257)](_0x41b182,_0x260daa);}_0x373757[_0x4a1645(0x23a)]&&(this[_0x4a1645(0x21f)][_0x4a1645(0x1f2)](_0x41b182,_0x373757[_0x4a1645(0x23a)]),this[_0x4a1645(0x168)]=_0x373757[_0x4a1645(0x23a)]),this[_0x4a1645(0x23f)][_0x4a1645(0x1eb)]=_0x39e10c+this[_0x4a1645(0x230)],this[_0x4a1645(0x1e6)](_0x41b182),_0x530d0a[_0x4a1645(0x227)](_0x1a7ca1=>{const _0x20b859=_0x4a1645,_0x10f854=this[_0x20b859(0x1cb)](_0x1a7ca1);return _0x10f854&&!this[_0x20b859(0x1ef)][_0x20b859(0x1da)](_0x10f854);})[_0x4a1645(0x20a)]((_0x17fa1f,_0xe2cc96)=>{const _0x4aef96=_0x4a1645;_0x17fa1f[_0x4aef96(0x1ff)]=this[_0x4aef96(0x167)][_0x4aef96(0x1eb)]+_0xe2cc96,this[_0x4aef96(0x1c6)](_0x17fa1f);}),this[_0x4a1645(0x17d)]()?(this[_0x4a1645(0x20e)]=0x0,this[_0x4a1645(0x241)](!0x0),await this[_0x4a1645(0x1f5)]()):(this[_0x4a1645(0x1b7)]=!0x1,this[_0x4a1645(0x205)]());}[_0xe0519b(0x251)](_0x4f73d4,_0x5e72a6){const _0x121d19=_0xe0519b,_0xacf8da=_0x5e72a6&&_0x5e72a6[_0x121d19(0x1e3)];if(_0xacf8da&&_0xacf8da[_0x121d19(0x1d3)](_0x121d19(0x254)))throw _0x5e72a6;const _0x4a1cb1=this[_0x121d19(0x1ba)][_0x121d19(0x158)][_0x121d19(0x1c4)](_0x52e86);throw this[_0x121d19(0x1b7)]=!0x0,_0x4a1cb1[_0x121d19(0x1a3)](),this[_0x121d19(0x1ba)][_0x121d19(0x233)](_0x121d19(0x1a2)),new _0x3b39b4(_0x4f73d4,this[_0x121d19(0x1ba)],_0xacf8da?{'originalError':_0xacf8da}:void 0x0);}[_0xe0519b(0x1c6)](_0x546940){const _0x3dcaf3=_0xe0519b;this[_0x3dcaf3(0x224)][_0x3dcaf3(0x1da)](_0x546940)||(this[_0x3dcaf3(0x224)][_0x3dcaf3(0x1bc)](_0x546940),this[_0x3dcaf3(0x1a6)][_0x3dcaf3(0x24c)](_0x546940),this[_0x3dcaf3(0x15a)]||_0x3dcaf3(0x193)==_0x546940[_0x3dcaf3(0x223)]&&!_0x546940[_0x3dcaf3(0x1ad)]||this[_0x3dcaf3(0x1cd)]());}[_0xe0519b(0x241)](_0x7c9535=!0x1){const _0x3f1543=_0xe0519b;!_0x7c9535&&this[_0x3f1543(0x1b7)]||(this[_0x3f1543(0x1b7)]=!0x0,clearTimeout(this[_0x3f1543(0x1cc)]),this[_0x3f1543(0x1cc)]=setTimeout(()=>{const _0x4f11ef=_0x3f1543;this[_0x4f11ef(0x1bf)]()[_0x4f11ef(0x238)](_0x42ca48=>{const _0x431260=_0x4f11ef;_0x42ca48&&(this[_0x431260(0x205)](),this[_0x431260(0x1b7)]=!0x1);})[_0x4f11ef(0x1af)](_0x2c393a=>{const _0x4d0966=_0x4f11ef;this[_0x4d0966(0x205)](),this[_0x4d0966(0x1b7)]=!0x1,function(_0x3a12b2){const _0x20c7d9=_0x4d0966;return _0x3a12b2[_0x20c7d9(0x1e3)][_0x20c7d9(0x1d3)](_0x20c7d9(0x17f))||_0x3a12b2[_0x20c7d9(0x1e3)][_0x20c7d9(0x1d3)](_0x20c7d9(0x21e))||_0x3a12b2[_0x20c7d9(0x1e3)][_0x20c7d9(0x1d3)](_0x20c7d9(0x256));}(_0x2c393a)||this[_0x4d0966(0x251)](_0x2c393a[_0x4d0966(0x1e3)],_0x2c393a);});},this[_0x3f1543(0x20e)]));}[_0xe0519b(0x1f5)](){return new Promise(_0x5daeb3=>{const _0x5e9f80=_0x34bc;this['on'](_0x5e9f80(0x252),()=>{_0x5daeb3();});});}async[_0xe0519b(0x1bf)](){const _0x1c2b83=_0xe0519b,_0x24bc65=this[_0x1c2b83(0x1ba)][_0x1c2b83(0x158)][_0x1c2b83(0x1c4)](_0x36c06e);if(this[_0x1c2b83(0x22d)]()&&(_0x24bc65[_0x1c2b83(0x1d8)](),this[_0x1c2b83(0x1d1)]=!0x1),!this[_0x1c2b83(0x17d)]())return!0x0;const _0x416815=[...this[_0x1c2b83(0x1a6)]];for(const _0x2ad777 of _0x416815)_0x2ad777[_0x1c2b83(0x20b)]=this[_0x1c2b83(0x167)][_0x1c2b83(0x159)][_0x1c2b83(0x177)](_0x2ad777);const _0x73af78=this[_0x1c2b83(0x21f)][_0x1c2b83(0x187)](_0x416815),_0xae32d1=Q++,_0x5b3c3c=this[_0x1c2b83(0x23e)](_0x416815),_0x4caa59=await this[_0x1c2b83(0x1d6)][_0x1c2b83(0x1a5)](_0x5b3c3c,_0x5b3c3c[_0x1c2b83(0x1ff)],_0x73af78);try{return await this[_0x1c2b83(0x190)](_0x416815,_0x4caa59,_0xae32d1);}catch(_0x218617){return this[_0x1c2b83(0x251)](_0x1c2b83(0x1ac),_0x218617);}}async[_0xe0519b(0x190)](_0x407513,_0x5dff70,_0x515df3){const _0x4b4e22=_0xe0519b;if(_0x4b4e22(0x16e)in _0x5dff70)throw _0x5dff70[_0x4b4e22(0x16e)];let _0x4d8f77=!0x1;if(_0x5dff70[_0x4b4e22(0x1a9)]){_0x5dff70[_0x4b4e22(0x23a)]&&(this[_0x4b4e22(0x168)]=_0x5dff70[_0x4b4e22(0x23a)]),this[_0x4b4e22(0x1a6)]=this[_0x4b4e22(0x1a6)][_0x4b4e22(0x227)](_0x2bf761=>!_0x407513[_0x4b4e22(0x21c)](_0x2bf761));for(const _0x4e54a2 of _0x407513)_0x4e54a2[_0x4b4e22(0x1c5)]=_0x4b4e22(0x203)in _0x5dff70&&_0x5dff70[_0x4b4e22(0x203)]||void 0x0;Y(_0x407513,_0x5dff70[_0x4b4e22(0x1eb)]-_0x407513[_0x4b4e22(0x1e7)]),this[_0x4b4e22(0x1e6)](_0x407513);const _0x151dab=_0x407513[_0x4b4e22(0x227)](_0x1f9e09=>{const _0x3340cd=_0x4b4e22;if(!_0x1f9e09[_0x3340cd(0x1c8)])return!0x1;const _0x57447f=this[_0x3340cd(0x1cb)](_0x1f9e09);return _0x57447f&&!this[_0x3340cd(0x1ef)][_0x3340cd(0x1da)](_0x57447f);});Y(_0x151dab,this[_0x4b4e22(0x167)][_0x4b4e22(0x1eb)]),this[_0x4b4e22(0x257)](_0x151dab),_0x4d8f77=!0x0,this[_0x4b4e22(0x20e)]=this[_0x4b4e22(0x1be)];}else{const _0x487180=this[_0x4b4e22(0x160)](_0x5dff70[_0x4b4e22(0x234)],_0x5dff70[_0x4b4e22(0x232)])[_0x4b4e22(0x227)](_0x58392c=>_0x58392c[_0x4b4e22(0x1ff)]>=this[_0x4b4e22(0x17e)]);_0x487180[_0x4b4e22(0x20a)](_0x150bf5=>this[_0x4b4e22(0x202)](_0x150bf5)),this[_0x4b4e22(0x1a6)]=this[_0x4b4e22(0x1a6)][_0x4b4e22(0x227)](_0x463871=>!_0x463871[_0x4b4e22(0x1c8)]||!this[_0x4b4e22(0x1ef)][_0x4b4e22(0x1da)](this[_0x4b4e22(0x1cb)](_0x463871))),this[_0x4b4e22(0x1a6)][_0x4b4e22(0x1e7)]&&Y(this[_0x4b4e22(0x1a6)],this[_0x4b4e22(0x1a6)][0x0][_0x4b4e22(0x1ff)]),await this[_0x4b4e22(0x229)](_0x487180),_0x4d8f77=this[_0x4b4e22(0x1fe)](_0x487180,_0x5dff70[_0x4b4e22(0x1eb)],_0x5dff70[_0x4b4e22(0x23a)]),this[_0x4b4e22(0x20e)]=Math[_0x4b4e22(0x16c)](this[_0x4b4e22(0x20e)]/0x2);}return _0x4d8f77?!this[_0x4b4e22(0x17d)]()||(this[_0x4b4e22(0x241)](!0x0),!0x1):this[_0x4b4e22(0x251)](_0x4b4e22(0x1f0));}[_0xe0519b(0x1fe)](_0x3bffd6,_0x2ccd0b,_0x8fb592){const _0x1fa7a4=_0xe0519b;try{const _0x3f7f0e={'document':this[_0x1fa7a4(0x167)],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x52f50e,operationsB:_0x2bf7a9,originalOperations:_0xf175c9}=_0x5237f5(_0x3bffd6,this[_0x1fa7a4(0x1a6)],_0x3f7f0e);Y(_0x52f50e,this[_0x1fa7a4(0x167)][_0x1fa7a4(0x1eb)]),Y(_0x2bf7a9,_0x2ccd0b);for(const _0x8e6bc6 of _0x52f50e){const _0x2824ca=_0xf175c9[_0x1fa7a4(0x1c4)](_0x8e6bc6);_0x8e6bc6[_0x1fa7a4(0x210)]=_0x2824ca?_0x2824ca[_0x1fa7a4(0x210)]:null;}_0x8fb592&&(this[_0x1fa7a4(0x21f)][_0x1fa7a4(0x1f2)](_0x3bffd6,_0x8fb592),this[_0x1fa7a4(0x168)]=_0x8fb592),this[_0x1fa7a4(0x1a6)]=[..._0x2bf7a9],this[_0x1fa7a4(0x257)](_0x52f50e),this[_0x1fa7a4(0x1e6)](_0x3bffd6);}catch(_0x3c780a){return console[_0x1fa7a4(0x16e)](_0x3c780a),!0x1;}return!0x0;}[_0xe0519b(0x257)](_0x233e00,_0x44769b=!0x1){const _0x595da6=_0xe0519b;this[_0x595da6(0x1ba)][_0x595da6(0x1ee)][_0x595da6(0x1fb)]({'isUndoable':!0x1,'isLocal':!0x1},_0x1cd7df=>{const _0x1bdd23=_0x595da6;for(const _0x28853f of _0x233e00)this[_0x1bdd23(0x224)][_0x1bdd23(0x1bc)](_0x28853f),this[_0x1bdd23(0x202)](_0x28853f),_0x1cd7df[_0x1bdd23(0x24b)][_0x1bdd23(0x19c)](_0x28853f),this[_0x1bdd23(0x1ba)][_0x1bdd23(0x1ee)][_0x1bdd23(0x245)](_0x28853f);});}[_0xe0519b(0x202)](_0x800f5e){const _0x55b377=_0xe0519b,_0x4c2a9b=this[_0x55b377(0x1cb)](_0x800f5e);_0x4c2a9b&&this[_0x55b377(0x1ef)][_0x55b377(0x1bc)](_0x4c2a9b);}[_0xe0519b(0x1cb)](_0x3602e3){const _0x18f1e4=_0xe0519b;let _0x4cc1fc,_0x1547f2;switch(_0x3602e3[_0x18f1e4(0x223)]){case _0x18f1e4(0x1a1):_0x4cc1fc=_0x3602e3[_0x18f1e4(0x206)][_0x18f1e4(0x1d9)];break;case _0x18f1e4(0x193):if(_0x1547f2=_0x3602e3[_0x18f1e4(0x24f)],!_0x1547f2)return null;_0x4cc1fc=_0x1547f2[_0x18f1e4(0x1d9)];break;case _0x18f1e4(0x218):_0x4cc1fc=_0x3602e3[_0x18f1e4(0x1d9)];break;case _0x18f1e4(0x178):_0x4cc1fc=_0x3602e3[_0x18f1e4(0x17a)];break;case _0x18f1e4(0x250):_0x4cc1fc=_0x3602e3[_0x18f1e4(0x25f)][_0x18f1e4(0x1d9)];break;default:return null;}return _0x4cc1fc[_0x18f1e4(0x1d2)];}[_0xe0519b(0x1e6)](_0x2e61b1){const _0x201d22=_0xe0519b;_0x2e61b1[_0x201d22(0x20a)](_0x40fa72=>{const _0x187a7a=_0x201d22,_0x1f2b70=_0x40fa72[_0x187a7a(0x25e)]();_0x1f2b70[_0x187a7a(0x210)]=_0x40fa72[_0x187a7a(0x210)],_0x1f2b70[_0x187a7a(0x1c8)]=!!_0x40fa72[_0x187a7a(0x1c8)],_0x1f2b70[_0x187a7a(0x1c5)]=_0x40fa72[_0x187a7a(0x1c5)],_0x1f2b70[_0x187a7a(0x1ff)]+=this[_0x187a7a(0x230)],_0x40fa72[_0x187a7a(0x16d)]&&this[_0x187a7a(0x1ed)][_0x187a7a(0x1bc)](_0x1f2b70),this[_0x187a7a(0x23f)][_0x187a7a(0x19c)](_0x1f2b70);});}[_0xe0519b(0x16a)](_0x185a33){const _0x3959a8=_0xe0519b,_0x320e91=this[_0x3959a8(0x1ba)][_0x3959a8(0x158)][_0x3959a8(0x1c4)](_0x3959a8(0x1f7)),_0xc2cc55=this[_0x3959a8(0x1ba)][_0x3959a8(0x22e)];_0x185a33||(_0x185a33=_0x4f1b52(_0xc2cc55,_0x3959a8(0x200))),_0x320e91[_0x3959a8(0x182)](_0x185a33,{'title':_0x4f1b52(_0xc2cc55,_0x3959a8(0x174)),'namespace':_0x3959a8(0x179)}),this[_0x3959a8(0x1fc)]=!0x0,clearTimeout(this[_0x3959a8(0x1cc)]),this[_0x3959a8(0x1a6)]=[],this[_0x3959a8(0x1ba)][_0x3959a8(0x158)][_0x3959a8(0x1c4)](_0x52e86)[_0x3959a8(0x1a3)]();}[_0xe0519b(0x1cd)](){const _0x3c0d5a=_0xe0519b;this[_0x3c0d5a(0x15a)]||(this[_0x3c0d5a(0x15a)]=this[_0x3c0d5a(0x1ba)][_0x3c0d5a(0x158)][_0x3c0d5a(0x1c4)](_0x282206)[_0x3c0d5a(0x1bc)](_0x4f1b52(this[_0x3c0d5a(0x1ba)][_0x3c0d5a(0x22e)],_0x3c0d5a(0x1df))));}[_0xe0519b(0x205)](){const _0x3dfb9c=_0xe0519b;this[_0x3dfb9c(0x15a)]&&(this[_0x3dfb9c(0x1ba)][_0x3dfb9c(0x158)][_0x3dfb9c(0x1c4)](_0x282206)[_0x3dfb9c(0x1b2)](this[_0x3dfb9c(0x15a)]),this[_0x3dfb9c(0x15a)]=null);}[_0xe0519b(0x23e)](_0x32b568){const _0x224edf=_0xe0519b,_0x3b8da0=_0x32b568[_0x224edf(0x1dd)](_0xf82385=>_0xf82385[_0x224edf(0x235)]());return this[_0x224edf(0x19a)][_0x224edf(0x1ab)](_0x3b8da0);}[_0xe0519b(0x160)](_0x32a1eb,_0x371d41){const _0x51bc05=_0xe0519b;return this[_0x51bc05(0x19a)][_0x51bc05(0x189)](_0x32a1eb)[_0x51bc05(0x1dd)]((_0x3d82af,_0x4f463e)=>{const _0x4d6d39=_0x51bc05,_0xf060ba=_0x4d6d39(0x212)==_0x371d41[_0x4f463e][_0x4d6d39(0x223)];if(_0x4d6d39(0x20f)==_0x3d82af[_0x4d6d39(0x1a0)]){const _0x3ef1a9=_0x3d82af[_0x4d6d39(0x206)][_0x4d6d39(0x1d9)];!this[_0x4d6d39(0x167)][_0x4d6d39(0x1f4)](_0x3ef1a9)&&(this[_0x4d6d39(0x167)][_0x4d6d39(0x1d0)](_0x4d6d39(0x23c),_0x3ef1a9)[_0x4d6d39(0x15b)]=!0x1);}const _0x524e8a=_0x36fc84[_0x4d6d39(0x1c1)](_0x3d82af,this[_0x4d6d39(0x167)]);return _0x524e8a[_0x4d6d39(0x20b)]=_0x3d82af[_0x4d6d39(0x20b)],_0x524e8a[_0x4d6d39(0x1c8)]=_0xf060ba,_0x524e8a[_0x4d6d39(0x210)]=_0xf060ba?null:_0x371d41[_0x4f463e][_0x4d6d39(0x1c3)],_0x524e8a[_0x4d6d39(0x16d)]=_0x4d6d39(0x24e)===_0x371d41[_0x4f463e][_0x4d6d39(0x223)],_0x524e8a[_0x4d6d39(0x1c5)]=_0x371d41[_0x4f463e][_0x4d6d39(0x1c5)],_0x524e8a;});}[_0xe0519b(0x1de)](){const _0xe23b1=_0xe0519b;this[_0xe23b1(0x1d1)]=!0x0,this[_0xe23b1(0x22d)]()?this[_0xe23b1(0x241)]():this[_0xe23b1(0x1d1)]=!0x1;}[_0xe0519b(0x22d)](){const _0x3a37ac=_0xe0519b,_0x4b3996=this[_0x3a37ac(0x1ba)][_0x3a37ac(0x158)][_0x3a37ac(0x1c4)](_0x49d947)[_0x3a37ac(0x22f)][_0x3a37ac(0x1c4)](this[_0x3a37ac(0x1fa)]);return!this[_0x3a37ac(0x1ba)][_0x3a37ac(0x183)]&&!!_0x4b3996&&_0x4b3996[_0x3a37ac(0x1e7)]>0x1&&this[_0x3a37ac(0x1d1)];}[_0xe0519b(0x17d)](){const _0x346d0c=_0xe0519b;return this[_0x346d0c(0x1a6)][_0x346d0c(0x1e7)]>0x0||this[_0x346d0c(0x22d)]();}}export{l as RealTimeCollaborationClient};class X extends Error{}function Y(_0x1711d9,_0x1efc0e){const _0x250d2d=_0xe0519b;for(const _0xc2c76 of _0x1711d9)_0xc2c76[_0x250d2d(0x1ff)]=_0x1efc0e++;}function _0x3300(){const _0x2d8fed=['stopListening','_decompressOperations','_isConnected','from','isPremiumPlugin','connect','currentDocumentSession','sessionId','_document','_lastSyncedOperationId','removeFromReconnectionStack','_handleReconnectionError','markers','round','_isDisconnection','error','set','createPositionAt','4GMFrmU','createPositionFromPath','register','Synchronization\x20issue','selection','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','isUndoneOperation','addRoot','real-time-collaboration','affectedSelectable','apply','define','_shouldSendUpdate','_lastServerVersion','cloud-services-internal-error:\x20Not\x20connected.','ready','realtimecollaborationclient-init-service-incorrect-server-operation','showWarning','isReadOnly','differ','path','return','getIdOfTheLastOperation','offset','decompress','permissions','rootsAttributes','4LEZASU','editing','code','280gBmRGl','_handleServerResponse','_isLoaded','operationsReceived','marker','6657190ZhkSvD','collaboration','addUser','unregister','disconnected','high','_compressor','finally','addOperation','createRange','getDocumentDetails','rtc-destroyed','__className','insert','realtimecollaborationclient-error','disconnect','realtimecollaborationclient-init-session-connection-error','sendOperations','_bufferedOperations','_handleInitialConnectionData','4011804ySLodC','wereChangesApplied','lastSyncVersion','compress','realtimecollaborationclient-sendbufferedoperations','affectsData','off','catch','end','entries','remove','409','roots','realtimecollaborationclient-init-connection-failed','parse','_isPendingUpdate','suppressErrorInCollaboration','collaboration-missing-channelid','editor','13733707EdaZqA','add','disableReadOnlyMode','_baseBufferDelay','_sendBufferedOperations','_initSessionsHandling','fromJSON','collaboration.channelId','userId','get','createdAt','_saveOperationInBuffer','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','_isInit','getOperationAuthor','rtc-offline','_getAffectedRoot','_sendBufferedOperationsDelayId','_setPendingAction','_operationToId','change:hasDomSelection','createRoot','_hasSelectionChanged','rootName','startsWith','cloudServices.bundleVersion','3160053QGBlwm','_service','_setUpDataInit','createUserMarkerOperations','root','has','realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration','listenTo','map','_refreshUserSelectionMarkers','PENDING_ACTION_SENDING_DATA','addToReconnectionStack','stop','initData','message','_connectService','attributes','_updateServerHistory','length','15861890CniXny','404','_handleReceivedOperations','version','sessionAdd:','_disconnectionOperations','model','_knownRootNames','realtimecollaborationclient-handleserverresponse','102411gzyEYI','setIdForTheLastOperation','CommentsOnly','getRoot','_waitUntilSynced','document:write','Notification','getOperations','start','_channelId','enqueueChange','_hasSynchronizationProblem','document','_handleExternalOperations','baseVersion','The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','isEnabled','_addKnownRoot','lastOperationAcceptedAt','state','_clearPendingAction','position','reconnect','loadRoot','reset','forEach','wasUndone','multi-root-editor-root-attributes-no-root','view','_currentBufferDelay','InsertOperation','_authorId','realtimecollaborationclient-init-non-existent-root','init','getConnectedSessions','_connectAfterSessionHasBeenFlushed','RealTimeCollaborationClient','_getOperationsFromInitData','_handleReconnectionResponse','addRootAttribute','725810qwuyNf','isDocumentOperation','destroy','includes','reconnection:\x20flushed\x20session','cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.','_operationIdentifier','cloudDocumentVersion','slice','requires','type','_knownOperations','CollaborativeEditingService','_disconnectService','filter','10HLGAsp','_fetchMissingUsers','_handleSendingSelectionMarkers','isOfficialPlugin','_isEditingAllowed','_shouldSendSelectionUpdate','locale','channelSessions','_offset','size','metadata','enableReadOnlyMode','data','toJSON','sessionCreatedAt','12ilZgOX','then','connected','lastOperationId','7TPEYgF','$root','change:_isEditingAllowed','_compressOperations','serverHistory','bind','_sendBufferedOperationsDelayed','lastDocumentSession','_bufferRootLoad','_ignoredOperations','applyOperation','connection','setPermissions','_loadRoot','change:range','Permissions','batch','push','The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','cs:removeUser','newRange','move','_crash','change:_isPendingUpdate','string','realtimecollaborationclient','pluginName','cloud-services-internal-error:\x20Request\x20timeout.','_applyOperationsSet','getMany','_initThrowingOnDataSet','getUser','realtimecollaborationclient-init-document-already-initialized','mySessionId','realtimecollaborationclient-init-service-internal-error','clone','targetPosition','directChange','plugins','history','_pendingAction','_isAttached','config','fire','keys'];_0x3300=function(){return _0x2d8fed;};return _0x3300();}function _0x34bc(_0x2bd80b,_0x84c193){const _0x33002b=_0x3300();return _0x34bc=function(_0x34bc7c,_0x4590db){_0x34bc7c=_0x34bc7c-0x157;let _0x877e1f=_0x33002b[_0x34bc7c];return _0x877e1f;},_0x34bc(_0x2bd80b,_0x84c193);}class Z{[_0xe0519b(0x244)];[_0xe0519b(0x1ce)];constructor(_0x139657){const _0x571d79=_0xe0519b;this[_0x571d79(0x244)]=_0x139657,this[_0x571d79(0x1ce)]=new WeakMap();}[_0xe0519b(0x187)](_0x1652a4){const _0x5b5ae5=_0xe0519b;let _0x474423=_0x1652a4[_0x5b5ae5(0x1e7)];for(;_0x474423--;){const _0x2d3879=_0x1652a4[_0x474423];if(!this[_0x5b5ae5(0x244)][_0x5b5ae5(0x1da)](_0x2d3879)){if(!this[_0x5b5ae5(0x1ce)][_0x5b5ae5(0x1da)](_0x2d3879)){const _0x46302c=_0x2ff451()[_0x5b5ae5(0x221)](0x1,0x12);this[_0x5b5ae5(0x1ce)][_0x5b5ae5(0x16f)](_0x2d3879,_0x46302c);}return this[_0x5b5ae5(0x1ce)][_0x5b5ae5(0x1c4)](_0x2d3879);}}}[_0xe0519b(0x1f2)](_0x2cff73,_0x2081ca){const _0x4a8814=_0xe0519b;if(!_0x2081ca)return;let _0x3498a1=_0x2cff73[_0x4a8814(0x1e7)];for(;_0x3498a1--;){const _0x43c453=_0x2cff73[_0x3498a1];this[_0x4a8814(0x244)][_0x4a8814(0x1da)](_0x43c453)||this[_0x4a8814(0x1ce)][_0x4a8814(0x16f)](_0x43c453,_0x2081ca);}}}