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 8.08 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 _0x41788e=_0x36a2;(function(_0x169b7a,_0x528866){const _0x2e8afd=_0x36a2,_0x2174fe=_0x169b7a();while(!![]){try{const _0x5e52d8=parseInt(_0x2e8afd(0xcd))/0x1+-parseInt(_0x2e8afd(0xe9))/0x2+parseInt(_0x2e8afd(0xfa))/0x3+parseInt(_0x2e8afd(0xdb))/0x4+-parseInt(_0x2e8afd(0x10b))/0x5+parseInt(_0x2e8afd(0xe6))/0x6*(-parseInt(_0x2e8afd(0xcf))/0x7)+-parseInt(_0x2e8afd(0xfd))/0x8;if(_0x5e52d8===_0x528866)break;else _0x2174fe['push'](_0x2174fe['shift']());}catch(_0x3767c6){_0x2174fe['push'](_0x2174fe['shift']());}}}(_0xc56a,0xe63c6));import{ContextPlugin as _0x338963}from'ckeditor5/src/core.js';import{DomEmitterMixin as _0x46da0e,CKEditorError as _0x860ca1}from'ckeditor5/src/utils.js';function _0x36a2(_0x2aeb56,_0x2b56a8){const _0xc56a41=_0xc56a();return _0x36a2=function(_0x36a2b6,_0x5f4db0){_0x36a2b6=_0x36a2b6-0xc7;let _0x22c060=_0xc56a41[_0x36a2b6];return _0x22c060;},_0x36a2(_0x2aeb56,_0x2b56a8);}import{WebSocketGateway as _0x2bb010,WEB_SOCKET_GATEWAY_STATES as _0x49d189}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';import{Notification as _0x5a6098}from'ckeditor5/src/ui.js';function _0xc56a(){const _0x1792a1=['882972olpuYE','limitExceeded','real-time-collaboration','CloudServices','from','CONNECTED','disconnect','websocketgateway-plugin-already-registered','WebSocketGateway','token','isOfficialPlugin','6NtZpFQ','bind','pluginName','1019780JQRmrw','_reconnect','has','init','get','requires','cloudservices-reconnection-error','stopListening','websocketgateway-invalid-plugin-interface','define','cloudservices-init','code','plugins','online','cloudServices.requestTimeout','add','state','2355768BXgioD','_domEmitter','CONNECTING','1617856eFoyRj','The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.','then','function','websocketgateway-missing-websocket-url','connection','delete','constructor','webSocketUrl','DISCONNECTED','set','change:me','removeFromReconnectionStack','error','4213380tDOkbZ','initialReconnectionInterval','destroy','_reconnectionStack','all','Connected\x20users\x20limit\x20exceeded','_shouldPluginsReconnect','_isBrowserOffline','listenTo','showWarning','1621264taidBN','config','905933EqFQLx','cloudServices.connectionTimeout','isInReconnectionStack','connected','isPremiumPlugin','catch','addToReconnectionStack','offline','connect','reconnect','websocketgateway-missing-token','context'];_0xc56a=function(){return _0x1792a1;};return _0xc56a();}export class WebSocketGateway extends _0x338963{static [_0x41788e(0xe3)]=/* #__PURE__ -- @preserve */ ((()=>_0x2bb010)());static [_0x41788e(0x10c)]=0x3e8;[_0x41788e(0x102)];[_0x41788e(0x10e)];[_0x41788e(0xc9)];[_0x41788e(0xfb)];static get[_0x41788e(0xee)](){const _0x51bafe=_0x41788e;return[_0x51bafe(0xde),_0x5a6098];}static get[_0x41788e(0xe8)](){const _0xe41756=_0x41788e;return _0xe41756(0xe3);}static get[_0x41788e(0xe5)](){return!0x0;}static get[_0x41788e(0xd3)](){return!0x0;}constructor(_0x13217a){const _0x280473=_0x41788e;super(_0x13217a),this[_0x280473(0x107)](_0x280473(0xf9),_0x49d189[_0x280473(0xe0)]),this[_0x280473(0x107)](_0x280473(0xca),!0x1),this[_0x280473(0x10e)]=new Set(),this[_0x280473(0xc9)]=!0x1,this[_0x280473(0xfb)]=new(_0x46da0e())();}[_0x41788e(0xec)](){const _0x450d66=_0x41788e,_0x101201=this[_0x450d66(0xda)],_0x1f78c6=_0x101201[_0x450d66(0xf5)][_0x450d66(0xed)](_0x450d66(0xde)),_0x1c3f5d=_0x101201[_0x450d66(0xf5)][_0x450d66(0xed)](_0x5a6098);if(!_0x1f78c6[_0x450d66(0xe4)])throw new _0x860ca1(_0x450d66(0xd9),this);if(!_0x1f78c6[_0x450d66(0x105)])throw new _0x860ca1(_0x450d66(0x101),this);return this[_0x450d66(0xfb)][_0x450d66(0xcb)](window,_0x450d66(0xd6),()=>this[_0x450d66(0xca)]=!0x0),this[_0x450d66(0xfb)][_0x450d66(0xcb)](window,_0x450d66(0xf6),()=>this[_0x450d66(0xca)]=!0x1),this[_0x450d66(0xda)][_0x450d66(0xce)][_0x450d66(0xf2)](_0x450d66(0xd0),0xa),this[_0x450d66(0xda)][_0x450d66(0xce)][_0x450d66(0xf2)](_0x450d66(0xf7),0x14),WebSocketGateway[_0x450d66(0xe3)][_0x450d66(0xd7)](_0x1f78c6[_0x450d66(0xe4)],_0x1f78c6[_0x450d66(0x105)],{'timeout':0x3e8*this[_0x450d66(0xda)][_0x450d66(0xce)][_0x450d66(0xed)](_0x450d66(0xd0)),'requestTimeout':0x3e8*this[_0x450d66(0xda)][_0x450d66(0xce)][_0x450d66(0xed)](_0x450d66(0xf7))})[_0x450d66(0xff)](_0x699679=>{const _0x3922f1=_0x450d66;if(this[_0x3922f1(0x102)]=_0x699679,this[_0x3922f1(0xe7)](_0x3922f1(0xf9))['to'](_0x699679,_0x3922f1(0xf9),this,_0x3922f1(0xca),(_0x332043,_0x2ba9df)=>(_0x3922f1(0xd2)!==_0x332043&&(this[_0x3922f1(0xc9)]=!0x0),_0x2ba9df||_0x332043!==_0x49d189[_0x3922f1(0xe0)]?_0x49d189[_0x3922f1(0x106)]:this[_0x3922f1(0xf9)]==_0x49d189[_0x3922f1(0x106)]&&this[_0x3922f1(0xc9)]?(this[_0x3922f1(0xc9)]=!0x1,this[_0x3922f1(0xea)](),_0x49d189[_0x3922f1(0xfc)]):_0x49d189[_0x3922f1(0xe0)])),this[_0x3922f1(0x102)]['on'](_0x3922f1(0x10a),(_0x1968dd,_0x1bf950)=>{const _0x40e2b7=_0x3922f1;if(_0x40e2b7(0xdc)!==_0x1bf950[_0x40e2b7(0xf4)])throw console[_0x40e2b7(0x10a)](_0x1bf950),new _0x860ca1(_0x40e2b7(0xf3),null,{'originalError':_0x1bf950});_0x1c3f5d[_0x40e2b7(0xcc)](_0x40e2b7(0xfe),{'title':_0x40e2b7(0xc8),'namespace':_0x40e2b7(0xdd)});}),!_0x699679['me'])return new Promise(_0x3efeef=>_0x699679['on'](_0x3922f1(0x108),_0x3efeef));})[_0x450d66(0xd4)](_0x191e81=>{const _0x5120c4=_0x450d66;throw console[_0x5120c4(0x10a)](_0x191e81),new _0x860ca1(_0x5120c4(0xf3),null,{'originalError':_0x191e81});});}[_0x41788e(0xd5)](_0x566896){const _0x3bc5e9=_0x41788e;if(_0x3bc5e9(0x100)!=typeof _0x566896[_0x3bc5e9(0xd8)])throw new _0x860ca1(_0x3bc5e9(0xf1),this);if(this[_0x3bc5e9(0xd1)](_0x566896))throw new _0x860ca1(_0x3bc5e9(0xe2),this,{'name':_0x566896[_0x3bc5e9(0x104)][_0x3bc5e9(0xe8)]});this[_0x3bc5e9(0x10e)][_0x3bc5e9(0xf8)](_0x566896);}[_0x41788e(0x109)](_0x5813e0){const _0x512f6c=_0x41788e;this[_0x512f6c(0x10e)][_0x512f6c(0x103)](_0x5813e0);}[_0x41788e(0xd1)](_0x32b8dd){const _0x3eb939=_0x41788e;return this[_0x3eb939(0x10e)][_0x3eb939(0xeb)](_0x32b8dd);}[_0x41788e(0xea)](){const _0x12a29c=_0x41788e;return this[_0x12a29c(0x102)][_0x12a29c(0xd8)]()[_0x12a29c(0xff)](()=>Promise[_0x12a29c(0xc7)](Array[_0x12a29c(0xdf)](this[_0x12a29c(0x10e)],_0x2301dd=>_0x2301dd[_0x12a29c(0xd8)]())))[_0x12a29c(0xff)](()=>this[_0x12a29c(0xf9)]=_0x49d189[_0x12a29c(0xe0)])[_0x12a29c(0xd4)](_0x1ff8d6=>{const _0x55ae3a=_0x12a29c;throw console[_0x55ae3a(0x10a)](_0x1ff8d6),new _0x860ca1(_0x55ae3a(0xef),this[_0x55ae3a(0xda)]);});}[_0x41788e(0xe1)](){const _0x4417bd=_0x41788e;this[_0x4417bd(0x102)]&&this[_0x4417bd(0x102)][_0x4417bd(0xe1)](),this[_0x4417bd(0xf9)]=_0x49d189[_0x4417bd(0x106)],this[_0x4417bd(0xfb)][_0x4417bd(0xf0)]();}[_0x41788e(0x10d)](){const _0x55eeb3=_0x41788e;this[_0x55eeb3(0xe1)](),super[_0x55eeb3(0x10d)]();}}