@ckeditor/ckeditor5-real-time-collaboration 35.3.0 → 35.3.2
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/build/real-time-collaboration.js +1 -2
- package/package.json +5 -5
- package/src/common-translations.js +1 -1
- package/src/presencelist/presencelistui.js +1 -1
- package/src/presencelist/view/presencecounterview.js +1 -1
- package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
- package/src/presencelist/view/presencedropdownlistview.js +1 -1
- package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
- package/src/presencelist/view/presenceinlinelistview.js +1 -1
- package/src/presencelist/view/presencelistview.js +1 -1
- package/src/presencelist.js +1 -1
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
- package/src/realtimecollaborativecomments.js +1 -1
- package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
- package/src/realtimecollaborativeediting/sessions.js +1 -1
- package/src/realtimecollaborativeediting/usermarkers.js +1 -1
- package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
- package/src/realtimecollaborativeediting.js +1 -1
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
- package/src/realtimecollaborativetrackchanges.js +1 -1
- package/build/translations/ar.js +0 -1
- package/build/translations/bg.js +0 -1
- package/build/translations/bn.js +0 -1
- package/build/translations/ca.js +0 -1
- package/build/translations/cs.js +0 -1
- package/build/translations/da.js +0 -1
- package/build/translations/de-ch.js +0 -1
- package/build/translations/de.js +0 -1
- package/build/translations/el.js +0 -1
- package/build/translations/en-au.js +0 -1
- package/build/translations/es.js +0 -1
- package/build/translations/et.js +0 -1
- package/build/translations/fi.js +0 -1
- package/build/translations/fr.js +0 -1
- package/build/translations/gl.js +0 -1
- package/build/translations/he.js +0 -1
- package/build/translations/hi.js +0 -1
- package/build/translations/hr.js +0 -1
- package/build/translations/hu.js +0 -1
- package/build/translations/id.js +0 -1
- package/build/translations/it.js +0 -1
- package/build/translations/ja.js +0 -1
- package/build/translations/ko.js +0 -1
- package/build/translations/lt.js +0 -1
- package/build/translations/lv.js +0 -1
- package/build/translations/ms.js +0 -1
- package/build/translations/nl.js +0 -1
- package/build/translations/no.js +0 -1
- package/build/translations/pl.js +0 -1
- package/build/translations/pt-br.js +0 -1
- package/build/translations/pt.js +0 -1
- package/build/translations/ro.js +0 -1
- package/build/translations/ru.js +0 -1
- package/build/translations/sk.js +0 -1
- package/build/translations/sr-latn.js +0 -1
- package/build/translations/sr.js +0 -1
- package/build/translations/sv.js +0 -1
- package/build/translations/th.js +0 -1
- package/build/translations/tk.js +0 -1
- package/build/translations/tr.js +0 -1
- package/build/translations/uk.js +0 -1
- package/build/translations/vi.js +0 -1
- package/build/translations/zh-cn.js +0 -1
- package/build/translations/zh.js +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{CONNECTED_USERS:["1 connected user (me)","%0 connected users"],PENDING_ACTION_SENDING_DATA:"Sending data to the server.","Synchronization issue":"Synchronization issue","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor."})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
|
|
2
1
|
/*!
|
|
3
2
|
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
3
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var __webpack_modules__={357:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends Error{constructor(t,e,s=null,r={}){super("cloud-services-internal-error: "+t),this.context=e,this.code=s,this.data=r,this.name="CKEditorError"}static fromPublicError(t){return new s(function(t){let e="cloud-services-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}e.default=s},8801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends Error{constructor(t,e){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=t,this.code=e.code,this.traceId=e.traceId,this.data=e.data}static fromPublicError(t){return new s(function(t){let e="cloud-services-server-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}e.default=s},7622:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const n=s(5003),i=s(2209),o=r(s(3596)),a=r(s(7026)),c=r(s(7839)),u=r(s(5132)),d=r(s(4148)),l=r(s(223)),h=r(s(2968)),f=r(s(7158)),p=r(s(357)),y=r(s(6314)),m=r(s(6148)),v=r(s(961));e._SERVICE=1;class _{constructor(t,e){if(!t)throw new TypeError('Param "bundleVersion" must be provided.');this._id=null!=e?e:(0,n.v4)(),this._isConnected=!1,this._bundleVersion=t}getId(){return this._id}isConnected(){return this._isConnected}connect(t,e={buffers:[],types:[]},s){const r=new c.default(this.getId(),e.buffers,e.types,this._bundleVersion,s);return this._connect(t,r)}reconnect(t,e){if(this.isConnected())throw new p.default("Cannot reconnect to already connected service.",t);return this._connect(t,new d.default(this.getId(),e,this._bundleVersion))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async getDocumentDetails(){const t=new v.default(this.getId());if(!this._wsGateway)throw new y.default("Collaborative Editing",this);const s=await this._wsGateway._sendRequest(e._SERVICE,v.default.TYPE,o.default.encode(t));return o.default.decode(s,m.default)}async sendOperations(t,s,r){if(!t||!t.types||!t.types.length)throw new p.default("Cannot send empty update.",this._wsGateway);const n="number"==typeof s?s:parseInt(s);if(!Number.isInteger(n)||n<0)throw new p.default("Base version not provided.",this._wsGateway);const i=new u.default(this.getId(),t.buffers,t.types,n,[],r);if(!this._wsGateway||!this._isConnected)throw new y.default("Collaborative Editing",this);const a=await this._wsGateway._sendRequest(e._SERVICE,u.default.TYPE,o.default.encode(i));return o.default.decode(a,l.default)}async getConnectedSessions(){if(!this._isConnected)throw new y.default("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await a.default.getConnectedSessions(this._wsGateway,this._id,e._SERVICE)),this._connectedSessions}static getConnectedSessions(t,s){return a.default.getConnectedSessions(t,s,e._SERVICE)}async _connect(t,s){if(this.isConnected())return;if(t.state!==f.default.STATE_CONNECTED)throw new p.default("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const r=await t._sendRequest(e._SERVICE,s.constructor.TYPE,o.default.encode(s)),n=o.default.decode(r,h.default);return this.listenTo(t,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:f.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,n.channel),this._isConnected=!0,this.fire("connected"),n}_connectToChannel(t,s){this._channel=t._getChannel(e._SERVICE,s),this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((t,e)=>{const s=o.default.decode(e,u.default);this.fire("operationsReceived",s.baseVersion,s.data,s.metadata)}))}_onWsGatewayStateChange(t){t===f.default.STATE_DISCONNECTED&&this.disconnect()}}_._SERVICE=e._SERVICE,(0,i.mix)(_,i.EmitterMixin),e.default=_},8677:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON({createdAt:t,...e}){const s={...e};return t instanceof Date&&(s.createdAt=t.toISOString()),s}static fromJSON({createdAt:t,...e}){const s={...e};return t&&(s.createdAt=new Date(t)),s}}e.default=i,i.DESCRIPTOR_NAME="OperationMetadataDescriptor",i.DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}}},6685:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{static prepareMetadataForOperations(t,e){if(!(t&&t.length&&e&&e.length))return[];const s=[];let r=0;for(const n of t)if(0!==n){if(!e[r])throw new Error("Missing metadata for a operation");s.push(e[r]),r++}else s.push(s[s.length-1]);return s}static removeUnnecessaryMetadata(t,e){if(!(t&&t.length&&e&&e.length))return[];const s=[];for(let r=0;r<t.length;r++)if(0!==t[r]){if(!e[r])throw new Error("Missing metadata for a operation");s.push(e[r])}return s}}},7839:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n=""){super(),this.id=t,this.buffers=e,this.types=s,this.bundleVersion=r,this.lastOperationId=n}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(t){return new i(t.id,t.buffers,t.types,t.bundleVersion,t.lastOperationId)}}e.default=i,i.TYPE="11",i.READABLE_TYPE_NAME="connectToDocument",i.DESCRIPTOR_NAME="CollaborativeEditingConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}}},4148:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.id=t,this.lastKnowVersion=e,this.bundleVersion=s}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(t){return new i(t.id,t.lastKnowVersion,t.bundleVersion)}}e.default=i,i.TYPE="12",i.READABLE_TYPE_NAME="reconnectToDocument",i.DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}}},5132:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(t,e,s,r,n=[],i=""){super(),this.id=t,this.buffers=e,this.types=s,this.baseVersion=r,this.metadata=n,this.lastOperationId=i}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(t){return new a(t.id,t.buffers,t.types,t.baseVersion,i.default.prepareMetadataForOperations(t.types,t.metadata).map(o.default.fromJSON),t.lastOperationId)}}e.default=a,a.TYPE="13",a.READABLE_TYPE_NAME="updateDocument",a.DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage",a.DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}}},961:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="14",i.READABLE_TYPE_NAME="getDocumentDetails",i.DESCRIPTOR_NAME="GetDocumentDetailsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}}},2968:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(t,e,s=[],r=[],n=0,i=[],o=null,a="",c="",u=null){super(),this.channel=t,this.version=e,this.buffers=s,this.types=r,this.offset=n,this.metadata=i,this.initData=o,this.sessionId=a,this.lastOperationId=c,this.sessionCreatedAt=u}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt}}get wereChangesApplied(){var t;return!(null===(t=this.types)||void 0===t?void 0:t.length)&&null===this.initData}toJSON(){var t;return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),initData:null!==(t=this.initData)&&void 0!==t?t:"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(t){return new a(t.channel,t.version,t.buffers,t.types,t.offset,t.metadata,t.initData,t.sessionId,t.lastOperationId,t.sessionCreatedAt)}static fromJSON(t){var e;let s=null;return!0===t.isInitialized?s=null!==(e=t.initData)&&void 0!==e?e:"":"boolean"!=typeof t.isInitialized&&t.initData&&(s=t.initData),a.create({channel:t.channel,version:t.version,buffers:t.buffers,types:t.types,offset:t.offset,metadata:i.default.prepareMetadataForOperations(t.types,t.metadata).map(o.default.fromJSON),initData:s,sessionId:t.sessionId,lastOperationId:t.lastOperationId,sessionCreatedAt:t.sessionCreatedAt?new Date(t.sessionCreatedAt):null})}}e.default=a,a.DESCRIPTOR_NAME="CollaborativeEditingConnectResponse",a.DESCRIPTOR={fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:o.default.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}},223:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(t,e=[],s=[],r=[],n="",i=null){super(),this.version=t,this.buffers=e,this.types=s,this.metadata=r,this.lastOperationId=n,this.lastOperationAcceptedAt=i}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){var t;return!(null===(t=this.types)||void 0===t?void 0:t.length)}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(t){return new a(t.version,t.buffers,t.types,i.default.prepareMetadataForOperations(t.types,t.metadata).map(o.default.fromJSON),t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}static create(t){return new a(t.version,t.buffers,t.types,t.metadata,t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}}e.default=a,a.DESCRIPTOR_NAME="CollaborativeEditingResponse",a.DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}}},6148:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.lastDocumentSession=t,this.currentDocumentSession=e}get data(){var t,e,s,r,n;return{lastDocumentSessionId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.id,lastDocumentSessionOperationId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.lastOperationId,currentDocumentSessionId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.lastOperationId}}toJSON(){var t,e,s,r,n;return{lastDocumentSessionId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.id,lastDocumentSessionOperationId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.lastOperationId,currentDocumentSessionId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.lastOperationId}}static fromJSON(t){const e=t.lastDocumentSessionId?{id:t.lastDocumentSessionId,lastOperationId:t.lastDocumentSessionOperationId}:void 0,s=t.currentDocumentSessionId?{lastOperationId:t.currentDocumentSessionOperationId,version:t.currentDocumentSessionVersion,id:t.currentDocumentSessionId}:void 0;return new i(e,s)}}e.default=i,i.DESCRIPTOR_NAME="GetDocumentDetailsResponse",i.DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}}},6042:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(5420)),d=o(s(2280)),l=o(s(6376)),h=o(s(7608)),f=o(s(6178)),p=o(s(5711)),y=o(s(7955)),m=o(s(939)),v=o(s(6523)),_=o(s(1926)),x=o(s(7952)),g=i(s(7158)),b=o(s(357)),w=o(s(7026)),O=o(s(6314)),E=o(s(8801));e._SERVICE=9;class S{constructor(t){this._documentId=t,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==g.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new b.default("WebSocket Gateway is not connected.",t);const s=new l.default(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const r=await t._sendRequest(e._SERVICE,l.default.TYPE,c.default.encode(s)),{channel:n,threads:i}=c.default.decode(r,h.default);return this.listenTo(t,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:g.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,n),this._isConnected=!0,this.fire("connected"),i}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async addComment(t,e,s,r){const n=new u.default(this._documentId,t,s,e,void 0,void 0,r),i=await this._sendRequest(u.default.TYPE,n);return c.default.decode(i,d.default)}async updateComment(t,e,s,r){const n=void 0!==r,i=new y.default(this._documentId,t,e,s,r,n);await this._sendRequest(y.default.TYPE,i)}async removeComment(t,e){const s=new f.default(this._documentId,t,e);await this._sendRequest(f.default.TYPE,s)}async removeCommentThread(t){const e=new p.default(this._documentId,t);await this._sendRequest(p.default.TYPE,e)}async getCommentThread(t,e=1){const s=new m.default(t,this._documentId);try{const t=await this._sendRequest(m.default.TYPE,s),{comments:e,commentThreadId:r}=c.default.decode(t,v.default);return{comments:e,commentThreadId:r}}catch(s){if(s instanceof E.default&&"404"===s.code&&e<5)return await(r=100*e,new Promise((t=>{setTimeout(t,r)}))),this.getCommentThread(t,e+1);if(s instanceof E.default)throw s;throw E.default.fromPublicError(s)}var r}async getDocumentThreads(){const t=new _.default(this._documentId),e=await this._sendRequest(_.default.TYPE,t),{threads:s}=c.default.decode(e,x.default);return{threads:s}}async getConnectedSessions(){if(!this._isConnected)throw new O.default("Comments",this);return this._connectedSessions||(this._connectedSessions=await w.default.getConnectedSessions(this._wsGateway,this._documentId,e._SERVICE)),this._connectedSessions}_connectToChannel(t,e){this._channel=t._getChannel(S._SERVICE,e),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((t,e)=>{const s=c.default.decode(e,u.default);this.fire("commentAdded",s)})),this.listenTo(this._channel,this._channel.getEventName(f.default.TYPE),((t,e)=>{const s=c.default.decode(e,f.default);this.fire("commentRemoved",s)})),this.listenTo(this._channel,this._channel.getEventName(y.default.TYPE),((t,e)=>{const s=c.default.decode(e,y.default);this.fire("commentUpdated",s)})),this.listenTo(this._channel,this._channel.getEventName(p.default.TYPE),((t,e)=>{const s=c.default.decode(e,p.default);this.fire("commentThreadRemoved",s)})))}_onWsGatewayStateChange(t){t===g.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(t,s){if(!this._wsGateway||!this._isConnected)throw new O.default("Comments",this);return this._wsGateway._sendRequest(e._SERVICE,t,c.default.encode(s))}}S._SERVICE=e._SERVICE,(0,a.mix)(S,a.EmitterMixin),e.default=S},2529:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON(t){var e;return{...t,createdAt:null===(e=t.createdAt)||void 0===e?void 0:e.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null}}static fromJSON(t){return{...t,createdAt:new Date(t.createdAt),attributes:t.attributes?JSON.parse(t.attributes):null}}}e.default=i,i.DESCRIPTOR_NAME="CommentDescriptor",i.DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}}},1578:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945)),i=r(s(2529));class o extends n.default{static toJSON(t){var e;return{...t,comments:null===(e=t.comments)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e;return{...t,comments:null===(e=t.comments)||void 0===e?void 0:e.map(i.default.fromJSON)}}}e.default=o,o.DESCRIPTOR_NAME="CommentsThreadDescriptor",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2}}}},5420:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r="",n,i="",o=null){super(),this.documentId=t,this.commentThreadId=e,this.content=s,this.commentId=r,this.userId=i,this.attributes=o,this.createdAt=n?new Date(n):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new i(t.documentId,t.commentThreadId,t.content,t.commentId?t.commentId:void 0,t.createdAt?new Date(t.createdAt):void 0,t.userId?t.userId:void 0,t.attributes?JSON.parse(t.attributes):{})}}e.default=i,i.TYPE="91",i.READABLE_TYPE_NAME="addComment",i.DESCRIPTOR_NAME="CommentsV2AddCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7}}}},6376:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="92",i.READABLE_TYPE_NAME="connectToComment",i.DESCRIPTOR_NAME="CommentsV2ConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},939:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(t){return new i(t.commentThreadId,t.documentId)}}e.default=i,i.TYPE="93",i.READABLE_TYPE_NAME="getComment",i.DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},1926:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="94",i.READABLE_TYPE_NAME="getDocumentThreads",i.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},6178:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.documentId=t,this.commentThreadId=e,this.commentId=s}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(t){return new i(t.documentId,t.commentThreadId,t.commentId)}}e.default=i,i.TYPE="95",i.READABLE_TYPE_NAME="removeComment",i.DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}}},5711:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.documentId=t,this.commentThreadId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new i(t.documentId,t.commentThreadId)}}e.default=i,i.TYPE="97",i.READABLE_TYPE_NAME="removeCommentThread",i.DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},7955:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n=null,i=!1){super(),this.documentId=t,this.commentThreadId=e,this.commentId=s,this.content=r,this.attributes=n,this.isAttributesUpdated=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated}}static fromJSON(t){return new i(t.documentId,t.commentThreadId,t.commentId,t.content,t.attributes?JSON.parse(t.attributes):null,t.isAttributesUpdated)}}e.default=i,i.TYPE="96",i.READABLE_TYPE_NAME="updateComment",i.DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6}}}},2280:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.commentThreadId=t,this.commentId=e,this.createdAt=new Date(s)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(t){return new i(t.commentThreadId,t.commentId,t.createdAt)}}e.default=i,i.DESCRIPTOR_NAME="CommentsV2AddCommentResponse",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}}},7608:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1578));class o extends n.default{constructor(t,e,s){super(),this.channel=t,this._threads=e,this._threadsV2=s,this.threads=(null==s?void 0:s.length)?s:e}toJSON(){var t,e;return{channel:this.channel,threads:null===(t=this._threads)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),threadsV2:null===(e=this._threadsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(t.channel,null===(e=t.threads)||void 0===e?void 0:e.map((t=>JSON.parse(t))),null===(s=t.threadsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="CommentsV2ConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}}},6523:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(2529));class o extends n.default{constructor(t,e,s){super(),this.commentThreadId=t,this._comments=e,this._commentsV2=s,this.comments=(null==s?void 0:s.length)?s:e}toJSON(){var t,e;return{commentThreadId:this.commentThreadId,comments:null===(t=this._comments)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),commentsV2:null===(e=this._commentsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(t.commentThreadId,null===(e=t.comments)||void 0===e?void 0:e.map((t=>function(t){const e=JSON.parse(t);return{...e,createdAt:new Date(e.createdAt)}}(t))),null===(s=t.commentsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3}}}},7952:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1578));class o extends n.default{constructor(t,e){super(),this._threads=t,this._threadsV2=e,this.threads=(null==e?void 0:e.length)?e:t}toJSON(){var t,e;return{threads:null===(t=this._threads)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),threadsV2:null===(e=this._threadsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(null===(e=t.threads)||void 0===e?void 0:e.map((t=>function(t){var e;const s=JSON.parse(t),r={...s};return s.comments&&(r.comments=null===(e=s.comments)||void 0===e?void 0:e.map((t=>({...t,createdAt:new Date(t.createdAt)})))),r}(t))),null===(s=t.threadsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse",o.DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}}},5945:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor(...t){}}},6345:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}e.default=i,i.DESCRIPTOR_NAME="KeyValueDescriptor",i.DESCRIPTOR={fields:{key:{type:"string",id:1},value:{type:"string",id:2}}}},8689:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const n=s(2209),i=r(s(3596)),o=s(7158),a=r(s(6052)),c=r(s(4910)),u=r(s(357));e._SERVICE=13;class d{static async isBundleUploaded(t,e){const s=new a.default(e);if(t.state!==o.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new u.default("WebSocket Gateway is not connected.",t);const r=await t._sendRequest(d._SERVICE,a.default.TYPE,i.default.encode(s));return i.default.decode(r,c.default).isUploaded}}d._SERVICE=e._SERVICE,(0,n.mix)(d,n.EmitterMixin),e.default=d},6052:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.bundleVersion=t}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(t){return new i(t.bundleVersion)}}e.default=i,i.TYPE="131",i.READABLE_TYPE_NAME="isEditorBundleUploaded",i.DESCRIPTOR_NAME="IsEditorBundleUploadedMessage",i.DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}}},4910:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.isUploaded=t}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(t){return new i(t.isUploaded)}}e.default=i,i.DESCRIPTOR_NAME="IsEditorBundleUploadedResponse",i.DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}}},6314:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(357));class i extends n.default{constructor(t,e){super(t+" Service is not connected.",e)}}e.default=i},3545:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{constructor(...t){super()}static fromJSON(t){throw new TypeError("Must be implemented in a child class!")}}e.default=i,i.TYPE="1000"},3596:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=i(s(6154)),c=o(s(6783)),u=o(s(8677)),d=o(s(6345)),l=o(s(7618)),h=o(s(2529)),f=o(s(1578)),p=o(s(1706)),y=o(s(9883)),m=[d.default,c.default,u.default,l.default,h.default,f.default,p.default,y.default],v=a.Root.fromJSON({nested:m.reduce(((t,e)=>(t[e.DESCRIPTOR_NAME]=e.DESCRIPTOR,t)),{})});function _(t){return e=t,v.lookup(e.DESCRIPTOR_NAME)||v.addJSON({[e.DESCRIPTOR_NAME]:e.DESCRIPTOR}),v.lookupType(t.DESCRIPTOR_NAME);var e}e.default=class{static decode(t,e){const s=_(e).decode("undefined"==typeof window?t:new Uint8Array(t));return e.fromJSON({...s})}static encode(t){const e=_(t.constructor),s=t.toJSON(),r=e.verify(s);if(r)throw Error(r);return e.encode(e.create(s)).finish()}}},9883:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static create(t){return{revisionId:t.id,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.stringify(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds}}static toJSON(t){var e;return{revisionId:t.revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.stringify(t.authorsIds):void 0,diffData:t.diffData,createdAt:null===(e=t.createdAt)||void 0===e?void 0:e.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static fromJSON(t){return{revisionId:(t={...t}).revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.parse(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?new Date(t.createdAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static toObject(t){return function(t){for(const[e,s]of Object.entries(t))void 0===s&&delete t[e];return t}({id:t.revisionId,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.parse(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds})}}e.default=i,i.DESCRIPTOR_NAME="RevisionDescriptor",i.DESCRIPTOR={fields:{revisionId:{type:"string",id:1},name:{type:"string",id:2},creatorId:{type:"string",id:3},authorsIds:{type:"string",id:4},diffData:{type:"string",id:5},createdAt:{type:"string",id:6},attributes:{type:"string",id:7},toVersion:{type:"uint32",id:8},fromVersion:{type:"uint32",id:9},isEmptyCurrent:{type:"bool",id:10}}}},801:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="121",i.READABLE_TYPE_NAME="connectToRevisionHistory",i.DESCRIPTOR_NAME="RevisionHistoryConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},3667:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.documentId=t,this.revisionId=e}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(t){return new i(t.documentId,t.revisionId)}}e.default=i,i.TYPE="123",i.READABLE_TYPE_NAME="getRevision",i.DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}}},8702:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.documentId=t,this.requestId=e}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(t){return new i(t.documentId,t.requestId)}}e.default=i,i.TYPE="122",i.READABLE_TYPE_NAME="reconnectToRevisionHistory",i.DESCRIPTOR_NAME="RevisionHistoryReconnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}}},6120:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(t,e,s){super(),this.documentId=t,this.requestId=e,this.revisions=s}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(i.default.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(i.default.toObject)}}static create(t){return new o(t.documentId,t.requestId,t.revisions.map(i.default.create))}static fromJSON(t){return new o(t.documentId,t.requestId,t.revisions.map(i.default.fromJSON))}}e.default=o,o.TYPE="124",o.READABLE_TYPE_NAME="updateRevisions",o.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},5218:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(t,e,s){super(),this.channel=t,this.requestId=e,this.revisions=s}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(i.default.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(i.default.toObject)}}static fromJSON(t){return new o(t.channel,t.requestId,t.revisions.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="RevisionHistoryConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},6311:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(t,e,s,r,n,i,o,a,c,u){super(),this.revisionId=t,this.name=e,this.creatorId=s,this.authorsIds=r,this.createdAt=n,this.diffData=i,this.attributes=o,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return i.default.toJSON(this)}toObject(){return i.default.toObject(this)}static create(t){return new o(t.revisionId,t.name,t.creatorId,t.authorsIds,t.createdAt,t.diffData,t.attributes,t.fromVersion,t.toVersion,t.isEmptyCurrent)}static fromJSON(t){return new o(t.revisionId,t.name,t.creatorId,t.authorsIds?JSON.parse(t.authorsIds):void 0,t.createdAt?new Date(t.createdAt):void 0,t.diffData,t.attributes?JSON.parse(t.attributes):void 0,t.fromVersion,t.toVersion,t.isEmptyCurrent)}}e.default=o,o.DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse",o.DESCRIPTOR=i.default.DESCRIPTOR},1655:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.requestId=t}toJSON(){return{requestId:this.requestId}}static fromJSON(t){return new i(t.requestId)}}e.default=i,i.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse",i.DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}}},8811:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(3667)),d=o(s(6311)),l=o(s(6120)),h=o(s(1655)),f=o(s(801)),p=o(s(5218)),y=o(s(8702)),m=o(s(357)),v=i(s(7158)),_=o(s(6314));e._SERVICE=12;class x{constructor(t){this._documentId=t,this._isConnected=!1}get isConnected(){return this._isConnected}connect(t){return this._isConnected?Promise.resolve():this._connect(t,new f.default(this._documentId))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}reconnect(t,e){if(this.isConnected)throw new m.default("Cannot reconnect to already connected service.",t);return this._connect(t,new y.default(this._documentId,e))}async updateRevisions(t,e){const s=l.default.create({documentId:this._documentId,requestId:e,revisions:t}),r=await this._sendRequest(l.default.TYPE,s),{requestId:n}=c.default.decode(r,h.default);return n}async getRevision(t){const e=new u.default(this._documentId,t),s=await this._sendRequest(u.default.TYPE,e);return c.default.decode(s,d.default).toObject()}async _connect(t,s){if(t.state!==v.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new m.default("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const r=await t._sendRequest(e._SERVICE,s.constructor.TYPE,c.default.encode(s)),{channel:n,requestId:i,revisions:o}=c.default.decode(r,p.default).toObject();return this.listenTo(t,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:v.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,n),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:i}}_connectToChannel(t,e){this._channel=t._getChannel(x._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(l.default.TYPE),((t,e)=>{const{documentId:s,requestId:r,revisions:n}=c.default.decode(e,l.default).toObject();this.fire("revisionsUpdated",{documentId:s,requestId:r,revisionsData:n})}))}_onWsGatewayStateChange(t){t===v.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(t,s){if(!this._wsGateway||!this._isConnected)throw new _.default("Revision History",this);return this._wsGateway._sendRequest(e._SERVICE,t,c.default.encode(s))}}x._SERVICE=e._SERVICE,(0,a.mix)(x,a.EmitterMixin),e.default=x},6783:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}e.default=i,i.DESCRIPTOR_NAME="SessionsSocketDescriptor",i.DESCRIPTOR={fields:{session:{type:"string",id:1},user:{type:"string",id:2},role:{id:3,type:"string"},permissions:{rule:"repeated",type:"string",id:4}}}},2366:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.id=t,this.sessionType=e}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(t){return new i(t.id,t.sessionType)}}e.default=i,i.TYPE="31",i.READABLE_TYPE_NAME="getConnectedSockets",i.DESCRIPTOR_NAME="SessionsConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}}},2414:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r){super(),this.id=t,this.userId=e,this.role=s,this.permissions=r}toJSON(){var t,e,s;return{id:this.id,userId:null!==(t=this.userId)&&void 0!==t?t:void 0,role:null!==(e=this.role)&&void 0!==e?e:void 0,permissions:null!==(s=this.permissions)&&void 0!==s?s:void 0}}static fromJSON(t){return new i(t.id,t.userId,t.role,t.permissions)}}e.default=i,i.TYPE="32",i.READABLE_TYPE_NAME="connectSocket",i.DESCRIPTOR_NAME="SocketConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}}},4194:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new i(t.id)}}e.default=i,i.TYPE="33",i.READABLE_TYPE_NAME="disconnectSocket",i.DESCRIPTOR_NAME="SocketDisconnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},6145:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e=[]){super(),this.channel=t,this.sockets=e}toJSON(){return{channel:this.channel,sockets:this.sockets.map((t=>({user:t.userId,session:t.id,role:t.role,permissions:t.permissions})))}}static fromJSON(t){return new i(t.channel,t.sockets.map((t=>({id:t.session,userId:t.user,role:t.role,permissions:t.permissions}))))}}e.default=i,i.DESCRIPTOR_NAME="SessionsConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}}},2690:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=s(2209),i=s(7026),o=r(s(7530)),a=r(s(7158)),c=r(s(6145)),u=r(s(2366)),d=r(s(2414)),l=r(s(4194)),h=r(s(3596));class f extends n.Collection{constructor(t,e){super({idProperty:"id"}),this._id=t,this._sessionType=e,this._handlers=new Map,this._eventsQueue=[],this._isRunning=!1}async connect(t){this._wsGateway=t,this.stopListening(t,"change:state");const e=new u.default(this._id,this._sessionType);let s;try{const t=await this._wsGateway._sendRequest(i._SERVICE,u.default.TYPE,h.default.encode(e));s=h.default.decode(t,c.default)}catch(t){s=new c.default(this._id,[])}this._connectToChannel(this._wsGateway,s.channel,this._sessionType);const r=await async function(t,e){const s=e.map((t=>t.userId)),r=s.length?await o.default.getMany(t,s):[];return e.map((t=>{const e={id:t.id,role:t.role,permissions:t.permissions};return e.user=t.userId&&r.find((e=>e.id===t.userId))||new o.default,e}))}(this._wsGateway,s.sockets);for(const t of r)super.add(t);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:a.default._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(t=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&t&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),t&&this.stopListening()}}add(t,e){throw new TypeError("The collection is read-only.")}remove(t){throw new TypeError("The collection is read-only.")}_connectToChannel(t,e,s){this._channel=t._getChannel(s,e),this._channel&&(this._addHandler(this._channel,d.default.TYPE,(async e=>{const s=h.default.decode(e,d.default);if(-1===this.getIndex(s.id)){const e={id:s.id,role:s.role,permissions:s.permissions};s.userId&&(e.user=await o.default.get(t,s.userId)),super.add(e)}})),this._addHandler(this._channel,l.default.TYPE,(t=>{const e=h.default.decode(t,l.default);-1!==this.getIndex(e.id)&&super.remove(e.id)})))}async _onWsGatewayStateChange(t){t===a.default.STATE_DISCONNECTED&&this.disconnect(!1),t===a.default.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let t;for(this._isRunning=!0;t=this._eventsQueue.shift();){const e=this._handlers.get(t.eventName);e&&await e(t.data)}this._isRunning=!1}_addHandler(t,e,s){const r=t.getEventName(e,!0);this.listenTo(t,r,(async(t,e)=>{const s=t.name;this._eventsQueue.push({eventName:s,data:e}),await this._runQueue()})),this._handlers.set(r,s)}}e.default=f},7026:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const n=r(s(2690));e._SERVICE=3,e.default=class{static async getConnectedSessions(t,e,s){const r=new n.default(e,s);return await r.connect(t),r}}},1706:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON(t){var e;return{...t,data:t.data?JSON.stringify(t.data):t.data,attributes:t.attributes?JSON.stringify(t.attributes):t.attributes,createdAt:null===(e=t.createdAt)||void 0===e?void 0:e.toISOString()}}static fromJSON(t){return{...t,data:t.data?JSON.parse(t.data):t.data,attributes:t.attributes?JSON.parse(t.attributes):t.attributes,createdAt:t.createdAt?new Date(t.createdAt):void 0}}}e.default=i,i.DESCRIPTOR_NAME="SuggestionDescriptor",i.DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}}},597:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r={},n=null,i=null){super(),this.id=t,this.documentId=e,this.type=s,this.data=r,this.originalSuggestionId=n,this.attributes=i}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){var e;return new i(t.id,t.documentId,t.type,JSON.parse(t.data),null!==(e=t.originalSuggestionId)&&void 0!==e?e:null,t.attributes?JSON.parse(t.attributes):null)}}e.default=i,i.TYPE="101",i.READABLE_TYPE_NAME="addSuggestion",i.DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}}},3268:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.ids=t,this.documentId=e,this.state=s}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(t){return new i(t.ids,t.documentId,t.state)}}e.default=i,i.TYPE="106",i.READABLE_TYPE_NAME="batchUpdateSuggestionsState",i.DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage",i.DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}}},144:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="105",i.READABLE_TYPE_NAME="connectToSuggestions",i.DESCRIPTOR_NAME="TrackChangesConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},2679:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="102",i.READABLE_TYPE_NAME="getAllSuggestions",i.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},1659:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.id=t,this.documentId=e}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(t){return new i(t.id,t.documentId)}}e.default=i,i.TYPE="103",i.READABLE_TYPE_NAME="getSuggestion",i.DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}}},598:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n,i=null){super(),this.id=t,this.documentId=e,this.hasComments=s,this.isHasCommentsModified=r,this.state=n,this.attributes=i}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new i(t.id,t.documentId,t.hasComments,t.isHasCommentsModified,t.state,t.attributes?JSON.parse(t.attributes):null)}}e.default=i,i.TYPE="104",i.READABLE_TYPE_NAME="updateSuggestion",i.DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},hasComments:{type:"bool",id:3},isHasCommentsModified:{type:"bool",id:4},state:{type:"string",id:5},attributes:{type:"string",id:6}}}},3111:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n,i,o={},a=null){super(),this.id=t,this.authorId=e,this.type=s,this.hasComments=n,this.state=i,this.data=o,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){var t;return{id:this.id,authorId:this.authorId,type:this.type,createdAt:null===(t=this.createdAt)||void 0===t?void 0:t.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new i(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}e.default=i,i.DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse",i.DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}}},701:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1706));class o extends n.default{constructor(t,e,s){super(),this.channel=t,this._suggestions=e,this._suggestionsV2=s,this.suggestions=(null==s?void 0:s.length)?s:e}toJSON(){var t,e;return{channel:this.channel,suggestions:null===(t=this._suggestions)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),suggestionsV2:null===(e=this._suggestionsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(t.channel,null===(e=t.suggestions)||void 0===e?void 0:e.map((t=>JSON.parse(t))),null===(s=t.suggestionsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="TrackChangesConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}}},3390:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1706));class o extends n.default{constructor(t,e){super(),this._suggestions=t,this._suggestionsV2=e,this.suggestions=(null==e?void 0:e.length)?e:t}toJSON(){var t,e;return{suggestions:null===(t=this._suggestions)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),suggestionsV2:null===(e=this._suggestionsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(null===(e=t.suggestions)||void 0===e?void 0:e.map(a),null===(s=t.suggestionsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}function a(t){const e=JSON.parse(t);return e.createdAt=e.createdAt?new Date(e.createdAt):void 0,e}e.default=o,o.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse",o.DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}}},5930:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n,i,o={},a=null){super(),this.id=t,this.authorId=e,this.type=s,this.hasComments=n,this.state=i,this.data=o,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new i(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}e.default=i,i.DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse",i.DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}}},125:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(597)),d=o(s(3111)),l=o(s(1659)),h=o(s(5930)),f=o(s(2679)),p=o(s(3390)),y=o(s(598)),m=o(s(144)),v=o(s(701)),_=o(s(357)),x=i(s(7158)),g=o(s(6314)),b=o(s(8801)),w=o(s(3268));e._SERVICE=10;class O{constructor(t){this._documentId=t,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==x.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new _.default("WebSocket Gateway is not connected.",t);const s=new m.default(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const r=await t._sendRequest(e._SERVICE,m.default.TYPE,c.default.encode(s)),n=c.default.decode(r,v.default);return this.listenTo(t,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:x.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,n.channel),this._isConnected=!0,this.fire("connected"),n.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(t,e,s,r=null,n){const i=new u.default(t,this._documentId,e,s,r,n),o=await this._sendRequest(u.default.TYPE,i);return c.default.decode(o,d.default)}async get(t,e=1){const s=new l.default(t,this._documentId);try{const t=await this._sendRequest(l.default.TYPE,s);return c.default.decode(t,h.default)}catch(s){if(s instanceof b.default&&"404"===s.code&&e<5)return await(r=100*e,new Promise((t=>{setTimeout(t,r)}))),this.get(t,e+1);if(s instanceof b.default)throw s;throw b.default.fromPublicError(s)}var r}async getAll(){const t=new f.default(this._documentId),e=await this._sendRequest(f.default.TYPE,t),{suggestions:s}=c.default.decode(e,p.default);return s}async update(t,e={}){const{hasComments:s,state:r,attributes:n}=e,i=void 0!==s,o=new y.default(t,this._documentId,s,i,r,n);await this._sendRequest(y.default.TYPE,o)}async batchUpdateState(t){const e=new w.default(t.ids,this._documentId,t.state);await this._sendRequest(w.default.TYPE,e)}_connectToChannel(t,e){this._channel=t._getChannel(O._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(y.default.TYPE),((t,e)=>{const s=c.default.decode(e,y.default);this.fire("suggestionUpdated",s)}))}_onWsGatewayStateChange(t){t===x.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(t,s){if(!this._wsGateway||!this._isConnected)throw new g.default("Track Changes",this);return this._wsGateway._sendRequest(e._SERVICE,t,c.default.encode(s))}}O._SERVICE=e._SERVICE,(0,a.mix)(O,a.EmitterMixin),e.default=O},7618:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}e.default=i,i.DESCRIPTOR_NAME="UserDescriptor",i.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7204:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.ids=t}toJSON(){return{ids:this.ids}}static fromJSON(t){return new i(t.ids)}}e.default=i,i.TYPE="22",i.READABLE_TYPE_NAME="getManyUsers",i.DESCRIPTOR_NAME="GetManyUsersMessage",i.DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}}},1779:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new i(t.id)}}e.default=i,i.TYPE="21",i.READABLE_TYPE_NAME="getUser",i.DESCRIPTOR_NAME="GetUserMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},624:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.users=t}toJSON(){return{users:this.users.map(o)}}static fromJSON(t){return new i(t.users.map(a))}}function o(t){return{attributes:Object.keys(t).map((e=>({key:e,value:JSON.stringify(t[e])})))}}function a(t){return t.attributes.reduce(((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t)),{})}e.default=i,i.DESCRIPTOR_NAME="GetManyUsersResponse",i.DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}}},2184:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.attributes=t}toJSON(){return{attributes:Object.keys(this.attributes).map((t=>({key:t,value:JSON.stringify(this.attributes[t])})))}}static fromJSON(t){const e=t.attributes.reduce(((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t)),{});return new i(e)}}e.default=i,i.DESCRIPTOR_NAME="GetUserResponse",i.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7530:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(1779)),i=r(s(2184)),o=r(s(3596)),a=r(s(7204)),c=r(s(624));class u{constructor(t={}){this._attributes=new Map;for(const e of Object.keys(t))"id"!==e?(this._attributes.set(e,t[e]),Object.defineProperty(this,e,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(e)})):this.id=t.id}static fromData(t){return new u(t)}static async get(t,e){const s=new n.default(e);try{const e=await t._sendRequest(u._SERVICE,n.default.TYPE,o.default.encode(s)),r=o.default.decode(e,i.default);return new u(r.attributes)}catch(t){return new u({id:e})}}static async getMany(t,e){const s=new a.default(e);try{const e=await t._sendRequest(u._SERVICE,a.default.TYPE,o.default.encode(s));return o.default.decode(e,c.default).users.map((t=>new u(t)))}catch(t){return e.map((t=>new u({id:t})))}}}u._SERVICE=2,e.default=u},6754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="37.0.0"},1573:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=s(2209),i=r(s(3554)),o=r(s(3596));class a{constructor(t,e,s){this._channelName=t,this._wsGateway=e,this._socket=s,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(t,e=!1){let s="";return e&&(s+="all:"),s+="event",t&&(s+=":"+t),s}_subscribeToChannel(){this._socket.on(this._channelName,(t=>{const e=o.default.decode(t,i.default);this.fire(this.getEventName(e.type,!0),e.data,e.socketId),e.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(e.type),e.data,e.socketId)}))}}(0,n.mix)(a,n.EmitterMixin),e.default=a},3554:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.type=t,this.socketId=e,this.data=s}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(t){return new i(t.type,t.socketId,t.data)}}e.default=i,i.DESCRIPTOR_NAME="ChannelMessage",i.DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}}},8735:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(4990)),i=r(s(3596));e.default=class{encode(t,e,s,r="/",o={}){if(e.length>2)throw new Error("PacketParser supports only 2 elements in data");const a={type:t,data:e,id:s,nsp:r};return i.default.encode(n.default.create(a,o))}decode(t){const e=i.default.decode(t,n.default);return{packet:{id:e.id,type:e.type,data:e.packetData,nsp:e.nsp},options:{flags:e.options.flags,rooms:e.options.rooms,except:e.options.except}}}}},2854:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.BUFFER,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="BytesBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}}},4253:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="NumberBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}}},1433:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.NUMBER),u.DESCRIPTOR_NAME="NumberNumberPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}}},2272:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new u(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="NumberObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}}},1692:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.STRING),u.DESCRIPTOR_NAME="NumberStringPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}}},7239:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(t){return new u(t.data&&JSON.parse(t.data),t.data1)}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.OBJECT,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="ObjectBufferPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}}},9075:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new u(t.data&&JSON.parse(t.data),t.data1&&JSON.parse(t.data1))}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.OBJECT,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="ObjectObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},799:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{static create(t,e){throw new TypeError("Must be implemented in a child class!")}}e.default=i,t.exports=i},4990:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3596)),i=r(s(3545)),o=r(s(338)),a=r(s(817)),c=r(s(4253)),u=r(s(6335)),d=r(s(2854)),l=r(s(9769)),h=r(s(2272)),f=r(s(9075)),p=r(s(7239)),y=r(s(1797)),m=r(s(1694)),v=r(s(1433)),_=r(s(1692)),x=[c.default,u.default,d.default,l.default,h.default,f.default,p.default,y.default,m.default,v.default,_.default].reduce(((t,e)=>(t[e.TYPE]=e,t)),{});class g extends i.default{constructor(t,e,s,r="/",n=new o.default){super(),this.type=t,this.data=e,this.id=s,this.nsp=r,this.options=n}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const t=n.default.encode(this.options),e=n.default.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:e,options:t}}static fromJSON(t){const e=Math.floor(t.type/10);return new g(t.type-10*e,n.default.decode(t.data,x[e]),t.id,t.nsp,t.options?n.default.decode(t.options,o.default):new o.default)}static create(t,e={}){var s;const r=a.default.getPacketType(a.default.getType(t.data[0]),a.default.getType(null!==(s=t.data[1])&&void 0!==s?s:t.data[0]));return new g(t.type,x[r].create(t.data[0],t.data[1]),t.id,t.nsp,new o.default(e.flags,e.rooms,e.except))}}e.default=g,g.TYPE=10,g.DESCRIPTOR_NAME="PacketMessage",g.DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}}},338:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e=[],s=[]){super(),this.flags=t,this.rooms=e,this.except=s}toJSON(){var t,e;return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:(null===(t=this.rooms)||void 0===t?void 0:t.length)?this.rooms:void 0,except:(null===(e=this.except)||void 0===e?void 0:e.length)?this.except:void 0}}static fromJSON(t){return new i(t.flags&&JSON.parse(t.flags),t.rooms,t.except)}}e.default=i,i.TYPE=11,i.DESCRIPTOR_NAME="PacketOptionsMessage",i.DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}}},6335:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="StringBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}}},1694:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.NUMBER),u.DESCRIPTOR_NAME="StringNumberPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}}},9769:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new u(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="StringObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},1797:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.STRING),u.DESCRIPTOR_NAME="StringStringPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},2069:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.ENCODED_TYPES=void 0;const n=s(170),i=r(s(8735)),o=r(s(817));e.ENCODED_TYPES=[n.PacketType.EVENT,n.PacketType.ACK,n.PacketType.BINARY_ACK,n.PacketType.BINARY_EVENT];class a extends n.Encoder{constructor(t=new i.default){super(),this._packetParser=t}encode(t){if(e.ENCODED_TYPES.includes(t.type))try{return[this._packetParser.encode(t.type,t.data,t.id,t.nsp)]}catch(t){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:t.message}})}return super.encode(t)}}e.Encoder=a;class c extends n.Decoder{constructor(t=new i.default){super(),this._packetParser=t}add(t){if(!o.default.isBuffer(t))return super.add(t);let e;try{e=this._packetParser.decode(t).packet}catch(e){return super.add(t)}super.emitReserved("decoded",e)}}e.Decoder=c},817:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageDataTypes=void 0;const s=!("undefined"==typeof process||!process.versions||!process.versions.node);var r,n;(n=r=e.MessageDataTypes||(e.MessageDataTypes={}))[n.BUFFER=1]="BUFFER",n[n.STRING=2]="STRING",n[n.NUMBER=3]="NUMBER",n[n.OBJECT=4]="OBJECT";class i{static getPacketType(...t){let e=0;for(let s=0;s<t.length;s++)e+=t[s]*Math.pow(10,t.length-s-1);return e}static getType(t){if(i.isBuffer(t))return r.BUFFER;const e=typeof t;return"string"===e?r.STRING:"number"===e?r.NUMBER:r.OBJECT}static isBuffer(t){return s&&Buffer.isBuffer(t)||t instanceof ArrayBuffer||t instanceof Uint8Array||this._isBufferView(t)}static _isBufferView(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}e.default=i},1113:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(357));class i{constructor(t,e){this._context=t,this._deferredPromise=function(){let t,e;const s=new Promise(((s,r)=>{t=s,e=r}));return{resolve:t,reject:e,promise:s}}(),this.timeout=setTimeout((()=>this.error(new n.default("Request timeout.",this._context))),e)}get promise(){return this._deferredPromise.promise}response(t){this._deferredPromise.resolve(t)}error(t){this._deferredPromise.reject(t)}}e.default=class{constructor(t){this._context=t,this._requests=new Set}async send(t,e=1e4){const s=this._createRequest(e);try{return t(s),await s.promise}finally{this._finishRequest(s)}}errorAll(t){for(const e of this._requests)e.error(t)}_createRequest(t){const e=new i(this._context,t);return this._requests.add(e),e}_finishRequest(t){this._requests.delete(t),clearTimeout(t.timeout)}}},7158:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WEB_SOCKET_GATEWAY_STATES=void 0;const n=s(8623),i=r(s(9655)),o=s(2209),a=r(s(1573)),c=r(s(7530)),u=r(s(6754)),d=r(s(357)),l=r(s(8801)),h=s(2069),f=r(s(1113));var p,y;(y=p=e.WEB_SOCKET_GATEWAY_STATES||(e.WEB_SOCKET_GATEWAY_STATES={})).DISCONNECTED="disconnected",y.CONNECTING="connecting",y.CONNECTED="connected";class m{constructor(t,e,s={},r=n.io,o=c.default.get){if(this._token=e,this._options=s,this._connectionProvider=r,this._userFactory=o,this._requestsManager=new f.default(this),this._channels=new Map,this._connectionAttempt=0,!t)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=(0,i.default)(t.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state","disconnected"),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",(async(t,e,s)=>{var r;if(this._debugEvent("ws-gw:change:state",s),s!==m.STATE_CONNECTED){if(s===m.STATE_DISCONNECTED)return this._requestsManager.errorAll(new d.default("Not connected.",this))}else try{this.me=await this._userFactory.call(c.default,this,null===(r=this._socketAuth)||void 0===r?void 0:r.userId)}catch(t){}}),{priority:m._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",((t,e)=>{this._options.onError?this._options.onError(e):console.error(e)}))}get sessionId(){return this.socketId}disconnect(){var t;this.state!==p.DISCONNECTED&&(null===(t=this._socket)||void 0===t||t.disconnect(),this._socket=void 0,this.state=p.DISCONNECTED)}async reconnect(){this._socket||this.state!==p.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(t,e="local.cs.dev:443/ws-v2",s={},r=n.io,i=c.default.get){const o=new m(e,t,s,r,i);return await o._connect(),o}_sendRequest(t,e,s){if(!t)throw new d.default("`serviceName` must be provided.",this);if(this.state!==m.STATE_CONNECTED)throw new d.default("Not connected.",this);if(!this._socketAuth||!this._socketAuth.isAuthenticated)throw new d.default("Not authenticated.",this);const r=new ArrayBuffer(s.length+2),n=new Uint8Array(r);return n[0]=t,n[1]=parseInt(e),n.set(s,2),this._emit(1,n)}_getChannel(t,e){const s=""+t+e;return!this._channels.has(s)&&this._socket&&this._channels.set(s,new a.default(s,this,this._socket)),this._channels.get(s)}_connect(){return new Promise(((t,e)=>{const s=this._setupSocket();!this.socketId&&s.io.on("reconnect_error",(()=>{this._debugEvent("reconnect_error"),this._reconnectionAttemptError(e)})),s.once("connect",(async()=>{this._debugEvent("once-connect");try{await this._onConnect(),t()}catch(t){e(t)}})),s.connect()}))}_getPortByProtocol(t){return["http:","ws:"].includes(t)?80:443}_setupSocket(){var t;if(this._socket)return this._socket;const e=this._url.port||this._getPortByProtocol(this._url.protocol),s=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+e,r=this._connectionProvider(s,{parser:{Encoder:h.Encoder,Decoder:h.Decoder},path:"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:u.default},agent:null!==(t=this._options.agent)&&void 0!==t&&t,closeOnBeforeunload:!1});return this.state=p.CONNECTING,r.on("connect",(()=>{this._debugEvent("connect"),this.socketId=r.id})),r.on("connect_error",(t=>{this._debugEvent("connect_error"),this._onError(t)})),r.on("disconnect",(()=>{this._debugEvent("disconnect"),this._onDisconnect()})),r.io.on("reconnect",(async()=>{this._debugEvent("reconnect"),await this._onReconnect()})),r.io.on("reconnect_attempt",(t=>{this._debugEvent("reconnect_attempt",t),this.state=p.CONNECTING,this._connectionAttempt=t})),r.on("unauthorized",(t=>{this._debugEvent("unauthorized"),this._onUnauthorized(t)})),r.on("authenticationRequest",(async t=>{this._debugEvent("authenticationRequest",t.attempt),await this._onReconnect()})),this._socket=r,r}_emit(t,e){const s=this._socket;return this._requestsManager.send((r=>{s.emit(t,e,((t,e)=>{if(t)return r.error(l.default.fromPublicError(t));r.response(e)}))}),this._options.requestTimeout)}_addAuthData(t,e){this._socketAuth={environmentId:t,userId:e,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=p.CONNECTED;const t=async(t,e,s)=>{this._debugEvent("token:value:change");try{await this._authenticate(s)}catch(t){}};this._token.on("change:value",t),this._socket.io.off("reconnect_error"),this.on("disconnect",(()=>{this._token.off("change:value",t)}))}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=p.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const t of this._channels.values())t.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_onError(t){console.warn("Connection to WebSocket server failed. Details: ",{originalError:t})}_debugEvent(t,e){if(!this._isDebugModeEnabled())return;const s=void 0!==e?", data: "+e:"";console.info((new Date).toLocaleString()+" "+t+s)}_reconnectionAttemptError(t){this._connectionAttempt>=2&&(this.disconnect(),t(d.default.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a missing or blocked Internet connection.",action:"Please verify the stability of your Internet connection and ensure that no antivirus or firewall software blocks the Web Socket protocol connections."})))}_onUnauthorized({error:t}){this._removeAuthData(),this.fire("error",l.default.fromPublicError(t))}async _authenticate(t){try{const e=await this._emit(2,{token:t});this._addAuthData(e.environmentId,e.userId)}catch(t){throw this._removeAuthData(),t}}_isDebugModeEnabled(){var t;return!!o.global.window.localStorage&&"true"===(null!==(t=o.global.window.localStorage.getItem("csClientDebugMode"))&&void 0!==t?t:"false").toLowerCase()}}m.STATE_DISCONNECTED=p.DISCONNECTED,m.STATE_CONNECTING=p.CONNECTING,m.STATE_CONNECTED=p.CONNECTED,m._CHANGE_STATE_EVENT_PRIORITY=o.priorities.get("highest")+999999,(0,o.mix)(m,o.ObservableMixin),e.default=m},9933:(t,e,s)=>{"use strict";t.exports=s(6386)},2777:(t,e,s)=>{"use strict";var r=e,n=s(238),i=s(7886);function o(t,e,s,r){if(e.resolvedType)if(e.resolvedType instanceof n){t("switch(d%s){",r);for(var i=e.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)e.repeated&&i[o[a]]===e.typeDefault&&t("default:"),t("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",r,i[o[a]])("break");t("}")}else t('if(typeof d%s!=="object")',r)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,s,r);else{var c=!1;switch(e.type){case"double":case"float":t("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function a(t,e,s,r){if(e.resolvedType)e.resolvedType instanceof n?t("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,s,r,r):t("d%s=types[%i].toObject(m%s,o)",r,s,r);else{var i=!1;switch(e.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}r.fromObject=function(t){var e=t.fieldsArray,s=i.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!e.length)return s("return new this.ctor");s("var m=new this.ctor");for(var r=0;r<e.length;++r){var a=e[r].resolve(),c=i.safeProp(a.name);a.map?(s("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),o(s,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(s("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),o(s,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof n||s("if(d%s!=null){",c),o(s,a,r,c),a.resolvedType instanceof n||s("}"))}return s("return m")},r.toObject=function(t){var e=t.fieldsArray.slice().sort(i.compareFieldsById);if(!e.length)return i.codegen()("return {}");for(var s=i.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],c=[],u=0;u<e.length;++u)e[u].partOf||(e[u].resolve().repeated?r:e[u].map?o:c).push(e[u]);if(r.length){for(s("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)s("d%s=[]",i.safeProp(r[u].name));s("}")}if(o.length){for(s("if(o.objects||o.defaults){"),u=0;u<o.length;++u)s("d%s={}",i.safeProp(o[u].name));s("}")}if(c.length){for(s("if(o.defaults){"),u=0;u<c.length;++u){var d=c[u],l=i.safeProp(d.name);if(d.resolvedType instanceof n)s("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var h="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";s("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else s("d%s=%j",l,d.typeDefault)}s("}")}var f=!1;for(u=0;u<e.length;++u){d=e[u];var p=t._fieldsArray.indexOf(d);l=i.safeProp(d.name);d.map?(f||(f=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(s,d,p,l+"[ks2[j]]")("}")):d.repeated?(s("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(s,d,p,l+"[j]")("}")):(s("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),a(s,d,p,l),d.partOf&&s("if(o.oneofs)")("d%s=%j",i.safeProp(d.partOf.name),d.name)),s("}")}return s("return d")}},8159:(t,e,s)=>{"use strict";t.exports=function(t){var e=i.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter((function(t){return t.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&e("if((t&7)===4)")("break");e("switch(t>>>3){");for(var s=0;s<t.fieldsArray.length;++s){var a=t._fieldsArray[s].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);e("case %i:",a.id),a.map?(e("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[a.keyType]?e("k=%j",n.defaults[a.keyType]):e("k=null"),void 0!==n.defaults[c]?e("value=%j",n.defaults[c]):e("value=null"),e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===n.basic[c]?e("value=types[%i].decode(r,r.uint32())",s):e("value=r.%s()",c),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[a.keyType]?e('%s[typeof k==="object"?util.longToHash(k):k]=value',u):e("%s[k]=value",u)):a.repeated?(e("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==n.packed[c]&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===n.basic[c]?e(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,s):e("%s.push(r.%s())",u,c)):void 0===n.basic[c]?e(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,s):e("%s=r.%s()",u,c),e("break")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<t._fieldsArray.length;++s){var d=t._fieldsArray[s];d.required&&e("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return e("return m")};var r=s(238),n=s(8372),i=s(7886);function o(t){return"missing required '"+t.name+"'"}},8357:(t,e,s)=>{"use strict";t.exports=function(t){for(var e,s=i.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),a=t.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),d=t._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,h=n.basic[l];e="m"+i.safeProp(u.name),u.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",e,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",e)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|n.mapKey[u.keyType],u.keyType),void 0===h?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,e):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,e),s("}")("}")):u.repeated?(s("if(%s!=null&&%s.length){",e,e),u.packed&&void 0!==n.packed[l]?s("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",e)("w.%s(%s[i])",l,e)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",e),void 0===h?o(s,u,d,e+"[i]"):s("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,l,e)),s("}")):(u.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",e,u.name),void 0===h?o(s,u,d,e):s("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,l,e))}return s("return w")};var r=s(238),n=s(8372),i=s(7886);function o(t,e,s,r){return e.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,r,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,r,(e.id<<3|2)>>>0)}},238:(t,e,s)=>{"use strict";t.exports=o;var r=s(6913);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var n=s(9587),i=s(7886);function o(t,e,s,n,i){if(r.call(this,t,s),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=i||{},this.reserved=void 0,e)for(var o=Object.keys(e),a=0;a<o.length;++a)"number"==typeof e[o[a]]&&(this.valuesById[this.values[o[a]]=e[o[a]]]=o[a])}o.fromJSON=function(t,e){var s=new o(t,e.values,e.options,e.comment,e.comments);return s.reserved=e.reserved,s},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",e?this.comment:void 0,"comments",e?this.comments:void 0])},o.prototype.add=function(t,e,s){if(!i.isString(t))throw TypeError("name must be a string");if(!i.isInteger(e))throw TypeError("id must be an integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(e))throw Error("id "+e+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(void 0!==this.valuesById[e]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+e+" in "+this);this.values[t]=e}else this.valuesById[this.values[t]=e]=t;return this.comments[t]=s||null,this},o.prototype.remove=function(t){if(!i.isString(t))throw TypeError("name must be a string");var e=this.values[t];if(null==e)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[e],delete this.values[t],delete this.comments[t],this},o.prototype.isReservedId=function(t){return n.isReservedId(this.reserved,t)},o.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},5263:(t,e,s)=>{"use strict";t.exports=u;var r=s(6913);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var n,i=s(238),o=s(8372),a=s(7886),c=/^required|optional|repeated$/;function u(t,e,s,n,i,u,d){if(a.isObject(n)?(d=i,u=n,n=i=void 0):a.isObject(i)&&(d=u,u=i,i=void 0),r.call(this,t,u),!a.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!a.isString(s))throw TypeError("type must be a string");if(void 0!==n&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=s,this.id=e,this.extend=i||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=d}u.fromJSON=function(t,e){return new u(t,e.id,e.type,e.rule,e.extend,e.options,e.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(t,e,s){return"packed"===t&&(this._packed=null),r.prototype.setOption.call(this,t,e,s)},u.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,t=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,t=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(t,e,s,r){return"function"==typeof e?e=a.decorateType(e).name:e&&"object"==typeof e&&(e=a.decorateEnum(e).name),function(n,i){a.decorateType(n.constructor).add(new u(i,t,e,s,{default:r}))}},u._configure=function(t){n=t}},6386:(t,e,s)=>{"use strict";var r=t.exports=s(2877);r.build="light",r.load=function(t,e,s){return"function"==typeof e?(s=e,e=new r.Root):e||(e=new r.Root),e.load(t,s)},r.loadSync=function(t,e){return e||(e=new r.Root),e.loadSync(t)},r.encoder=s(8357),r.decoder=s(8159),r.verifier=s(5669),r.converter=s(2777),r.ReflectionObject=s(6913),r.Namespace=s(9587),r.Root=s(6720),r.Enum=s(238),r.Type=s(396),r.Field=s(5263),r.OneOf=s(8930),r.MapField=s(6977),r.Service=s(5280),r.Method=s(9455),r.Message=s(5986),r.wrappers=s(2016),r.types=s(8372),r.util=s(7886),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},2877:(t,e,s)=>{"use strict";var r=e;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=s(3117),r.BufferWriter=s(4766),r.Reader=s(9924),r.BufferReader=s(6515),r.util=s(4652),r.rpc=s(8607),r.roots=s(9188),r.configure=n,n()},6977:(t,e,s)=>{"use strict";t.exports=o;var r=s(5263);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var n=s(8372),i=s(7886);function o(t,e,s,n,o,a){if(r.call(this,t,e,n,void 0,void 0,o,a),!i.isString(s))throw TypeError("keyType must be a string");this.keyType=s,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(t,e){return new o(t,e.id,e.keyType,e.type,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(t,e,s){return"function"==typeof s?s=i.decorateType(s).name:s&&"object"==typeof s&&(s=i.decorateEnum(s).name),function(r,n){i.decorateType(r.constructor).add(new o(n,t,e,s))}}},5986:(t,e,s)=>{"use strict";t.exports=n;var r=s(4652);function n(t){if(t)for(var e=Object.keys(t),s=0;s<e.length;++s)this[e[s]]=t[e[s]]}n.create=function(t){return this.$type.create(t)},n.encode=function(t,e){return this.$type.encode(t,e)},n.encodeDelimited=function(t,e){return this.$type.encodeDelimited(t,e)},n.decode=function(t){return this.$type.decode(t)},n.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},n.verify=function(t){return this.$type.verify(t)},n.fromObject=function(t){return this.$type.fromObject(t)},n.toObject=function(t,e){return this.$type.toObject(t,e)},n.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},9455:(t,e,s)=>{"use strict";t.exports=i;var r=s(6913);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var n=s(7886);function i(t,e,s,i,o,a,c,u,d){if(n.isObject(o)?(c=o,o=a=void 0):n.isObject(a)&&(c=a,a=void 0),void 0!==e&&!n.isString(e))throw TypeError("type must be a string");if(!n.isString(s))throw TypeError("requestType must be a string");if(!n.isString(i))throw TypeError("responseType must be a string");r.call(this,t,c),this.type=e||"rpc",this.requestType=s,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=d}i.fromJSON=function(t,e){return new i(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options,e.comment,e.parsedOptions)},i.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},9587:(t,e,s)=>{"use strict";t.exports=l;var r=s(6913);((l.prototype=Object.create(r.prototype)).constructor=l).className="Namespace";var n,i,o,a=s(5263),c=s(8930),u=s(7886);function d(t,e){if(t&&t.length){for(var s={},r=0;r<t.length;++r)s[t[r].name]=t[r].toJSON(e);return s}}function l(t,e){r.call(this,t,e),this.nested=void 0,this._nestedArray=null}function h(t){return t._nestedArray=null,t}l.fromJSON=function(t,e){return new l(t,e.options).addJSON(e.nested)},l.arrayToJSON=d,l.isReservedId=function(t,e){if(t)for(var s=0;s<t.length;++s)if("string"!=typeof t[s]&&t[s][0]<=e&&t[s][1]>e)return!0;return!1},l.isReservedName=function(t,e){if(t)for(var s=0;s<t.length;++s)if(t[s]===e)return!0;return!1},Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),l.prototype.toJSON=function(t){return u.toObject(["options",this.options,"nested",d(this.nestedArray,t)])},l.prototype.addJSON=function(t){if(t)for(var e,s=Object.keys(t),r=0;r<s.length;++r)e=t[s[r]],this.add((void 0!==e.fields?n.fromJSON:void 0!==e.values?o.fromJSON:void 0!==e.methods?i.fromJSON:void 0!==e.id?a.fromJSON:l.fromJSON)(s[r],e));return this},l.prototype.get=function(t){return this.nested&&this.nested[t]||null},l.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof o)return this.nested[t].values;throw Error("no such enum: "+t)},l.prototype.add=function(t){if(!(t instanceof a&&void 0!==t.extend||t instanceof n||t instanceof o||t instanceof i||t instanceof l||t instanceof c))throw TypeError("object must be a valid nested object");if(this.nested){var e=this.get(t.name);if(e){if(!(e instanceof l&&t instanceof l)||e instanceof n||e instanceof i)throw Error("duplicate name '"+t.name+"' in "+this);for(var s=e.nestedArray,r=0;r<s.length;++r)t.add(s[r]);this.remove(e),this.nested||(this.nested={}),t.setOptions(e.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),h(this)},l.prototype.remove=function(t){if(!(t instanceof r))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),h(this)},l.prototype.define=function(t,e){if(u.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var s=this;t.length>0;){var r=t.shift();if(s.nested&&s.nested[r]){if(!((s=s.nested[r])instanceof l))throw Error("path conflicts with non-namespace objects")}else s.add(s=new l(r))}return e&&s.addJSON(e),s},l.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e<t.length;)t[e]instanceof l?t[e++].resolveAll():t[e++].resolve();return this.resolve()},l.prototype.lookup=function(t,e,s){if("boolean"==typeof e?(s=e,e=void 0):e&&!Array.isArray(e)&&(e=[e]),u.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),e);var r=this.get(t[0]);if(r){if(1===t.length){if(!e||e.indexOf(r.constructor)>-1)return r}else if(r instanceof l&&(r=r.lookup(t.slice(1),e,!0)))return r}else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof l&&(r=this._nestedArray[n].lookup(t,e,!0)))return r;return null===this.parent||s?null:this.parent.lookup(t,e)},l.prototype.lookupType=function(t){var e=this.lookup(t,[n]);if(!e)throw Error("no such type: "+t);return e},l.prototype.lookupEnum=function(t){var e=this.lookup(t,[o]);if(!e)throw Error("no such Enum '"+t+"' in "+this);return e},l.prototype.lookupTypeOrEnum=function(t){var e=this.lookup(t,[n,o]);if(!e)throw Error("no such Type or Enum '"+t+"' in "+this);return e},l.prototype.lookupService=function(t){var e=this.lookup(t,[i]);if(!e)throw Error("no such Service '"+t+"' in "+this);return e},l._configure=function(t,e,s){n=t,i=e,o=s}},6913:(t,e,s)=>{"use strict";t.exports=i,i.className="ReflectionObject";var r,n=s(7886);function i(t,e){if(!n.isString(t))throw TypeError("name must be a string");if(e&&!n.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof r&&e._handleAdd(this)},i.prototype.onRemove=function(t){var e=t.root;e instanceof r&&e._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(t){if(this.options)return this.options[t]},i.prototype.setOption=function(t,e,s){return s&&this.options&&void 0!==this.options[t]||((this.options||(this.options={}))[t]=e),this},i.prototype.setParsedOption=function(t,e,s){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(s){var i=r.find((function(e){return Object.prototype.hasOwnProperty.call(e,t)}));if(i){var o=i[t];n.setProperty(o,s,e)}else(i={})[t]=n.setProperty({},s,e),r.push(i)}else{var a={};a[t]=e,r.push(a)}return this},i.prototype.setOptions=function(t,e){if(t)for(var s=Object.keys(t),r=0;r<s.length;++r)this.setOption(s[r],t[s[r]],e);return this},i.prototype.toString=function(){var t=this.constructor.className,e=this.fullName;return e.length?t+" "+e:t},i._configure=function(t){r=t}},8930:(t,e,s)=>{"use strict";t.exports=o;var r=s(6913);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var n=s(5263),i=s(7886);function o(t,e,s,n){if(Array.isArray(e)||(s=e,e=void 0),r.call(this,t,s),void 0!==e&&!Array.isArray(e))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=n}function a(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}o.fromJSON=function(t,e){return new o(t,e.oneof,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:void 0])},o.prototype.add=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,a(this),this},o.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),(e=this.oneof.indexOf(t.name))>-1&&this.oneof.splice(e,1),t.partOf=null,this},o.prototype.onAdd=function(t){r.prototype.onAdd.call(this,t);for(var e=0;e<this.oneof.length;++e){var s=t.get(this.oneof[e]);s&&!s.partOf&&(s.partOf=this,this.fieldsArray.push(s))}a(this)},o.prototype.onRemove=function(t){for(var e,s=0;s<this.fieldsArray.length;++s)(e=this.fieldsArray[s]).parent&&e.parent.remove(e);r.prototype.onRemove.call(this,t)},o.d=function(){for(var t=new Array(arguments.length),e=0;e<arguments.length;)t[e]=arguments[e++];return function(e,s){i.decorateType(e.constructor).add(new o(s,t)),Object.defineProperty(e,s,{get:i.oneOfGetter(t),set:i.oneOfSetter(t)})}}},9924:(t,e,s)=>{"use strict";t.exports=c;var r,n=s(4652),i=n.LongBits,o=n.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return n.Buffer?function(t){return(c.create=function(t){return n.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function h(){var t=new i(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function f(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,s=this.pos+t;if(s>this.len)throw a(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,s):e===s?new this.buf.constructor(0):this._slice.call(this.buf,e,s)},c.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=l(),r._configure();var e=n.Long?"toLong":"toNumber";n.merge(c.prototype,{int64:function(){return h.call(this)[e](!1)},uint64:function(){return h.call(this)[e](!0)},sint64:function(){return h.call(this).zzDecode()[e](!1)},fixed64:function(){return p.call(this)[e](!0)},sfixed64:function(){return p.call(this)[e](!1)}})}},6515:(t,e,s)=>{"use strict";t.exports=i;var r=s(9924);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4652);function i(t){r.call(this,t)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},i._configure()},6720:(t,e,s)=>{"use strict";t.exports=l;var r=s(9587);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var n,i,o,a=s(5263),c=s(238),u=s(8930),d=s(7886);function l(t){r.call(this,"",t),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(t,e){return e||(e=new l),t.options&&e.setOptions(t.options),e.addJSON(t.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function t(e,s,r){"function"==typeof s&&(r=s,s=void 0);var n=this;if(!r)return d.asPromise(t,n,e,s);var a=r===h;function c(t,e){if(r){var s=r;if(r=null,a)throw t;s(t,e)}}function u(t){var e=t.lastIndexOf("google/protobuf/");if(e>-1){var s=t.substring(e);if(s in o)return s}return null}function l(t,e){try{if(d.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),d.isString(e)){i.filename=t;var r,o=i(e,n,s),l=0;if(o.imports)for(;l<o.imports.length;++l)(r=u(o.imports[l])||n.resolvePath(t,o.imports[l]))&&f(r);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(r=u(o.weakImports[l])||n.resolvePath(t,o.weakImports[l]))&&f(r,!0)}else n.setOptions(e.options).addJSON(e.nested)}catch(t){c(t)}a||p||c(null,n)}function f(t,e){if(!(n.files.indexOf(t)>-1))if(n.files.push(t),t in o)a?l(t,o[t]):(++p,setTimeout((function(){--p,l(t,o[t])})));else if(a){var s;try{s=d.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||c(t))}l(t,s)}else++p,n.fetch(t,(function(s,i){--p,r&&(s?e?p||c(null,n):c(s):l(t,i))}))}var p=0;d.isString(e)&&(e=[e]);for(var y,m=0;m<e.length;++m)(y=n.resolvePath("",e[m]))&&f(y);if(a)return n;p||c(null,n)},l.prototype.loadSync=function(t,e){if(!d.isNode)throw Error("not supported");return this.load(t,e,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(t){return"'extend "+t.extend+"' in "+t.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(t,e){var s=e.parent.lookup(e.extend);if(s){var r=new a(e.fullName,e.id,e.type,e.rule,void 0,e.options);return r.declaringField=e,e.extensionField=r,s.add(r),!0}return!1}l.prototype._handleAdd=function(t){if(t instanceof a)void 0===t.extend||t.extensionField||p(0,t)||this.deferred.push(t);else if(t instanceof c)f.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof u)){if(t instanceof n)for(var e=0;e<this.deferred.length;)p(0,this.deferred[e])?this.deferred.splice(e,1):++e;for(var s=0;s<t.nestedArray.length;++s)this._handleAdd(t._nestedArray[s]);f.test(t.name)&&(t.parent[t.name]=t)}},l.prototype._handleRemove=function(t){if(t instanceof a){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var e=this.deferred.indexOf(t);e>-1&&this.deferred.splice(e,1)}}else if(t instanceof c)f.test(t.name)&&delete t.parent[t.name];else if(t instanceof r){for(var s=0;s<t.nestedArray.length;++s)this._handleRemove(t._nestedArray[s]);f.test(t.name)&&delete t.parent[t.name]}},l._configure=function(t,e,s){n=t,i=e,o=s}},9188:t=>{"use strict";t.exports={}},8607:(t,e,s)=>{"use strict";e.Service=s(8887)},8887:(t,e,s)=>{"use strict";t.exports=n;var r=s(4652);function n(t,e,s){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(s)}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(e,s,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return r.asPromise(t,a,e,s,n,i);if(a.rpcImpl)try{return a.rpcImpl(e,s[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(t,s){if(t)return a.emit("error",t,e),o(t);if(null!==s){if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(t){return a.emit("error",t,e),o(t)}return a.emit("data",s,e),o(null,s)}a.end(!0)}))}catch(t){return a.emit("error",t,e),void setTimeout((function(){o(t)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},5280:(t,e,s)=>{"use strict";t.exports=a;var r=s(9587);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var n=s(9455),i=s(7886),o=s(8607);function a(t,e){r.call(this,t,e),this.methods={},this._methodsArray=null}function c(t){return t._methodsArray=null,t}a.fromJSON=function(t,e){var s=new a(t,e.options);if(e.methods)for(var r=Object.keys(e.methods),i=0;i<r.length;++i)s.add(n.fromJSON(r[i],e.methods[r[i]]));return e.nested&&s.addJSON(e.nested),s.comment=e.comment,s},a.prototype.toJSON=function(t){var e=r.prototype.toJSON.call(this,t),s=!!t&&Boolean(t.keepComments);return i.toObject(["options",e&&e.options||void 0,"methods",r.arrayToJSON(this.methodsArray,t)||{},"nested",e&&e.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(t){return this.methods[t]||r.prototype.get.call(this,t)},a.prototype.resolveAll=function(){for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof n?(this.methods[t.name]=t,t.parent=this,c(this)):r.prototype.add.call(this,t)},a.prototype.remove=function(t){if(t instanceof n){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,c(this)}return r.prototype.remove.call(this,t)},a.prototype.create=function(t,e,s){for(var r,n=new o.Service(t,e,s),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");n[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return n}},396:(t,e,s)=>{"use strict";t.exports=_;var r=s(9587);((_.prototype=Object.create(r.prototype)).constructor=_).className="Type";var n=s(238),i=s(8930),o=s(5263),a=s(6977),c=s(5280),u=s(5986),d=s(9924),l=s(3117),h=s(7886),f=s(8357),p=s(8159),y=s(5669),m=s(2777),v=s(2016);function _(t,e){r.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function x(t){return t._fieldsById=t._fieldsArray=t._oneofsArray=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(_.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var s=this.fields[t[e]],r=s.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=s}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=_.generateConstructor(this)())},set:function(t){var e=t.prototype;e instanceof u||((t.prototype=new u).constructor=t,h.merge(t.prototype,e)),t.$type=t.prototype.$type=this,h.merge(t,u,!0),this._ctor=t;for(var s=0;s<this.fieldsArray.length;++s)this._fieldsArray[s].resolve();var r={};for(s=0;s<this.oneofsArray.length;++s)r[this._oneofsArray[s].resolve().name]={get:h.oneOfGetter(this._oneofsArray[s].oneof),set:h.oneOfSetter(this._oneofsArray[s].oneof)};s&&Object.defineProperties(t.prototype,r)}}}),_.generateConstructor=function(t){for(var e,s=h.codegen(["p"],t.name),r=0;r<t.fieldsArray.length;++r)(e=t._fieldsArray[r]).map?s("this%s={}",h.safeProp(e.name)):e.repeated&&s("this%s=[]",h.safeProp(e.name));return s("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},_.fromJSON=function(t,e){var s=new _(t,e.options);s.extensions=e.extensions,s.reserved=e.reserved;for(var u=Object.keys(e.fields),d=0;d<u.length;++d)s.add((void 0!==e.fields[u[d]].keyType?a.fromJSON:o.fromJSON)(u[d],e.fields[u[d]]));if(e.oneofs)for(u=Object.keys(e.oneofs),d=0;d<u.length;++d)s.add(i.fromJSON(u[d],e.oneofs[u[d]]));if(e.nested)for(u=Object.keys(e.nested),d=0;d<u.length;++d){var l=e.nested[u[d]];s.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?_.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[d],l))}return e.extensions&&e.extensions.length&&(s.extensions=e.extensions),e.reserved&&e.reserved.length&&(s.reserved=e.reserved),e.group&&(s.group=!0),e.comment&&(s.comment=e.comment),s},_.prototype.toJSON=function(t){var e=r.prototype.toJSON.call(this,t),s=!!t&&Boolean(t.keepComments);return h.toObject(["options",e&&e.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,t),"fields",r.arrayToJSON(this.fieldsArray.filter((function(t){return!t.declaringField})),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",e&&e.nested||void 0,"comment",s?this.comment:void 0])},_.prototype.resolveAll=function(){for(var t=this.fieldsArray,e=0;e<t.length;)t[e++].resolve();var s=this.oneofsArray;for(e=0;e<s.length;)s[e++].resolve();return r.prototype.resolveAll.call(this)},_.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},_.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof o&&void 0===t.extend){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),x(this)}return t instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),x(this)):r.prototype.add.call(this,t)},_.prototype.remove=function(t){if(t instanceof o&&void 0===t.extend){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),x(this)}if(t instanceof i){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),x(this)}return r.prototype.remove.call(this,t)},_.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},_.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)},_.prototype.create=function(t){return new this.ctor(t)},_.prototype.setup=function(){for(var t=this.fullName,e=[],s=0;s<this.fieldsArray.length;++s)e.push(this._fieldsArray[s].resolve().resolvedType);this.encode=f(this)({Writer:l,types:e,util:h}),this.decode=p(this)({Reader:d,types:e,util:h}),this.verify=y(this)({types:e,util:h}),this.fromObject=m.fromObject(this)({types:e,util:h}),this.toObject=m.toObject(this)({types:e,util:h});var r=v[t];if(r){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(n),n.toObject=this.toObject,this.toObject=r.toObject.bind(n)}return this},_.prototype.encode=function(t,e){return this.setup().encode(t,e)},_.prototype.encodeDelimited=function(t,e){return this.encode(t,e&&e.len?e.fork():e).ldelim()},_.prototype.decode=function(t,e){return this.setup().decode(t,e)},_.prototype.decodeDelimited=function(t){return t instanceof d||(t=d.create(t)),this.decode(t,t.uint32())},_.prototype.verify=function(t){return this.setup().verify(t)},_.prototype.fromObject=function(t){return this.setup().fromObject(t)},_.prototype.toObject=function(t,e){return this.setup().toObject(t,e)},_.d=function(t){return function(e){h.decorateType(e,t)}}},8372:(t,e,s)=>{"use strict";var r=e,n=s(7886),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(t,e){var s=0,r={};for(e|=0;s<t.length;)r[i[s+e]]=t[s++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},7886:(t,e,s)=>{"use strict";var r,n,i=t.exports=s(4652),o=s(9188);i.codegen=s(6348),i.fetch=s(7803),i.path=s(1272),i.fs=i.inquire("fs"),i.toArray=function(t){if(t){for(var e=Object.keys(t),s=new Array(e.length),r=0;r<e.length;)s[r]=t[e[r++]];return s}return[]},i.toObject=function(t){for(var e={},s=0;s<t.length;){var r=t[s++],n=t[s++];void 0!==n&&(e[r]=n)}return e};var a=/\\/g,c=/"/g;i.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},i.safeProp=function(t){return!/^[$\w_]+$/.test(t)||i.isReserved(t)?'["'+t.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+t},i.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var u=/_([a-z])/g;i.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(u,(function(t,e){return e.toUpperCase()}))},i.compareFieldsById=function(t,e){return t.id-e.id},i.decorateType=function(t,e){if(t.$type)return e&&t.$type.name!==e&&(i.decorateRoot.remove(t.$type),t.$type.name=e,i.decorateRoot.add(t.$type)),t.$type;r||(r=s(396));var n=new r(e||t.name);return i.decorateRoot.add(n),n.ctor=t,Object.defineProperty(t,"$type",{value:n,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;i.decorateEnum=function(t){if(t.$type)return t.$type;n||(n=s(238));var e=new n("Enum"+d++,t);return i.decorateRoot.add(e),Object.defineProperty(t,"$type",{value:e,enumerable:!1}),e},i.setProperty=function(t,e,s){if("object"!=typeof t)throw TypeError("dst must be an object");if(!e)throw TypeError("path must be specified");return function t(e,s,r){var n=s.shift();if("__proto__"===n)return e;if(s.length>0)e[n]=t(e[n]||{},s,r);else{var i=e[n];i&&(r=[].concat(i).concat(r)),e[n]=r}return e}(t,e=e.split("."),s)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(s(6720)))}})},1427:(t,e,s)=>{"use strict";t.exports=n;var r=s(4652);function n(t,e){this.lo=t>>>0,this.hi=e>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return i;var e=t<0;e&&(t=-t);var s=t>>>0,r=(t-s)/4294967296>>>0;return e&&(r=~r>>>0,s=~s>>>0,++s>4294967295&&(s=0,++r>4294967295&&(r=0))),new n(s,r)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if(r.isString(t)){if(!r.Long)return n.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):i},n.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,s=~this.hi>>>0;return e||(s=s+1>>>0),-(e+4294967296*s)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;n.fromHash=function(t){return t===o?i:new n((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},n.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},n.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0===s?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:s<128?9:10}},4652:function(t,e,s){"use strict";var r=e;function n(t,e,s){for(var r=Object.keys(e),n=0;n<r.length;++n)void 0!==t[r[n]]&&s||(t[r[n]]=e[r[n]]);return t}function i(t){function e(t,s){if(!(this instanceof e))return new e(t,s);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),s&&n(this,s)}return(e.prototype=Object.create(Error.prototype)).constructor=e,Object.defineProperty(e.prototype,"name",{get:function(){return t}}),e.prototype.toString=function(){return this.name+": "+this.message},e}r.asPromise=s(537),r.base64=s(9745),r.EventEmitter=s(4459),r.float=s(897),r.inquire=s(3229),r.utf8=s(113),r.pool=s(7986),r.LongBits=s(1427),r.isNode=Boolean(void 0!==s.g&&s.g&&s.g.process&&s.g.process.versions&&s.g.process.versions.node),r.global=r.isNode&&s.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var s=t[e];return!(null==s||!t.hasOwnProperty(e))&&("object"!=typeof s||(Array.isArray(s)?s.length:Object.keys(s).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var s=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(s.lo,s.hi,e):s.toNumber(Boolean(e))},r.merge=n,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(t){for(var e={},s=0;s<t.length;++s)e[t[s]]=1;return function(){for(var t=Object.keys(this),s=t.length-1;s>-1;--s)if(1===e[t[s]]&&void 0!==this[t[s]]&&null!==this[t[s]])return t[s]}},r.oneOfSetter=function(t){return function(e){for(var s=0;s<t.length;++s)t[s]!==e&&delete this[t[s]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,s){return new t(e,s)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},5669:(t,e,s)=>{"use strict";t.exports=function(t){var e=n.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=t.oneofsArray,r={};s.length&&e("var p={}");for(var c=0;c<t.fieldsArray.length;++c){var u=t._fieldsArray[c].resolve(),d="m"+n.safeProp(u.name);if(u.optional&&e("if(%s!=null&&m.hasOwnProperty(%j)){",d,u.name),u.map)e("if(!util.isObject(%s))",d)("return%j",i(u,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(e,u,"k[i]"),o(e,u,c,d+"[k[i]]")("}");else if(u.repeated)e("if(!Array.isArray(%s))",d)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",d),o(e,u,c,d+"[i]")("}");else{if(u.partOf){var l=n.safeProp(u.partOf.name);1===r[u.partOf.name]&&e("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,e("p%s=1",l)}o(e,u,c,d)}u.optional&&e("}")}return e("return null")};var r=s(238),n=s(7886);function i(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function o(t,e,s,n){if(e.resolvedType)if(e.resolvedType instanceof r){t("switch(%s){",n)("default:")("return%j",i(e,"enum value"));for(var o=Object.keys(e.resolvedType.values),a=0;a<o.length;++a)t("case %i:",e.resolvedType.values[o[a]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",s,n)("if(e)")("return%j+e",e.name+".")("}");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",n)("return%j",i(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',n)("return%j",i(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',n)("return%j",i(e,"boolean"));break;case"string":t("if(!util.isString(%s))",n)("return%j",i(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(e,"buffer"))}return t}function a(t,e,s){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",s)("return%j",i(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",s)("return%j",i(e,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",s)("return%j",i(e,"boolean key"))}return t}},2016:(t,e,s)=>{"use strict";var r=e,n=s(5986);r[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var e=t["@type"].substring(t["@type"].lastIndexOf("/")+1),s=this.lookup(e);if(s){var r="."===t["@type"].charAt(0)?t["@type"].substr(1):t["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:s.encode(s.fromObject(t)).finish()})}}return this.fromObject(t)},toObject:function(t,e){var s="",r="";if(e&&e.json&&t.type_url&&t.value){r=t.type_url.substring(t.type_url.lastIndexOf("/")+1),s=t.type_url.substring(0,t.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(t=i.decode(t.value))}if(!(t instanceof this.ctor)&&t instanceof n){var o=t.$type.toObject(t,e);return""===s&&(s="type.googleapis.com/"),r=s+("."===t.$type.fullName[0]?t.$type.fullName.substr(1):t.$type.fullName),o["@type"]=r,o}return this.toObject(t,e)}}},3117:(t,e,s)=>{"use strict";t.exports=l;var r,n=s(4652),i=n.LongBits,o=n.base64,a=n.utf8;function c(t,e,s){this.fn=t,this.len=e,this.next=void 0,this.val=s}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return n.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(t,e,s){e[s]=255&t}function p(t,e){this.len=t,this.next=void 0,this.val=e}function y(t,e,s){for(;t.hi;)e[s++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[s++]=127&t.lo|128,t.lo=t.lo>>>7;e[s++]=t.lo}function m(t,e,s){e[s]=255&t,e[s+1]=t>>>8&255,e[s+2]=t>>>16&255,e[s+3]=t>>>24}l.create=h(),l.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype._push=function(t,e,s){return this.tail=this.tail.next=new c(t,e,s),this.len+=e,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(t,e,s){for(;t>127;)e[s++]=127&t|128,t>>>=7;e[s]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(y,10,i.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=i.from(t);return this._push(y,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=i.from(t).zzEncode();return this._push(y,e.length(),e)},l.prototype.bool=function(t){return this._push(f,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(m,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=i.from(t);return this._push(m,4,e.lo)._push(m,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(n.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(n.float.writeDoubleLE,8,t)};var v=n.Array.prototype.set?function(t,e,s){e.set(t,s)}:function(t,e,s){for(var r=0;r<t.length;++r)e[s+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(f,1,0);if(n.isString(t)){var s=l.alloc(e=o.length(t));o.decode(t,s,0),t=s}return this.uint32(e)._push(v,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(f,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,e=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=t.next,this.tail=e,this.len+=s),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),s=0;t;)t.fn(t.val,e,s),s+=t.len,t=t.next;return e},l._configure=function(t){r=t,l.create=h(),r._configure()}},4766:(t,e,s)=>{"use strict";t.exports=i;var r=s(3117);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4652);function i(){r.call(this)}function o(t,e,s){t.length<40?n.utf8.write(t,e,s):e.utf8Write?e.utf8Write(t,s):e.write(t,s)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(t,e,s){e.set(t,s)}:function(t,e,s){if(t.copy)t.copy(e,s,0,t.length);else for(var r=0;r<t.length;)e[s++]=t[r++]}},i.prototype.bytes=function(t){n.isString(t)&&(t=n._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(i.writeBytesBuffer,e,t),this},i.prototype.string=function(t){var e=n.Buffer.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this},i._configure()},537:t=>{"use strict";t.exports=function(t,e){var s=new Array(arguments.length-1),r=0,n=2,i=!0;for(;n<arguments.length;)s[r++]=arguments[n++];return new Promise((function(n,o){s[r]=function(t){if(i)if(i=!1,t)o(t);else{for(var e=new Array(arguments.length-1),s=0;s<e.length;)e[s++]=arguments[s];n.apply(null,e)}};try{t.apply(e||null,s)}catch(t){i&&(i=!1,o(t))}}))}},9745:(t,e)=>{"use strict";var s=e;s.length=function(t){var e=t.length;if(!e)return 0;for(var s=0;--e%4>1&&"="===t.charAt(e);)++s;return Math.ceil(3*t.length)/4-s};for(var r=new Array(64),n=new Array(123),i=0;i<64;)n[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;s.encode=function(t,e,s){for(var n,i=null,o=[],a=0,c=0;e<s;){var u=t[e++];switch(c){case 0:o[a++]=r[u>>2],n=(3&u)<<4,c=1;break;case 1:o[a++]=r[n|u>>4],n=(15&u)<<2,c=2;break;case 2:o[a++]=r[n|u>>6],o[a++]=r[63&u],c=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0)}return c&&(o[a++]=r[n],o[a++]=61,1===c&&(o[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var o="invalid encoding";s.decode=function(t,e,s){for(var r,i=s,a=0,c=0;c<t.length;){var u=t.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=n[u]))throw Error(o);switch(a){case 0:r=u,a=1;break;case 1:e[s++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:e[s++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:e[s++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(o);return s-i},s.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},6348:t=>{"use strict";function e(t,s){"string"==typeof t&&(s=t,t=void 0);var r=[];function n(t){if("string"!=typeof t){var s=i();if(e.verbose&&console.log("codegen: "+s),s="return "+s,t){for(var o=Object.keys(t),a=new Array(o.length+1),c=new Array(o.length),u=0;u<o.length;)a[u]=o[u],c[u]=t[o[u++]];return a[u]=s,Function.apply(null,a).apply(null,c)}return Function(s)()}for(var d=new Array(arguments.length-1),l=0;l<d.length;)d[l]=arguments[++l];if(l=0,t=t.replace(/%([%dfijs])/g,(function(t,e){var s=d[l++];switch(e){case"d":case"f":return String(Number(s));case"i":return String(Math.floor(s));case"j":return JSON.stringify(s);case"s":return String(s)}return"%"})),l!==d.length)throw Error("parameter count mismatch");return r.push(t),n}function i(e){return"function "+(e||s||"")+"("+(t&&t.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return n.toString=i,n}t.exports=e,e.verbose=!1},4459:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,s){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:s||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var s=this._listeners[t],r=0;r<s.length;)s[r].fn===e?s.splice(r,1):++r;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var s=[],r=1;r<arguments.length;)s.push(arguments[r++]);for(r=0;r<e.length;)e[r].fn.apply(e[r++].ctx,s)}return this}},7803:(t,e,s)=>{"use strict";t.exports=i;var r=s(537),n=s(3229)("fs");function i(t,e,s){return"function"==typeof e?(s=e,e={}):e||(e={}),s?!e.xhr&&n&&n.readFile?n.readFile(t,(function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i.xhr(t,e,s):r?s(r):s(null,e.binary?n:n.toString("utf8"))})):i.xhr(t,e,s):r(i,this,t,e)}i.xhr=function(t,e,s){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return s(Error("status "+r.status));if(e.binary){var t=r.response;if(!t){t=[];for(var n=0;n<r.responseText.length;++n)t.push(255&r.responseText.charCodeAt(n))}return s(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return s(null,r.responseText)}},e.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",t),r.send()}},897:t=>{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),s=new Uint8Array(e.buffer),r=128===s[3];function n(t,r,n){e[0]=t,r[n]=s[0],r[n+1]=s[1],r[n+2]=s[2],r[n+3]=s[3]}function i(t,r,n){e[0]=t,r[n]=s[3],r[n+1]=s[2],r[n+2]=s[1],r[n+3]=s[0]}function o(t,r){return s[0]=t[r],s[1]=t[r+1],s[2]=t[r+2],s[3]=t[r+3],e[0]}function a(t,r){return s[3]=t[r],s[2]=t[r+1],s[1]=t[r+2],s[0]=t[r+3],e[0]}t.writeFloatLE=r?n:i,t.writeFloatBE=r?i:n,t.readFloatLE=r?o:a,t.readFloatBE=r?a:o}():function(){function e(t,e,s,r){var n=e<0?1:0;if(n&&(e=-e),0===e)t(1/e>0?0:2147483648,s,r);else if(isNaN(e))t(2143289344,s,r);else if(e>34028234663852886e22)t((n<<31|2139095040)>>>0,s,r);else if(e<11754943508222875e-54)t((n<<31|Math.round(e/1401298464324817e-60))>>>0,s,r);else{var i=Math.floor(Math.log(e)/Math.LN2);t((n<<31|i+127<<23|8388607&Math.round(e*Math.pow(2,-i)*8388608))>>>0,s,r)}}function o(t,e,s){var r=t(e,s),n=2*(r>>31)+1,i=r>>>23&255,o=8388607&r;return 255===i?o?NaN:n*(1/0):0===i?1401298464324817e-60*n*o:n*Math.pow(2,i-150)*(o+8388608)}t.writeFloatLE=e.bind(null,s),t.writeFloatBE=e.bind(null,r),t.readFloatLE=o.bind(null,n),t.readFloatBE=o.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),s=new Uint8Array(e.buffer),r=128===s[7];function n(t,r,n){e[0]=t,r[n]=s[0],r[n+1]=s[1],r[n+2]=s[2],r[n+3]=s[3],r[n+4]=s[4],r[n+5]=s[5],r[n+6]=s[6],r[n+7]=s[7]}function i(t,r,n){e[0]=t,r[n]=s[7],r[n+1]=s[6],r[n+2]=s[5],r[n+3]=s[4],r[n+4]=s[3],r[n+5]=s[2],r[n+6]=s[1],r[n+7]=s[0]}function o(t,r){return s[0]=t[r],s[1]=t[r+1],s[2]=t[r+2],s[3]=t[r+3],s[4]=t[r+4],s[5]=t[r+5],s[6]=t[r+6],s[7]=t[r+7],e[0]}function a(t,r){return s[7]=t[r],s[6]=t[r+1],s[5]=t[r+2],s[4]=t[r+3],s[3]=t[r+4],s[2]=t[r+5],s[1]=t[r+6],s[0]=t[r+7],e[0]}t.writeDoubleLE=r?n:i,t.writeDoubleBE=r?i:n,t.readDoubleLE=r?o:a,t.readDoubleBE=r?a:o}():function(){function e(t,e,s,r,n,i){var o=r<0?1:0;if(o&&(r=-r),0===r)t(0,n,i+e),t(1/r>0?0:2147483648,n,i+s);else if(isNaN(r))t(0,n,i+e),t(2146959360,n,i+s);else if(r>17976931348623157e292)t(0,n,i+e),t((o<<31|2146435072)>>>0,n,i+s);else{var a;if(r<22250738585072014e-324)t((a=r/5e-324)>>>0,n,i+e),t((o<<31|a/4294967296)>>>0,n,i+s);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(a=r*Math.pow(2,-c))>>>0,n,i+e),t((o<<31|c+1023<<20|1048576*a&1048575)>>>0,n,i+s)}}}function o(t,e,s,r,n){var i=t(r,n+e),o=t(r,n+s),a=2*(o>>31)+1,c=o>>>20&2047,u=4294967296*(1048575&o)+i;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,s,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=o.bind(null,n,0,4),t.readDoubleBE=o.bind(null,i,4,0)}(),t}function s(t,e,s){e[s]=255&t,e[s+1]=t>>>8&255,e[s+2]=t>>>16&255,e[s+3]=t>>>24}function r(t,e,s){e[s]=t>>>24,e[s+1]=t>>>16&255,e[s+2]=t>>>8&255,e[s+3]=255&t}function n(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function i(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},3229:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},1272:(t,e)=>{"use strict";var s=e,r=s.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},n=s.normalize=function(t){var e=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),s=r(t),n="";s&&(n=e.shift()+"/");for(var i=0;i<e.length;)".."===e[i]?i>0&&".."!==e[i-1]?e.splice(--i,2):s?e.splice(i,1):++i:"."===e[i]?e.splice(i,1):++i;return n+e.join("/")};s.resolve=function(t,e,s){return s||(e=n(e)),r(e)?e:(s||(t=n(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?n(t+"/"+e):e)}},7986:t=>{"use strict";t.exports=function(t,e,s){var r=s||8192,n=r>>>1,i=null,o=r;return function(s){if(s<1||s>n)return t(s);o+s>r&&(i=t(r),o=0);var a=e.call(i,o,o+=s);return 7&o&&(o=1+(7|o)),a}}},113:(t,e)=>{"use strict";var s=e;s.length=function(t){for(var e=0,s=0,r=0;r<t.length;++r)(s=t.charCodeAt(r))<128?e+=1:s<2048?e+=2:55296==(64512&s)&&56320==(64512&t.charCodeAt(r+1))?(++r,e+=4):e+=3;return e},s.read=function(t,e,s){if(s-e<1)return"";for(var r,n=null,i=[],o=0;e<s;)(r=t[e++])<128?i[o++]=r:r>191&&r<224?i[o++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,i[o++]=55296+(r>>10),i[o++]=56320+(1023&r)):i[o++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],o>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,i)),o=0);return n?(o&&n.push(String.fromCharCode.apply(String,i.slice(0,o))),n.join("")):String.fromCharCode.apply(String,i.slice(0,o))},s.write=function(t,e,s){for(var r,n,i=s,o=0;o<t.length;++o)(r=t.charCodeAt(o))<128?e[s++]=r:r<2048?(e[s++]=r>>6|192,e[s++]=63&r|128):55296==(64512&r)&&56320==(64512&(n=t.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&n),++o,e[s++]=r>>18|240,e[s++]=r>>12&63|128,e[s++]=r>>6&63|128,e[s++]=63&r|128):(e[s++]=r>>12|224,e[s++]=r>>6&63|128,e[s++]=63&r|128);return s-i}},3717:(t,e)=>{function s(t){if(t)return function(t){for(var e in s.prototype)t[e]=s.prototype[e];return t}(t)}e.Emitter=s,s.prototype.on=s.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},s.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},s.prototype.off=s.prototype.removeListener=s.prototype.removeAllListeners=s.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<r.length;n++)if((s=r[n])===e||s.fn===e){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},s.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),s=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,e)}return this},s.prototype.emitReserved=s.prototype.emit,s.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},s.prototype.hasListeners=function(t){return!!this.listeners(t).length}},7672:t=>{function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-s:t+s}return 0|Math.min(t,this.max)},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t}},3286:(t,e,s)=>{"use strict";s.d(e,{Z:()=>i});var r=s(7758),n=s.n(r)()((function(t){return t[1]}));n.push([t.id,".ck.ck-balloon-panel.ck-tooltip{pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;justify-content:flex-end}.ck.ck-presence-list__counter{color:var(--ck-color-base-text)}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:0;color:inherit;font:inherit;margin-left:var(--ck-spacing-standard);outline:none;padding:0;position:relative}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:3px;position:relative;width:100%}.ck.ck-presence-list--collapsed .ck-presence-list__list{margin-left:var(--ck-spacing-standard);min-width:calc(var(--ck-user-avatar-size)*1.5)}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{margin-left:calc(var(--ck-user-avatar-size)*-1 + 5px)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(5){opacity:.15}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(4){opacity:.35}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(3){opacity:.55}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(2){opacity:.75}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-height:80vh;max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width);overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:0;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]);const i=n},9940:(t,e,s)=>{"use strict";s.d(e,{Z:()=>i});var r=s(7758),n=s.n(r)()((function(t){return t[1]}));n.push([t.id,".ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker:after{color:#fff;content:attr(data-name);display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}.ck .ck-user__marker:hover .ck-user__marker-dot{width:0}.ck .ck-user__marker:hover:after{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-placeholder .ck-user__marker{display:none}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const i=n},7758:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var s=t(e);return e[2]?"@media ".concat(e[2]," {").concat(s,"}"):s})).join("")},e.i=function(t,s,r){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(r)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(n[o]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);r&&n[c[0]]||(s&&(c[2]?c[2]="".concat(s," and ").concat(c[2]):c[2]=s),e.push(c))}},e}},7154:t=>{var e=1e3,s=60*e,r=60*s,n=24*r,i=7*n,o=365.25*n;function a(t,e,s,r){var n=e>=1.5*s;return Math.round(t/s)+" "+r+(n?"s":"")}t.exports=function(t,c){c=c||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*s;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(t);if("number"===u&&isFinite(t))return c.long?function(t){var i=Math.abs(t);if(i>=n)return a(t,i,n,"day");if(i>=r)return a(t,i,r,"hour");if(i>=s)return a(t,i,s,"minute");if(i>=e)return a(t,i,e,"second");return t+" ms"}(t):function(t){var i=Math.abs(t);if(i>=n)return Math.round(t/n)+"d";if(i>=r)return Math.round(t/r)+"h";if(i>=s)return Math.round(t/s)+"m";if(i>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},5579:(t,e,s)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;e.splice(1,0,s,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(n=r))})),e.splice(n,0,s)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=s(3847)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},3847:(t,e,s)=>{t.exports=function(t){function e(t){let s,n,i,o=null;function a(...t){if(!a.enabled)return;const r=a,n=Number(new Date),i=n-(s||n);r.diff=i,r.prev=s,r.curr=n,s=n,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((s,n)=>{if("%%"===s)return"%";o++;const i=e.formatters[n];if("function"==typeof i){const e=t[o];s=i.call(r,e),t.splice(o,1),o--}return s})),e.formatArgs.call(r,t);(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(n!==e.namespaces&&(n=e.namespaces,i=e.enabled(t)),i),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,s){const r=e(this.namespace+(void 0===s?":":s)+t);return r.log=this.log,r}function n(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(n),...e.skips.map(n).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let s;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(s=0;s<n;s++)r[s]&&("-"===(t=r[s].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let s,r;for(s=0,r=e.skips.length;s<r;s++)if(e.skips[s].test(t))return!1;for(s=0,r=e.names.length;s<r;s++)if(e.names[s].test(t))return!0;return!1},e.humanize=s(7154),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((s=>{e[s]=t[s]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let s=0;for(let e=0;e<t.length;e++)s=(s<<5)-s+t.charCodeAt(e),s|=0;return e.colors[Math.abs(s)%e.colors.length]},e.enable(e.load()),e}},4568:t=>{try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},9827:(t,e)=>{e.encode=function(t){var e="";for(var s in t)t.hasOwnProperty(s)&&(e.length&&(e+="&"),e+=encodeURIComponent(s)+"="+encodeURIComponent(t[s]));return e},e.decode=function(t){for(var e={},s=t.split("&"),r=0,n=s.length;r<n;r++){var i=s[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},5977:t=>{var e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var r=t,n=t.indexOf("["),i=t.indexOf("]");-1!=n&&-1!=i&&(t=t.substring(0,n)+t.substring(n,i).replace(/:/g,";")+t.substring(i,t.length));for(var o,a,c=e.exec(t||""),u={},d=14;d--;)u[s[d]]=c[d]||"";return-1!=n&&-1!=i&&(u.source=r,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,e){var s=/\/{2,9}/g,r=e.replace(s,"/").split("/");"/"!=e.substr(0,1)&&0!==e.length||r.splice(0,1);"/"==e.substr(e.length-1,1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(o=u.query,a={},o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,s){e&&(a[e]=s)})),a),u}},6154:(t,e,s)=>{"use strict";t.exports=s(7278)},6274:(t,e,s)=>{"use strict";var r=e,n=s(4937),i=s(7572);function o(t,e,s,r){if(e.resolvedType)if(e.resolvedType instanceof n){t("switch(d%s){",r);for(var i=e.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)e.repeated&&i[o[a]]===e.typeDefault&&t("default:"),t("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",r,i[o[a]])("break");t("}")}else t('if(typeof d%s!=="object")',r)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,s,r);else{var c=!1;switch(e.type){case"double":case"float":t("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function a(t,e,s,r){if(e.resolvedType)e.resolvedType instanceof n?t("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,s,r,r):t("d%s=types[%i].toObject(m%s,o)",r,s,r);else{var i=!1;switch(e.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}r.fromObject=function(t){var e=t.fieldsArray,s=i.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!e.length)return s("return new this.ctor");s("var m=new this.ctor");for(var r=0;r<e.length;++r){var a=e[r].resolve(),c=i.safeProp(a.name);a.map?(s("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),o(s,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(s("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),o(s,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof n||s("if(d%s!=null){",c),o(s,a,r,c),a.resolvedType instanceof n||s("}"))}return s("return m")},r.toObject=function(t){var e=t.fieldsArray.slice().sort(i.compareFieldsById);if(!e.length)return i.codegen()("return {}");for(var s=i.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],c=[],u=0;u<e.length;++u)e[u].partOf||(e[u].resolve().repeated?r:e[u].map?o:c).push(e[u]);if(r.length){for(s("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)s("d%s=[]",i.safeProp(r[u].name));s("}")}if(o.length){for(s("if(o.objects||o.defaults){"),u=0;u<o.length;++u)s("d%s={}",i.safeProp(o[u].name));s("}")}if(c.length){for(s("if(o.defaults){"),u=0;u<c.length;++u){var d=c[u],l=i.safeProp(d.name);if(d.resolvedType instanceof n)s("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var h="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";s("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else s("d%s=%j",l,d.typeDefault)}s("}")}var f=!1;for(u=0;u<e.length;++u){d=e[u];var p=t._fieldsArray.indexOf(d);l=i.safeProp(d.name);d.map?(f||(f=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(s,d,p,l+"[ks2[j]]")("}")):d.repeated?(s("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(s,d,p,l+"[j]")("}")):(s("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),a(s,d,p,l),d.partOf&&s("if(o.oneofs)")("d%s=%j",i.safeProp(d.partOf.name),d.name)),s("}")}return s("return d")}},4799:(t,e,s)=>{"use strict";t.exports=function(t){var e=i.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter((function(t){return t.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&e("if((t&7)===4)")("break");e("switch(t>>>3){");for(var s=0;s<t.fieldsArray.length;++s){var a=t._fieldsArray[s].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);e("case %i: {",a.id),a.map?(e("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[a.keyType]?e("k=%j",n.defaults[a.keyType]):e("k=null"),void 0!==n.defaults[c]?e("value=%j",n.defaults[c]):e("value=null"),e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===n.basic[c]?e("value=types[%i].decode(r,r.uint32())",s):e("value=r.%s()",c),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[a.keyType]?e('%s[typeof k==="object"?util.longToHash(k):k]=value',u):e("%s[k]=value",u)):a.repeated?(e("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==n.packed[c]&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===n.basic[c]?e(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,s):e("%s.push(r.%s())",u,c)):void 0===n.basic[c]?e(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,s):e("%s=r.%s()",u,c),e("break")("}")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<t._fieldsArray.length;++s){var d=t._fieldsArray[s];d.required&&e("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return e("return m")};var r=s(4937),n=s(8997),i=s(7572);function o(t){return"missing required '"+t.name+"'"}},6382:(t,e,s)=>{"use strict";t.exports=function(t){for(var e,s=i.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),a=t.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),d=t._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,h=n.basic[l];e="m"+i.safeProp(u.name),u.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",e,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",e)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|n.mapKey[u.keyType],u.keyType),void 0===h?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,e):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,e),s("}")("}")):u.repeated?(s("if(%s!=null&&%s.length){",e,e),u.packed&&void 0!==n.packed[l]?s("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",e)("w.%s(%s[i])",l,e)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",e),void 0===h?o(s,u,d,e+"[i]"):s("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,l,e)),s("}")):(u.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",e,u.name),void 0===h?o(s,u,d,e):s("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,l,e))}return s("return w")};var r=s(4937),n=s(8997),i=s(7572);function o(t,e,s,r){return e.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,r,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,r,(e.id<<3|2)>>>0)}},4937:(t,e,s)=>{"use strict";t.exports=o;var r=s(4154);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var n=s(512),i=s(7572);function o(t,e,s,n,i){if(r.call(this,t,s),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=i||{},this.reserved=void 0,e)for(var o=Object.keys(e),a=0;a<o.length;++a)"number"==typeof e[o[a]]&&(this.valuesById[this.values[o[a]]=e[o[a]]]=o[a])}o.fromJSON=function(t,e){var s=new o(t,e.values,e.options,e.comment,e.comments);return s.reserved=e.reserved,s},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",e?this.comment:void 0,"comments",e?this.comments:void 0])},o.prototype.add=function(t,e,s){if(!i.isString(t))throw TypeError("name must be a string");if(!i.isInteger(e))throw TypeError("id must be an integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(e))throw Error("id "+e+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(void 0!==this.valuesById[e]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+e+" in "+this);this.values[t]=e}else this.valuesById[this.values[t]=e]=t;return this.comments[t]=s||null,this},o.prototype.remove=function(t){if(!i.isString(t))throw TypeError("name must be a string");var e=this.values[t];if(null==e)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[e],delete this.values[t],delete this.comments[t],this},o.prototype.isReservedId=function(t){return n.isReservedId(this.reserved,t)},o.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},5891:(t,e,s)=>{"use strict";t.exports=u;var r=s(4154);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var n,i=s(4937),o=s(8997),a=s(7572),c=/^required|optional|repeated$/;function u(t,e,s,n,i,u,d){if(a.isObject(n)?(d=i,u=n,n=i=void 0):a.isObject(i)&&(d=u,u=i,i=void 0),r.call(this,t,u),!a.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!a.isString(s))throw TypeError("type must be a string");if(void 0!==n&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=s,this.id=e,this.extend=i||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=d}u.fromJSON=function(t,e){return new u(t,e.id,e.type,e.rule,e.extend,e.options,e.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(t,e,s){return"packed"===t&&(this._packed=null),r.prototype.setOption.call(this,t,e,s)},u.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,t=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,t=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(t,e,s,r){return"function"==typeof e?e=a.decorateType(e).name:e&&"object"==typeof e&&(e=a.decorateEnum(e).name),function(n,i){a.decorateType(n.constructor).add(new u(i,t,e,s,{default:r}))}},u._configure=function(t){n=t}},7278:(t,e,s)=>{"use strict";var r=t.exports=s(3278);r.build="light",r.load=function(t,e,s){return"function"==typeof e?(s=e,e=new r.Root):e||(e=new r.Root),e.load(t,s)},r.loadSync=function(t,e){return e||(e=new r.Root),e.loadSync(t)},r.encoder=s(6382),r.decoder=s(4799),r.verifier=s(8600),r.converter=s(6274),r.ReflectionObject=s(4154),r.Namespace=s(512),r.Root=s(2613),r.Enum=s(4937),r.Type=s(4560),r.Field=s(5891),r.OneOf=s(3044),r.MapField=s(8911),r.Service=s(877),r.Method=s(4935),r.Message=s(4777),r.wrappers=s(3375),r.types=s(8997),r.util=s(7572),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},3278:(t,e,s)=>{"use strict";var r=e;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=s(2944),r.BufferWriter=s(2178),r.Reader=s(9867),r.BufferReader=s(2676),r.util=s(4155),r.rpc=s(3290),r.roots=s(284),r.configure=n,n()},8911:(t,e,s)=>{"use strict";t.exports=o;var r=s(5891);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var n=s(8997),i=s(7572);function o(t,e,s,n,o,a){if(r.call(this,t,e,n,void 0,void 0,o,a),!i.isString(s))throw TypeError("keyType must be a string");this.keyType=s,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(t,e){return new o(t,e.id,e.keyType,e.type,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(t,e,s){return"function"==typeof s?s=i.decorateType(s).name:s&&"object"==typeof s&&(s=i.decorateEnum(s).name),function(r,n){i.decorateType(r.constructor).add(new o(n,t,e,s))}}},4777:(t,e,s)=>{"use strict";t.exports=n;var r=s(4155);function n(t){if(t)for(var e=Object.keys(t),s=0;s<e.length;++s)this[e[s]]=t[e[s]]}n.create=function(t){return this.$type.create(t)},n.encode=function(t,e){return this.$type.encode(t,e)},n.encodeDelimited=function(t,e){return this.$type.encodeDelimited(t,e)},n.decode=function(t){return this.$type.decode(t)},n.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},n.verify=function(t){return this.$type.verify(t)},n.fromObject=function(t){return this.$type.fromObject(t)},n.toObject=function(t,e){return this.$type.toObject(t,e)},n.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},4935:(t,e,s)=>{"use strict";t.exports=i;var r=s(4154);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var n=s(7572);function i(t,e,s,i,o,a,c,u,d){if(n.isObject(o)?(c=o,o=a=void 0):n.isObject(a)&&(c=a,a=void 0),void 0!==e&&!n.isString(e))throw TypeError("type must be a string");if(!n.isString(s))throw TypeError("requestType must be a string");if(!n.isString(i))throw TypeError("responseType must be a string");r.call(this,t,c),this.type=e||"rpc",this.requestType=s,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=d}i.fromJSON=function(t,e){return new i(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options,e.comment,e.parsedOptions)},i.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},512:(t,e,s)=>{"use strict";t.exports=d;var r=s(4154);((d.prototype=Object.create(r.prototype)).constructor=d).className="Namespace";var n,i,o,a=s(5891),c=s(7572);function u(t,e){if(t&&t.length){for(var s={},r=0;r<t.length;++r)s[t[r].name]=t[r].toJSON(e);return s}}function d(t,e){r.call(this,t,e),this.nested=void 0,this._nestedArray=null}function l(t){return t._nestedArray=null,t}d.fromJSON=function(t,e){return new d(t,e.options).addJSON(e.nested)},d.arrayToJSON=u,d.isReservedId=function(t,e){if(t)for(var s=0;s<t.length;++s)if("string"!=typeof t[s]&&t[s][0]<=e&&t[s][1]>e)return!0;return!1},d.isReservedName=function(t,e){if(t)for(var s=0;s<t.length;++s)if(t[s]===e)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),d.prototype.toJSON=function(t){return c.toObject(["options",this.options,"nested",u(this.nestedArray,t)])},d.prototype.addJSON=function(t){if(t)for(var e,s=Object.keys(t),r=0;r<s.length;++r)e=t[s[r]],this.add((void 0!==e.fields?n.fromJSON:void 0!==e.values?o.fromJSON:void 0!==e.methods?i.fromJSON:void 0!==e.id?a.fromJSON:d.fromJSON)(s[r],e));return this},d.prototype.get=function(t){return this.nested&&this.nested[t]||null},d.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof o)return this.nested[t].values;throw Error("no such enum: "+t)},d.prototype.add=function(t){if(!(t instanceof a&&void 0!==t.extend||t instanceof n||t instanceof o||t instanceof i||t instanceof d))throw TypeError("object must be a valid nested object");if(this.nested){var e=this.get(t.name);if(e){if(!(e instanceof d&&t instanceof d)||e instanceof n||e instanceof i)throw Error("duplicate name '"+t.name+"' in "+this);for(var s=e.nestedArray,r=0;r<s.length;++r)t.add(s[r]);this.remove(e),this.nested||(this.nested={}),t.setOptions(e.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),l(this)},d.prototype.remove=function(t){if(!(t instanceof r))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),l(this)},d.prototype.define=function(t,e){if(c.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var s=this;t.length>0;){var r=t.shift();if(s.nested&&s.nested[r]){if(!((s=s.nested[r])instanceof d))throw Error("path conflicts with non-namespace objects")}else s.add(s=new d(r))}return e&&s.addJSON(e),s},d.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e<t.length;)t[e]instanceof d?t[e++].resolveAll():t[e++].resolve();return this.resolve()},d.prototype.lookup=function(t,e,s){if("boolean"==typeof e?(s=e,e=void 0):e&&!Array.isArray(e)&&(e=[e]),c.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),e);var r=this.get(t[0]);if(r){if(1===t.length){if(!e||e.indexOf(r.constructor)>-1)return r}else if(r instanceof d&&(r=r.lookup(t.slice(1),e,!0)))return r}else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof d&&(r=this._nestedArray[n].lookup(t,e,!0)))return r;return null===this.parent||s?null:this.parent.lookup(t,e)},d.prototype.lookupType=function(t){var e=this.lookup(t,[n]);if(!e)throw Error("no such type: "+t);return e},d.prototype.lookupEnum=function(t){var e=this.lookup(t,[o]);if(!e)throw Error("no such Enum '"+t+"' in "+this);return e},d.prototype.lookupTypeOrEnum=function(t){var e=this.lookup(t,[n,o]);if(!e)throw Error("no such Type or Enum '"+t+"' in "+this);return e},d.prototype.lookupService=function(t){var e=this.lookup(t,[i]);if(!e)throw Error("no such Service '"+t+"' in "+this);return e},d._configure=function(t,e,s){n=t,i=e,o=s}},4154:(t,e,s)=>{"use strict";t.exports=i,i.className="ReflectionObject";var r,n=s(7572);function i(t,e){if(!n.isString(t))throw TypeError("name must be a string");if(e&&!n.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof r&&e._handleAdd(this)},i.prototype.onRemove=function(t){var e=t.root;e instanceof r&&e._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(t){if(this.options)return this.options[t]},i.prototype.setOption=function(t,e,s){return s&&this.options&&void 0!==this.options[t]||((this.options||(this.options={}))[t]=e),this},i.prototype.setParsedOption=function(t,e,s){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(s){var i=r.find((function(e){return Object.prototype.hasOwnProperty.call(e,t)}));if(i){var o=i[t];n.setProperty(o,s,e)}else(i={})[t]=n.setProperty({},s,e),r.push(i)}else{var a={};a[t]=e,r.push(a)}return this},i.prototype.setOptions=function(t,e){if(t)for(var s=Object.keys(t),r=0;r<s.length;++r)this.setOption(s[r],t[s[r]],e);return this},i.prototype.toString=function(){var t=this.constructor.className,e=this.fullName;return e.length?t+" "+e:t},i._configure=function(t){r=t}},3044:(t,e,s)=>{"use strict";t.exports=o;var r=s(4154);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var n=s(5891),i=s(7572);function o(t,e,s,n){if(Array.isArray(e)||(s=e,e=void 0),r.call(this,t,s),void 0!==e&&!Array.isArray(e))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=n}function a(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}o.fromJSON=function(t,e){return new o(t,e.oneof,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:void 0])},o.prototype.add=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,a(this),this},o.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),(e=this.oneof.indexOf(t.name))>-1&&this.oneof.splice(e,1),t.partOf=null,this},o.prototype.onAdd=function(t){r.prototype.onAdd.call(this,t);for(var e=0;e<this.oneof.length;++e){var s=t.get(this.oneof[e]);s&&!s.partOf&&(s.partOf=this,this.fieldsArray.push(s))}a(this)},o.prototype.onRemove=function(t){for(var e,s=0;s<this.fieldsArray.length;++s)(e=this.fieldsArray[s]).parent&&e.parent.remove(e);r.prototype.onRemove.call(this,t)},o.d=function(){for(var t=new Array(arguments.length),e=0;e<arguments.length;)t[e]=arguments[e++];return function(e,s){i.decorateType(e.constructor).add(new o(s,t)),Object.defineProperty(e,s,{get:i.oneOfGetter(t),set:i.oneOfSetter(t)})}}},9867:(t,e,s)=>{"use strict";t.exports=c;var r,n=s(4155),i=n.LongBits,o=n.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return n.Buffer?function(t){return(c.create=function(t){return n.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function h(){var t=new i(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function f(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,s=this.pos+t;if(s>this.len)throw a(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,s):e===s?new this.buf.constructor(0):this._slice.call(this.buf,e,s)},c.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=l(),r._configure();var e=n.Long?"toLong":"toNumber";n.merge(c.prototype,{int64:function(){return h.call(this)[e](!1)},uint64:function(){return h.call(this)[e](!0)},sint64:function(){return h.call(this).zzDecode()[e](!1)},fixed64:function(){return p.call(this)[e](!0)},sfixed64:function(){return p.call(this)[e](!1)}})}},2676:(t,e,s)=>{"use strict";t.exports=i;var r=s(9867);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4155);function i(t){r.call(this,t)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},i._configure()},2613:(t,e,s)=>{"use strict";t.exports=l;var r=s(512);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var n,i,o,a=s(5891),c=s(4937),u=s(3044),d=s(7572);function l(t){r.call(this,"",t),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(t,e){return e||(e=new l),t.options&&e.setOptions(t.options),e.addJSON(t.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function t(e,s,r){"function"==typeof s&&(r=s,s=void 0);var n=this;if(!r)return d.asPromise(t,n,e,s);var a=r===h;function c(t,e){if(r){var s=r;if(r=null,a)throw t;s(t,e)}}function u(t){var e=t.lastIndexOf("google/protobuf/");if(e>-1){var s=t.substring(e);if(s in o)return s}return null}function l(t,e){try{if(d.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),d.isString(e)){i.filename=t;var r,o=i(e,n,s),l=0;if(o.imports)for(;l<o.imports.length;++l)(r=u(o.imports[l])||n.resolvePath(t,o.imports[l]))&&f(r);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(r=u(o.weakImports[l])||n.resolvePath(t,o.weakImports[l]))&&f(r,!0)}else n.setOptions(e.options).addJSON(e.nested)}catch(t){c(t)}a||p||c(null,n)}function f(t,e){if(!(n.files.indexOf(t)>-1))if(n.files.push(t),t in o)a?l(t,o[t]):(++p,setTimeout((function(){--p,l(t,o[t])})));else if(a){var s;try{s=d.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||c(t))}l(t,s)}else++p,n.fetch(t,(function(s,i){--p,r&&(s?e?p||c(null,n):c(s):l(t,i))}))}var p=0;d.isString(e)&&(e=[e]);for(var y,m=0;m<e.length;++m)(y=n.resolvePath("",e[m]))&&f(y);if(a)return n;p||c(null,n)},l.prototype.loadSync=function(t,e){if(!d.isNode)throw Error("not supported");return this.load(t,e,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(t){return"'extend "+t.extend+"' in "+t.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(t,e){var s=e.parent.lookup(e.extend);if(s){var r=new a(e.fullName,e.id,e.type,e.rule,void 0,e.options);return r.declaringField=e,e.extensionField=r,s.add(r),!0}return!1}l.prototype._handleAdd=function(t){if(t instanceof a)void 0===t.extend||t.extensionField||p(0,t)||this.deferred.push(t);else if(t instanceof c)f.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof u)){if(t instanceof n)for(var e=0;e<this.deferred.length;)p(0,this.deferred[e])?this.deferred.splice(e,1):++e;for(var s=0;s<t.nestedArray.length;++s)this._handleAdd(t._nestedArray[s]);f.test(t.name)&&(t.parent[t.name]=t)}},l.prototype._handleRemove=function(t){if(t instanceof a){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var e=this.deferred.indexOf(t);e>-1&&this.deferred.splice(e,1)}}else if(t instanceof c)f.test(t.name)&&delete t.parent[t.name];else if(t instanceof r){for(var s=0;s<t.nestedArray.length;++s)this._handleRemove(t._nestedArray[s]);f.test(t.name)&&delete t.parent[t.name]}},l._configure=function(t,e,s){n=t,i=e,o=s}},284:t=>{"use strict";t.exports={}},3290:(t,e,s)=>{"use strict";e.Service=s(979)},979:(t,e,s)=>{"use strict";t.exports=n;var r=s(4155);function n(t,e,s){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(s)}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(e,s,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return r.asPromise(t,a,e,s,n,i);if(a.rpcImpl)try{return a.rpcImpl(e,s[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(t,s){if(t)return a.emit("error",t,e),o(t);if(null!==s){if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(t){return a.emit("error",t,e),o(t)}return a.emit("data",s,e),o(null,s)}a.end(!0)}))}catch(t){return a.emit("error",t,e),void setTimeout((function(){o(t)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},877:(t,e,s)=>{"use strict";t.exports=a;var r=s(512);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var n=s(4935),i=s(7572),o=s(3290);function a(t,e){r.call(this,t,e),this.methods={},this._methodsArray=null}function c(t){return t._methodsArray=null,t}a.fromJSON=function(t,e){var s=new a(t,e.options);if(e.methods)for(var r=Object.keys(e.methods),i=0;i<r.length;++i)s.add(n.fromJSON(r[i],e.methods[r[i]]));return e.nested&&s.addJSON(e.nested),s.comment=e.comment,s},a.prototype.toJSON=function(t){var e=r.prototype.toJSON.call(this,t),s=!!t&&Boolean(t.keepComments);return i.toObject(["options",e&&e.options||void 0,"methods",r.arrayToJSON(this.methodsArray,t)||{},"nested",e&&e.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(t){return this.methods[t]||r.prototype.get.call(this,t)},a.prototype.resolveAll=function(){for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof n?(this.methods[t.name]=t,t.parent=this,c(this)):r.prototype.add.call(this,t)},a.prototype.remove=function(t){if(t instanceof n){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,c(this)}return r.prototype.remove.call(this,t)},a.prototype.create=function(t,e,s){for(var r,n=new o.Service(t,e,s),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");n[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return n}},4560:(t,e,s)=>{"use strict";t.exports=_;var r=s(512);((_.prototype=Object.create(r.prototype)).constructor=_).className="Type";var n=s(4937),i=s(3044),o=s(5891),a=s(8911),c=s(877),u=s(4777),d=s(9867),l=s(2944),h=s(7572),f=s(6382),p=s(4799),y=s(8600),m=s(6274),v=s(3375);function _(t,e){r.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function x(t){return t._fieldsById=t._fieldsArray=t._oneofsArray=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(_.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var s=this.fields[t[e]],r=s.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=s}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=_.generateConstructor(this)())},set:function(t){var e=t.prototype;e instanceof u||((t.prototype=new u).constructor=t,h.merge(t.prototype,e)),t.$type=t.prototype.$type=this,h.merge(t,u,!0),this._ctor=t;for(var s=0;s<this.fieldsArray.length;++s)this._fieldsArray[s].resolve();var r={};for(s=0;s<this.oneofsArray.length;++s)r[this._oneofsArray[s].resolve().name]={get:h.oneOfGetter(this._oneofsArray[s].oneof),set:h.oneOfSetter(this._oneofsArray[s].oneof)};s&&Object.defineProperties(t.prototype,r)}}}),_.generateConstructor=function(t){for(var e,s=h.codegen(["p"],t.name),r=0;r<t.fieldsArray.length;++r)(e=t._fieldsArray[r]).map?s("this%s={}",h.safeProp(e.name)):e.repeated&&s("this%s=[]",h.safeProp(e.name));return s("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},_.fromJSON=function(t,e){var s=new _(t,e.options);s.extensions=e.extensions,s.reserved=e.reserved;for(var u=Object.keys(e.fields),d=0;d<u.length;++d)s.add((void 0!==e.fields[u[d]].keyType?a.fromJSON:o.fromJSON)(u[d],e.fields[u[d]]));if(e.oneofs)for(u=Object.keys(e.oneofs),d=0;d<u.length;++d)s.add(i.fromJSON(u[d],e.oneofs[u[d]]));if(e.nested)for(u=Object.keys(e.nested),d=0;d<u.length;++d){var l=e.nested[u[d]];s.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?_.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[d],l))}return e.extensions&&e.extensions.length&&(s.extensions=e.extensions),e.reserved&&e.reserved.length&&(s.reserved=e.reserved),e.group&&(s.group=!0),e.comment&&(s.comment=e.comment),s},_.prototype.toJSON=function(t){var e=r.prototype.toJSON.call(this,t),s=!!t&&Boolean(t.keepComments);return h.toObject(["options",e&&e.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,t),"fields",r.arrayToJSON(this.fieldsArray.filter((function(t){return!t.declaringField})),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",e&&e.nested||void 0,"comment",s?this.comment:void 0])},_.prototype.resolveAll=function(){for(var t=this.fieldsArray,e=0;e<t.length;)t[e++].resolve();var s=this.oneofsArray;for(e=0;e<s.length;)s[e++].resolve();return r.prototype.resolveAll.call(this)},_.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},_.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof o&&void 0===t.extend){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),x(this)}return t instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),x(this)):r.prototype.add.call(this,t)},_.prototype.remove=function(t){if(t instanceof o&&void 0===t.extend){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),x(this)}if(t instanceof i){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),x(this)}return r.prototype.remove.call(this,t)},_.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},_.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)},_.prototype.create=function(t){return new this.ctor(t)},_.prototype.setup=function(){for(var t=this.fullName,e=[],s=0;s<this.fieldsArray.length;++s)e.push(this._fieldsArray[s].resolve().resolvedType);this.encode=f(this)({Writer:l,types:e,util:h}),this.decode=p(this)({Reader:d,types:e,util:h}),this.verify=y(this)({types:e,util:h}),this.fromObject=m.fromObject(this)({types:e,util:h}),this.toObject=m.toObject(this)({types:e,util:h});var r=v[t];if(r){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(n),n.toObject=this.toObject,this.toObject=r.toObject.bind(n)}return this},_.prototype.encode=function(t,e){return this.setup().encode(t,e)},_.prototype.encodeDelimited=function(t,e){return this.encode(t,e&&e.len?e.fork():e).ldelim()},_.prototype.decode=function(t,e){return this.setup().decode(t,e)},_.prototype.decodeDelimited=function(t){return t instanceof d||(t=d.create(t)),this.decode(t,t.uint32())},_.prototype.verify=function(t){return this.setup().verify(t)},_.prototype.fromObject=function(t){return this.setup().fromObject(t)},_.prototype.toObject=function(t,e){return this.setup().toObject(t,e)},_.d=function(t){return function(e){h.decorateType(e,t)}}},8997:(t,e,s)=>{"use strict";var r=e,n=s(7572),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(t,e){var s=0,r={};for(e|=0;s<t.length;)r[i[s+e]]=t[s++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},7572:(t,e,s)=>{"use strict";var r,n,i=t.exports=s(4155),o=s(284);i.codegen=s(6348),i.fetch=s(7803),i.path=s(1272),i.fs=i.inquire("fs"),i.toArray=function(t){if(t){for(var e=Object.keys(t),s=new Array(e.length),r=0;r<e.length;)s[r]=t[e[r++]];return s}return[]},i.toObject=function(t){for(var e={},s=0;s<t.length;){var r=t[s++],n=t[s++];void 0!==n&&(e[r]=n)}return e};var a=/\\/g,c=/"/g;i.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},i.safeProp=function(t){return!/^[$\w_]+$/.test(t)||i.isReserved(t)?'["'+t.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+t},i.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var u=/_([a-z])/g;i.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(u,(function(t,e){return e.toUpperCase()}))},i.compareFieldsById=function(t,e){return t.id-e.id},i.decorateType=function(t,e){if(t.$type)return e&&t.$type.name!==e&&(i.decorateRoot.remove(t.$type),t.$type.name=e,i.decorateRoot.add(t.$type)),t.$type;r||(r=s(4560));var n=new r(e||t.name);return i.decorateRoot.add(n),n.ctor=t,Object.defineProperty(t,"$type",{value:n,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;i.decorateEnum=function(t){if(t.$type)return t.$type;n||(n=s(4937));var e=new n("Enum"+d++,t);return i.decorateRoot.add(e),Object.defineProperty(t,"$type",{value:e,enumerable:!1}),e},i.setProperty=function(t,e,s){if("object"!=typeof t)throw TypeError("dst must be an object");if(!e)throw TypeError("path must be specified");return function t(e,s,r){var n=s.shift();if("__proto__"===n)return e;if(s.length>0)e[n]=t(e[n]||{},s,r);else{var i=e[n];i&&(r=[].concat(i).concat(r)),e[n]=r}return e}(t,e=e.split("."),s)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(s(2613)))}})},8950:(t,e,s)=>{"use strict";t.exports=n;var r=s(4155);function n(t,e){this.lo=t>>>0,this.hi=e>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return i;var e=t<0;e&&(t=-t);var s=t>>>0,r=(t-s)/4294967296>>>0;return e&&(r=~r>>>0,s=~s>>>0,++s>4294967295&&(s=0,++r>4294967295&&(r=0))),new n(s,r)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if(r.isString(t)){if(!r.Long)return n.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):i},n.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,s=~this.hi>>>0;return e||(s=s+1>>>0),-(e+4294967296*s)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;n.fromHash=function(t){return t===o?i:new n((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},n.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},n.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0===s?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:s<128?9:10}},4155:function(t,e,s){"use strict";var r=e;function n(t,e,s){for(var r=Object.keys(e),n=0;n<r.length;++n)void 0!==t[r[n]]&&s||(t[r[n]]=e[r[n]]);return t}function i(t){function e(t,s){if(!(this instanceof e))return new e(t,s);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),s&&n(this,s)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:()=>t,set:void 0,enumerable:!1,configurable:!0},toString:{value(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}r.asPromise=s(537),r.base64=s(9745),r.EventEmitter=s(4459),r.float=s(897),r.inquire=s(3229),r.utf8=s(113),r.pool=s(7986),r.LongBits=s(8950),r.isNode=Boolean(void 0!==s.g&&s.g&&s.g.process&&s.g.process.versions&&s.g.process.versions.node),r.global=r.isNode&&s.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var s=t[e];return!(null==s||!t.hasOwnProperty(e))&&("object"!=typeof s||(Array.isArray(s)?s.length:Object.keys(s).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var s=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(s.lo,s.hi,e):s.toNumber(Boolean(e))},r.merge=n,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(t){for(var e={},s=0;s<t.length;++s)e[t[s]]=1;return function(){for(var t=Object.keys(this),s=t.length-1;s>-1;--s)if(1===e[t[s]]&&void 0!==this[t[s]]&&null!==this[t[s]])return t[s]}},r.oneOfSetter=function(t){return function(e){for(var s=0;s<t.length;++s)t[s]!==e&&delete this[t[s]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,s){return new t(e,s)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},8600:(t,e,s)=>{"use strict";t.exports=function(t){var e=n.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=t.oneofsArray,r={};s.length&&e("var p={}");for(var c=0;c<t.fieldsArray.length;++c){var u=t._fieldsArray[c].resolve(),d="m"+n.safeProp(u.name);if(u.optional&&e("if(%s!=null&&m.hasOwnProperty(%j)){",d,u.name),u.map)e("if(!util.isObject(%s))",d)("return%j",i(u,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(e,u,"k[i]"),o(e,u,c,d+"[k[i]]")("}");else if(u.repeated)e("if(!Array.isArray(%s))",d)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",d),o(e,u,c,d+"[i]")("}");else{if(u.partOf){var l=n.safeProp(u.partOf.name);1===r[u.partOf.name]&&e("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,e("p%s=1",l)}o(e,u,c,d)}u.optional&&e("}")}return e("return null")};var r=s(4937),n=s(7572);function i(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function o(t,e,s,n){if(e.resolvedType)if(e.resolvedType instanceof r){t("switch(%s){",n)("default:")("return%j",i(e,"enum value"));for(var o=Object.keys(e.resolvedType.values),a=0;a<o.length;++a)t("case %i:",e.resolvedType.values[o[a]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",s,n)("if(e)")("return%j+e",e.name+".")("}");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",n)("return%j",i(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',n)("return%j",i(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',n)("return%j",i(e,"boolean"));break;case"string":t("if(!util.isString(%s))",n)("return%j",i(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(e,"buffer"))}return t}function a(t,e,s){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",s)("return%j",i(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",s)("return%j",i(e,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",s)("return%j",i(e,"boolean key"))}return t}},3375:(t,e,s)=>{"use strict";var r=e,n=s(4777);r[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var e=t["@type"].substring(t["@type"].lastIndexOf("/")+1),s=this.lookup(e);if(s){var r="."===t["@type"].charAt(0)?t["@type"].slice(1):t["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:s.encode(s.fromObject(t)).finish()})}}return this.fromObject(t)},toObject:function(t,e){var s="",r="";if(e&&e.json&&t.type_url&&t.value){r=t.type_url.substring(t.type_url.lastIndexOf("/")+1),s=t.type_url.substring(0,t.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(t=i.decode(t.value))}if(!(t instanceof this.ctor)&&t instanceof n){var o=t.$type.toObject(t,e);return""===s&&(s="type.googleapis.com/"),r=s+("."===t.$type.fullName[0]?t.$type.fullName.slice(1):t.$type.fullName),o["@type"]=r,o}return this.toObject(t,e)}}},2944:(t,e,s)=>{"use strict";t.exports=l;var r,n=s(4155),i=n.LongBits,o=n.base64,a=n.utf8;function c(t,e,s){this.fn=t,this.len=e,this.next=void 0,this.val=s}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return n.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(t,e,s){e[s]=255&t}function p(t,e){this.len=t,this.next=void 0,this.val=e}function y(t,e,s){for(;t.hi;)e[s++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[s++]=127&t.lo|128,t.lo=t.lo>>>7;e[s++]=t.lo}function m(t,e,s){e[s]=255&t,e[s+1]=t>>>8&255,e[s+2]=t>>>16&255,e[s+3]=t>>>24}l.create=h(),l.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype._push=function(t,e,s){return this.tail=this.tail.next=new c(t,e,s),this.len+=e,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(t,e,s){for(;t>127;)e[s++]=127&t|128,t>>>=7;e[s]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(y,10,i.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=i.from(t);return this._push(y,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=i.from(t).zzEncode();return this._push(y,e.length(),e)},l.prototype.bool=function(t){return this._push(f,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(m,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=i.from(t);return this._push(m,4,e.lo)._push(m,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(n.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(n.float.writeDoubleLE,8,t)};var v=n.Array.prototype.set?function(t,e,s){e.set(t,s)}:function(t,e,s){for(var r=0;r<t.length;++r)e[s+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(f,1,0);if(n.isString(t)){var s=l.alloc(e=o.length(t));o.decode(t,s,0),t=s}return this.uint32(e)._push(v,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(f,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,e=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=t.next,this.tail=e,this.len+=s),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),s=0;t;)t.fn(t.val,e,s),s+=t.len,t=t.next;return e},l._configure=function(t){r=t,l.create=h(),r._configure()}},2178:(t,e,s)=>{"use strict";t.exports=i;var r=s(2944);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4155);function i(){r.call(this)}function o(t,e,s){t.length<40?n.utf8.write(t,e,s):e.utf8Write?e.utf8Write(t,s):e.write(t,s)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(t,e,s){e.set(t,s)}:function(t,e,s){if(t.copy)t.copy(e,s,0,t.length);else for(var r=0;r<t.length;)e[s++]=t[r++]}},i.prototype.bytes=function(t){n.isString(t)&&(t=n._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(i.writeBytesBuffer,e,t),this},i.prototype.string=function(t){var e=n.Buffer.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this},i._configure()},1829:(t,e)=>{"use strict";var s=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function n(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,i,o=[];for(i in"string"!=typeof e&&(e="?"),t)if(s.call(t,i)){if((r=t[i])||null!=r&&!isNaN(r)||(r=""),i=n(i),r=n(r),null===i||null===r)continue;o.push(i+"="+r)}return o.length?e+o.join("&"):""},e.parse=function(t){for(var e,s=/([^=?#&]+)=?([^&]*)/g,n={};e=s.exec(t);){var i=r(e[1]),o=r(e[2]);null===i||null===o||i in n||(n[i]=o)}return n}},3722:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},7594:(t,e,s)=>{"use strict";var r,n=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var t={};return function(e){if(void 0===t[e]){var s=document.querySelector(e);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}t[e]=s}return t[e]}}(),o=[];function a(t){for(var e=-1,s=0;s<o.length;s++)if(o[s].identifier===t){e=s;break}return e}function c(t,e){for(var s={},r=[],n=0;n<t.length;n++){var i=t[n],c=e.base?i[0]+e.base:i[0],u=s[c]||0,d="".concat(c," ").concat(u);s[c]=u+1;var l=a(d),h={css:i[1],media:i[2],sourceMap:i[3]};-1!==l?(o[l].references++,o[l].updater(h)):o.push({identifier:d,updater:m(h,e),references:1}),r.push(d)}return r}function u(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var n=s.nc;n&&(r.nonce=n)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var o=i(t.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(e)}return e}var d,l=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function h(t,e,s,r){var n=s?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=l(e,n);else{var i=document.createTextNode(n),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(i,o[e]):t.appendChild(i)}}function f(t,e,s){var r=s.css,n=s.media,i=s.sourceMap;if(n?t.setAttribute("media",n):t.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var p=null,y=0;function m(t,e){var s,r,n;if(e.singleton){var i=y++;s=p||(p=u(e)),r=h.bind(null,s,i,!1),n=h.bind(null,s,i,!0)}else s=u(e),r=f.bind(null,s,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(s)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=n());var s=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<s.length;r++){var n=a(s[r]);o[n].references--}for(var i=c(t,e),u=0;u<s.length;u++){var d=a(s[u]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}s=i}}}},9655:(t,e,s)=>{"use strict";var r=s(3722),n=s(1829),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(t){return(t||"").toString().replace(i,"")}var h=[["#","hash"],["?","query"],function(t,e){return y(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function p(t){var e,r=("undefined"!=typeof window?window:void 0!==s.g?s.g:"undefined"!=typeof self?self:{}).location||{},n={},i=typeof(t=t||r);if("blob:"===t.protocol)n=new v(unescape(t.pathname),{});else if("string"===i)for(e in n=new v(t,{}),f)delete n[e];else if("object"===i){for(e in t)e in f||(n[e]=t[e]);void 0===n.slashes&&(n.slashes=a.test(t.href))}return n}function y(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function m(t,e){t=(t=l(t)).replace(o,""),e=e||{};var s,r=u.exec(t),n=r[1]?r[1].toLowerCase():"",i=!!r[2],a=!!r[3],c=0;return i?a?(s=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(s=r[2]+r[4],c=r[2].length):a?(s=r[3]+r[4],c=r[3].length):s=r[4],"file:"===n?c>=2&&(s=s.slice(2)):y(n)?s=r[4]:n?i&&(s=s.slice(2)):c>=2&&y(e.protocol)&&(s=r[4]),{protocol:n,slashes:i||y(n),slashesCount:c,rest:s}}function v(t,e,s){if(t=(t=l(t)).replace(o,""),!(this instanceof v))return new v(t,e,s);var i,a,c,u,f,_,x=h.slice(),g=typeof e,b=this,w=0;for("object"!==g&&"string"!==g&&(s=e,e=null),s&&"function"!=typeof s&&(s=n.parse),i=!(a=m(t||"",e=p(e))).protocol&&!a.slashes,b.slashes=a.slashes||i&&e.slashes,b.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!y(b.protocol)))&&(x[3]=[/(.*)/,"pathname"]);w<x.length;w++)"function"!=typeof(u=x[w])?(c=u[0],_=u[1],c!=c?b[_]=t:"string"==typeof c?~(f="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(b[_]=t.slice(0,f),t=t.slice(f+u[2])):(b[_]=t.slice(f),t=t.slice(0,f))):(f=c.exec(t))&&(b[_]=f[1],t=t.slice(0,f.index)),b[_]=b[_]||i&&u[3]&&e[_]||"",u[4]&&(b[_]=b[_].toLowerCase())):t=u(t,b);s&&(b.query=s(b.query)),i&&e.slashes&&"/"!==b.pathname.charAt(0)&&(""!==b.pathname||""!==e.pathname)&&(b.pathname=function(t,e){if(""===t)return e;for(var s=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=s.length,n=s[r-1],i=!1,o=0;r--;)"."===s[r]?s.splice(r,1):".."===s[r]?(s.splice(r,1),o++):o&&(0===r&&(i=!0),s.splice(r,1),o--);return i&&s.unshift(""),"."!==n&&".."!==n||s.push(""),s.join("/")}(b.pathname,e.pathname)),"/"!==b.pathname.charAt(0)&&y(b.protocol)&&(b.pathname="/"+b.pathname),r(b.port,b.protocol)||(b.host=b.hostname,b.port=""),b.username=b.password="",b.auth&&(~(f=b.auth.indexOf(":"))?(b.username=b.auth.slice(0,f),b.username=encodeURIComponent(decodeURIComponent(b.username)),b.password=b.auth.slice(f+1),b.password=encodeURIComponent(decodeURIComponent(b.password))):b.username=encodeURIComponent(decodeURIComponent(b.auth)),b.auth=b.password?b.username+":"+b.password:b.username),b.origin="file:"!==b.protocol&&y(b.protocol)&&b.host?b.protocol+"//"+b.host:"null",b.href=b.toString()}v.prototype={set:function(t,e,s){var i=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(s||n.parse)(e)),i[t]=e;break;case"port":i[t]=e,r(e,i.protocol)?e&&(i.host=i.hostname+":"+e):(i.host=i.hostname,i[t]="");break;case"hostname":i[t]=e,i.port&&(e+=":"+i.port),i.host=e;break;case"host":i[t]=e,c.test(e)?(e=e.split(":"),i.port=e.pop(),i.hostname=e.join(":")):(i.hostname=e,i.port="");break;case"protocol":i.protocol=e.toLowerCase(),i.slashes=!s;break;case"pathname":case"hash":if(e){var o="pathname"===t?"/":"#";i[t]=e.charAt(0)!==o?o+e:e}else i[t]=e;break;case"username":case"password":i[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(i.username=e.slice(0,a),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=e.slice(a+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(e))}for(var u=0;u<h.length;u++){var d=h[u];d[4]&&(i[d[1]]=i[d[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&y(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(t){t&&"function"==typeof t||(t=n.stringify);var e,s=this,r=s.host,i=s.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(s.protocol&&s.slashes||y(s.protocol)?"//":"");return s.username?(o+=s.username,s.password&&(o+=":"+s.password),o+="@"):s.password?(o+=":"+s.password,o+="@"):"file:"!==s.protocol&&y(s.protocol)&&!r&&"/"!==s.pathname&&(o+="@"),(":"===r[r.length-1]||c.test(s.hostname)&&!s.port)&&(r+=":"),o+=r+s.pathname,(e="object"==typeof s.query?t(s.query):s.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),s.hash&&(o+=s.hash),o}},v.extractProtocol=m,v.location=p,v.trimLeft=l,v.qs=n,t.exports=v},5003:(t,e,s)=>{"use strict";var r;s.r(e),s.d(e,{NIL:()=>N,parse:()=>m,stringify:()=>d,v1:()=>y,v3:()=>T,v4:()=>k,v5:()=>R,validate:()=>a,version:()=>j});var n=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)}const o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const a=function(t){return"string"==typeof t&&o.test(t)};for(var c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));const d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!a(s))throw TypeError("Stringified UUID is invalid");return s};var l,h,f=0,p=0;const y=function(t,e,s){var r=e&&s||0,n=e||new Array(16),o=(t=t||{}).node||l,a=void 0!==t.clockseq?t.clockseq:h;if(null==o||null==a){var c=t.random||(t.rng||i)();null==o&&(o=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==a&&(a=h=16383&(c[6]<<8|c[7]))}var u=void 0!==t.msecs?t.msecs:Date.now(),y=void 0!==t.nsecs?t.nsecs:p+1,m=u-f+(y-p)/1e4;if(m<0&&void 0===t.clockseq&&(a=a+1&16383),(m<0||u>f)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=u,p=y,h=a;var v=(1e4*(268435455&(u+=122192928e5))+y)%4294967296;n[r++]=v>>>24&255,n[r++]=v>>>16&255,n[r++]=v>>>8&255,n[r++]=255&v;var _=u/4294967296*1e4&268435455;n[r++]=_>>>8&255,n[r++]=255&_,n[r++]=_>>>24&15|16,n[r++]=_>>>16&255,n[r++]=a>>>8|128,n[r++]=255&a;for(var x=0;x<6;++x)n[r+x]=o[x];return e||d(n)};const m=function(t){if(!a(t))throw TypeError("Invalid UUID");var e,s=new Uint8Array(16);return s[0]=(e=parseInt(t.slice(0,8),16))>>>24,s[1]=e>>>16&255,s[2]=e>>>8&255,s[3]=255&e,s[4]=(e=parseInt(t.slice(9,13),16))>>>8,s[5]=255&e,s[6]=(e=parseInt(t.slice(14,18),16))>>>8,s[7]=255&e,s[8]=(e=parseInt(t.slice(19,23),16))>>>8,s[9]=255&e,s[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,s[11]=e/4294967296&255,s[12]=e>>>24&255,s[13]=e>>>16&255,s[14]=e>>>8&255,s[15]=255&e,s};function v(t,e,s){function r(t,r,n,i){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],s=0;s<t.length;++s)e.push(t.charCodeAt(s));return e}(t)),"string"==typeof r&&(r=m(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+t.length);if(o.set(r),o.set(t,r.length),(o=s(o))[6]=15&o[6]|e,o[8]=63&o[8]|128,n){i=i||0;for(var a=0;a<16;++a)n[i+a]=o[a];return n}return d(o)}try{r.name=t}catch(t){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function _(t){return 14+(t+64>>>9<<4)+1}function x(t,e){var s=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(s>>16)<<16|65535&s}function g(t,e,s,r,n,i){return x((o=x(x(e,t),x(r,i)))<<(a=n)|o>>>32-a,s);var o,a}function b(t,e,s,r,n,i,o){return g(e&s|~e&r,t,e,n,i,o)}function w(t,e,s,r,n,i,o){return g(e&r|s&~r,t,e,n,i,o)}function O(t,e,s,r,n,i,o){return g(e^s^r,t,e,n,i,o)}function E(t,e,s,r,n,i,o){return g(s^(e|~r),t,e,n,i,o)}const S=function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var s=0;s<e.length;++s)t[s]=e.charCodeAt(s)}return function(t){for(var e=[],s=32*t.length,r="0123456789abcdef",n=0;n<s;n+=8){var i=t[n>>5]>>>n%32&255,o=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<<e%32,t[_(e)-1]=e;for(var s=1732584193,r=-271733879,n=-1732584194,i=271733878,o=0;o<t.length;o+=16){var a=s,c=r,u=n,d=i;s=b(s,r,n,i,t[o],7,-680876936),i=b(i,s,r,n,t[o+1],12,-389564586),n=b(n,i,s,r,t[o+2],17,606105819),r=b(r,n,i,s,t[o+3],22,-1044525330),s=b(s,r,n,i,t[o+4],7,-176418897),i=b(i,s,r,n,t[o+5],12,1200080426),n=b(n,i,s,r,t[o+6],17,-1473231341),r=b(r,n,i,s,t[o+7],22,-45705983),s=b(s,r,n,i,t[o+8],7,1770035416),i=b(i,s,r,n,t[o+9],12,-1958414417),n=b(n,i,s,r,t[o+10],17,-42063),r=b(r,n,i,s,t[o+11],22,-1990404162),s=b(s,r,n,i,t[o+12],7,1804603682),i=b(i,s,r,n,t[o+13],12,-40341101),n=b(n,i,s,r,t[o+14],17,-1502002290),s=w(s,r=b(r,n,i,s,t[o+15],22,1236535329),n,i,t[o+1],5,-165796510),i=w(i,s,r,n,t[o+6],9,-1069501632),n=w(n,i,s,r,t[o+11],14,643717713),r=w(r,n,i,s,t[o],20,-373897302),s=w(s,r,n,i,t[o+5],5,-701558691),i=w(i,s,r,n,t[o+10],9,38016083),n=w(n,i,s,r,t[o+15],14,-660478335),r=w(r,n,i,s,t[o+4],20,-405537848),s=w(s,r,n,i,t[o+9],5,568446438),i=w(i,s,r,n,t[o+14],9,-1019803690),n=w(n,i,s,r,t[o+3],14,-187363961),r=w(r,n,i,s,t[o+8],20,1163531501),s=w(s,r,n,i,t[o+13],5,-1444681467),i=w(i,s,r,n,t[o+2],9,-51403784),n=w(n,i,s,r,t[o+7],14,1735328473),s=O(s,r=w(r,n,i,s,t[o+12],20,-1926607734),n,i,t[o+5],4,-378558),i=O(i,s,r,n,t[o+8],11,-2022574463),n=O(n,i,s,r,t[o+11],16,1839030562),r=O(r,n,i,s,t[o+14],23,-35309556),s=O(s,r,n,i,t[o+1],4,-1530992060),i=O(i,s,r,n,t[o+4],11,1272893353),n=O(n,i,s,r,t[o+7],16,-155497632),r=O(r,n,i,s,t[o+10],23,-1094730640),s=O(s,r,n,i,t[o+13],4,681279174),i=O(i,s,r,n,t[o],11,-358537222),n=O(n,i,s,r,t[o+3],16,-722521979),r=O(r,n,i,s,t[o+6],23,76029189),s=O(s,r,n,i,t[o+9],4,-640364487),i=O(i,s,r,n,t[o+12],11,-421815835),n=O(n,i,s,r,t[o+15],16,530742520),s=E(s,r=O(r,n,i,s,t[o+2],23,-995338651),n,i,t[o],6,-198630844),i=E(i,s,r,n,t[o+7],10,1126891415),n=E(n,i,s,r,t[o+14],15,-1416354905),r=E(r,n,i,s,t[o+5],21,-57434055),s=E(s,r,n,i,t[o+12],6,1700485571),i=E(i,s,r,n,t[o+3],10,-1894986606),n=E(n,i,s,r,t[o+10],15,-1051523),r=E(r,n,i,s,t[o+1],21,-2054922799),s=E(s,r,n,i,t[o+8],6,1873313359),i=E(i,s,r,n,t[o+15],10,-30611744),n=E(n,i,s,r,t[o+6],15,-1560198380),r=E(r,n,i,s,t[o+13],21,1309151649),s=E(s,r,n,i,t[o+4],6,-145523070),i=E(i,s,r,n,t[o+11],10,-1120210379),n=E(n,i,s,r,t[o+2],15,718787259),r=E(r,n,i,s,t[o+9],21,-343485551),s=x(s,a),r=x(r,c),n=x(n,u),i=x(i,d)}return[s,r,n,i]}(function(t){if(0===t.length)return[];for(var e=8*t.length,s=new Uint32Array(_(e)),r=0;r<e;r+=8)s[r>>5]|=(255&t[r/8])<<r%32;return s}(t),8*t.length))};const T=v("v3",48,S);const k=function(t,e,s){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){s=s||0;for(var n=0;n<16;++n)e[s+n]=r[n];return e}return d(r)};function C(t,e,s,r){switch(t){case 0:return e&s^~e&r;case 1:case 3:return e^s^r;case 2:return e&s^e&r^s&r}}function A(t,e){return t<<e|t>>>32-e}const I=function(t){var e=[1518500249,1859775393,2400959708,3395469782],s=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var r=unescape(encodeURIComponent(t));t=[];for(var n=0;n<r.length;++n)t.push(r.charCodeAt(n))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,o=Math.ceil(i/16),a=new Array(o),c=0;c<o;++c){for(var u=new Uint32Array(16),d=0;d<16;++d)u[d]=t[64*c+4*d]<<24|t[64*c+4*d+1]<<16|t[64*c+4*d+2]<<8|t[64*c+4*d+3];a[c]=u}a[o-1][14]=8*(t.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(t.length-1)&4294967295;for(var l=0;l<o;++l){for(var h=new Uint32Array(80),f=0;f<16;++f)h[f]=a[l][f];for(var p=16;p<80;++p)h[p]=A(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var y=s[0],m=s[1],v=s[2],_=s[3],x=s[4],g=0;g<80;++g){var b=Math.floor(g/20),w=A(y,5)+C(b,m,v,_)+x+e[b]+h[g]>>>0;x=_,_=v,v=A(m,30)>>>0,m=y,y=w}s[0]=s[0]+y>>>0,s[1]=s[1]+m>>>0,s[2]=s[2]+v>>>0,s[3]=s[3]+_>>>0,s[4]=s[4]+x>>>0}return[s[0]>>24&255,s[0]>>16&255,s[0]>>8&255,255&s[0],s[1]>>24&255,s[1]>>16&255,s[1]>>8&255,255&s[1],s[2]>>24&255,s[2]>>16&255,s[2]>>8&255,255&s[2],s[3]>>24&255,s[3]>>16&255,s[3]>>8&255,255&s[3],s[4]>>24&255,s[4]>>16&255,s[4]>>8&255,255&s[4]]};const R=v("v5",80,I),N="00000000-0000-0000-0000-000000000000";const j=function(t){if(!a(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}},9347:t=>{"use strict";var e,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r={},n=0,i=0;function o(t){var e="";do{e=s[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function a(){var t=o(+new Date);return t!==e?(n=0,e=t):t+"."+o(n++)}for(;i<64;i++)r[s[i]]=i;a.encode=o,a.decode=function(t){var e=0;for(i=0;i<t.length;i++)e=64*e+r[t.charAt(i)];return e},t.exports=a},2417:(t,e,s)=>{t.exports=s(7720)("./src/collaboration-core.js")},2704:(t,e,s)=>{t.exports=s(7079)("./src/core.js")},1492:(t,e,s)=>{t.exports=s(7079)("./src/engine.js")},9273:(t,e,s)=>{t.exports=s(7079)("./src/ui.js")},2209:(t,e,s)=>{t.exports=s(7079)("./src/utils.js")},7720:t=>{"use strict";t.exports=CKEditor5.collaborationDll},7079:t=>{"use strict";t.exports=CKEditor5.dll},66:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},5769:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const r=s(1187);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}}),e.protocol=r.Socket.protocol;var n=s(4291);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var i=s(6449);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return i.transports}});var o=s(102);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}})},1187:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const n=s(6449),i=s(102),o=r(s(9827)),a=r(s(5977)),c=r(s(5579)),u=s(3717),d=s(4755),l=(0,c.default)("engine.io-client:socket");class h extends u.Emitter{constructor(t,e={}){super(),t&&"object"==typeof t&&(e=t,t=null),t?(t=(0,a.default)(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=(0,a.default)(e.host).host),(0,i.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=o.default.decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",(()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())}),!1),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close")},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){l('creating transport "%s"',t);const e=function(t){const e={};for(let s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);return e}(this.opts.query);e.EIO=d.protocol,e.transport=t,this.id&&(e.sid=this.id);const s=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return l("options: %j",s),new n.transports[t](s)}open(){let t;if(this.opts.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return l("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){l("setting transport %s",t.name),this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(()=>{this.onClose("transport close")}))}probe(t){l('probing transport "%s"',t);let e=this.createTransport(t),s=!1;h.priorWebsocketSuccess=!1;const r=()=>{s||(l('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!s)if("pong"===r.type&&"probe"===r.data){if(l('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,l('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{s||"closed"!==this.readyState&&(l("changing transport and sending upgrade packet"),u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{l('probe transport "%s" failed',t);const s=new Error("probe error");s.transport=e.name,this.emitReserved("upgradeError",s)}})))};function n(){s||(s=!0,u(),e.close(),e=null)}const i=s=>{const r=new Error("probe error: "+s);r.transport=e.name,n(),l('probe transport "%s" failed because of error: %s',t,s),this.emitReserved("upgradeError",r)};function o(){i("transport closed")}function a(){i("socket closed")}function c(t){e&&t.name!==e.name&&(l('"%s" works - aborting "%s"',t.name,e.name),n())}const u=()=>{e.removeListener("open",r),e.removeListener("error",i),e.removeListener("close",o),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",i),e.once("close",o),this.once("close",a),this.once("upgrading",c),e.open()}onOpen(){if(l("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){l("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(l('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}else l('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(l("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emitReserved("flush"))}write(t,e,s){return this.sendPacket("message",t,e,s),this}send(t,e,s){return this.sendPacket("message",t,e,s),this}sendPacket(t,e,s,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:t,data:e,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),l("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?s():t()})):this.upgrading?s():t()),this}onError(t){l("socket error %j",t),h.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(l('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let s=0;const r=t.length;for(;s<r;s++)~this.transports.indexOf(t[s])&&e.push(t[s]);return e}}e.Socket=h,h.protocol=d.protocol},4291:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=void 0;const n=s(4755),i=s(3717),o=s(102),a=(0,r(s(5579)).default)("engine.io-client:transport");class c extends i.Emitter{constructor(t){super(),this.writable=!1,(0,o.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e){const s=new Error(t);return s.type="TransportError",s.description=e,super.emit("error",s),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState?this.write(t):a("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emit("open")}onData(t){const e=(0,n.decodePacket)(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emit("packet",t)}onClose(){this.readyState="closed",super.emit("close")}}e.Transport=c},6449:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=s(9814),n=s(4199);e.transports={websocket:n.WS,polling:r.XHR}},9814:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.XHR=void 0;const n=r(s(4582)),i=r(s(5579)),o=r(s(66)),a=s(102),c=s(3717),u=s(3737),d=(0,i.default)("engine.io-client:polling-xhr");function l(){}const h=null!=new n.default({xdomain:!1}).responseType;class f extends u.Polling{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=h&&!e}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new p(this.uri(),t)}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t=>{this.onError("xhr post error",t)}))}doPoll(){d("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t=>{this.onError("xhr poll error",t)})),this.pollXhr=t}}e.XHR=f;class p extends c.Emitter{constructor(t,e){super(),(0,a.installTimerFunctions)(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=(0,a.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new n.default(t);try{d("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof e.status?e.status:0)}),0))},d("xhr data %s",this.data),e.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)}onSuccess(){this.emit("success"),this.cleanup()}onData(t){this.emit("data",t),this.onSuccess()}onError(t){this.emit("error",t),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=l,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete p.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&this.onData(t)}abort(){this.cleanup()}}if(e.Request=p,p.requestsCount=0,p.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",y);else if("function"==typeof addEventListener){const t="onpagehide"in o.default?"pagehide":"unload";addEventListener(t,y,!1)}function y(){for(let t in p.requests)p.requests.hasOwnProperty(t)&&p.requests[t].abort()}},3737:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Polling=void 0;const n=s(4291),i=r(s(5579)),o=r(s(9347)),a=r(s(9827)),c=s(4755),u=(0,i.default)("engine.io-client:polling");class d extends n.Transport{constructor(){super(...arguments),this.polling=!1}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{u("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(u("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--t||e()}))),this.writable||(u("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){u("pre-pause writing complete"),--t||e()})))}else e()}poll(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")}onData(t){u("polling got data %s",t);(0,c.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose(),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{u("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,c.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emit("drain")}))}))}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let s="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,o.default)()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(s=":"+this.opts.port);const r=a.default.encode(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}}e.Polling=d},9233:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.usingBrowserWebSocket=e.WebSocket=e.nextTick=void 0;const n=r(s(66));e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.WebSocket=n.default.WebSocket||n.default.MozWebSocket,e.usingBrowserWebSocket=!0,e.defaultBinaryType="arraybuffer"},4199:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=void 0;const n=s(4291),i=r(s(9827)),o=r(s(9347)),a=s(102),c=s(9233),u=r(s(5579)),d=s(4755),l=(0,u.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class f extends n.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,s=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=c.usingBrowserWebSocket&&!h?e?new c.WebSocket(t,e):new c.WebSocket(t):new c.WebSocket(t,e,s)}catch(t){return this.emit("error",t)}this.ws.binaryType=this.socket.binaryType||c.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=this.onClose.bind(this),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const s=t[e],r=e===t.length-1;(0,d.encodePacket)(s,this.supportsBinary,(t=>{const e={};if(!c.usingBrowserWebSocket&&(s.options&&(e.compress=s.options.compress),this.opts.perMessageDeflate)){("string"==typeof t?Buffer.byteLength(t):t.length)<this.opts.perMessageDeflate.threshold&&(e.compress=!1)}try{c.usingBrowserWebSocket?this.ws.send(t):this.ws.send(t,e)}catch(t){l("websocket closed before onclose event")}r&&(0,c.nextTick)((()=>{this.writable=!0,this.emit("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let s="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(s=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,o.default)()),this.supportsBinary||(t.b64=1);const r=i.default.encode(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}check(){return!(!c.WebSocket||"__initialize"in c.WebSocket&&this.name===f.prototype.name)}}e.WS=f},4582:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(4568)),i=r(s(66));e.default=function(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||n.default))return new XMLHttpRequest}catch(t){}if(!e)try{return new(i.default[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},102:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.installTimerFunctions=e.pick=void 0;const n=r(s(66));e.pick=function(t,...e){return e.reduce(((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e)),{})};const i=setTimeout,o=clearTimeout;e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=i.bind(n.default),t.clearTimeoutFn=o.bind(n.default)):(t.setTimeoutFn=setTimeout.bind(n.default),t.clearTimeoutFn=clearTimeout.bind(n.default))}},9782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const s=Object.create(null);e.PACKET_TYPES=s,s.open="0",s.close="1",s.ping="2",s.pong="3",s.message="4",s.upgrade="5",s.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(s).forEach((t=>{r[s[t]]=t}));e.ERROR_PACKET={type:"error",data:"parser error"}},6502:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<s.length;t++)r[s.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),n=r.length,i="";for(e=0;e<n;e+=3)i+=s[r[e]>>2],i+=s[(3&r[e])<<4|r[e+1]>>4],i+=s[(15&r[e+1])<<2|r[e+2]>>6],i+=s[63&r[e+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i};e.decode=t=>{let e,s,n,i,o,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const d=new ArrayBuffer(a),l=new Uint8Array(d);for(e=0;e<c;e+=4)s=r[t.charCodeAt(e)],n=r[t.charCodeAt(e+1)],i=r[t.charCodeAt(e+2)],o=r[t.charCodeAt(e+3)],l[u++]=s<<2|n>>4,l[u++]=(15&n)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return d}},3108:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=s(9782),n=s(6502),i="function"==typeof ArrayBuffer,o=(t,e)=>{if(i){const s=(0,n.decode)(t);return a(s,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t;e.default=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const s=t.charAt(0);if("b"===s)return{type:"message",data:o(t.substring(1),e)};return r.PACKET_TYPES_REVERSE[s]?t.length>1?{type:r.PACKET_TYPES_REVERSE[s],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[s]}:r.ERROR_PACKET}},4895:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=s(9782),n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,o=(t,e)=>{const s=new FileReader;return s.onload=function(){const t=s.result.split(",")[1];e("b"+t)},s.readAsDataURL(t)};e.default=({type:t,data:e},s,a)=>{return n&&e instanceof Blob?s?a(e):o(e,a):i&&(e instanceof ArrayBuffer||(c=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer))?s?a(e):o(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));var c}},4755:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0;const r=s(4895);e.encodePacket=r.default;const n=s(3108);e.decodePacket=n.default;const i=String.fromCharCode(30);e.encodePayload=(t,e)=>{const s=t.length,n=new Array(s);let o=0;t.forEach(((t,a)=>{(0,r.default)(t,!1,(t=>{n[a]=t,++o===s&&e(n.join(i))}))}))};e.decodePayload=(t,e)=>{const s=t.split(i),r=[];for(let t=0;t<s.length;t++){const i=(0,n.default)(s[t],e);if(r.push(i),"error"===i.type)break}return r},e.protocol=4},8623:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.connect=e.io=e.Socket=e.Manager=e.protocol=void 0;const n=s(4197),i=s(3288);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=s(3232);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=r(s(5579)).default("socket.io-client"),c={};function u(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const s=n.url(t,e.path||"/socket.io"),r=s.source,o=s.id,u=s.path,d=c[o]&&u in c[o].nsps;let l;return e.forceNew||e["force new connection"]||!1===e.multiplex||d?(a("ignoring socket cache for %s",r),l=new i.Manager(r,e)):(c[o]||(a("new io instance for %s",r),c[o]=new i.Manager(r,e)),l=c[o]),s.query&&!e.query&&(e.query=s.queryKey),l.socket(s.path,e)}e.io=u,e.connect=u,e.default=u,Object.assign(u,{Manager:i.Manager,Socket:o.Socket,io:u,connect:u});var d=s(3625);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return d.protocol}}),t.exports=u},3288:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=s(5769),c=s(3232),u=i(s(3625)),d=s(6263),l=o(s(7672)),h=s(3717),f=o(s(5579)).default("socket.io-client:manager");class p extends h.Emitter{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,a.installTimerFunctions(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=e.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new l.default({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||u;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(f("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;f("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=d.on(e,"open",(function(){s.onopen(),t&&t()})),n=d.on(e,"error",(e=>{f("error"),s.cleanup(),s._readyState="closed",this.emitReserved("error",e),t?t(e):s.maybeReconnectOnOpen()}));if(!1!==this._timeout){const t=this._timeout;f("connect attempt will timeout after %d",t),0===t&&r();const s=this.setTimeoutFn((()=>{f("connect attempt timed out after %d",t),r(),e.close(),e.emit("error",new Error("timeout"))}),t);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}return this.subs.push(r),this.subs.push(n),this}connect(t){return this.open(t)}onopen(){f("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(d.on(t,"ping",this.onping.bind(this)),d.on(t,"data",this.ondata.bind(this)),d.on(t,"error",this.onerror.bind(this)),d.on(t,"close",this.onclose.bind(this)),d.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){this.decoder.add(t)}ondecoded(t){this.emitReserved("packet",t)}onerror(t){f("error",t),this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s||(s=new c.Socket(this,t,e),this.nsps[t]=s),s}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return void f("socket %s is still active, skipping close",t)}this._close()}_packet(t){f("writing packet %j",t);const e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){f("cleanup"),this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){f("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t){f("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();f("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const s=this.setTimeoutFn((()=>{t.skipReconnect||(f("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(f("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(f("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=p},6263:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,s){return t.on(e,s),function(){t.off(e,s)}}},3232:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const n=s(3625),i=s(6263),o=s(3717),a=r(s(5579)).default("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends o.Emitter{constructor(t,e,s){super(),this.connected=!1,this.disconnected=!0,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this.io._autoConnect&&this.open()}subEvents(){if(this.subs)return;const t=this.io;this.subs=[i.on(t,"open",this.onopen.bind(this)),i.on(t,"packet",this.onpacket.bind(this)),i.on(t,"error",this.onerror.bind(this)),i.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(c.hasOwnProperty(t))throw new Error('"'+t+'" is a reserved event name');e.unshift(t);const s={type:n.PacketType.EVENT,data:e,options:{}};if(s.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const r=e.pop();this._registerAckCallback(t,r),s.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)?a("discard packet as the transport is not currently writable"):this.connected?this.packet(s):this.sendBuffer.push(s),this.flags={},this}_registerAckCallback(t,e){const s=this.flags.timeout;if(void 0===s)return void(this.acks[t]=e);const r=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&(a("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(e,1));a("event with ack id %d has timed out after %d ms",t,s),e.call(this,new Error("operation has timed out"))}),s);this.acks[t]=(...t)=>{this.io.clearTimeoutFn(r),e.apply(this,[null,...t])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this.packet({type:n.PacketType.CONNECT,data:t})})):this.packet({type:n.PacketType.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t){a("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emitReserved("disconnect",t)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case n.PacketType.CONNECT:if(t.data&&t.data.sid){const e=t.data.sid;this.onconnect(e)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case n.PacketType.EVENT:case n.PacketType.BINARY_EVENT:this.onevent(t);break;case n.PacketType.ACK:case n.PacketType.BINARY_ACK:this.onack(t);break;case n.PacketType.DISCONNECT:this.ondisconnect();break;case n.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const s of e)s.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let s=!1;return function(...r){s||(s=!0,a("sending ack %j",r),e.packet({type:n.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(a("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):a("bad ack %s",t.id)}onconnect(t){a("socket connected with id %s",t),this.id=t,this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>this.packet(t))),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:n.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}}e.Socket=u},4197:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.url=void 0;const n=r(s(5977)),i=r(s(5579)).default("socket.io-client:url");e.url=function(t,e="",s){let r=t;s=s||"undefined"!=typeof location&&location,null==t&&(t=s.protocol+"//"+s.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?s.protocol+t:s.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t=void 0!==s?s.protocol+"//"+t:"https://"+t),i("parse %s",t),r=n.default(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(s&&s.port===r.port?"":":"+r.port),r}},5496:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=s(2375);function n(t,e){if(!t)return t;if(r.isBinary(t)){const s={_placeholder:!0,num:e.length};return e.push(t),s}if(Array.isArray(t)){const s=new Array(t.length);for(let r=0;r<t.length;r++)s[r]=n(t[r],e);return s}if("object"==typeof t&&!(t instanceof Date)){const s={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(s[r]=n(t[r],e));return s}return t}function i(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(Array.isArray(t))for(let s=0;s<t.length;s++)t[s]=i(t[s],e);else if("object"==typeof t)for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(t[s]=i(t[s],e));return t}e.deconstructPacket=function(t){const e=[],s=t.data,r=t;return r.data=n(s,e),r.attachments=e.length,{packet:r,buffers:e}},e.reconstructPacket=function(t,e){return t.data=i(t.data,e),t.attachments=void 0,t}},3625:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=s(3717),n=s(5496),i=s(2375),o=s(5579).default("socket.io-parser");var a;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(a=e.PacketType||(e.PacketType={}));e.Encoder=class{encode(t){return o("encoding packet %j",t),t.type!==a.EVENT&&t.type!==a.ACK||!i.hasBinary(t)?[this.encodeAsString(t)]:(t.type=t.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,this.encodeAsBinary(t))}encodeAsString(t){let e=""+t.type;return t.type!==a.BINARY_EVENT&&t.type!==a.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data)),o("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=n.deconstructPacket(t),s=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(s),r}};class c extends r.Emitter{constructor(){super()}add(t){let e;if("string"==typeof t)e=this.decodeString(t),e.type===a.BINARY_EVENT||e.type===a.BINARY_ACK?(this.reconstructor=new u(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e);else{if(!i.isBinary(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const s={type:Number(t.charAt(0))};if(void 0===a[s.type])throw new Error("unknown packet type "+s.type);if(s.type===a.BINARY_EVENT||s.type===a.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const n=t.substring(r,e);if(n!=Number(n)||"-"!==t.charAt(e))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}s.nsp=t.substring(r,e)}else s.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const s=t.charAt(e);if(null==s||Number(s)!=s){--e;break}if(e===t.length)break}s.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(e));if(!c.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return o("decoded %s as %j",t,s),s}static isPayloadValid(t,e){switch(t){case a.CONNECT:return"object"==typeof e;case a.DISCONNECT:return void 0===e;case a.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case a.ACK:case a.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}e.Decoder=c;class u{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},2375:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const s="function"==typeof ArrayBuffer,r=Object.prototype.toString,n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function o(t){return s&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||n&&t instanceof Blob||i&&t instanceof File}e.isBinary=o,e.hasBinary=function t(e,s){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let s=0,r=e.length;s<r;s++)if(t(e[s]))return!0;return!1}if(o(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return!0;return!1}},2830:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=s(3980);function n(t,e){if(!t)return t;if(r.isBinary(t)){const s={_placeholder:!0,num:e.length};return e.push(t),s}if(Array.isArray(t)){const s=new Array(t.length);for(let r=0;r<t.length;r++)s[r]=n(t[r],e);return s}if("object"==typeof t&&!(t instanceof Date)){const s={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(s[r]=n(t[r],e));return s}return t}function i(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let s=0;s<t.length;s++)t[s]=i(t[s],e);else if("object"==typeof t)for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(t[s]=i(t[s],e));return t}e.deconstructPacket=function(t){const e=[],s=t.data,r=t;return r.data=n(s,e),r.attachments=e.length,{packet:r,buffers:e}},e.reconstructPacket=function(t,e){return t.data=i(t.data,e),t.attachments=void 0,t}},170:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=s(9339),n=s(2830),i=s(3980),o=s(5579).default("socket.io-parser");var a;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(a=e.PacketType||(e.PacketType={}));e.Encoder=class{constructor(t){this.replacer=t}encode(t){return o("encoding packet %j",t),t.type!==a.EVENT&&t.type!==a.ACK||!i.hasBinary(t)?[this.encodeAsString(t)]:(t.type=t.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,this.encodeAsBinary(t))}encodeAsString(t){let e=""+t.type;return t.type!==a.BINARY_EVENT&&t.type!==a.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),o("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=n.deconstructPacket(t),s=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(s),r}};class c extends r.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t),e.type===a.BINARY_EVENT||e.type===a.BINARY_ACK?(this.reconstructor=new u(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!i.isBinary(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const s={type:Number(t.charAt(0))};if(void 0===a[s.type])throw new Error("unknown packet type "+s.type);if(s.type===a.BINARY_EVENT||s.type===a.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const n=t.substring(r,e);if(n!=Number(n)||"-"!==t.charAt(e))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}s.nsp=t.substring(r,e)}else s.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const s=t.charAt(e);if(null==s||Number(s)!=s){--e;break}if(e===t.length)break}s.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!c.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return o("decoded %s as %j",t,s),s}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case a.CONNECT:return"object"==typeof e;case a.DISCONNECT:return void 0===e;case a.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case a.ACK:case a.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}e.Decoder=c;class u{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},3980:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const s="function"==typeof ArrayBuffer,r=Object.prototype.toString,n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function o(t){return s&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||n&&t instanceof Blob||i&&t instanceof File}e.isBinary=o,e.hasBinary=function t(e,s){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let s=0,r=e.length;s<r;s++)if(t(e[s]))return!0;return!1}if(o(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return!0;return!1}},9339:(t,e,s)=>{"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}s.r(e),s.d(e,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<r.length;n++)if((s=r[n])===e||s.fn===e){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),s=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,e)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var s=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(s.exports,s,s.exports,__webpack_require__),s.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var s in e)__webpack_require__.o(e,s)&&!__webpack_require__.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>Li,CloudServicesRevisionHistoryAdapter:()=>xo,CloudServicesTrackChangesAdapter:()=>Zi,PresenceList:()=>ga,RealTimeCollaborativeComments:()=>no,RealTimeCollaborativeEditing:()=>Pi,RealTimeCollaborativeRevisionHistory:()=>So,RealTimeCollaborativeTrackChanges:()=>uo});var t=__webpack_require__(2704),e=__webpack_require__(2209),s=__webpack_require__(1492),r=__webpack_require__(9273),n=__webpack_require__(2417),i=__webpack_require__(7158),o=__webpack_require__.n(i);const a=["set","cloudServices.connectionTimeout","isInReconnectionStack","disconnect","token","websocketgateway-missing-token","offline","_reconnect","bind","connection","then","connected","context","websocketgateway-invalid-plugin-interface","add","_shouldPluginsReconnect","_isBrowserOffline","initialReconnectionInterval","define","disconnected","limitExceeded","listenTo","has","_domEmitter","state","reconnect","init","webSocketUrl","pluginName","requires","get","catch","function","cloudservices-reconnection-error","removeFromReconnectionStack","WebSocketGateway","cloudservices-init","config","websocketgateway-missing-websocket-url","plugins","Connected users limit exceeded","create","constructor","websocketgateway-plugin-already-registered","error","code","addToReconnectionStack","delete","all","connecting","_reconnectionStack","cloudServices.requestTimeout"];var c,u;c=a,u=242,function(t){for(;--t;)c.push(c.shift())}(++u);const d=function(t,e){return a[t-=0]};class l extends t.ContextPlugin{static get[d("0x2f")](){return["CloudServices",r.Notification]}static get[d("0x2e")](){return d("0x1")}[d("0x2c")](){const t=this.context,s=t[d("0x5")][d("0x30")]("CloudServices"),n=t[d("0x5")][d("0x30")](r.Notification);if(!s[d("0x16")])throw new e.CKEditorError(d("0x17"),this);if(!s[d("0x2d")])throw new e.CKEditorError(d("0x4"),this);return this.set(d("0x2a"),d("0xf")),this[d("0x12")](d("0x22"),!1),this[d("0x10")]=new Set,this[d("0x21")]=!1,this._domEmitter=Object[d("0x7")](e.DomEmitterMixin),this[d("0x29")].listenTo(window,d("0x18"),(()=>this._isBrowserOffline=!0)),this[d("0x29")][d("0x27")](window,"online",(()=>this[d("0x22")]=!1)),this[d("0x1e")].config.define(d("0x13"),10),this[d("0x1e")][d("0x3")][d("0x24")](d("0x11"),20),l[d("0x1")].connect(s[d("0x16")],s.webSocketUrl,{disconnectOnUnload:!1,timeout:1e3*this[d("0x1e")][d("0x3")].get(d("0x13")),requestTimeout:1e3*this[d("0x1e")][d("0x3")].get(d("0x11"))})[d("0x1c")]((t=>{if(this.connection=t,this[d("0x1a")](d("0x2a")).to(t,d("0x2a"),this,d("0x22"),((t,e)=>(d("0x1d")!==t&&(this[d("0x21")]=!0),e||d("0x1d")!==t?d("0x25"):d("0x25")==this[d("0x2a")]&&this[d("0x21")]?(this[d("0x21")]=!1,this[d("0x19")](),d("0xf")):"connected"))),this[d("0x1b")].on(d("0xa"),((t,s)=>{if(d("0x26")!==s[d("0xb")])throw console[d("0xa")](s),new e.CKEditorError(d("0x2"),null,{originalError:s});n.showWarning("The limit of maximum concurrent connections that the collaboration server can handle has been reached. Try opening the document again in a few minutes. Please contact your system administrator if the problem persists.",{title:d("0x6"),namespace:"real-time-collaboration"})})),!t.me)return new Promise((e=>t.on("change:me",e)))}))[d("0x31")]((t=>{throw console[d("0xa")](t),new e.CKEditorError(d("0x2"),null,{originalError:t})}))}[d("0xc")](t){if(d("0x32")!=typeof t[d("0x2b")])throw new e.CKEditorError(d("0x1f"),this);if(this[d("0x14")](t))throw new e.CKEditorError(d("0x9"),this,{name:t[d("0x8")][d("0x2e")]});this[d("0x10")][d("0x20")](t)}[d("0x0")](t){this._reconnectionStack[d("0xd")](t)}isInReconnectionStack(t){return this._reconnectionStack[d("0x28")](t)}[d("0x19")](){return this[d("0x1b")][d("0x2b")]()[d("0x1c")]((()=>Promise[d("0xe")](Array.from(this[d("0x10")],(t=>t[d("0x2b")]())))))[d("0x1c")]((()=>this.state=d("0x1d"))).catch((t=>{throw console[d("0xa")](t),new e.CKEditorError(d("0x33"),this[d("0x1e")])}))}destroy(){this[d("0x1b")]&&this[d("0x1b")][d("0x15")](),this.state=d("0x25"),this[d("0x29")].stopListening(),super.destroy()}}l.WebSocketGateway=o(),l[d("0x23")]=1e3;const h=["unregister","_createUser","values","connected","requires","get","add","role","fire","stopListening","_uniqueUsersCount","sessions-register-already-registered","listenTo","connection","sessionId","_users","Sessions","has","change:state","init","plugins","set","state","clear","allConnectedUsers","size","delete","channelSessions","user","forEach","getUserBySessionId","sessions-unregister-not-exist","context","remove","channelConnectedUsers","_handleSessionRemove","defineMe","mySessionId","_registeredSessions","orderNumber","getUserSessions","_handleSessionAdd","getUser"];var f,p;f=h,p=180,function(t){for(;--t;)f.push(f.shift())}(++p);const y=function(t,e){return h[t-=0]};class m extends t.ContextPlugin{static get pluginName(){return y("0x8")}static get[y("0x27")](){return[l,n.Users]}[y("0xb")](){const t=this[y("0x18")],s=t.plugins.get(l);this.channelSessions=new Map,this[y("0x1a")]=new Map,this[y("0x10")]=new e.Collection,this._registeredSessions=new Map,this[y("0x2")]=0,this[y("0x7")]=t[y("0xc")].get(n.Users),this.listenTo(s,y("0xa"),((t,e,s)=>{if(y("0x26")!==s)this[y("0x13")][y("0x15")]((t=>t.clear())),this[y("0x1a")][y("0x15")]((t=>t[y("0xf")]())),this[y("0x10")][y("0xf")]();else for(const[t,e]of this[y("0x1e")])for(const s of e)this[y("0x21")](t,s)})),this[y("0x24")](s.connection.me,!0)}register(t,s){if(this[y("0x1e")][y("0x9")](t))throw new e.CKEditorError(y("0x3"),null,{channelId:t});this[y("0x1e")][y("0xd")](t,s),this[y("0x13")][y("0xd")](t,new e.Collection),this[y("0x1a")][y("0xd")](t,new e.Collection),this.listenTo(s,y("0x29"),((e,s)=>this[y("0x21")](t,s))),this[y("0x4")](s,y("0x19"),((e,s)=>this[y("0x1b")](t,s)));for(const e of s)this[y("0x21")](t,e)}[y("0x23")](t){if(!this[y("0x1e")][y("0x9")](t))throw new e.CKEditorError(y("0x17"),null,{channelId:t});const s=this._registeredSessions.get(t);this[y("0x1")](s);for(const e of s)y("0x26")===this[y("0x18")].plugins[y("0x28")](l).state&&this[y("0x1b")](t,e);this[y("0x1e")][y("0x12")](t),this.channelSessions[y("0x12")](t),this[y("0x1a")][y("0x12")](t)}get[y("0x1d")](){return this[y("0x18")][y("0xc")][y("0x28")](l)[y("0x5")][y("0x6")]}[y("0x16")](t){for(const e of this[y("0x13")][y("0x25")]())for(const s of e)if(s.id===t)return s[y("0x14")]}getUserSessions(t,e){const s=e?[this.channelSessions[y("0x28")](e)]:this.channelSessions.values(),r=new Set;for(const e of s)for(const s of e)s.user.id===t.id&&r[y("0x29")](s.id);return r}getUserRole(t){for(const e of this.channelSessions[y("0x25")]())for(const s of e)if(s.user===t)return s[y("0x2a")]}[y("0x21")](t,e){if(y("0x26")!==this.context[y("0xc")].get(l)[y("0xe")])return;const s=e.user,r=this._users[y("0x22")](s.id)||this[y("0x24")](s),n=Object.assign({},e,{user:r});this[y("0x13")].get(t)[y("0x29")](n);const i=this[y("0x1a")][y("0x28")](t);i[y("0x9")](r.id)||i[y("0x29")](r),this.allConnectedUsers.has(r.id)||this[y("0x10")][y("0x29")](r),this[y("0x0")]("sessionAdd:"+t,{channelId:t,session:n})}[y("0x1b")](t,e){if(y("0x26")!==this[y("0x18")][y("0xc")][y("0x28")](l)[y("0xe")])return;const s=this[y("0x1a")][y("0x28")](t),r=e[y("0x14")];this[y("0x13")][y("0x28")](t)[y("0x19")](e.id),s[y("0x9")](r.id)&&!this[y("0x20")](r,t)[y("0x11")]&&s[y("0x19")](r.id),this[y("0x10")][y("0x28")](r.id)&&!this[y("0x20")](r)[y("0x11")]&&this[y("0x10")][y("0x19")](r.id)}_createUser(t,e){const s=this[y("0x7")].addUser(t);return e&&this[y("0x7")][y("0x1c")](t.id),s[y("0x1f")]=this[y("0x2")]++,s}}var v=__webpack_require__(7594),_=__webpack_require__.n(v),x=__webpack_require__(9940),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};_()(x.Z,g);x.Z.locals;const b=["start","startsWith","addMarker","toDomElement","getUserBySessionId","$text","editor","update:user:range","detach","toRange","markerToHighlight","change","color","markerRange","checkChild","ck-user__marker ","selection","createUIElement","nodeAfter","change:range","for","deletionPosition","ck-user__selection","getAttribute","isLimit","marker","has","getCustomProperty","mySessionId","updateMarker","_createdBatches","document","init","delete","editing","name","schema","editingDowncast","parent","afterInit","getNearestSelectionRange","user:","model","rootName","isInline","enqueueChange","commands","plugins","user:position:","$graveyard","conversion","getFirstRange","removeMarker","getContainedElement","user:range:","orderNumber","element","set","hasDomSelection","oldRange","getRange","span","type","size","user:position","userPositionMarker","priority","tableCell","createRange","setCustomProperty","markers","end","pluginName","view","undo","get","isSimilar","UserMarkers","markerName","split","root","contenteditable","getStart","render"];var w,O;w=b,O=292,function(t){for(;--t;)w.push(w.shift())}(++O);const E=function(t,e){return b[t-=0]};class S extends t.Plugin{static get requires(){return[m]}static get[E("0x20")](){return E("0x25")}[E("0x4c")](){const t=this.editor,e=t[E("0x7")][E("0x23")](m);t[E("0xa")][E("0x40")](E("0x51")).markerToElement({model:E("0x18"),view:(s,{writer:r})=>function(t,e,s,r){const n=t[E("0x26")][E("0x27")](":")[2],i=s[E("0x30")](n);if(!i||n===s.mySessionId)return;if(!r[E("0x2")][E("0x50")][E("0x3a")](t[E("0x39")][E("0x2c")],E("0x31")))return;const o={class:E("0x3b")+i.color.getMarkerClass(),"data-name":i[E("0x4f")],"data-session-id":n},a=r[E("0x2")].markers[E("0x23")](t.markerName)[E("0x2a")](),c=a[E("0x3e")],u=r[E("0x2")].schema;if(c&&u.isObject(c)&&u[E("0x4")](c)&&!r[E("0x2")][E("0x1e")][E("0x23")](E("0xe")+n)[E("0x14")]().isCollapsed)return;const d=a[E("0x52")];r.model[E("0x50")][E("0x44")](d)&&!r[E("0x2")].hasContent(d)&&(o[E("0x29")]=!1);const l=function(t,e){const s=t[E("0x3d")](E("0x15"),e);return t[E("0x1d")]("userPositionMarker",!0,s),s[E("0x2b")]=function(t){const e=this[E("0x2f")](t);return e.innerHTML='​<span class="ck-user__marker-line"><span class="ck-user__marker-dot"></span></span>',e},s[E("0x24")]=function(t){return this[E("0x47")](E("0x19"))&&t[E("0x47")]("userPositionMarker")&&this[E("0x43")]("data-session-id")==t.getAttribute("data-session-id")},s}(e,o);return l[E("0x1a")]=1e3+i.orderNumber,l}(s,r,e,t)}),t[E("0xa")][E("0x40")](E("0x51"))[E("0x36")]({model:"user:range",view:t=>function(t,e){const s=t[E("0x26")][E("0x27")](":")[2];if(s===e[E("0x48")])return;const r=e.getUserBySessionId(s);return r?{id:s,classes:[E("0x42"),r[E("0x38")].getSelectionClass()],attributes:{"data-session-id":s},priority:2e3+r[E("0xf")]}:{id:s}}(t,e)}),function(t){const e=t.model,r=new Map,n=t[E("0x7")][E("0x23")](m);e[E("0x1e")].on(E("0x33"),((i,o,a,c)=>{if(!c&&r[E("0x23")](o.name))return r.get(o.name)[E("0x34")](),void r[E("0x4d")](o[E("0x4f")]);const u=o[E("0x4f")][E("0x27")](":")[2];if(u===n.mySessionId)return;const d=E("0x8")+u;e[E("0x1e")][E("0x46")](d)&&t[E("0x4e")].reconvertMarker(d),o.on(E("0x3f"),((t,n,i)=>{if(E("0x9")!=n[E("0x28")][E("0x3")]&&E("0x9")==o[E("0x14")]()[E("0x28")][E("0x3")]&&!r[E("0x46")](o[E("0x4f")])){const t=e.schema[E("0x0")](i[E("0x41")]);if(t){const n=s.LiveRange.fromRange(t);r[E("0x11")](o.name,n),n.on(E("0x3f"),((t,s,i)=>{if(E("0x9")==n[E("0x28")].rootName){const t=e.schema[E("0x0")](i[E("0x41")]);t?(n.start=t[E("0x2c")],n[E("0x1f")]=t[E("0x1f")]):(r[E("0x4d")](o.name),n[E("0x34")]())}}))}}}))})),e.document.on(E("0x37"),(()=>{r[E("0x17")]>0&&e[E("0x5")]({isUndoable:!1},(t=>{for(const[s,n]of r)E("0x9")==e[E("0x1e")][E("0x23")](s)[E("0x14")]()[E("0x28")][E("0x3")]&&(T(s[E("0x27")](":")[2],n[E("0x35")](),e,t),n[E("0x34")]());r.clear()}))}))}(t)}[E("0x53")](){const t=this[E("0x32")],e=t[E("0x6")][E("0x23")](E("0x22"));e&&t.model.on("applyOperation",((s,r)=>{const n=r[0];if(E("0x45")!=n[E("0x16")]||!n.name[E("0x2d")](E("0x1")))return;const i=n.batch;e[E("0x4a")][E("0x46")](i)&&(n.newRange=n.oldRange?t[E("0x2")][E("0x1c")](n[E("0x13")][E("0x2c")],n[E("0x13")][E("0x1f")]):null)}),{priority:"highest"})}createUserMarkerOperations(){const t=this[E("0x32")],e=t[E("0x2")][E("0x4b")],s=t[E("0x7")][E("0x23")](m);t.model[E("0x5")]({isUndoable:!1},(r=>{const n=E("0xe")+s[E("0x48")],i=E("0x8")+s[E("0x48")],o=t[E("0x2")][E("0x1e")][E("0x46")](n);t[E("0x4e")][E("0x21")][E("0x12")]?T(s[E("0x48")],e[E("0x3c")][E("0xb")](),t[E("0x2")],r):o&&(r[E("0xc")](n),r[E("0xc")](i))}))}}function T(t,e,s,r){const n=E("0xe")+t,i=E("0x8")+t,o=e[E("0xd")]();let a=e[E("0x2c")];o&&o.is(E("0x10"),E("0x1b"))&&(a=function(t,e){for(const s of t.getPositions())if(e[E("0x50")][E("0x3a")](s,"$text"))return s}(e,s),e=r[E("0x1c")](a)),a=r[E("0x1c")](a),s[E("0x1e")][E("0x46")](n)?(r[E("0x49")](n,{range:e}),r[E("0x49")](i,{range:a})):(r[E("0x2e")](n,{range:e,usingOperation:!0}),r.addMarker(i,{range:a,usingOperation:!0}))}function k(t,e,s){const r=t.t;switch(e){case"PENDING_ACTION_SENDING_DATA":return r({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return r("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return r("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return r("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return r("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return r("Synchronization issue");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return r({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},s)}}var C=__webpack_require__(9933),A=__webpack_require__.n(C);const I=function(){this.__data__=[],this.size=0};const R=function(t,e){return t===e||t!=t&&e!=e};const N=function(t,e){for(var s=t.length;s--;)if(R(t[s][0],e))return s;return-1};var j=Array.prototype.splice;const P=function(t){var e=this.__data__,s=N(e,t);return!(s<0)&&(s==e.length-1?e.pop():j.call(e,s,1),--this.size,!0)};const D=function(t){var e=this.__data__,s=N(e,t);return s<0?void 0:e[s][1]};const M=function(t){return N(this.__data__,t)>-1};const B=function(t,e){var s=this.__data__,r=N(s,t);return r<0?(++this.size,s.push([t,e])):s[r][1]=e,this};function J(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var r=t[e];this.set(r[0],r[1])}}J.prototype.clear=I,J.prototype.delete=P,J.prototype.get=D,J.prototype.has=M,J.prototype.set=B;const V=J;const U=function(){this.__data__=new V,this.size=0};const F=function(t){var e=this.__data__,s=e.delete(t);return this.size=e.size,s};const q=function(t){return this.__data__.get(t)};const L=function(t){return this.__data__.has(t)};const Y="object"==typeof global&&global&&global.Object===Object&&global;var z="object"==typeof self&&self&&self.Object===Object&&self;const G=Y||z||Function("return this")();const $=G.Symbol;var W=Object.prototype,K=W.hasOwnProperty,H=W.toString,Z=$?$.toStringTag:void 0;const X=function(t){var e=K.call(t,Z),s=t[Z];try{t[Z]=void 0;var r=!0}catch(t){}var n=H.call(t);return r&&(e?t[Z]=s:delete t[Z]),n};var Q=Object.prototype.toString;const tt=function(t){return Q.call(t)};var et=$?$.toStringTag:void 0;const st=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?X(t):tt(t)};const rt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const nt=function(t){if(!rt(t))return!1;var e=st(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const it=G["__core-js_shared__"];var ot,at=(ot=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||""))?"Symbol(src)_1."+ot:"";const ct=function(t){return!!at&&at in t};var ut=Function.prototype.toString;const dt=function(t){if(null!=t){try{return ut.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var lt=/^\[object .+?Constructor\]$/,ht=Function.prototype,ft=Object.prototype,pt=ht.toString,yt=ft.hasOwnProperty,mt=RegExp("^"+pt.call(yt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const vt=function(t){return!(!rt(t)||ct(t))&&(nt(t)?mt:lt).test(dt(t))};const _t=function(t,e){return null==t?void 0:t[e]};const xt=function(t,e){var s=_t(t,e);return vt(s)?s:void 0};const gt=xt(G,"Map");const bt=xt(Object,"create");const wt=function(){this.__data__=bt?bt(null):{},this.size=0};const Ot=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var Et=Object.prototype.hasOwnProperty;const St=function(t){var e=this.__data__;if(bt){var s=e[t];return"__lodash_hash_undefined__"===s?void 0:s}return Et.call(e,t)?e[t]:void 0};var Tt=Object.prototype.hasOwnProperty;const kt=function(t){var e=this.__data__;return bt?void 0!==e[t]:Tt.call(e,t)};const Ct=function(t,e){var s=this.__data__;return this.size+=this.has(t)?0:1,s[t]=bt&&void 0===e?"__lodash_hash_undefined__":e,this};function At(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var r=t[e];this.set(r[0],r[1])}}At.prototype.clear=wt,At.prototype.delete=Ot,At.prototype.get=St,At.prototype.has=kt,At.prototype.set=Ct;const It=At;const Rt=function(){this.size=0,this.__data__={hash:new It,map:new(gt||V),string:new It}};const Nt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const jt=function(t,e){var s=t.__data__;return Nt(e)?s["string"==typeof e?"string":"hash"]:s.map};const Pt=function(t){var e=jt(this,t).delete(t);return this.size-=e?1:0,e};const Dt=function(t){return jt(this,t).get(t)};const Mt=function(t){return jt(this,t).has(t)};const Bt=function(t,e){var s=jt(this,t),r=s.size;return s.set(t,e),this.size+=s.size==r?0:1,this};function Jt(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var r=t[e];this.set(r[0],r[1])}}Jt.prototype.clear=Rt,Jt.prototype.delete=Pt,Jt.prototype.get=Dt,Jt.prototype.has=Mt,Jt.prototype.set=Bt;const Vt=Jt;const Ut=function(t,e){var s=this.__data__;if(s instanceof V){var r=s.__data__;if(!gt||r.length<199)return r.push([t,e]),this.size=++s.size,this;s=this.__data__=new Vt(r)}return s.set(t,e),this.size=s.size,this};function Ft(t){var e=this.__data__=new V(t);this.size=e.size}Ft.prototype.clear=U,Ft.prototype.delete=F,Ft.prototype.get=q,Ft.prototype.has=L,Ft.prototype.set=Ut;const qt=Ft;const Lt=function(t,e){for(var s=-1,r=null==t?0:t.length;++s<r&&!1!==e(t[s],s,t););return t};const Yt=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();const zt=function(t,e,s){"__proto__"==e&&Yt?Yt(t,e,{configurable:!0,enumerable:!0,value:s,writable:!0}):t[e]=s};var Gt=Object.prototype.hasOwnProperty;const $t=function(t,e,s){var r=t[e];Gt.call(t,e)&&R(r,s)&&(void 0!==s||e in t)||zt(t,e,s)};const Wt=function(t,e,s,r){var n=!s;s||(s={});for(var i=-1,o=e.length;++i<o;){var a=e[i],c=r?r(s[a],t[a],a,s,t):void 0;void 0===c&&(c=t[a]),n?zt(s,a,c):$t(s,a,c)}return s};const Kt=function(t,e){for(var s=-1,r=Array(t);++s<t;)r[s]=e(s);return r};const Ht=function(t){return null!=t&&"object"==typeof t};const Zt=function(t){return Ht(t)&&"[object Arguments]"==st(t)};var Xt=Object.prototype,Qt=Xt.hasOwnProperty,te=Xt.propertyIsEnumerable;const ee=Zt(function(){return arguments}())?Zt:function(t){return Ht(t)&&Qt.call(t,"callee")&&!te.call(t,"callee")};const se=Array.isArray;const re=function(){return!1};var ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,ie=ne&&"object"==typeof module&&module&&!module.nodeType&&module,oe=ie&&ie.exports===ne?G.Buffer:void 0;const ae=(oe?oe.isBuffer:void 0)||re;var ce=/^(?:0|[1-9]\d*)$/;const ue=function(t,e){var s=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==s||"symbol"!=s&&ce.test(t))&&t>-1&&t%1==0&&t<e};const de=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var le={};le["[object Float32Array]"]=le["[object Float64Array]"]=le["[object Int8Array]"]=le["[object Int16Array]"]=le["[object Int32Array]"]=le["[object Uint8Array]"]=le["[object Uint8ClampedArray]"]=le["[object Uint16Array]"]=le["[object Uint32Array]"]=!0,le["[object Arguments]"]=le["[object Array]"]=le["[object ArrayBuffer]"]=le["[object Boolean]"]=le["[object DataView]"]=le["[object Date]"]=le["[object Error]"]=le["[object Function]"]=le["[object Map]"]=le["[object Number]"]=le["[object Object]"]=le["[object RegExp]"]=le["[object Set]"]=le["[object String]"]=le["[object WeakMap]"]=!1;const he=function(t){return Ht(t)&&de(t.length)&&!!le[st(t)]};const fe=function(t){return function(e){return t(e)}};var pe="object"==typeof exports&&exports&&!exports.nodeType&&exports,ye=pe&&"object"==typeof module&&module&&!module.nodeType&&module,me=ye&&ye.exports===pe&&Y.process;const ve=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||me&&me.binding&&me.binding("util")}catch(t){}}();var _e=ve&&ve.isTypedArray;const xe=_e?fe(_e):he;var ge=Object.prototype.hasOwnProperty;const be=function(t,e){var s=se(t),r=!s&&ee(t),n=!s&&!r&&ae(t),i=!s&&!r&&!n&&xe(t),o=s||r||n||i,a=o?Kt(t.length,String):[],c=a.length;for(var u in t)!e&&!ge.call(t,u)||o&&("length"==u||n&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ue(u,c))||a.push(u);return a};var we=Object.prototype;const Oe=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||we)};const Ee=function(t,e){return function(s){return t(e(s))}};const Se=Ee(Object.keys,Object);var Te=Object.prototype.hasOwnProperty;const ke=function(t){if(!Oe(t))return Se(t);var e=[];for(var s in Object(t))Te.call(t,s)&&"constructor"!=s&&e.push(s);return e};const Ce=function(t){return null!=t&&de(t.length)&&!nt(t)};const Ae=function(t){return Ce(t)?be(t):ke(t)};const Ie=function(t,e){return t&&Wt(e,Ae(e),t)};const Re=function(t){var e=[];if(null!=t)for(var s in Object(t))e.push(s);return e};var Ne=Object.prototype.hasOwnProperty;const je=function(t){if(!rt(t))return Re(t);var e=Oe(t),s=[];for(var r in t)("constructor"!=r||!e&&Ne.call(t,r))&&s.push(r);return s};const Pe=function(t){return Ce(t)?be(t,!0):je(t)};const De=function(t,e){return t&&Wt(e,Pe(e),t)};var Me="object"==typeof exports&&exports&&!exports.nodeType&&exports,Be=Me&&"object"==typeof module&&module&&!module.nodeType&&module,Je=Be&&Be.exports===Me?G.Buffer:void 0,Ve=Je?Je.allocUnsafe:void 0;const Ue=function(t,e){if(e)return t.slice();var s=t.length,r=Ve?Ve(s):new t.constructor(s);return t.copy(r),r};const Fe=function(t,e){var s=-1,r=t.length;for(e||(e=Array(r));++s<r;)e[s]=t[s];return e};const qe=function(t,e){for(var s=-1,r=null==t?0:t.length,n=0,i=[];++s<r;){var o=t[s];e(o,s,t)&&(i[n++]=o)}return i};const Le=function(){return[]};var Ye=Object.prototype.propertyIsEnumerable,ze=Object.getOwnPropertySymbols;const Ge=ze?function(t){return null==t?[]:(t=Object(t),qe(ze(t),(function(e){return Ye.call(t,e)})))}:Le;const $e=function(t,e){return Wt(t,Ge(t),e)};const We=function(t,e){for(var s=-1,r=e.length,n=t.length;++s<r;)t[n+s]=e[s];return t};const Ke=Ee(Object.getPrototypeOf,Object);const He=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)We(e,Ge(t)),t=Ke(t);return e}:Le;const Ze=function(t,e){return Wt(t,He(t),e)};const Xe=function(t,e,s){var r=e(t);return se(t)?r:We(r,s(t))};const Qe=function(t){return Xe(t,Ae,Ge)};const ts=function(t){return Xe(t,Pe,He)};const es=xt(G,"DataView");const ss=xt(G,"Promise");const rs=xt(G,"Set");const ns=xt(G,"WeakMap");var is="[object Map]",os="[object Promise]",as="[object Set]",cs="[object WeakMap]",us="[object DataView]",ds=dt(es),ls=dt(gt),hs=dt(ss),fs=dt(rs),ps=dt(ns),ys=st;(es&&ys(new es(new ArrayBuffer(1)))!=us||gt&&ys(new gt)!=is||ss&&ys(ss.resolve())!=os||rs&&ys(new rs)!=as||ns&&ys(new ns)!=cs)&&(ys=function(t){var e=st(t),s="[object Object]"==e?t.constructor:void 0,r=s?dt(s):"";if(r)switch(r){case ds:return us;case ls:return is;case hs:return os;case fs:return as;case ps:return cs}return e});const ms=ys;var vs=Object.prototype.hasOwnProperty;const _s=function(t){var e=t.length,s=new t.constructor(e);return e&&"string"==typeof t[0]&&vs.call(t,"index")&&(s.index=t.index,s.input=t.input),s};const xs=G.Uint8Array;const gs=function(t){var e=new t.constructor(t.byteLength);return new xs(e).set(new xs(t)),e};const bs=function(t,e){var s=e?gs(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.byteLength)};var ws=/\w*$/;const Os=function(t){var e=new t.constructor(t.source,ws.exec(t));return e.lastIndex=t.lastIndex,e};var Es=$?$.prototype:void 0,Ss=Es?Es.valueOf:void 0;const Ts=function(t){return Ss?Object(Ss.call(t)):{}};const ks=function(t,e){var s=e?gs(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.length)};const Cs=function(t,e,s){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return gs(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return bs(t,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ks(t,s);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Os(t);case"[object Symbol]":return Ts(t)}};var As=Object.create;const Is=function(){function t(){}return function(e){if(!rt(e))return{};if(As)return As(e);t.prototype=e;var s=new t;return t.prototype=void 0,s}}();const Rs=function(t){return"function"!=typeof t.constructor||Oe(t)?{}:Is(Ke(t))};const Ns=function(t){return Ht(t)&&"[object Map]"==ms(t)};var js=ve&&ve.isMap;const Ps=js?fe(js):Ns;const Ds=function(t){return Ht(t)&&"[object Set]"==ms(t)};var Ms=ve&&ve.isSet;const Bs=Ms?fe(Ms):Ds;var Js="[object Arguments]",Vs="[object Function]",Us="[object Object]",Fs={};Fs[Js]=Fs["[object Array]"]=Fs["[object ArrayBuffer]"]=Fs["[object DataView]"]=Fs["[object Boolean]"]=Fs["[object Date]"]=Fs["[object Float32Array]"]=Fs["[object Float64Array]"]=Fs["[object Int8Array]"]=Fs["[object Int16Array]"]=Fs["[object Int32Array]"]=Fs["[object Map]"]=Fs["[object Number]"]=Fs["[object Object]"]=Fs["[object RegExp]"]=Fs["[object Set]"]=Fs["[object String]"]=Fs["[object Symbol]"]=Fs["[object Uint8Array]"]=Fs["[object Uint8ClampedArray]"]=Fs["[object Uint16Array]"]=Fs["[object Uint32Array]"]=!0,Fs["[object Error]"]=Fs[Vs]=Fs["[object WeakMap]"]=!1;const qs=function t(e,s,r,n,i,o){var a,c=1&s,u=2&s,d=4&s;if(r&&(a=i?r(e,n,i,o):r(e)),void 0!==a)return a;if(!rt(e))return e;var l=se(e);if(l){if(a=_s(e),!c)return Fe(e,a)}else{var h=ms(e),f=h==Vs||"[object GeneratorFunction]"==h;if(ae(e))return Ue(e,c);if(h==Us||h==Js||f&&!i){if(a=u||f?{}:Rs(e),!c)return u?Ze(e,De(a,e)):$e(e,Ie(a,e))}else{if(!Fs[h])return i?e:{};a=Cs(e,h,c)}}o||(o=new qt);var p=o.get(e);if(p)return p;o.set(e,a),Bs(e)?e.forEach((function(n){a.add(t(n,s,r,n,e,o))})):Ps(e)&&e.forEach((function(n,i){a.set(i,t(n,s,r,i,e,o))}));var y=l?void 0:(d?u?ts:Qe:u?Pe:Ae)(e);return Lt(y||e,(function(n,i){y&&(n=e[i=n]),$t(a,i,t(n,s,r,i,e,o))})),a};const Ls=function(t){return qs(t,5)},Ys=["build","finish","getDescriptor","create","_protobuf","verify","registerDescriptor","toObject","_protobufRoot","decode","encode","nested","_description","fromJSON"];var zs,Gs;zs=Ys,Gs=247,function(t){for(;--t;)zs.push(zs.shift())}(++Gs);const $s=function(t,e){return Ys[t-=0]};class Ws{constructor(){this[$s("0x3")]={nested:{}}}[$s("0xb")](t,e){this[$s("0x3")][$s("0x2")][t]=Ls(e)}[$s("0x5")](){this[$s("0xd")]=A().Root[$s("0x4")](this[$s("0x3")])}[$s("0x7")](t){if(!this[$s("0xd")])throw new e.CKEditorError("protobuffactory-cannot-get-descriptor-before-build",this);return new Ks(this[$s("0xd")].lookupType(t))}}class Ks{constructor(t){this[$s("0x9")]=t}compress(t){const e=this[$s("0x9")][$s("0xa")](t);if(e)throw Error(e);return this[$s("0x9")][$s("0x1")](this._protobuf[$s("0x8")](t))[$s("0x6")]()}decompress(t){return this._protobuf[$s("0xc")](this._protobuf[$s("0x0")](t),{oneofs:!0})}}var Hs,Zs,Xs=["Position","Element","bool","uint32","string","repeated"];Hs=Xs,Zs=477,function(t){for(;--t;)Hs.push(Hs.shift())}(++Zs);var Qs=function(t,e){return Xs[t-=0]};const tr={Position:{fields:{root:{type:Qs("0x1"),id:1},rootMain:{type:Qs("0x5"),id:2},rootGraveyard:{type:"bool",id:3},path:{rule:Qs("0x2"),type:Qs("0x0"),id:4},stickiness:{type:Qs("0x1"),id:5}}},Range:{fields:{start:{type:Qs("0x3"),id:1},end:{type:Qs("0x3"),id:2}}},Element:{fields:{name:{type:Qs("0x1"),id:1},children:{rule:Qs("0x2"),type:Qs("0x4"),id:2},data:{type:Qs("0x1"),id:3},attributesBoolean:{keyType:Qs("0x1"),type:Qs("0x5"),id:4},attributesJson:{type:Qs("0x1"),id:5}}}};const er=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const sr=function(t){return this.__data__.has(t)};function rr(t){var e=-1,s=null==t?0:t.length;for(this.__data__=new Vt;++e<s;)this.add(t[e])}rr.prototype.add=rr.prototype.push=er,rr.prototype.has=sr;const nr=rr;const ir=function(t,e){for(var s=-1,r=null==t?0:t.length;++s<r;)if(e(t[s],s,t))return!0;return!1};const or=function(t,e){return t.has(e)};const ar=function(t,e,s,r,n,i){var o=1&s,a=t.length,c=e.length;if(a!=c&&!(o&&c>a))return!1;var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var l=-1,h=!0,f=2&s?new nr:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var p=t[l],y=e[l];if(r)var m=o?r(y,p,l,e,t,i):r(p,y,l,t,e,i);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!ir(e,(function(t,e){if(!or(f,e)&&(p===t||n(p,t,s,r,i)))return f.push(e)}))){h=!1;break}}else if(p!==y&&!n(p,y,s,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h};const cr=function(t){var e=-1,s=Array(t.size);return t.forEach((function(t,r){s[++e]=[r,t]})),s};const ur=function(t){var e=-1,s=Array(t.size);return t.forEach((function(t){s[++e]=t})),s};var dr=$?$.prototype:void 0,lr=dr?dr.valueOf:void 0;const hr=function(t,e,s,r,n,i,o){switch(s){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new xs(t),new xs(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return R(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=cr;case"[object Set]":var c=1&r;if(a||(a=ur),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;r|=2,o.set(t,e);var d=ar(a(t),a(e),r,n,i,o);return o.delete(t),d;case"[object Symbol]":if(lr)return lr.call(t)==lr.call(e)}return!1};var fr=Object.prototype.hasOwnProperty;const pr=function(t,e,s,r,n,i){var o=1&s,a=Qe(t),c=a.length;if(c!=Qe(e).length&&!o)return!1;for(var u=c;u--;){var d=a[u];if(!(o?d in e:fr.call(e,d)))return!1}var l=i.get(t),h=i.get(e);if(l&&h)return l==e&&h==t;var f=!0;i.set(t,e),i.set(e,t);for(var p=o;++u<c;){var y=t[d=a[u]],m=e[d];if(r)var v=o?r(m,y,d,e,t,i):r(y,m,d,t,e,i);if(!(void 0===v?y===m||n(y,m,s,r,i):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var _=t.constructor,x=e.constructor;_==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(f=!1)}return i.delete(t),i.delete(e),f};var yr="[object Arguments]",mr="[object Array]",vr="[object Object]",_r=Object.prototype.hasOwnProperty;const xr=function(t,e,s,r,n,i){var o=se(t),a=se(e),c=o?mr:ms(t),u=a?mr:ms(e),d=(c=c==yr?vr:c)==vr,l=(u=u==yr?vr:u)==vr,h=c==u;if(h&&ae(t)){if(!ae(e))return!1;o=!0,d=!1}if(h&&!d)return i||(i=new qt),o||xe(t)?ar(t,e,s,r,n,i):hr(t,e,c,s,r,n,i);if(!(1&s)){var f=d&&_r.call(t,"__wrapped__"),p=l&&_r.call(e,"__wrapped__");if(f||p){var y=f?t.value():t,m=p?e.value():e;return i||(i=new qt),n(y,m,s,r,i)}}return!!h&&(i||(i=new qt),pr(t,e,s,r,n,i))};const gr=function t(e,s,r,n,i){return e===s||(null==e||null==s||!Ht(e)&&!Ht(s)?e!=e&&s!=s:xr(e,s,r,n,t,i))};const br=function(t,e){return gr(t,e)},wr=["nodes","main","rootGraveyard","length","root","rootMain","$graveyard","path"];var Or,Er;Or=wr,Er=177,function(t){for(;--t;)Or.push(Or.shift())}(++Er);const Sr=function(t,e){return wr[t-=0]};function Tr(t,e){const s=Ls(t);return s.path[s[Sr("0x6")][Sr("0x2")]-1]+=e,s}function kr(t,e){return t.root===e[Sr("0x3")]&&br(t[Sr("0x6")],e[Sr("0x6")])}function Cr(t){Ir(t,(t=>("main"==t[Sr("0x3")]?(t.rootMain=!0,delete t[Sr("0x3")]):"$graveyard"==t[Sr("0x3")]&&(t[Sr("0x1")]=!0,delete t[Sr("0x3")]),t)))}function Ar(t){Ir(t,(t=>(t[Sr("0x4")]?(t.root=Sr("0x0"),delete t.rootMain):t[Sr("0x1")]&&(t.root=Sr("0x5"),delete t[Sr("0x1")]),t)))}function Ir(t,e){for(const s in t){const r=t[s];Sr("0x7")!==s&&rt(r)&&(r[Sr("0x6")]&&(r[Sr("0x3")]||r[Sr("0x4")]||r[Sr("0x1")])?t[s]=e(r):Ir(r,e))}return t}const Rr=["operationName","decompress","push","types","__className","compress","shift","buffers","_protobufDescriptor"];var Nr,jr;Nr=Rr,jr=476,function(t){for(;--t;)Nr.push(Nr.shift())}(++jr);const Pr=function(t,e){return Rr[t-=0]};class Dr{constructor(t,e,s){this.id=t,this[Pr("0x1")]=e,this._protobufDescriptor=s}[Pr("0x6")](t,e){const s=e[Pr("0x7")]();Cr(s),t[Pr("0x8")][Pr("0x3")](this[Pr("0x0")][Pr("0x6")](s)),t[Pr("0x4")][Pr("0x3")](this.id)}[Pr("0x2")](t,e){e[Pr("0x4")][Pr("0x7")]();const s=this[Pr("0x0")].decompress(e[Pr("0x8")].shift());Ar(s),s[Pr("0x5")]=this.operationName,t[Pr("0x3")](s)}}const Mr=["operationName","bool","string","types","_protobufDescriptor","description","decompress","newValue","shift","boolean","Json","buffers","push","oldValue","compress","Boolean","__className","Range","parse"];var Br,Jr;Br=Mr,Jr=125,function(t){for(;--t;)Br.push(Br.shift())}(++Jr);const Vr=function(t,e){return Mr[t-=0]};class Ur extends Dr{static get[Vr("0xd")](){return{fields:{range:{type:Vr("0x6"),id:1},key:{type:Vr("0xa"),id:2},oldValueBoolean:{type:Vr("0x9"),id:3},oldValueJson:{type:"string",id:4},newValueBoolean:{type:Vr("0x9"),id:5},newValueJson:{type:Vr("0xa"),id:6},wasUndone:{type:Vr("0x9"),id:7}}}}[Vr("0x3")](t,e){const s=e[Vr("0x10")]();Fr(Vr("0x2"),s),Fr(Vr("0xf"),s),Cr(s),t[Vr("0x0")][Vr("0x1")](this[Vr("0xc")][Vr("0x3")](s)),t[Vr("0xb")][Vr("0x1")](this.id)}[Vr("0xe")](t,e){const{types:s,buffers:r}=e,n=this._protobufDescriptor[Vr("0xe")](r[Vr("0x10")]());s[Vr("0x10")](),qr("oldValue",n),qr("newValue",n),Ar(n),n[Vr("0x5")]=this[Vr("0x8")],t[Vr("0x1")](n)}}function Fr(t,e){const s=e[t];Vr("0x11")==typeof s?e[t+"Boolean"]=s:e[t+Vr("0x12")]=JSON.stringify(s)}function qr(t,e){const s=t+Vr("0x12");e[s]?(e[t]=JSON[Vr("0x7")](e[s]),delete e[s]):(e[t]=e[t+"Boolean"],delete e[t+Vr("0x4")])}const Lr=["__className","attributes","attributesJson","shift","stringify","boolean","description","buffers","push","compress","Position","types","keys","bool","decompress","operationName","children","Element","every","nodes","attributesBoolean"];var Yr,zr;Yr=Lr,zr=269,function(t){for(;--t;)Yr.push(Yr.shift())}(++zr);const Gr=function(t,e){return Lr[t-=0]};class $r extends Dr{static get[Gr("0xa")](){return{fields:{position:{type:Gr("0xe"),id:1},nodes:{rule:"repeated",type:Gr("0x0"),id:2},shouldReceiveAttributes:{type:Gr("0x11"),id:3},wasUndone:{type:Gr("0x11"),id:4}}}}[Gr("0xd")](t,e){const s=e[Gr("0x7")]();Wr(s[Gr("0x2")]),Cr(s),t[Gr("0xb")][Gr("0xc")](this._protobufDescriptor.compress(s)),t[Gr("0xf")][Gr("0xc")](this.id)}[Gr("0x12")](t,e){const{types:s,buffers:r}=e,n=this._protobufDescriptor[Gr("0x12")](r.shift());s[Gr("0x7")](),n[Gr("0x2")]||(n[Gr("0x2")]=[]),Kr(n[Gr("0x2")]),Ar(n),n[Gr("0x4")]=this[Gr("0x13")],t[Gr("0xc")](n)}}function Wr(t){for(const e of t){if(e[Gr("0x5")]){const t=e[Gr("0x5")];Hr(t)?e.attributesBoolean=t:e[Gr("0x6")]=JSON[Gr("0x8")](t)}e[Gr("0x14")]&&Wr(e.children)}}function Kr(t){for(const e of t)(e[Gr("0x3")]||e[Gr("0x6")])&&(e.attributesBoolean?(e[Gr("0x5")]=e[Gr("0x3")],delete e[Gr("0x3")]):(e.attributes=JSON.parse(e[Gr("0x6")]),delete e.attributesJson)),e.children&&Kr(e[Gr("0x14")])}function Hr(t){return Object[Gr("0x10")](t)[Gr("0x1")]((e=>Gr("0x9")==typeof t[e]))}const Zr=["Range","bool","description","length","decompress","string"];var Xr,Qr;Xr=Zr,Qr=401,function(t){for(;--t;)Xr.push(Xr.shift())}(++Qr);const tn=function(t,e){return Zr[t-=0]};class en extends Dr{static get[tn("0x3")](){return{fields:{name:{type:tn("0x0"),id:1},oldRange:{type:"Range",id:2},newRange:{type:tn("0x1"),id:3},affectsData:{type:tn("0x2"),id:4},wasUndone:{type:tn("0x2"),id:5}}}}decompress(t,e){super[tn("0x5")](t,e);const s=t[t[tn("0x4")]-1];s.oldRange||(s.oldRange=null),s.newRange||(s.newRange=null)}}var sn,rn,nn=["bool","uint32","Position","description"];sn=nn,rn=362,function(t){for(;--t;)sn.push(sn.shift())}(++rn);var on=function(t,e){return nn[t-=0]};class an extends Dr{static get[on("0x1")](){return{fields:{sourcePosition:{type:on("0x0"),id:1},targetPosition:{type:"Position",id:2},graveyardPosition:{type:on("0x0"),id:3},howMany:{type:on("0x3"),id:4},wasUndone:{type:on("0x2"),id:5}}}}}var cn,un,dn=["uint32","description","Position"];cn=dn,un=166,function(t){for(;--t;)cn.push(cn.shift())}(++un);var ln=function(t,e){return dn[t-=0]};class hn extends Dr{static get[ln("0x0")](){return{fields:{sourcePosition:{type:ln("0x1"),id:1},howMany:{type:ln("0x2"),id:2},targetPosition:{type:ln("0x1"),id:3},wasUndone:{type:"bool",id:4}}}}}var fn,pn,yn=["description","string","Position"];fn=yn,pn=330,function(t){for(;--t;)fn.push(fn.shift())}(++pn);var mn=function(t,e){return yn[t-=0]};class vn extends Dr{static get[mn("0x0")](){return{fields:{position:{type:mn("0x2"),id:1},oldName:{type:mn("0x1"),id:2},newName:{type:mn("0x1"),id:3},wasUndone:{type:"bool",id:4}}}}}const _n=["string","root","fields"];var xn,gn;xn=_n,gn=437,function(t){for(;--t;)xn.push(xn.shift())}(++gn);const bn=function(t,e){return _n[t-=0]};class wn extends Ur{static get description(){const t=Ur.description;return delete t[bn("0x0")].range,t[bn("0x0")][bn("0x2")]={type:bn("0x1"),id:1},t}}var On,En,Sn=["Position"];On=Sn,En=186,function(t){for(;--t;)On.push(On.shift())}(++En);var Tn=function(t,e){return Sn[t-=0]};class kn extends Dr{static get description(){return{fields:{splitPosition:{type:"Position",id:1},graveyardPosition:{type:Tn("0x0"),id:2},howMany:{type:"uint32",id:3},insertionPosition:{type:Tn("0x0"),id:4},wasUndone:{type:"bool",id:5}}}}}var Cn,An,In=["shift","compress","push","types"];Cn=In,An=119,function(t){for(;--t;)Cn.push(Cn.shift())}(++An);var Rn=function(t,e){return In[t-=0]};class Nn extends Dr{[Rn("0x2")](t,e){e[Rn("0x1")](),t[Rn("0x0")][Rn("0x3")](this.id)}decompress(t,e){e[Rn("0x0")][Rn("0x1")](),t.push({__className:this.operationName})}}const jn=["compress","MarkerOperation","decompress","length","_omittedNamespace","replace","__className","startsWith","name"];var Pn,Dn;Pn=jn,Dn=323,function(t){for(;--t;)Pn.push(Pn.shift())}(++Dn);const Mn=function(t,e){return jn[t-=0]};class Bn extends en{constructor(t,e,s,r){super(t,e,s),this[Mn("0x5")]=r+":"}[Mn("0x1")](t,e){return!(Mn("0x2")!=e[0][Mn("0x7")]||!e[0][Mn("0x0")][Mn("0x8")](this[Mn("0x5")])||(e[0][Mn("0x0")]=e[0][Mn("0x0")][Mn("0x6")](new RegExp("^"+this._omittedNamespace),""),super[Mn("0x1")](t,e),0))}[Mn("0x3")](t,e){super[Mn("0x3")](t,e);const s=t[t[Mn("0x4")]-1];s[Mn("0x0")]=this[Mn("0x5")]+s[Mn("0x0")]}}const Jn=["types","_compressSingleOperation","_decompressSingleOperation","buffers","_compareOperations","compress","push","_splitCurrent","shift","decompress","_combineNext","_context"];var Vn,Un;Vn=Jn,Un=464,function(t){for(;--t;)Vn.push(Vn.shift())}(++Un);const Fn=function(t,e){return Jn[t-=0]};class qn{constructor(t,e){this.id=t,this[Fn("0x3")]=e}[Fn("0x9")](t,e){let s;for(;e.length>1&&this[Fn("0x8")](e[0],e[1]);)s?(s=this._combineNext(e.shift(),s),t[Fn("0x4")][Fn("0xa")](0)):(s=Ls(e[Fn("0x0")]()),t[Fn("0x4")].push(this.id));return!!s&&(s=this[Fn("0x2")](e[Fn("0x0")](),s),t[Fn("0x4")][Fn("0xa")](0),t[Fn("0x7")][Fn("0xa")](this[Fn("0x5")](s)),!0)}[Fn("0x1")](t,e){const s=this[Fn("0x6")](e);for(;0==e.types[0];)e[Fn("0x4")].shift(),t.push(this[Fn("0xb")](s));t[Fn("0xa")](s)}}const Ln=["wasUndone","length","_splitCurrent","next","_context","_getCompressorByName","InsertOperation","every","__className","from","value","compress","substr","_combineNext","_decompressSingleOperation","iterator","decompress","attributes","nodes","keys","data","_compareOperations","position"];var Yn,zn;Yn=Ln,zn=162,function(t){for(;--t;)Yn.push(Yn.shift())}(++zn);const Gn=function(t,e){return Ln[t-=0]};class $n extends qn{[Gn("0xc")](t,e){return e[Gn("0x11")][0][Gn("0x13")]+=t[Gn("0x11")][0][Gn("0x13")],e}[Gn("0x1")](t){const e=Ls(t),s=e[Gn("0x11")][0],r=t.nodes[0],n=r[Gn("0x13")][Symbol[Gn("0xe")]]()[Gn("0x2")]()[Gn("0x9")],i=n.length;return s[Gn("0x13")]=n,r[Gn("0x13")]=r[Gn("0x13")][Gn("0xb")](i),t.position=Tr(t[Gn("0x15")],i),e}[Gn("0x14")](t,e){if(Wn(t)&&Wn(e)){const s=t[Gn("0x11")][0][Gn("0x13")].length,r=kr(Tr(t[Gn("0x15")],s),e.position),n=t[Gn("0x11")][0],i=e[Gn("0x11")][0];return r&&function(t,e){const s=Object[Gn("0x12")](t[Gn("0x10")]||{}),r=Object[Gn("0x12")](e.attributes||{});return s[Gn("0x0")]===r[Gn("0x0")]&&s[Gn("0x6")]((s=>e[Gn("0x10")][s]&&e[Gn("0x10")][s]===t[Gn("0x10")][s]))}(n,i)}return!1}_compressSingleOperation(t){const e={types:[],buffers:[],baseVersion:0};return this[Gn("0x3")][Gn("0x4")](Gn("0x5"))[Gn("0xa")](e,[t]),e.buffers[0]}[Gn("0xd")](t){const e=[];return this._context[Gn("0x4")]("InsertOperation")[Gn("0xf")](e,t),e[0]}}function Wn(t){return"InsertOperation"==t[Gn("0x7")]&&1==t[Gn("0x11")][Gn("0x0")]&&t[Gn("0x11")][0][Gn("0x13")]&&!t[Gn("0x16")]&&1==Array[Gn("0x8")](t[Gn("0x11")][0][Gn("0x13")])[Gn("0x0")]}const Kn=["_getCompressorByName","$graveyard","_combineNext","_context","_decompressSingleOperation","sourcePosition","MoveOperation","_compareOperations","targetPosition","_splitCurrent","compress","buffers","_compressSingleOperation","decompress","root","howMany"];var Hn,Zn;Hn=Kn,Zn=479,function(t){for(;--t;)Hn.push(Hn.shift())}(++Zn);const Xn=function(t,e){return Kn[t-=0]};class Qn extends qn{[Xn("0x3")](t,e){return e[Xn("0x0")]++,e.sourcePosition=Ls(t[Xn("0x6")]),e}[Xn("0xa")](t){const e=Ls(t);return t[Xn("0x0")]--,e[Xn("0x0")]=1,e.sourcePosition=Tr(e.sourcePosition,t[Xn("0x0")]),e}[Xn("0x8")](t,e){return!(!ti(t)||!ti(e))&&kr(Tr(t[Xn("0x6")],-1),e[Xn("0x6")])&&kr(t[Xn("0x9")],e.targetPosition)}[Xn("0xd")](t){const e={types:[],buffers:[],baseVersion:0};return this[Xn("0x4")][Xn("0x1")](Xn("0x7"))[Xn("0xb")](e,[t]),e[Xn("0xc")][0]}[Xn("0x5")](t){const e=[];return this[Xn("0x4")][Xn("0x1")](Xn("0x7"))[Xn("0xe")](e,t),e[0]}}function ti(t){return Xn("0x7")==t.__className&&Xn("0x2")==t[Xn("0x9")][Xn("0xf")]&&1==t[Xn("0x0")]&&!t.wasUndone}const ei=["wasUndone","sourcePosition","root","buffers","_decompressSingleOperation","_compareOperations","_getCompressorByName","MoveOperation","howMany","compress","decompress","_compressSingleOperation","$graveyard","_splitCurrent","_context","_combineNext"];var si,ri;si=ei,ri=221,function(t){for(;--t;)si.push(si.shift())}(++ri);const ni=function(t,e){return ei[t-=0]};class ii extends qn{[ni("0x2")](t,e){return e[ni("0xb")]++,e}[ni("0x0")](t){const e=Ls(t);return e[ni("0xb")]=1,t.howMany--,e}[ni("0x8")](t,e){return!(!oi(t)||!oi(e))&&kr(t[ni("0x4")],e[ni("0x4")])&&kr(t.targetPosition,e.targetPosition)}[ni("0xe")](t){const e={types:[],buffers:[],baseVersion:0};return this[ni("0x1")][ni("0x9")](ni("0xa"))[ni("0xc")](e,[t]),e[ni("0x6")][0]}[ni("0x7")](t){const e=[];return this._context._getCompressorByName(ni("0xa"))[ni("0xd")](e,t),e[0]}}function oi(t){return"MoveOperation"==t.__className&&ni("0xf")==t.targetPosition[ni("0x5")]&&1==t[ni("0xb")]&&!t[ni("0x3")]}const ai=["newRange","user:position:","_context","start","compress","_getCompressorByName","types","__className","shift","decompress","end","toNone","push","MarkerOperation","_compressSingleOperation","user:","oldRange","name","_decompressSingleOperation","startsWith","buffers","split"];var ci,ui;ci=ai,ui=125,function(t){for(;--t;)ci.push(ci.shift())}(++ui);const di=function(t,e){return ai[t-=0]};class li extends qn{[di("0xb")](t,e){if(s=e[0],r=e[1],!(s&&r&&"MarkerOperation"==s.__className&&di("0x14")==r[di("0xe")]&&s.name[di("0x4")](di("0x0"))&&r[di("0x2")][di("0x4")](di("0x0"))&&s[di("0x2")]!=r.name))return!1;var s,r;const n=e[di("0xf")]();return n[di("0x1")]=null,n[di("0x7")]&&kr(n.newRange[di("0xa")],n[di("0x7")][di("0x11")])&&(n.newRange[di("0x11")]=null),e[di("0xf")](),t[di("0xd")][di("0x13")](this.id),t[di("0xd")][di("0x13")](0),t[di("0x5")][di("0x13")](this._compressSingleOperation(n)),!0}[di("0x10")](t,e){const s=this[di("0x3")](e);s[di("0x7")]&&!s.newRange[di("0x11")]&&(s[di("0x7")][di("0x11")]=Ls(s[di("0x7")].start));const r=Ls(s);r[di("0x7")]&&(r[di("0x7")][di("0xa")].stickiness=di("0x12"),r[di("0x7")][di("0x11")]=Ls(r[di("0x7")].start)),r[di("0x2")]=di("0x8")+r.name[di("0x6")](":")[2],e[di("0xd")][di("0xf")](),t[di("0x13")](s),t[di("0x13")](r)}[di("0x15")](t){const e={types:[],buffers:[],baseVersion:0};return this[di("0x9")][di("0xc")](di("0x14"))[di("0xb")](e,[t]),e[di("0x5")][0]}[di("0x3")](t){const e=[];return this[di("0x9")][di("0xc")](di("0x14"))[di("0x10")](e,t),e[0]}}const hi=["CommentMarkerOperation","set","Element","MarkerOperation","types","suggestion","registerDescriptor","SuggestionMarkerOperation","DeletingAction","_compressorByName","SplitOperation","_protobufFactory","_registerCompressor","baseVersion","getDescriptor","forEach","MoveOperation","decompress","TypingAction","RenameOperation","comment","NoOperation","_registerActionCompressor","_getCompressorByName","AttributeOperation","RootAttributeOperation","__className","_registerOperationCompressor","description","UserSelectionAction","_compressorById","compress","ForwardDeletingAction","Position","length","get","MergeOperation","Range"];var fi,pi;fi=hi,pi=473,function(t){for(;--t;)fi.push(fi.shift())}(++pi);const yi=function(t,e){return hi[t-=0]};class mi{constructor(){this[yi("0xd")]=new Map,this[yi("0x1e")]=new Map,this[yi("0x20")]=new Ws,this._protobufFactory[yi("0x1b")]("Position",tr[yi("0x10")]),this[yi("0x20")].registerDescriptor(yi("0x14"),tr[yi("0x14")]),this._protobufFactory[yi("0x1b")](yi("0x17"),tr[yi("0x17")]),this._protobufFactory[yi("0x1b")](yi("0x7"),Ur[yi("0xb")]),this[yi("0x20")].registerDescriptor("InsertOperation",$r[yi("0xb")]),this[yi("0x20")].registerDescriptor(yi("0x18"),en[yi("0xb")]),this[yi("0x20")].registerDescriptor(yi("0x13"),an[yi("0xb")]),this._protobufFactory.registerDescriptor(yi("0x25"),hn.description),this[yi("0x20")][yi("0x1b")](yi("0x2"),vn[yi("0xb")]),this[yi("0x20")][yi("0x1b")](yi("0x8"),wn.description),this._protobufFactory.registerDescriptor(yi("0x1f"),kn[yi("0xb")]),this[yi("0x20")].build(),this[yi("0x21")](1,yi("0x4"),new Nn(1,"NoOperation")),this._registerOperationCompressor(10,yi("0x7"),Ur),this._registerOperationCompressor(11,"InsertOperation",$r),this._registerOperationCompressor(12,"MarkerOperation",en),this[yi("0xa")](13,yi("0x13"),an),this[yi("0xa")](14,yi("0x25"),hn),this[yi("0xa")](15,yi("0x2"),vn),this[yi("0xa")](16,yi("0x8"),wn),this[yi("0xa")](17,yi("0x1f"),kn);const t=this[yi("0x20")][yi("0x23")](yi("0x18"));this[yi("0x21")](18,"CommentMarkerOperation",new Bn(18,yi("0x18"),t,yi("0x3"))),this[yi("0x21")](19,yi("0x1c"),new Bn(19,"MarkerOperation",t,yi("0x1a"))),this._registerActionCompressor(100,"TypingAction",$n),this[yi("0x5")](101,"DeletingAction",Qn),this._registerActionCompressor(102,yi("0xf"),ii),this[yi("0x5")](103,yi("0xc"),li)}[yi("0xa")](t,e,s){const r=new s(t,e,this[yi("0x20")][yi("0x23")](e));this[yi("0x21")](t,e,r)}_registerActionCompressor(t,e,s){const r=new s(t,this);this[yi("0x21")](t,e,r)}[yi("0x21")](t,e,s){this[yi("0xd")].set(t,s),this[yi("0x1e")][yi("0x16")](e,s)}_getCompressorByName(t){return this[yi("0x1e")][yi("0x12")](t)}compress(t){if(!t||!t[0])throw new e.CKEditorError("no-operations-provided",this);const s={types:[],buffers:[],baseVersion:t[0][yi("0x22")]};for(;t[yi("0x11")];)this[yi("0x6")](yi("0xc")).compress(s,t)||this._getCompressorByName(yi("0x1"))[yi("0xe")](s,t)||this._getCompressorByName(yi("0x1d")).compress(s,t)||this[yi("0x6")]("ForwardDeletingAction")[yi("0xe")](s,t)||this[yi("0x6")](yi("0x15")).compress(s,t)||this._getCompressorByName(yi("0x1c"))[yi("0xe")](s,t)||this[yi("0x6")](t[0][yi("0x9")])[yi("0xe")](s,t);return s}[yi("0x0")](t){const e=[];for(;t[yi("0x19")][yi("0x11")];)this[yi("0xd")][yi("0x12")](t.types[0])[yi("0x0")](e,t);return e[yi("0x24")](((e,s)=>e[yi("0x22")]=t[yi("0x22")]+s)),e}}var vi=__webpack_require__(7622),_i=__webpack_require__.n(vi),xi=__webpack_require__(7530),gi=__webpack_require__.n(xi);const bi=["includes","_handleSendingSelectionMarkers","_compressOperations","createRange","collaboration-missing-channelid","init","_sendBufferedOperations","cloud-services-internal-error: Request timeout.","_bufferedOperations","requires","unregister","addToReconnectionStack","markers","_disconnectionOperations","startsWith","_hasSelectionChanged","then","type","rtc-destroyed","_handleReconnectionResponse","applyOperation","channelSessions","fromJSON","_handleInitialConnectionData","setPermissions","_sendBufferedOperationsDelayed","map","_sendBufferedOperationsDelay","cloud-services-internal-error: Not connected.","getDocumentDetails","_isInit","sendOperations","round","_initThrowingOnDataSet","getRoot","getUser","config","isReadOnly","has","_handleReceivedOperations","_ignoredOperations","addUser","register","marker","realtimecollaborationclient-sendbufferedoperations","error","createdAt","getOperations","getIdOfTheLastOperation","destroy","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","lastSyncVersion","_service","reset","_handleServerResponse","end","_pendingAction","parse","history","_applyOperationsSet","_getOperationsFromInitData","sessionId","_offset","_fetchMissingUsers","view","decompress","data","disableReadOnlyMode","_document","roots","_currentBufferDelay","_lastServerVersion","affectsData","push","version","mySessionId","getMany","_lastSyncedOperationId","bind","_disconnectService","filter","_shouldSendUpdate","_connectAfterSessionHasBeenFlushed","change:_isEditingAllowed","batch","removeFromReconnectionStack","isEnabled","model","_setPendingAction","stop","_shouldSendSelectionUpdate","realtimecollaborationclient-initservice-internal-error","document:write","_updateServerHistory","enqueueChange","disconnected","_decompressOperations","CommentsOnly","off","toJSON","collaboration","editor","addOperation","_hasSynchronizationProblem","CollaborativeEditingService","rtc-offline","suppressErrorInCollaboration","_baseBufferDelay","Notification","_isEditingAllowed","_saveOperationInBuffer","getConnectedSessions","get","start","cloudDocumentVersion","409","baseVersion","setIdForTheLastOperation","message","plugins","_isConnected","reconnect","RealTimeCollaborationClient","_channelId","lastOperationId","catch","initData","serverHistory","metadata","cloudServices.bundleVersion","_authorId","userId","_operationIdentifier","_compressor","realtimecollaborationclient-init-connection-failed","slice","realtimecollaborationclient-init-session-connection-error","_knownOperations","_handleExternalOperations","realtimecollaborationclient-initservice-incorrect-server-operation","isDocumentOperation","createPositionFromPath","pluginName","forEach","offset","_handleReconnectionError","add","PENDING_ACTION_SENDING_DATA","change:range","_connectService","fire","_initSessionsHandling","connected","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","_crash","cs:removeUser","getOperationAuthor","_setUpDataInit","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","_operationToId","enableReadOnlyMode","return","_isDisconnection","string","_sendBufferedOperationsDelayId","locale","apply","set","high","_clearPendingAction","length","define","code","_assignOperationsMetaData","directChange","wasUndone","createPositionAt","realtimecollaborationclient-init-document-already-initialized","_refreshUserSelectionMarkers","change:hasDomSelection","listenTo","_isPendingUpdate","operationsReceived","editing","connection","wereChangesApplied"];var wi,Oi;wi=bi,Oi=132,function(t){for(;--t;)wi.push(wi.shift())}(++Oi);const Ei=function(t,e){return bi[t-=0]};let Si=1;class Ti extends t.Plugin{static get[Ei("0x3f")](){return[l,m,S,t.PendingActions,n.Users,r.Notification]}static get[Ei("0xa")](){return Ei("0xb0")}get[Ei("0xa8")](){return this[Ei("0x7d")]+this[Ei("0x74")]}get[Ei("0x7d")](){return this[Ei("0xb5")].version-this[Ei("0x74")]}get lastSyncVersion(){const t=this[Ei("0xb5")][Ei("0x65")]();for(let e=t[Ei("0x26")]-1;e>=0;e--){const s=t[e];if(!this[Ei("0x43")][Ei("0x5c")](s))return s[Ei("0xaa")]+1-this[Ei("0x74")]}return 0}init(){const t=this[Ei("0x9b")],r=t[Ei("0xad")].get(n.Users),i=t.plugins.get(l);if(this[Ei("0x74")]=0,this[Ei("0x73")]=null,this.serverHistory=new s.History,this[Ei("0x9b")].config[Ei("0x27")](Ei("0x9a"),{}),this[Ei("0xb1")]=t.config[Ei("0xa6")]("collaboration.channelId"),!this[Ei("0xb1")])throw new e.CKEditorError(Ei("0x3a"),this);this.listenTo(r,Ei("0x18"),((t,e)=>{const s=e[0];s[Ei("0xb8")]&&(t[Ei("0x1d")]=r[Ei("0x59")](s._authorId),t[Ei("0x8f")]()),null===s._authorId&&(t[Ei("0x1d")]=null,t[Ei("0x8f")]())}),{priority:Ei("0x24")});const o=t[Ei("0x5a")][Ei("0xa6")](Ei("0xb7"))||e.version;this[Ei("0x6a")]=new(Ti[Ei("0x9e")])(o,this[Ei("0xb1")]),this[Ei("0x7a")]=this[Ei("0x9b")][Ei("0x8d")].document,this._compressor=new mi,this._bufferedOperations=[],this[Ei("0x5")]=new WeakSet,this[Ei("0x23")](Ei("0x31"),!1),this.set(Ei("0x9d"),!1),this[Ei("0x6e")]=null,this[Ei("0x45")]=!1,this._sendBufferedOperationsDelayId=null,this[Ei("0xa1")]=300,this[Ei("0x7c")]=this._baseBufferDelay,this._lastSyncedOperationId=null,this._disconnectionOperations=new WeakSet,this._operationIdentifier=new Ai(this[Ei("0x43")]),this.listenTo(t[Ei("0x8d")].document.selection,Ei("0x10"),((t,e)=>{e[Ei("0x2a")]&&this[Ei("0x2e")]()})),this[Ei("0x30")](t[Ei("0x33")][Ei("0x76")],Ei("0x2f"),(()=>{this[Ei("0x2e")]()})),this[Ei("0x57")](),t[Ei("0x8d")].on(Ei("0x4a"),((t,e)=>{const s=e[0];s[Ei("0x8")]&&(this[Ei("0xa4")](s),this[Ei("0x87")]()&&this[Ei("0x4f")]())})),this[Ei("0x19")](),this[Ei("0x84")](Ei("0xa3")).to(i,"state",this,"_hasSynchronizationProblem",((t,e)=>Ei("0x14")===t&&!e)),this.on(Ei("0x89"),(()=>{this[Ei("0xa3")]?t[Ei("0x79")](Ei("0x9f")):t[Ei("0x1c")](Ei("0x9f"))})),this[Ei("0xa3")]?t[Ei("0x79")]("rtc-offline"):t[Ei("0x1c")](Ei("0x9f")),this.set("_isConnected",!1)}async reconnect(){const t=this.editor[Ei("0xad")].get(m),e=this[Ei("0x9b")][Ei("0xad")][Ei("0xa6")](l);try{this[Ei("0x31")]=!0,t[Ei("0x40")](this._channelId);const s=await this[Ei("0x6a")][Ei("0xaf")](e[Ei("0x34")],this[Ei("0x69")]);await this._handleReconnectionResponse(s)&&(this[Ei("0x31")]=!1,this[Ei("0x25")]());const r=await this[Ei("0x6a")][Ei("0xa5")]();t[Ei("0x60")](this._channelId,r),this[Ei("0x37")](),this[Ei("0xae")]=!0}catch(t){if("404"===t[Ei("0x28")]&&this.sessionId)await this._connectAfterSessionHasBeenFlushed();else if(s=t,Ei("0xa9")===s[Ei("0x28")]){const t=k(this[Ei("0x9b")][Ei("0x21")],Ei("0x68"));this[Ei("0xd")](t)}else{if(!(t instanceof ki))throw t;this[Ei("0xd")]()}}var s}destroy(){const t=this[Ei("0x9b")].plugins[Ei("0xa6")](l),e=this.editor.plugins[Ei("0xa6")](m);this[Ei("0x9b")][Ei("0x1c")](Ei("0x48")),e[Ei("0x4b")].has(this._channelId)&&e[Ei("0x40")](this[Ei("0xb1")]),t[Ei("0x8b")](this),this[Ei("0x85")](),super.destroy()}async[Ei("0x49")](t){if(this[Ei("0x73")]!==t[Ei("0x73")]&&this[Ei("0x83")]!==t[Ei("0xb2")])throw new ki;return this.sessionId=t[Ei("0x73")],this[Ei("0x6c")]([],{...t,wereChangesApplied:!1,data:t.data},"reconnect")}async _connectService(t,e=!1){const{connection:s}=this[Ei("0x9b")].plugins[Ei("0xa6")](l);Ti[Ei("0x9e")][Ei("0xa5")](s,this._channelId)[Ei("0x46")]((t=>this[Ei("0x13")](t)))[Ei("0xb3")]((t=>{this[Ei("0x16")](Ei("0x4"),t)})),this[Ei("0x30")](this[Ei("0x6a")],Ei("0x32"),this[Ei("0x5d")][Ei("0x84")](this)),this.listenTo(this._service,"error",((t,e)=>{this[Ei("0x16")](Ei("0x91"),e)})),this[Ei("0x30")](this._service,Ei("0x95"),(()=>{this._isConnected=!1}));const r=this._operationIdentifier[Ei("0x66")](t),n=await this[Ei("0x6a")].connect(s,this[Ei("0x38")](t),r);if(this[Ei("0x73")]=n.sessionId,n[Ei("0x35")]&&(this[Ei("0x31")]=!1,this._clearPendingAction()),e){if(!n[Ei("0x35")])return void this[Ei("0xd")]();this[Ei("0xb5")][Ei("0x6b")](),this._offset=n[Ei("0xc")],this[Ei("0xb5")][Ei("0x80")]=this[Ei("0x74")],await this._handleServerResponse(t,n,"reconnection: flushed session")}else await this[Ei("0x4d")](n,t);this[Ei("0x37")](),this._isConnected=!0}[Ei("0x37")](){const t=this[Ei("0x9b")].plugins[Ei("0xa6")](m),e=t[Ei("0x4b")].get(this[Ei("0xb1")]);e&&e.length>1?(this[Ei("0x45")]=!0,this._sendBufferedOperationsDelayed()):this[Ei("0x30")](t,"sessionAdd:"+this[Ei("0xb1")],(e=>{t[Ei("0x4b")][Ei("0xa6")](this[Ei("0xb1")])[Ei("0x26")]>1&&(this[Ei("0x45")]=!0,this[Ei("0x4f")](),e[Ei("0x98")]())}))}async _handleReceivedOperations(t,e,s,r){if(!this[Ei("0x31")]&&this[Ei("0x7a")][Ei("0x80")]==e){const t=this._decompressOperations(s,r);await this[Ei("0x75")](t),this[Ei("0x6")](t,e,s[Ei("0xb2")])||this[Ei("0x16")](Ei("0x7"))}}async[Ei("0x88")](){this[Ei("0x85")]();const{locale:t}=this[Ei("0x9b")];let e;try{e=await this[Ei("0x6a")][Ei("0x53")]()}catch(e){const s=k(t,"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");return void this[Ei("0xd")](s)}const s=e.currentDocumentSession||e.lastDocumentSession;if(this[Ei("0x83")]===s[Ei("0xb2")])await this[Ei("0x11")](this[Ei("0x9b")].model.document[Ei("0x70")][Ei("0x65")](),!0);else{const e=k(t,Ei("0x15"));this[Ei("0xd")](e)}}[Ei("0x85")](){this[Ei("0x6a")].disconnect(),this[Ei("0x3e")]=[],clearTimeout(this[Ei("0x51")]),this.stopListening(this._service)}_initSessionsHandling(t){const e=this[Ei("0x9b")][Ei("0xad")][Ei("0xa6")](m);this[Ei("0x30")](e,"sessionAdd:"+this[Ei("0xb1")],((t,{session:s})=>{if(s.id===e[Ei("0x81")]){t[Ei("0x98")]();const e=this[Ei("0x9b")][Ei("0xad")][Ei("0x5c")](Ei("0x97"))&&this[Ei("0x9b")][Ei("0xad")].get("CommentsOnly");let r=s.permissions;e&&e[Ei("0x8c")]&&(r=r[Ei("0x86")]((t=>Ei("0x92")!==t))),this[Ei("0x9b")].plugins[Ei("0xa6")]("Permissions")[Ei("0x4e")](r,this[Ei("0xb1")])}})),e[Ei("0x60")](this[Ei("0xb1")],t)}[Ei("0x57")](){const t=this[Ei("0x9b")].data[Ei("0x23")];this.editor.data[Ei("0x23")]=(...s)=>{if(!s[s[Ei("0x26")]-1][Ei("0xa0")])throw new e.CKEditorError(Ei("0x1a"),this);t[Ei("0x22")](this.editor[Ei("0x78")],s)}}[Ei("0x19")](){this[Ei("0x9b")][Ei("0x78")].on(Ei("0x3b"),((t,[s])=>{if(this._document[Ei("0x80")])throw new e.CKEditorError(Ei("0x2d"),this);t.stop(),this[Ei("0x8e")]();const r=this[Ei("0x72")](s);t.return=this._connectService(r).then((()=>{this[Ei("0x9b")][Ei("0xad")][Ei("0xa6")](l)[Ei("0x41")](this),this.editor.data[Ei("0x12")]("ready")}))[Ei("0xb3")]((t=>this[Ei("0x16")](Ei("0x2"),t))).finally((()=>this[Ei("0x25")]()))}),{priority:Ei("0x24")})}async[Ei("0x75")](t){const e=this[Ei("0x9b")][Ei("0xad")][Ei("0xa6")](n.Users),{connection:s}=this[Ei("0x9b")].plugins[Ei("0xa6")](l),r=new Set;for(const s of t){const t=s[Ei("0xb8")];t&&!e.getUser(t)&&r[Ei("0xe")](t)}if(0===r.size)return;const i=await gi()[Ei("0x82")](s,Array.from(r));for(const t of i)e[Ei("0x59")](t.id)||e[Ei("0x5f")](t)}[Ei("0x72")](t){const r=this[Ei("0x9b")].model,n=[];let i=0;const o=Ei("0x1f")==typeof t?{main:t}:t;for(const t of Object.keys(o)){if(!this[Ei("0x7a")][Ei("0x7b")][Ei("0x5c")](t))throw new e.CKEditorError("realtimecollaborationclient-init-non-existent-root",this);const a=this[Ei("0x9b")][Ei("0x78")][Ei("0x6f")](o[t]),c=this._document[Ei("0x58")](t),u=new s.InsertOperation(r[Ei("0x2c")](c,0),a,i++);n[Ei("0x7f")](u);for(const[t,e]of a.markers){const o=r[Ei("0x39")](r.createPositionFromPath(c,e[Ei("0xa7")].path[Ei("0x3")]()),r[Ei("0x9")](c,e[Ei("0x6d")].path[Ei("0x3")]())),a=new s.MarkerOperation(t,null,o,r[Ei("0x42")],!0,i++);n[Ei("0x7f")](a)}}return n}async[Ei("0x4d")](t,e){let s;this._offset=t[Ei("0xc")];const r=t.wereChangesApplied&&!t[Ei("0xb4")],n=r?0:t[Ei("0x78")][Ei("0xaa")];if(r)s=e,s.forEach((e=>{e[Ei("0x64")]=t.sessionCreatedAt,e[Ei("0x54")]=!0,e[Ei("0xb8")]=null})),this[Ei("0x71")](s,r);else{if(t[Ei("0xb4")]){const e=this[Ei("0x72")](t[Ei("0xb4")]);this._document[Ei("0x70")][Ei("0x80")]=-e[Ei("0x26")],e.forEach((s=>{s.baseVersion-=e.length,s[Ei("0x64")]=t.sessionCreatedAt,s[Ei("0x54")]=!0,s._authorId=null})),this[Ei("0x71")](e,!0),this[Ei("0xb5")].version=-e.length+this[Ei("0x74")],this[Ei("0x93")](e)}this._document[Ei("0x70")][Ei("0x80")]=n,s=this[Ei("0x96")](t[Ei("0x78")],t.metadata),await this._fetchMissingUsers(s),this[Ei("0x71")](s,r)}t[Ei("0xb2")]&&(this._operationIdentifier[Ei("0xab")](s,t[Ei("0xb2")]),this[Ei("0x83")]=t[Ei("0xb2")]),this[Ei("0xb5")].version=n+this._offset,this[Ei("0x93")](s)}_crash(t,s){throw this._isPendingUpdate=!0,s&&console[Ei("0x63")](s),new e.CKEditorError(t,this[Ei("0x9b")])}[Ei("0xa4")](t){this[Ei("0x5")][Ei("0x5c")](t)||(this[Ei("0x5")][Ei("0xe")](t),this[Ei("0x3e")].push(t),this[Ei("0x6e")]||Ei("0x61")==t[Ei("0x47")]&&!t[Ei("0x7e")]||this[Ei("0x8e")]())}_sendBufferedOperationsDelayed(t=!1){!t&&this[Ei("0x31")]||(this[Ei("0x31")]=!0,clearTimeout(this[Ei("0x20")]),this[Ei("0x20")]=setTimeout((()=>{this[Ei("0x3c")]().then((t=>{t&&(this[Ei("0x25")](),this[Ei("0x31")]=!1)}))[Ei("0xb3")]((t=>{if(this._clearPendingAction(),this[Ei("0x31")]=!1,!((e=t).message.startsWith(Ei("0x52"))||e[Ei("0xac")][Ei("0x44")]("cloud-services-internal-error: Collaborative Editing Service is not connected.")||e[Ei("0xac")][Ei("0x44")](Ei("0x3d"))))throw t;var e}))}),this[Ei("0x7c")]))}async[Ei("0x3c")](){const t=this.editor[Ei("0xad")][Ei("0xa6")](S);if(this[Ei("0x90")]()&&(t.createUserMarkerOperations(),this[Ei("0x45")]=!1),!this[Ei("0x87")]())return!0;const e=[...this[Ei("0x3e")]];for(const t of e)t[Ei("0x2b")]=this._document[Ei("0x70")].isUndoneOperation(t);const s=this[Ei("0x0")][Ei("0x66")](e),r=Si++,n=this[Ei("0x38")](e),i=await this[Ei("0x6a")][Ei("0x55")](n,n[Ei("0xaa")],s);try{return await this[Ei("0x6c")](e,i,r)}catch(t){return this[Ei("0x16")](Ei("0x62"),t)}}async[Ei("0x6c")](t,e,s){if(e[Ei("0x63")])throw e[Ei("0x63")];let r=!1;if(e[Ei("0x35")]){e.lastOperationId&&(this[Ei("0x83")]=e[Ei("0xb2")]),this[Ei("0x3e")]=this._bufferedOperations.filter((e=>!t[Ei("0x36")](e)));for(const s of t)s[Ei("0x64")]=e.lastOperationAcceptedAt;this._updateServerHistory(t),r=!0,this._currentBufferDelay=this[Ei("0xa1")]}else{const t=this[Ei("0x96")](e[Ei("0x78")],e[Ei("0xb6")])[Ei("0x86")]((t=>t.baseVersion>=this[Ei("0x7d")]));await this[Ei("0x75")](t),r=this[Ei("0x6")](t,e[Ei("0x80")],e[Ei("0xb2")]),this[Ei("0x7c")]=Math[Ei("0x56")](this._currentBufferDelay/2)}return r?!this[Ei("0x87")]()||(this[Ei("0x4f")](!0),!1):this[Ei("0x16")]("realtimecollaborationclient-handleserverresponse")}_handleExternalOperations(t,e,r){try{const n={document:this[Ei("0x7a")],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:o,originalOperations:a}=(0,s.transformSets)(t,this[Ei("0x3e")],n);Ci(i,this._document[Ei("0x80")]),Ci(o,e);for(const t of i){const e=a[Ei("0xa6")](t);t[Ei("0xb8")]=e?e[Ei("0xb8")]:null}r&&(this._operationIdentifier[Ei("0xab")](t,r),this[Ei("0x83")]=r),this[Ei("0x3e")]=[...o],this._applyOperationsSet(i),this[Ei("0x93")](t)}catch(t){return console.error(t),!1}return!0}[Ei("0x71")](t,e=!1){this[Ei("0x9b")][Ei("0x8d")][Ei("0x94")]({isUndoable:!1,isLocal:!1},(e=>{for(const s of t)this[Ei("0x5")].add(s),e[Ei("0x8a")][Ei("0x9c")](s),this[Ei("0x9b")][Ei("0x8d")][Ei("0x4a")](s)}))}[Ei("0x93")](t){t[Ei("0xb")]((t=>{const e=t.clone();e[Ei("0xb8")]=t[Ei("0xb8")],e._isInit=!!t._isInit,e[Ei("0x64")]=t[Ei("0x64")],e[Ei("0xaa")]+=this[Ei("0x74")],t[Ei("0x1e")]&&this[Ei("0x43")][Ei("0xe")](e),this[Ei("0xb5")][Ei("0x9c")](e)}))}_handleReconnectionError(t){const e=this.editor[Ei("0xad")][Ei("0xa6")](Ei("0xa2")),s=this[Ei("0x9b")][Ei("0x21")];t||(t=k(s,"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.")),e.showWarning(t,{title:k(s,"Synchronization issue"),namespace:"real-time-collaboration"}),this[Ei("0x9d")]=!0,clearTimeout(this._sendBufferedOperationsDelayId),this[Ei("0x3e")]=[],this[Ei("0x9b")].plugins[Ei("0xa6")](l)[Ei("0x67")]()}[Ei("0x8e")](){this._pendingAction||(this._pendingAction=this[Ei("0x9b")][Ei("0xad")][Ei("0xa6")](t.PendingActions)[Ei("0xe")](k(this[Ei("0x9b")].locale,Ei("0xf"))))}[Ei("0x25")](){this._pendingAction&&(this.editor[Ei("0xad")][Ei("0xa6")](t.PendingActions).remove(this._pendingAction),this._pendingAction=null)}[Ei("0x38")](t){const e=t[Ei("0x50")]((t=>t[Ei("0x99")]()));return this[Ei("0x1")].compress(e)}[Ei("0x96")](t,e){const r=this[Ei("0x1")][Ei("0x77")](t)[Ei("0x50")](((t,r)=>{const n=s.OperationFactory[Ei("0x4c")](t,this[Ei("0x7a")]);return n.wasUndone=t[Ei("0x2b")],Ei("0x17")===e[r].type&&(n[Ei("0x1e")]=!0),n}));return this._assignOperationsMetaData(r,e),r}[Ei("0x29")](t,e){for(let s=0;s<t[Ei("0x26")];s++)Ei("0x3b")==e[s].type?(t[s][Ei("0x54")]=!0,t[s][Ei("0xb8")]=null):(t[s][Ei("0x54")]=!1,t[s]._authorId=e[s][Ei("0xb9")]),t[s][Ei("0x64")]=e[s][Ei("0x64")]}_refreshUserSelectionMarkers(){this[Ei("0x45")]=!0,this[Ei("0x90")]()&&this[Ei("0x4f")]()}[Ei("0x90")](){const t=this.editor[Ei("0xad")][Ei("0xa6")](m).channelSessions[Ei("0xa6")](this[Ei("0xb1")]);return!this[Ei("0x9b")][Ei("0x5b")]&&t&&t[Ei("0x26")]>1&&this[Ei("0x45")]}[Ei("0x87")](){return this[Ei("0x3e")][Ei("0x26")]>0||this[Ei("0x90")]()}}class ki extends Error{}function Ci(t,e){for(const s of t)s[Ei("0xaa")]=e++}Ti.CollaborativeEditingService=_i();class Ai{constructor(t){this[Ei("0x5e")]=t,this[Ei("0x1b")]=new WeakMap}[Ei("0x66")](t){let s=t[Ei("0x26")];for(;s--;){const r=t[s];if(!this[Ei("0x5e")][Ei("0x5c")](r)){if(!this[Ei("0x1b")][Ei("0x5c")](r)){const t=(0,e.uid)()[Ei("0x3")](1,18);this[Ei("0x1b")][Ei("0x23")](r,t)}return this._operationToId[Ei("0xa6")](r)}}}[Ei("0xab")](t,e){if(!e)return;let s=t[Ei("0x26")];for(;s--;){const r=t[s];this[Ei("0x5e")][Ei("0x5c")](r)||this._operationToId.set(r,e)}}}var Ii,Ri,Ni=["requires","RealTimeCollaborativeEditing","pluginName"];Ii=Ni,Ri=395,function(t){for(;--t;)Ii.push(Ii.shift())}(++Ri);var ji=function(t,e){return Ni[t-=0]};class Pi extends t.Plugin{static get[ji("0x1")](){return[Ti]}static get[ji("0x0")](){return ji("0x2")}}var Di=__webpack_require__(125),Mi=__webpack_require__.n(Di),Bi=__webpack_require__(6042),Ji=__webpack_require__.n(Bi);const Vi=["content","commentThreadId","listenTo","destroy","_getService","commentId","sessionAdd:","context","getConnectedSessions","add","comments","hasCommentThread","permissions","mySessionId","getCommentThread","unregister","cloudservicescommentsadapter-service-not-exist","code","remove","getCommentThreads","addToReconnectionStack","CommentsService","has","from","commentUpdated","_connectService","register","collaboration.channelId","message","cloudservicescommentsadapter-disconnect-not-exist","keys","updateComment","map","removeCommentThread","addComment","createdAt","config","Permissions","disconnect","CommentsRepository","removeComment","reconnect","_terminateService","delete","startsWith","getUser","404","setPermissions","cloud-services-internal-error: Request timeout.","catch","commentThreadRemoved","requires","commentRemoved","cloud-services-internal-error: Comments Service is not connected.","cloudservicescommentsadapter-connect-already-connected","_setUpService","getMany","connect","get","_services","getComment","_fetchMissingUsersForThreads","commentAdded","addCommentThread","plugins","assign"];var Ui,Fi;Ui=Vi,Fi=236,function(t){for(;--t;)Ui.push(Ui.shift())}(++Fi);const qi=function(t,e){return Vi[t-=0]};class Li extends t.ContextPlugin{static get[qi("0xd")](){return[l,qi("0x1"),m,n.Users]}constructor(t){super(t),this[qi("0x15")]=new Map}async init(){const e=this[qi("0x23")],s=e[qi("0x1a")].get(qi("0x1"));if(e.plugins[qi("0x14")](l)[qi("0x30")](this),s.adapter={getCommentThread:async({channelId:t,threadId:e})=>{const s=await this._getService(t)[qi("0x2a")](e)[qi("0xb")](zi);return await this._fetchMissingUsersForThreads([s]),{threadId:s.commentThreadId,comments:s[qi("0x26")][qi("0x3c")](Gi)}},removeCommentThread:({channelId:t,threadId:e})=>this[qi("0x20")](t)[qi("0x3d")](e)[qi("0xb")](Yi)[qi("0xb")](zi),addComment:({channelId:t,threadId:e,commentId:s,content:r,attributes:n})=>this[qi("0x20")](t)[qi("0x3e")](e,s,r,n).catch(zi),updateComment:({channelId:t,threadId:e,commentId:s,content:r,attributes:n})=>this._getService(t)[qi("0x3b")](e,s,r,n).catch(Yi)[qi("0xb")](zi),removeComment:({channelId:t,threadId:e,commentId:s})=>this[qi("0x20")](t)[qi("0x2")](e,s)[qi("0xb")](Yi).catch(zi)},e instanceof t.Context){const t=e[qi("0x40")].get(qi("0x37")),s=e[qi("0x1a")][qi("0x14")](m);await this[qi("0x11")](t);const r=await this[qi("0x15")].get(t).getConnectedSessions();this[qi("0x1e")](s,qi("0x22")+t,((e,{session:r})=>{r.id===s[qi("0x29")]&&(e.off(),this.context[qi("0x1a")].get(qi("0x41"))[qi("0x9")](r[qi("0x28")],t))})),s[qi("0x36")](t,r)}}async[qi("0x11")](t){if(this[qi("0x15")][qi("0x32")](t))throw new e.CKEditorError(qi("0x10"),null,{channelId:t});const s=this[qi("0x23")].plugins[qi("0x14")](qi("0x1")),r=new(Li[qi("0x31")])(t);this[qi("0x15")].set(t,r),this[qi("0x1e")](r,qi("0xc"),((t,{commentThreadId:e})=>{const r=s[qi("0x2a")](e);r&&r[qi("0x2e")]({isFromAdapter:!0})})),this.listenTo(r,qi("0x18"),((e,r)=>{const n=r[qi("0x1d")];s[qi("0x27")](n)||s[qi("0x19")]({channelId:t,threadId:n,isFromAdapter:!0});const i=s[qi("0x2a")](n);i&&i[qi("0x3e")](Object[qi("0x1b")](Gi(r),{isFromAdapter:!0}))})),this.listenTo(r,qi("0x34"),((t,{commentThreadId:e,commentId:r,content:n,attributes:i})=>{const o=s.getCommentThread(e);if(o){const t=o[qi("0x16")](r);t&&t.update({content:n,attributes:i,isFromAdapter:!0})}})),this[qi("0x1e")](r,qi("0xe"),((t,{commentThreadId:e,commentId:r})=>{const n=s[qi("0x2a")](e);if(n){const t=n[qi("0x16")](r);t&&t[qi("0x2e")]({isFromAdapter:!0})}})),await this[qi("0x35")](t)}[qi("0x1f")](){if(this[qi("0x23")]instanceof t.Context){const t=this[qi("0x23")][qi("0x40")][qi("0x14")](qi("0x37"));this[qi("0x4")](t)}}[qi("0x4")](t){if(!this._services[qi("0x32")](t))throw new e.CKEditorError(qi("0x39"),null,{channelId:t});this[qi("0x20")](t)[qi("0x0")](),this._services[qi("0x5")](t)}async[qi("0x3")](){for(const t of this[qi("0x15")][qi("0x3a")]())await this[qi("0x35")](t);if(this.context instanceof t.Context){const t=this[qi("0x23")][qi("0x40")][qi("0x14")](qi("0x37")),e=this[qi("0x23")].plugins[qi("0x14")](m);e[qi("0x2b")](t);const s=await this[qi("0x15")][qi("0x14")](t)[qi("0x24")]();e[qi("0x36")](t,s)}}async[qi("0x35")](t){const{connection:e}=this[qi("0x23")][qi("0x1a")][qi("0x14")](l),s=this[qi("0x23")][qi("0x1a")][qi("0x14")]("CommentsRepository"),r=this[qi("0x15")].get(t),n=await r[qi("0x13")](e);await this[qi("0x17")](n);const i=new Set(Array[qi("0x33")](s[qi("0x2f")]({channelId:t}),(t=>t.id)));for(const t of n)i.delete(t[qi("0x1d")]);for(const t of i)s[qi("0x2a")](t).remove({isFromAdapter:!0});for(const e of n){let r=s[qi("0x2a")](e[qi("0x1d")]);r||(r=s[qi("0x19")]({channelId:t,threadId:e[qi("0x1d")],isFromAdapter:!0}));const n=new Set(Array[qi("0x33")](r[qi("0x26")],(t=>t.id)));for(const t of e[qi("0x26")])n.delete(t.commentId);for(const t of n)r.getComment(t)[qi("0x2e")]({isFromAdapter:!0});for(const t of e[qi("0x26")]){const e=r[qi("0x16")](t[qi("0x21")]);e?e[qi("0x1c")]!==t.content&&e.update({content:t[qi("0x1c")],isFromAdapter:!0}):r[qi("0x3e")](Object[qi("0x1b")](Gi(t),{isFromAdapter:!0}))}}}[qi("0x20")](t){if(!this._services[qi("0x32")](t))throw new e.CKEditorError(qi("0x2c"),null,{channelId:t});return this._services[qi("0x14")](t)}async[qi("0x17")](t){const e=this[qi("0x23")][qi("0x1a")].get(n.Users),{connection:s}=this[qi("0x23")][qi("0x1a")].get(l),r=new Set;for(const{comments:s}of t)for(const{userId:t}of s)e[qi("0x7")](t)||r[qi("0x25")](t);if(0===r.size)return;const i=await gi()[qi("0x12")](s,Array.from(r));for(const t of i)e[qi("0x7")](t.id)||e.addUser(t)}}async function Yi(t){if(qi("0x8")!==t[qi("0x2d")])throw t}function zi(t){if((e=t)[qi("0x38")].startsWith(qi("0xf"))||e[qi("0x38")][qi("0x6")]("cloud-services-internal-error: Not connected.")||e[qi("0x38")][qi("0x6")](qi("0xa")))return new Promise((()=>{}));var e;throw t}function Gi(t){return{threadId:t[qi("0x1d")],commentId:t[qi("0x21")],content:t[qi("0x1c")],createdAt:t[qi("0x3f")],authorId:t.userId,attributes:t.attributes}}Li[qi("0x31")]=Ji();const $i=["listenTo","TrackChangesService","_fetchMissingUsersForThreads","getMany","getUser","connected","getSuggestion","attributes","update","plugins","off","connect","requires","set","delete","data","get","connection","TrackChangesEditing","_waitForServiceReady","hasSuggestion","catch","adapter","message","startsWith","isConnected","reconnect","init","_trackChangesService","size","addToReconnectionStack","_bufferedRequests","cloud-services-internal-error: Not connected.","collaboration.channelId","cloud-services-internal-error: Request timeout.","config","editor","type","originalSuggestionId","then","add"];var Wi,Ki;Wi=$i,Ki=117,function(t){for(;--t;)Wi.push(Wi.shift())}(++Ki);const Hi=function(t,e){return $i[t-=0]};class Zi extends t.Plugin{static get[Hi("0x12")](){return[Li,Hi("0x18"),l]}constructor(t){super(t),this._bufferedRequests=new Map}[Hi("0x21")](){const t=this.editor[Hi("0xf")].get(l),e=this[Hi("0x1")].plugins[Hi("0x16")](Hi("0x18")),s=this.editor[Hi("0x0")][Hi("0x16")](Hi("0x27"));return this._trackChangesService=new(Zi[Hi("0x7")])(s),e[Hi("0x1c")]={getSuggestion:async t=>{await this[Hi("0x19")]();const e=await this[Hi("0x22")][Hi("0x16")](t)[Hi("0x1b")](Xi);return await this._fetchMissingUsersForThreads([e]),e},addSuggestion:async({id:t,type:e,data:s,originalSuggestionId:r,attributes:n})=>{await this[Hi("0x19")]();const i={id:t,type:e,data:s,originalSuggestionId:r,attributes:n},o=await this[Hi("0x22")][Hi("0x5")](t,e,s,r,n)[Hi("0x1b")]((e=>{if(Qi(e))return new Promise((e=>{this[Hi("0x25")][Hi("0x13")](t,{resolve:e,suggestionData:i})}));throw e}));return this._bufferedRequests[Hi("0x14")](t),o},updateSuggestion:async(t,e)=>{if(await this[Hi("0x19")](),"open"!==e.state)return this._trackChangesService[Hi("0xe")](t,e)[Hi("0x1b")](Xi)}},this.listenTo(this[Hi("0x22")],"suggestionUpdated",((t,s)=>{e.hasSuggestion(s.id)&&(e[Hi("0xc")](s.id)[Hi("0xd")]=s.attributes)})),this[Hi("0x22")].connect(t[Hi("0x17")])[Hi("0x4")]((s=>(t[Hi("0x24")](this),this[Hi("0x8")](s)[Hi("0x4")]((()=>{for(const t of s)e.addSuggestionData(t)._saved=!0})))))}async[Hi("0x20")](){const t=this[Hi("0x1")][Hi("0xf")][Hi("0x16")](Hi("0x18")),{connection:e}=this[Hi("0x1")].plugins.get(l),s=await this[Hi("0x22")][Hi("0x11")](e);await this[Hi("0x8")](s);for(const{suggestionData:t,resolve:e}of this[Hi("0x25")].values()){let r=s.find((e=>e.id===t.id));r||(r=await this._trackChangesService[Hi("0x5")](t.id,t[Hi("0x2")],t[Hi("0x15")],t[Hi("0x3")])),e(r)}for(const e of s)t[Hi("0x1a")](e.id)||t.addSuggestionData(e)}async[Hi("0x19")](){this[Hi("0x22")][Hi("0x1f")]||await new Promise((t=>{this[Hi("0x6")](this[Hi("0x22")],Hi("0xb"),(e=>{e[Hi("0x10")](),t()}))}))}async[Hi("0x8")](t){const e=this[Hi("0x1")][Hi("0xf")][Hi("0x16")](n.Users),{connection:s}=this[Hi("0x1")][Hi("0xf")][Hi("0x16")](l),r=new Set;for(const{authorId:s}of t)e[Hi("0xa")](s)||r.add(s);if(0===r[Hi("0x23")])return;const i=await gi()[Hi("0x9")](s,Array.from(r));for(const t of i)e[Hi("0xa")](t.id)||e.addUser(t)}}function Xi(t){if(Qi(t))return new Promise((()=>{}));throw t}function Qi(t){return t[Hi("0x1d")][Hi("0x1e")](Hi("0x26"))||t.message[Hi("0x1e")](Hi("0x28"))}Zi[Hi("0x7")]=Mi();const to=["pluginName","Comments","editor","data","once","ready","collaboration.channelId","listenTo","_terminateService","get","plugins","config","requires","connected","CommentsEditing","change:state","RealTimeCollaborativeComments"];var eo,so;eo=to,so=419,function(t){for(;--t;)eo.push(eo.shift())}(++so);const ro=function(t,e){return to[t-=0]};class no extends t.Plugin{static get[ro("0x1")](){return[ro("0x7"),Li,Pi,l]}static get[ro("0x6")](){return ro("0x5")}init(){const t=this[ro("0x8")][ro("0x10")][ro("0xf")](l),e=this.editor[ro("0x10")][ro("0xf")](ro("0x3")),s=this.editor.plugins[ro("0xf")](Li);return this.editor[ro("0x9")][ro("0xa")](ro("0xb"),(()=>{this[ro("0xd")](t,"change:state",((t,s,r)=>{e.isThreadsLoadingPaused=ro("0x2")!==r}))})),this[ro("0xd")](t,ro("0x4"),((t,e,s)=>{this.editor[ro("0x10")][ro("0xf")]("CommentsRepository").switchReadOnly(ro("0x2")!==s)})),s._setUpService(this.editor[ro("0x0")][ro("0xf")]("collaboration.channelId"))}destroy(){this[ro("0x8")][ro("0x10")][ro("0xf")](Li)[ro("0xe")](this[ro("0x8")][ro("0x0")][ro("0xf")](ro("0xc"))),super.destroy()}}var io,oo,ao=["requires","TrackChanges"];io=ao,oo=455,function(t){for(;--t;)io.push(io.shift())}(++oo);var co=function(t,e){return ao[t-=0]};class uo extends t.Plugin{static get[co("0x1")](){return[no,Zi,co("0x0")]}static get pluginName(){return"RealTimeCollaborativeTrackChanges"}}var lo=__webpack_require__(8811),ho=__webpack_require__.n(lo),fo=__webpack_require__(8689),po=__webpack_require__.n(fo);const yo=["keys","listenTo","destroy","remove","isEmptyCurrent","_domEmitter","config","connected","_offset","diffData","getRevision","updateRevisions","_lastRequestId","bind","has","stopListening","currentRevision","addRevisionData","message","affectsData","startsWith","off","isBundleUploaded","catch","revisionsUpdated","plugins","once","add","getOperations","cloud-services-internal-error: Not connected.","_fixRevision","data","authorsIds","_revisions","_createCurrentRevision","collaboration.channelId","reInit","buildRevisionData","_startingVersion","creatorId","connect","toVersion","_revisionTracker","get","reverse","requires","_waitForServiceReady","map","then","cloud-services-internal-error: Revision History Service is not connected.","_handleRevisionsUpdate","_bufferedUpdates","change:_isConnected","addToReconnectionStack","cloudServices.bundleVersion","length","state","_isPendingUpdate","createdAt","init","serverHistory","_revisionHistoryService","addUser","RevisionTracker","_getLatestVersionFromServerOperations","baseVersion","code","_getLatestVersion","isEnabled","_preventResendingRevisionData","400","sessionId","_revisionDataBuilder","editor","RevisionHistoryService","max","repository","_fetchMissingUsers","connection","wrongRequestId","_update","fromVersion","_oldOffset","change:_isPendingUpdate","getUser","_bufferUpdate","marker"];var mo,vo;mo=yo,vo=247,function(t){for(;--t;)mo.push(mo.shift())}(++vo);const _o=function(t,e){return yo[t-=0]};class xo extends t.Plugin{static get[_o("0x3b")](){return[l,Ti,_o("0x4d"),m,n.Users]}async[_o("0x49")](){this[_o("0x1a")]=null,this[_o("0x38")]=this[_o("0x0")].plugins[_o("0x39")]("RevisionTracker");const t=this[_o("0x0")].plugins.get(Ti),s=t[_o("0x4a")],r=this[_o("0x0")][_o("0x27")][_o("0x39")](l),n=this.editor[_o("0x14")][_o("0x39")](_o("0x31"));this._revisionHistoryService=new(xo[_o("0x1")])(n),this[_o("0x38")].setSource({history:s,getLatestVersion:()=>this._getLatestVersion(),getCurrentRevisionId:()=>t[_o("0x55")]});const i=this[_o("0x0")][_o("0x14")][_o("0x39")](_o("0x44"))||e.version,o=await po()[_o("0x24")](r[_o("0x5")],i);this[_o("0x38")].adapter={getRevision:async({revisionId:t})=>(await this._waitForServiceReady(),await this[_o("0x4b")].getRevision(t)),updateRevisions:async t=>{await this._waitForServiceReady();const e=this[_o("0x38")][_o("0x1e")];if(!o||1!==t[_o("0x45")]||t[0].id!==e.id){for(const s of t)s.id===e.id&&(s[_o("0x12")]=s.fromVersion===s[_o("0x37")]);return this._revisionHistoryService[_o("0x19")](t,this[_o("0x1a")])[_o("0x3e")]((t=>{this._lastRequestId=t}))[_o("0x25")]((e=>{if(!(go(e)||_o("0x54")===e[_o("0x50")]&&void 0!==e[_o("0x2d")][_o("0x6")]))throw e;for(const e of t)!this[_o("0x38")].repository[_o("0x18")](e.id)||this[_o("0x38")]._bufferUpdate(e.id,e,!1);if(go(e))throw e}))}}},this[_o("0xf")](this[_o("0x4b")],_o("0x26"),((t,{revisionsData:e,requestId:s})=>{Math[_o("0x2")](...e[_o("0x3d")]((t=>t[_o("0x37")])))>this._getLatestVersionFromServerOperations()-1?this._getLatestVersion().then((()=>{this[_o("0x40")](e,s)})):this[_o("0x40")](e,s)}));const{revisions:a,requestId:c}=await this[_o("0x4b")][_o("0x36")](r[_o("0x5")]);r[_o("0x43")](this),this[_o("0x1a")]=c,await this._fetchMissingUsers(a);for(const t of a)this[_o("0x38")][_o("0x1f")](t);this[_o("0xf")](t,"change:_isConnected",((e,s,r)=>{r&&(this._oldOffset=t[_o("0x16")],e[_o("0x23")]())})),this[_o("0x38")][_o("0x1b")](_o("0x52")).to(r,_o("0x46"),(t=>_o("0x15")===t))}async reconnect(){const t=this.editor[_o("0x27")][_o("0x39")](l),e=this.editor[_o("0x27")][_o("0x39")](Ti),s=async()=>{const s=this[_o("0x38")][_o("0x1e")],r=s.id,n=r!==e[_o("0x55")];if(n){const t=e[_o("0x16")]-this[_o("0x9")],n=this[_o("0x4e")]();if(this[_o("0x38")][_o("0x56")][_o("0x32")](),s[_o("0x37")]+t!==n){const e=s[_o("0x8")]+t,r=this.editor[_o("0x27")][_o("0x39")]("Users"),i=this._revisionTracker.buildRevisionData({currentRevision:s,from:e,to:n});i.id=s.id;const o=i[_o("0x2e")].map((t=>r[_o("0xb")](t)));s[_o("0x7")]({...i,authors:o},!0),this[_o("0x38")][_o("0xc")](s.id,i,!0)}this[_o("0x38")][_o("0x34")]=n,s.toVersion===s[_o("0x8")]&&!this[_o("0x38")][_o("0x41")][_o("0x1c")](r)&&this[_o("0x38")][_o("0x3")][_o("0x2f")][_o("0x11")](r),this[_o("0x38")][_o("0x30")](n)}const{revisions:i,requestId:o}=await this[_o("0x4b")].reconnect(t[_o("0x5")],this[_o("0x1a")]);n&&i[_o("0x45")]>0?e._handleReconnectionError():(await this[_o("0x4")](i),this._handleRevisionsUpdate(i,o),this[_o("0x38")].sendBufferedUpdates())};return e._isConnected?s():new Promise(((t,r)=>{e[_o("0x28")](_o("0x42"),(()=>{s()[_o("0x3e")](t)[_o("0x25")](r)}))}))}destroy(){this._domEmitter&&this[_o("0x13")][_o("0x1d")](),super[_o("0x10")]()}async[_o("0x3c")](){this[_o("0x4b")].isConnected||await new Promise((t=>{this[_o("0xf")](this[_o("0x4b")],_o("0x15"),(e=>{e[_o("0x23")](),t()}))}))}[_o("0x4e")](){const t=this[_o("0x0")][_o("0x27")].get(Ti)[_o("0x4a")];for(const e of t[_o("0x2a")]()[_o("0x3a")]())if(_o("0xd")!==e.type||e[_o("0x21")])return e[_o("0x4f")]+1}[_o("0x51")](){const t=this.editor[_o("0x27")][_o("0x39")](Ti);return new Promise((e=>{t[_o("0x47")]?t.once(_o("0xa"),(()=>{e(this._getLatestVersionFromServerOperations())})):e(this._getLatestVersionFromServerOperations())}))}[_o("0x40")](t,e){const s=this[_o("0x38")][_o("0x3")];this[_o("0x1a")]=e;for(const e of t){const t=s[_o("0x18")](e.id);if(t){if((e[_o("0x8")]||e[_o("0x37")])&&(e[_o("0x17")]=null),t===this[_o("0x38")][_o("0x1e")]){const s=Math[_o("0x2")](t.toVersion,e.toVersion),r=Math[_o("0x2")](t[_o("0x8")],e.fromVersion);let n;t.toVersion===e.toVersion&&t[_o("0x8")]===e.fromVersion?(n=!0,this._preventResendingRevisionData(e)):e[_o("0x37")]===s&&e[_o("0x8")]===r?n=!1:(t[_o("0x37")]===s&&t[_o("0x8")]===r||this[_o("0x2c")]({revision:t,from:r,to:s}),n=!0),n&&(delete e[_o("0x8")],delete e.toVersion,delete e[_o("0x17")],delete e[_o("0x48")],delete e[_o("0x2e")])}this[_o("0x38")].setRevisionData(e),this[_o("0x53")](e)}else this._revisionTracker[_o("0x1f")](e)}const r=s.getRevisions();r[_o("0x3a")]();for(let t=0;t<r[_o("0x45")]-1;t++){const e=r[t],s=r[t+1];if(e[_o("0x8")]<s[_o("0x37")]){const t=s.toVersion,r=Math[_o("0x2")](t,e[_o("0x37")]);this[_o("0x2c")]({revision:e,from:t,to:r})}}}_fixRevision({revision:t,from:e,to:s}={}){const r=this[_o("0x0")].plugins[_o("0x39")]("Users"),n=this[_o("0x38")][_o("0x33")]({revision:t,from:e,to:s});n.authors=n[_o("0x2e")][_o("0x3d")]((t=>r[_o("0xb")](t))),t[_o("0x7")](n)}[_o("0x53")](t){const e={};e.id=t.id;for(const s of Object[_o("0xe")](t))"id"!==s&&(e[s]=void 0);this[_o("0x38")][_o("0xc")](e.id,e,!0)}async[_o("0x4")](t){const e=this[_o("0x0")][_o("0x27")][_o("0x39")](n.Users),{connection:s}=this[_o("0x0")][_o("0x27")].get(l),r=new Set;for(const e of t){for(const t of e[_o("0x2e")])o(t);e[_o("0x35")]&&o(e.creatorId)}if(0===r.size)return;const i=await gi().getMany(s,Array.from(r));for(const t of i)e[_o("0xb")](t.id)||e[_o("0x4c")](t);function o(t){e.getUser(t)||r[_o("0x29")](t)}}}function go(t){return t[_o("0x20")][_o("0x22")](_o("0x3f"))||t[_o("0x20")].startsWith(_o("0x2b"))||t[_o("0x20")][_o("0x22")]("cloud-services-internal-error: Request timeout.")}xo[_o("0x1")]=ho();var bo,wo,Oo=["RealTimeCollaborativeRevisionHistory","requires","pluginName"];bo=Oo,wo=145,function(t){for(;--t;)bo.push(bo.shift())}(++wo);var Eo=function(t,e){return Oo[t-=0]};class So extends t.Plugin{static get[Eo("0x0")](){return["RevisionHistory",xo,Pi]}static get[Eo("0x1")](){return Eo("0x2")}}var To=Function.prototype,ko=Object.prototype,Co=To.toString,Ao=ko.hasOwnProperty,Io=Co.call(Object);const Ro=function(t){if(!Ht(t)||"[object Object]"!=st(t))return!1;var e=Ke(t);if(null===e)return!0;var s=Ao.call(e,"constructor")&&e.constructor;return"function"==typeof s&&s instanceof s&&Co.call(s)==Io};const No=function(t){return Ht(t)&&1===t.nodeType&&!Ro(t)},jo=["isHidden","ck-presence-list__counter","div","usersCount","CONNECTED_USERS","bindTemplate","set"];var Po,Do;Po=jo,Do=478,function(t){for(;--t;)Po.push(Po.shift())}(++Do);const Mo=function(t,e){return jo[t-=0]};class Bo extends r.View{constructor(t){super(t);const e=this[Mo("0x3")];this[Mo("0x4")](Mo("0x1"),0),this[Mo("0x4")](Mo("0x5"),!0),this.setTemplate({tag:Mo("0x0"),attributes:{class:["ck",Mo("0x6"),e.if("isHidden","ck-presence-list__counter--hidden")]},children:[{text:e.to(Mo("0x1"),(e=>k(t,Mo("0x2"),e)))}]})}}const Jo=["bindTemplate","fire","ck-presence-list__list","setTemplate","div","items"];var Vo,Uo;Vo=Jo,Uo=304,function(t){for(;--t;)Vo.push(Vo.shift())}(++Uo);const Fo=function(t,e){return Jo[t-=0]};class qo extends r.View{constructor(t){super(t),this[Fo("0x1")]=this.createCollection();const e=this[Fo("0x2")];this[Fo("0x5")]({tag:Fo("0x0"),attributes:{class:["ck",Fo("0x4")]},children:this[Fo("0x1")],on:{click:e.to((()=>this[Fo("0x3")]("execute")))}})}}var Lo=__webpack_require__(3286),Yo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};_()(Lo.Z,Yo);Lo.Z.locals;const zo=["tooltipPosition","counterView","listenTo","first","items","ck-presence-list--collapsed","ck-rounded-corners","ck-presence-list","inlineListView","change","isCollapsed","div"];var Go,$o;Go=zo,$o=180,function(t){for(;--t;)Go.push(Go.shift())}(++$o);const Wo=function(t,e){return zo[t-=0]};class Ko extends r.View{constructor(t){super(t);const e=this.bindTemplate;this.set(Wo("0xa"),!0),this[Wo("0x1")]=new Bo(this.locale),this[Wo("0x8")]=new qo(t),this[Wo("0x2")](this.inlineListView[Wo("0x4")],Wo("0x9"),(()=>{for(const t of this[Wo("0x8")][Wo("0x4")])t[Wo("0x0")]="s";this[Wo("0x8")][Wo("0x4")][Wo("0x3")]&&(this.inlineListView[Wo("0x4")].first[Wo("0x0")]="se")})),this.setTemplate({tag:Wo("0xb"),attributes:{class:["ck",Wo("0x7"),"ck-reset",Wo("0x6"),e.if(Wo("0xa"),Wo("0x5"))]},children:[this.counterView,this.inlineListView]})}}var Ho,Zo,Xo=["items","createCollection","ck-presence-list__dropdown-list","div"];Ho=Xo,Zo=440,function(t){for(;--t;)Ho.push(Ho.shift())}(++Zo);var Qo=function(t,e){return Xo[t-=0]};class ta extends r.View{constructor(t){super(t),this[Qo("0x0")]=this[Qo("0x1")](),this.setTemplate({tag:Qo("0x3"),attributes:{class:["ck",Qo("0x2")]},children:[{tag:Qo("0x3"),attributes:{class:["ck","ck-presence-list__dropdown-list-wrapper"]},children:this[Qo("0x0")]}]})}}const ea=["tag","div","ck-presence-list__dropdown-list-item","ck-presence-list__marker","ck-user__full-name","setTemplate","button","bindTemplate","userView","execute","color"];var sa,ra;sa=ea,ra=280,function(t){for(;--t;)sa.push(sa.shift())}(++ra);const na=function(t,e){return ea[t-=0]};class ia extends r.View{constructor(t,e,s){super(t);const r=this[na("0x2")];this.userView=new n.UserView(t,e);const i={tag:na("0x7"),attributes:{class:["ck",na("0x8")]},children:[this[na("0x3")],{tag:"span",attributes:{class:["ck",na("0xa")]},children:[{text:e.name}]},{tag:"span",attributes:{class:["ck",na("0x9"),e[na("0x5")].getBackgroundColorClass()],"aria-hidden":"true"}}]};s&&(i[na("0x6")]=na("0x1"),i.on={click:r.to((()=>this.fire(na("0x4"))))}),this[na("0x0")](i)}}const oa=["userView","hasTooltip","tooltipPosition","button","markerView","ck-presence-list__list-item__tooltip","span","tag","div","setTemplate","set","ck-presence-list__marker","color","fire","bindTemplate"];var aa,ca;aa=oa,ca=112,function(t){for(;--t;)aa.push(aa.shift())}(++ca);const ua=function(t,e){return oa[t-=0]};class da extends r.View{constructor(t,e,s){super(t);const r=this[ua("0x7")];this[ua("0x3")](ua("0x9"),!0),this[ua("0x3")](ua("0xa"),""),this[ua("0x8")]=new n.UserView(t,e),this[ua("0xc")]=new la(t,e);const i={tag:ua("0x1"),attributes:{class:["ck","ck-presence-list__list-item"],"data-cke-tooltip-text":this[ua("0x8")].name,"data-cke-tooltip-position":r.to(ua("0xa")),"data-cke-tooltip-disabled":r.to(ua("0x9"),(t=>!t)),"data-cke-tooltip-class":ua("0xd")},children:[this.userView,this.markerView]};s&&(i[ua("0x0")]=ua("0xb"),i.on={click:r.to((()=>this[ua("0x6")]("execute")))}),this[ua("0x2")](i)}}class la extends r.View{constructor(t,e){super(t),this[ua("0x2")]({tag:ua("0xe"),attributes:{class:["ck",ua("0x4"),e[ua("0x5")].getBackgroundColorClass()],"aria-hidden":"true"}})}}const ha=["presenceList","counterView","length","hideDropdown","_allConnectedUsers","presenceList.container","plugins","listenTo","_handleUserAdd","presenceDropdownView","add","usersCount","isVisible","items","locale","_handleUserRemove","lastConnectedUsers","config","get","_createView","view","number","appendChild","class","bodyCollection","destroy","init","bindTo","ck ck-presence-list__balloon","render","allConnectedUsers","showDropdown","attachToDom","presenceList.collapseAt","detachFromDom","element","isHidden","context","content","bind","pin","balloonPanelView","requires","from","inlineListView","remove","presencelist-collapseat-invalid-format","execute","onClick","isCollapsed","hasTooltip","reverse","set","presencelist-missing-container","using"];var fa,pa;fa=ha,pa=161,function(t){for(;--t;)fa.push(fa.shift())}(++pa);const ya=function(t,e){return ha[t-=0]};class ma extends t.ContextPlugin{constructor(t){super(t),t[ya("0x15")].define("presenceList",{collapseAt:6});const s=t[ya("0x15")][ya("0x16")]("presenceList.collapseAt");if(ya("0x19")!=typeof s)throw new e.CKEditorError(ya("0x32"),this);if(s<1)throw new e.CKEditorError(ya("0x32"),this)}static get[ya("0x2e")](){return[m]}[ya("0x1e")](){const t=this[ya("0x29")];this[ya("0x8")]=t[ya("0xa")][ya("0x16")](m)[ya("0x22")],this[ya("0x1")](ya("0xf"),0),this[ya("0x14")]=new e.Collection,this[ya("0x2d")]=new r.BalloonPanelView,this.balloonPanelView[ya("0x1b")]=ya("0x20"),this[ya("0x18")]=this[ya("0x17")](),this[ya("0xd")]=void 0;for(const t of this[ya("0x8")])this[ya("0xc")](t);this[ya("0xb")](this[ya("0x8")],"add",((t,e)=>{this[ya("0xc")](e)})),this.listenTo(this[ya("0x8")],ya("0x31"),((t,e)=>{this[ya("0x13")](e)}))}[ya("0x17")](){const t=this.context,s=new Ko(this[ya("0x29")][ya("0x12")]),n=this[ya("0x2d")];if(!No(t[ya("0x15")][ya("0x16")](ya("0x9"))))throw new e.CKEditorError(ya("0x2"),this);return s[ya("0x5")].bind(ya("0xf")).to(this),s[ya("0x2b")](ya("0x35")).to(this,ya("0xf"),(e=>{const r=e>=t.config[ya("0x16")](ya("0x25"));return s[ya("0x5")][ya("0x28")]=!(1==e||r),r||this[ya("0x7")](),r})),s.inlineListView[ya("0x11")][ya("0x1f")](this[ya("0x14")])[ya("0x3")]((e=>{const r=t[ya("0x15")][ya("0x16")](ya("0x4")),n=new da(t[ya("0x12")],e,r[ya("0x34")]);return n[ya("0x2b")](ya("0x36")).to(s,ya("0x35"),(t=>!t)),r.onClick&&this[ya("0xb")](n,"execute",(()=>{this[ya("0x18")].isCollapsed||r[ya("0x34")](e,n[ya("0x27")])})),n})),this[ya("0xb")](s[ya("0x30")],ya("0x33"),(()=>{this[ya("0xd")]?this[ya("0x7")]():this[ya("0x18")][ya("0x35")]&&this[ya("0x23")]()})),s.render(),n[ya("0x21")](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>n[ya("0x10")],contextElements:[n.element,s[ya("0x30")][ya("0x27")]],callback:()=>this[ya("0x7")]()}),t.config[ya("0x16")]("presenceList.container")[ya("0x1a")](s.element),this[ya("0x1c")]=new r.BodyCollection(this.context[ya("0x12")]),this[ya("0x1c")][ya("0x24")](),this[ya("0x1c")][ya("0xe")](n),s}_handleUserAdd(t){this.usersCount++,5==this[ya("0x14")][ya("0x6")]&&this[ya("0x14")][ya("0x31")](0),this[ya("0x14")].add(t)}[ya("0x13")](t){if(this[ya("0xf")]--,this.lastConnectedUsers[ya("0x16")](t.id)&&(this[ya("0x14")][ya("0x31")](t.id),this.lastConnectedUsers[ya("0x6")]<this[ya("0xf")]))for(const t of Array[ya("0x2f")](this._allConnectedUsers)[ya("0x0")]())if(!this[ya("0x14")][ya("0x16")](t.id))return void this[ya("0x14")][ya("0xe")](t,0)}[ya("0x23")](){if(this[ya("0xd")])return;this[ya("0xd")]=new ta;const t=this[ya("0x29")][ya("0x15")][ya("0x16")](ya("0x4"));this[ya("0xd")][ya("0x11")][ya("0x1f")](this[ya("0x8")])[ya("0x3")]((e=>{const s=new ia(this[ya("0x29")][ya("0x12")],e,!!t[ya("0x34")]);return t.onClick&&this[ya("0xb")](s,ya("0x33"),(()=>{t[ya("0x34")](e,s.element)})),s})),this[ya("0x2d")][ya("0x2a")][ya("0xe")](this[ya("0xd")]),this[ya("0x2d")][ya("0x2c")]({target:this.view[ya("0x30")][ya("0x27")]})}[ya("0x7")](){this[ya("0xd")]&&(this.balloonPanelView.unpin(),this[ya("0x2d")][ya("0x2a")][ya("0x31")](this[ya("0xd")]),this[ya("0xd")][ya("0x1d")](),this.presenceDropdownView=void 0)}[ya("0x1d")](){super.destroy(),this[ya("0x18")]&&this.view.isRendered&&this[ya("0x18")][ya("0x1d")](),this[ya("0x1c")]&&this.bodyCollection[ya("0x26")]()}}var va,_a,xa=["pluginName"];va=xa,_a=128,function(t){for(;--t;)va.push(va.shift())}(++_a);class ga extends t.ContextPlugin{static get requires(){return[m,ma]}static get[function(t,e){return xa[t-=0]}("0x0")](){return"PresenceList"}}})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
|
|
4
|
+
*/(()=>{var __webpack_modules__={357:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends Error{constructor(e,t,s=null,r={}){super("cloud-services-internal-error: "+e),this.context=t,this.code=s,this.data=r,this.name="CKEditorError"}static fromPublicError(e){return new s(function(e){let t="cloud-services-error: "+e.message;return e.explanation&&(t+="\nExplanation: "+e.explanation),e.action&&(t+="\nAction: "+e.action),e.traceId&&(t+="\nTraceId: "+e.traceId),e.code&&(t+="\nCode: "+e.code),t}(e),e)}}t.default=s},8801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends Error{constructor(e,t){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=e,this.code=t.code,this.traceId=t.traceId,this.data=t.data}static fromPublicError(e){return new s(function(e){let t="cloud-services-server-error: "+e.message;return e.explanation&&(t+="\nExplanation: "+e.explanation),e.action&&(t+="\nAction: "+e.action),e.traceId&&(t+="\nTraceId: "+e.traceId),e.code&&(t+="\nCode: "+e.code),t}(e),e)}}t.default=s},7622:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const n=s(5003),i=s(2209),o=r(s(3596)),a=r(s(7026)),c=r(s(7839)),u=r(s(5132)),d=r(s(4148)),l=r(s(223)),h=r(s(2968)),f=r(s(7158)),p=r(s(357)),y=r(s(6314)),m=r(s(6148)),v=r(s(961));t._SERVICE=1;class x{constructor(e,t){if(!e)throw new TypeError('Param "bundleVersion" must be provided.');this._id=null!=t?t:(0,n.v4)(),this._isConnected=!1,this._bundleVersion=e}getId(){return this._id}isConnected(){return this._isConnected}connect(e,t={buffers:[],types:[]},s){const r=new c.default(this.getId(),t.buffers,t.types,this._bundleVersion,s);return this._connect(e,r)}reconnect(e,t){if(this.isConnected())throw new p.default("Cannot reconnect to already connected service.",e);return this._connect(e,new d.default(this.getId(),t,this._bundleVersion))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async getDocumentDetails(){const e=new v.default(this.getId());if(!this._wsGateway)throw new y.default("Collaborative Editing",this);const s=await this._wsGateway._sendRequest(t._SERVICE,v.default.TYPE,o.default.encode(e));return o.default.decode(s,m.default)}async sendOperations(e,s,r){if(!e||!e.types||!e.types.length)throw new p.default("Cannot send empty update.",this._wsGateway);const n="number"==typeof s?s:parseInt(s);if(!Number.isInteger(n)||n<0)throw new p.default("Base version not provided.",this._wsGateway);const i=new u.default(this.getId(),e.buffers,e.types,n,[],r);if(!this._wsGateway||!this._isConnected)throw new y.default("Collaborative Editing",this);const a=await this._wsGateway._sendRequest(t._SERVICE,u.default.TYPE,o.default.encode(i));return o.default.decode(a,l.default)}async getConnectedSessions(){if(!this._isConnected)throw new y.default("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await a.default.getConnectedSessions(this._wsGateway,this._id,t._SERVICE)),this._connectedSessions}static getConnectedSessions(e,s){return a.default.getConnectedSessions(e,s,t._SERVICE)}async _connect(e,s){if(this.isConnected())return;if(e.state!==f.default.STATE_CONNECTED)throw new p.default("WebSocket Gateway is not connected.",e);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,s.constructor.TYPE,o.default.encode(s)),n=o.default.decode(r,h.default);return this.listenTo(e,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:f.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,n.channel),this._isConnected=!0,this.fire("connected"),n}_connectToChannel(e,s){this._channel=e._getChannel(t._SERVICE,s),this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((e,t)=>{const s=o.default.decode(t,u.default);this.fire("operationsReceived",s.baseVersion,s.data,s.metadata)}))}_onWsGatewayStateChange(e){e===f.default.STATE_DISCONNECTED&&this.disconnect()}}x._SERVICE=t._SERVICE,(0,i.mix)(x,i.EmitterMixin),t.default=x},8677:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON({createdAt:e,...t}){const s={...t};return e instanceof Date&&(s.createdAt=e.toISOString()),s}static fromJSON({createdAt:e,...t}){const s={...t};return e&&(s.createdAt=new Date(e)),s}}t.default=i,i.DESCRIPTOR_NAME="OperationMetadataDescriptor",i.DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}}},6685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{static prepareMetadataForOperations(e,t){if(!(e&&e.length&&t&&t.length))return[];const s=[];let r=0;for(const n of e)if(0!==n){if(!t[r])throw new Error("Missing metadata for a operation");s.push(t[r]),r++}else s.push(s[s.length-1]);return s}static removeUnnecessaryMetadata(e,t){if(!(e&&e.length&&t&&t.length))return[];const s=[];for(let r=0;r<e.length;r++)if(0!==e[r]){if(!t[r])throw new Error("Missing metadata for a operation");s.push(t[r])}return s}}},7839:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n=""){super(),this.id=e,this.buffers=t,this.types=s,this.bundleVersion=r,this.lastOperationId=n}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(e){return new i(e.id,e.buffers,e.types,e.bundleVersion,e.lastOperationId)}}t.default=i,i.TYPE="11",i.READABLE_TYPE_NAME="connectToDocument",i.DESCRIPTOR_NAME="CollaborativeEditingConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}}},4148:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.id=e,this.lastKnowVersion=t,this.bundleVersion=s}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(e){return new i(e.id,e.lastKnowVersion,e.bundleVersion)}}t.default=i,i.TYPE="12",i.READABLE_TYPE_NAME="reconnectToDocument",i.DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}}},5132:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(e,t,s,r,n=[],i=""){super(),this.id=e,this.buffers=t,this.types=s,this.baseVersion=r,this.metadata=n,this.lastOperationId=i}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(e){return new a(e.id,e.buffers,e.types,e.baseVersion,i.default.prepareMetadataForOperations(e.types,e.metadata).map(o.default.fromJSON),e.lastOperationId)}}t.default=a,a.TYPE="13",a.READABLE_TYPE_NAME="updateDocument",a.DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage",a.DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}}},961:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="14",i.READABLE_TYPE_NAME="getDocumentDetails",i.DESCRIPTOR_NAME="GetDocumentDetailsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}}},2968:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(e,t,s=[],r=[],n=0,i=[],o=null,a="",c="",u=null){super(),this.channel=e,this.version=t,this.buffers=s,this.types=r,this.offset=n,this.metadata=i,this.initData=o,this.sessionId=a,this.lastOperationId=c,this.sessionCreatedAt=u}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt}}get wereChangesApplied(){var e;return!(null===(e=this.types)||void 0===e?void 0:e.length)&&null===this.initData}toJSON(){var e;return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),initData:null!==(e=this.initData)&&void 0!==e?e:"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(e){return new a(e.channel,e.version,e.buffers,e.types,e.offset,e.metadata,e.initData,e.sessionId,e.lastOperationId,e.sessionCreatedAt)}static fromJSON(e){var t;let s=null;return!0===e.isInitialized?s=null!==(t=e.initData)&&void 0!==t?t:"":"boolean"!=typeof e.isInitialized&&e.initData&&(s=e.initData),a.create({channel:e.channel,version:e.version,buffers:e.buffers,types:e.types,offset:e.offset,metadata:i.default.prepareMetadataForOperations(e.types,e.metadata).map(o.default.fromJSON),initData:s,sessionId:e.sessionId,lastOperationId:e.lastOperationId,sessionCreatedAt:e.sessionCreatedAt?new Date(e.sessionCreatedAt):null})}}t.default=a,a.DESCRIPTOR_NAME="CollaborativeEditingConnectResponse",a.DESCRIPTOR={fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:o.default.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}},223:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(e,t=[],s=[],r=[],n="",i=null){super(),this.version=e,this.buffers=t,this.types=s,this.metadata=r,this.lastOperationId=n,this.lastOperationAcceptedAt=i}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){var e;return!(null===(e=this.types)||void 0===e?void 0:e.length)}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(e){return new a(e.version,e.buffers,e.types,i.default.prepareMetadataForOperations(e.types,e.metadata).map(o.default.fromJSON),e.lastOperationId,e.lastOperationAcceptedAt?new Date(e.lastOperationAcceptedAt):null)}static create(e){return new a(e.version,e.buffers,e.types,e.metadata,e.lastOperationId,e.lastOperationAcceptedAt?new Date(e.lastOperationAcceptedAt):null)}}t.default=a,a.DESCRIPTOR_NAME="CollaborativeEditingResponse",a.DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}}},6148:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.lastDocumentSession=e,this.currentDocumentSession=t}get data(){var e,t,s,r,n;return{lastDocumentSessionId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.id,lastDocumentSessionOperationId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.lastOperationId,currentDocumentSessionId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.lastOperationId}}toJSON(){var e,t,s,r,n;return{lastDocumentSessionId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.id,lastDocumentSessionOperationId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.lastOperationId,currentDocumentSessionId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.lastOperationId}}static fromJSON(e){const t=e.lastDocumentSessionId?{id:e.lastDocumentSessionId,lastOperationId:e.lastDocumentSessionOperationId}:void 0,s=e.currentDocumentSessionId?{lastOperationId:e.currentDocumentSessionOperationId,version:e.currentDocumentSessionVersion,id:e.currentDocumentSessionId}:void 0;return new i(t,s)}}t.default=i,i.DESCRIPTOR_NAME="GetDocumentDetailsResponse",i.DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}}},6042:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(5420)),d=o(s(2280)),l=o(s(6376)),h=o(s(7608)),f=o(s(6178)),p=o(s(5711)),y=o(s(7955)),m=o(s(939)),v=o(s(6523)),x=o(s(1926)),g=o(s(7952)),_=i(s(7158)),b=o(s(357)),w=o(s(7026)),O=o(s(6314)),E=o(s(8801));t._SERVICE=9;class S{constructor(e){this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(e){if(this._isConnected)return;if(e.state!==_.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new b.default("WebSocket Gateway is not connected.",e);const s=new l.default(this._documentId);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,l.default.TYPE,c.default.encode(s)),{channel:n,threads:i}=c.default.decode(r,h.default);return this.listenTo(e,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:_.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,n),this._isConnected=!0,this.fire("connected"),i}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async addComment(e,t,s,r){const n=new u.default(this._documentId,e,s,t,void 0,void 0,r),i=await this._sendRequest(u.default.TYPE,n);return c.default.decode(i,d.default)}async updateComment(e,t,s,r){const n=void 0!==r,i=new y.default(this._documentId,e,t,s,r,n);await this._sendRequest(y.default.TYPE,i)}async removeComment(e,t){const s=new f.default(this._documentId,e,t);await this._sendRequest(f.default.TYPE,s)}async removeCommentThread(e){const t=new p.default(this._documentId,e);await this._sendRequest(p.default.TYPE,t)}async getCommentThread(e,t=1){const s=new m.default(e,this._documentId);try{const e=await this._sendRequest(m.default.TYPE,s),{comments:t,commentThreadId:r}=c.default.decode(e,v.default);return{comments:t,commentThreadId:r}}catch(s){if(s instanceof E.default&&"404"===s.code&&t<5)return await(r=100*t,new Promise((e=>{setTimeout(e,r)}))),this.getCommentThread(e,t+1);if(s instanceof E.default)throw s;throw E.default.fromPublicError(s)}var r}async getDocumentThreads(){const e=new x.default(this._documentId),t=await this._sendRequest(x.default.TYPE,e),{threads:s}=c.default.decode(t,g.default);return{threads:s}}async getConnectedSessions(){if(!this._isConnected)throw new O.default("Comments",this);return this._connectedSessions||(this._connectedSessions=await w.default.getConnectedSessions(this._wsGateway,this._documentId,t._SERVICE)),this._connectedSessions}_connectToChannel(e,t){this._channel=e._getChannel(S._SERVICE,t),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((e,t)=>{const s=c.default.decode(t,u.default);this.fire("commentAdded",s)})),this.listenTo(this._channel,this._channel.getEventName(f.default.TYPE),((e,t)=>{const s=c.default.decode(t,f.default);this.fire("commentRemoved",s)})),this.listenTo(this._channel,this._channel.getEventName(y.default.TYPE),((e,t)=>{const s=c.default.decode(t,y.default);this.fire("commentUpdated",s)})),this.listenTo(this._channel,this._channel.getEventName(p.default.TYPE),((e,t)=>{const s=c.default.decode(t,p.default);this.fire("commentThreadRemoved",s)})))}_onWsGatewayStateChange(e){e===_.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,s){if(!this._wsGateway||!this._isConnected)throw new O.default("Comments",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(s))}}S._SERVICE=t._SERVICE,(0,a.mix)(S,a.EmitterMixin),t.default=S},2529:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON(e){var t;return{...e,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString(),attributes:e.attributes?JSON.stringify(e.attributes):null}}static fromJSON(e){return{...e,createdAt:new Date(e.createdAt),attributes:e.attributes?JSON.parse(e.attributes):null}}}t.default=i,i.DESCRIPTOR_NAME="CommentDescriptor",i.DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}}},1578:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945)),i=r(s(2529));class o extends n.default{static toJSON(e){var t;return{...e,comments:null===(t=e.comments)||void 0===t?void 0:t.map(i.default.toJSON)}}static fromJSON(e){var t;return{...e,comments:null===(t=e.comments)||void 0===t?void 0:t.map(i.default.fromJSON)}}}t.default=o,o.DESCRIPTOR_NAME="CommentsThreadDescriptor",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2}}}},5420:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r="",n,i="",o=null){super(),this.documentId=e,this.commentThreadId=t,this.content=s,this.commentId=r,this.userId=i,this.attributes=o,this.createdAt=n?new Date(n):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.content,e.commentId?e.commentId:void 0,e.createdAt?new Date(e.createdAt):void 0,e.userId?e.userId:void 0,e.attributes?JSON.parse(e.attributes):{})}}t.default=i,i.TYPE="91",i.READABLE_TYPE_NAME="addComment",i.DESCRIPTOR_NAME="CommentsV2AddCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7}}}},6376:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="92",i.READABLE_TYPE_NAME="connectToComment",i.DESCRIPTOR_NAME="CommentsV2ConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},939:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.commentThreadId=e,this.documentId=t}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(e){return new i(e.commentThreadId,e.documentId)}}t.default=i,i.TYPE="93",i.READABLE_TYPE_NAME="getComment",i.DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},1926:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="94",i.READABLE_TYPE_NAME="getDocumentThreads",i.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},6178:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.documentId=e,this.commentThreadId=t,this.commentId=s}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.commentId)}}t.default=i,i.TYPE="95",i.READABLE_TYPE_NAME="removeComment",i.DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}}},5711:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.documentId=e,this.commentThreadId=t}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(e){return new i(e.documentId,e.commentThreadId)}}t.default=i,i.TYPE="97",i.READABLE_TYPE_NAME="removeCommentThread",i.DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},7955:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n=null,i=!1){super(),this.documentId=e,this.commentThreadId=t,this.commentId=s,this.content=r,this.attributes=n,this.isAttributesUpdated=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.commentId,e.content,e.attributes?JSON.parse(e.attributes):null,e.isAttributesUpdated)}}t.default=i,i.TYPE="96",i.READABLE_TYPE_NAME="updateComment",i.DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6}}}},2280:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.commentThreadId=e,this.commentId=t,this.createdAt=new Date(s)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(e){return new i(e.commentThreadId,e.commentId,e.createdAt)}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2AddCommentResponse",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}}},7608:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1578));class o extends n.default{constructor(e,t,s){super(),this.channel=e,this._threads=t,this._threadsV2=s,this.threads=(null==s?void 0:s.length)?s:t}toJSON(){var e,t;return{channel:this.channel,threads:null===(e=this._threads)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),threadsV2:null===(t=this._threadsV2)||void 0===t?void 0:t.map(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(e.channel,null===(t=e.threads)||void 0===t?void 0:t.map((e=>JSON.parse(e))),null===(s=e.threadsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2ConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}}},6523:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(2529));class o extends n.default{constructor(e,t,s){super(),this.commentThreadId=e,this._comments=t,this._commentsV2=s,this.comments=(null==s?void 0:s.length)?s:t}toJSON(){var e,t;return{commentThreadId:this.commentThreadId,comments:null===(e=this._comments)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),commentsV2:null===(t=this._commentsV2)||void 0===t?void 0:t.map(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(e.commentThreadId,null===(t=e.comments)||void 0===t?void 0:t.map((e=>function(e){const t=JSON.parse(e);return{...t,createdAt:new Date(t.createdAt)}}(e))),null===(s=e.commentsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3}}}},7952:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1578));class o extends n.default{constructor(e,t){super(),this._threads=e,this._threadsV2=t,this.threads=(null==t?void 0:t.length)?t:e}toJSON(){var e,t;return{threads:null===(e=this._threads)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),threadsV2:null===(t=this._threadsV2)||void 0===t?void 0:t.map(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(null===(t=e.threads)||void 0===t?void 0:t.map((e=>function(e){var t;const s=JSON.parse(e),r={...s};return s.comments&&(r.comments=null===(t=s.comments)||void 0===t?void 0:t.map((e=>({...e,createdAt:new Date(e.createdAt)})))),r}(e))),null===(s=e.threadsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse",o.DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}}},5945:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(...e){}}},6345:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}t.default=i,i.DESCRIPTOR_NAME="KeyValueDescriptor",i.DESCRIPTOR={fields:{key:{type:"string",id:1},value:{type:"string",id:2}}}},8689:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const n=s(2209),i=r(s(3596)),o=s(7158),a=r(s(6052)),c=r(s(4910)),u=r(s(357));t._SERVICE=13;class d{static async isBundleUploaded(e,t){const s=new a.default(t);if(e.state!==o.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new u.default("WebSocket Gateway is not connected.",e);const r=await e._sendRequest(d._SERVICE,a.default.TYPE,i.default.encode(s));return i.default.decode(r,c.default).isUploaded}}d._SERVICE=t._SERVICE,(0,n.mix)(d,n.EmitterMixin),t.default=d},6052:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.bundleVersion=e}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(e){return new i(e.bundleVersion)}}t.default=i,i.TYPE="131",i.READABLE_TYPE_NAME="isEditorBundleUploaded",i.DESCRIPTOR_NAME="IsEditorBundleUploadedMessage",i.DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}}},4910:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.isUploaded=e}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(e){return new i(e.isUploaded)}}t.default=i,i.DESCRIPTOR_NAME="IsEditorBundleUploadedResponse",i.DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}}},6314:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(357));class i extends n.default{constructor(e,t){super(e+" Service is not connected.",t)}}t.default=i},3545:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{constructor(...e){super()}static fromJSON(e){throw new TypeError("Must be implemented in a child class!")}}t.default=i,i.TYPE="1000"},3596:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(s(6154)),c=o(s(6783)),u=o(s(8677)),d=o(s(6345)),l=o(s(7618)),h=o(s(2529)),f=o(s(1578)),p=o(s(1706)),y=o(s(9883)),m=[d.default,c.default,u.default,l.default,h.default,f.default,p.default,y.default],v=a.Root.fromJSON({nested:m.reduce(((e,t)=>(e[t.DESCRIPTOR_NAME]=t.DESCRIPTOR,e)),{})});function x(e){return t=e,v.lookup(t.DESCRIPTOR_NAME)||v.addJSON({[t.DESCRIPTOR_NAME]:t.DESCRIPTOR}),v.lookupType(e.DESCRIPTOR_NAME);var t}t.default=class{static decode(e,t){const s=x(t).decode("undefined"==typeof window?e:new Uint8Array(e));return t.fromJSON({...s})}static encode(e){const t=x(e.constructor),s=e.toJSON(),r=t.verify(s);if(r)throw Error(r);return t.encode(t.create(s)).finish()}}},9883:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static create(e){return{revisionId:e.id,name:e.name,creatorId:e.creatorId,createdAt:e.createdAt,fromVersion:e.fromVersion,toVersion:e.toVersion,isEmptyCurrent:e.isEmptyCurrent,diffData:e.diffData?JSON.stringify(e.diffData):void 0,attributes:e.attributes,authorsIds:e.authorsIds}}static toJSON(e){var t;return{revisionId:e.revisionId,name:e.name,creatorId:e.creatorId,authorsIds:e.authorsIds?JSON.stringify(e.authorsIds):void 0,diffData:e.diffData,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString(),attributes:e.attributes?JSON.stringify(e.attributes):void 0,toVersion:e.toVersion,fromVersion:e.fromVersion,isEmptyCurrent:e.isEmptyCurrent}}static fromJSON(e){return{revisionId:(e={...e}).revisionId,name:e.name,creatorId:e.creatorId,authorsIds:e.authorsIds?JSON.parse(e.authorsIds):void 0,diffData:e.diffData,createdAt:e.createdAt?new Date(e.createdAt):void 0,attributes:e.attributes?JSON.parse(e.attributes):void 0,toVersion:e.toVersion,fromVersion:e.fromVersion,isEmptyCurrent:e.isEmptyCurrent}}static toObject(e){return function(e){for(const[t,s]of Object.entries(e))void 0===s&&delete e[t];return e}({id:e.revisionId,name:e.name,creatorId:e.creatorId,createdAt:e.createdAt,fromVersion:e.fromVersion,toVersion:e.toVersion,isEmptyCurrent:e.isEmptyCurrent,diffData:e.diffData?JSON.parse(e.diffData):void 0,attributes:e.attributes,authorsIds:e.authorsIds})}}t.default=i,i.DESCRIPTOR_NAME="RevisionDescriptor",i.DESCRIPTOR={fields:{revisionId:{type:"string",id:1},name:{type:"string",id:2},creatorId:{type:"string",id:3},authorsIds:{type:"string",id:4},diffData:{type:"string",id:5},createdAt:{type:"string",id:6},attributes:{type:"string",id:7},toVersion:{type:"uint32",id:8},fromVersion:{type:"uint32",id:9},isEmptyCurrent:{type:"bool",id:10}}}},801:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="121",i.READABLE_TYPE_NAME="connectToRevisionHistory",i.DESCRIPTOR_NAME="RevisionHistoryConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},3667:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.documentId=e,this.revisionId=t}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(e){return new i(e.documentId,e.revisionId)}}t.default=i,i.TYPE="123",i.READABLE_TYPE_NAME="getRevision",i.DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}}},8702:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.documentId=e,this.requestId=t}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(e){return new i(e.documentId,e.requestId)}}t.default=i,i.TYPE="122",i.READABLE_TYPE_NAME="reconnectToRevisionHistory",i.DESCRIPTOR_NAME="RevisionHistoryReconnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}}},6120:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(e,t,s){super(),this.documentId=e,this.requestId=t,this.revisions=s}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(i.default.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(i.default.toObject)}}static create(e){return new o(e.documentId,e.requestId,e.revisions.map(i.default.create))}static fromJSON(e){return new o(e.documentId,e.requestId,e.revisions.map(i.default.fromJSON))}}t.default=o,o.TYPE="124",o.READABLE_TYPE_NAME="updateRevisions",o.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},5218:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(e,t,s){super(),this.channel=e,this.requestId=t,this.revisions=s}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(i.default.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(i.default.toObject)}}static fromJSON(e){return new o(e.channel,e.requestId,e.revisions.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="RevisionHistoryConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},6311:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(e,t,s,r,n,i,o,a,c,u){super(),this.revisionId=e,this.name=t,this.creatorId=s,this.authorsIds=r,this.createdAt=n,this.diffData=i,this.attributes=o,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return i.default.toJSON(this)}toObject(){return i.default.toObject(this)}static create(e){return new o(e.revisionId,e.name,e.creatorId,e.authorsIds,e.createdAt,e.diffData,e.attributes,e.fromVersion,e.toVersion,e.isEmptyCurrent)}static fromJSON(e){return new o(e.revisionId,e.name,e.creatorId,e.authorsIds?JSON.parse(e.authorsIds):void 0,e.createdAt?new Date(e.createdAt):void 0,e.diffData,e.attributes?JSON.parse(e.attributes):void 0,e.fromVersion,e.toVersion,e.isEmptyCurrent)}}t.default=o,o.DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse",o.DESCRIPTOR=i.default.DESCRIPTOR},1655:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.requestId=e}toJSON(){return{requestId:this.requestId}}static fromJSON(e){return new i(e.requestId)}}t.default=i,i.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse",i.DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}}},8811:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(3667)),d=o(s(6311)),l=o(s(6120)),h=o(s(1655)),f=o(s(801)),p=o(s(5218)),y=o(s(8702)),m=o(s(357)),v=i(s(7158)),x=o(s(6314));t._SERVICE=12;class g{constructor(e){this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}connect(e){return this._isConnected?Promise.resolve():this._connect(e,new f.default(this._documentId))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}reconnect(e,t){if(this.isConnected)throw new m.default("Cannot reconnect to already connected service.",e);return this._connect(e,new y.default(this._documentId,t))}async updateRevisions(e,t){const s=l.default.create({documentId:this._documentId,requestId:t,revisions:e}),r=await this._sendRequest(l.default.TYPE,s),{requestId:n}=c.default.decode(r,h.default);return n}async getRevision(e){const t=new u.default(this._documentId,e),s=await this._sendRequest(u.default.TYPE,t);return c.default.decode(s,d.default).toObject()}async _connect(e,s){if(e.state!==v.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new m.default("WebSocket Gateway is not connected.",e);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,s.constructor.TYPE,c.default.encode(s)),{channel:n,requestId:i,revisions:o}=c.default.decode(r,p.default).toObject();return this.listenTo(e,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:v.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,n),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:i}}_connectToChannel(e,t){this._channel=e._getChannel(g._SERVICE,t),this._channel&&this.listenTo(this._channel,this._channel.getEventName(l.default.TYPE),((e,t)=>{const{documentId:s,requestId:r,revisions:n}=c.default.decode(t,l.default).toObject();this.fire("revisionsUpdated",{documentId:s,requestId:r,revisionsData:n})}))}_onWsGatewayStateChange(e){e===v.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,s){if(!this._wsGateway||!this._isConnected)throw new x.default("Revision History",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(s))}}g._SERVICE=t._SERVICE,(0,a.mix)(g,a.EmitterMixin),t.default=g},6783:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}t.default=i,i.DESCRIPTOR_NAME="SessionsSocketDescriptor",i.DESCRIPTOR={fields:{session:{type:"string",id:1},user:{type:"string",id:2},role:{id:3,type:"string"},permissions:{rule:"repeated",type:"string",id:4}}}},2366:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.id=e,this.sessionType=t}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(e){return new i(e.id,e.sessionType)}}t.default=i,i.TYPE="31",i.READABLE_TYPE_NAME="getConnectedSockets",i.DESCRIPTOR_NAME="SessionsConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}}},2414:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r){super(),this.id=e,this.userId=t,this.role=s,this.permissions=r}toJSON(){var e,t,s;return{id:this.id,userId:null!==(e=this.userId)&&void 0!==e?e:void 0,role:null!==(t=this.role)&&void 0!==t?t:void 0,permissions:null!==(s=this.permissions)&&void 0!==s?s:void 0}}static fromJSON(e){return new i(e.id,e.userId,e.role,e.permissions)}}t.default=i,i.TYPE="32",i.READABLE_TYPE_NAME="connectSocket",i.DESCRIPTOR_NAME="SocketConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}}},4194:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.id=e}toJSON(){return{id:this.id}}static fromJSON(e){return new i(e.id)}}t.default=i,i.TYPE="33",i.READABLE_TYPE_NAME="disconnectSocket",i.DESCRIPTOR_NAME="SocketDisconnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},6145:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t=[]){super(),this.channel=e,this.sockets=t}toJSON(){return{channel:this.channel,sockets:this.sockets.map((e=>({user:e.userId,session:e.id,role:e.role,permissions:e.permissions})))}}static fromJSON(e){return new i(e.channel,e.sockets.map((e=>({id:e.session,userId:e.user,role:e.role,permissions:e.permissions}))))}}t.default=i,i.DESCRIPTOR_NAME="SessionsConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}}},2690:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=s(2209),i=s(7026),o=r(s(7530)),a=r(s(7158)),c=r(s(6145)),u=r(s(2366)),d=r(s(2414)),l=r(s(4194)),h=r(s(3596));class f extends n.Collection{constructor(e,t){super({idProperty:"id"}),this._id=e,this._sessionType=t,this._handlers=new Map,this._eventsQueue=[],this._isRunning=!1}async connect(e){this._wsGateway=e,this.stopListening(e,"change:state");const t=new u.default(this._id,this._sessionType);let s;try{const e=await this._wsGateway._sendRequest(i._SERVICE,u.default.TYPE,h.default.encode(t));s=h.default.decode(e,c.default)}catch(e){s=new c.default(this._id,[])}this._connectToChannel(this._wsGateway,s.channel,this._sessionType);const r=await async function(e,t){const s=t.map((e=>e.userId)),r=s.length?await o.default.getMany(e,s):[];return t.map((e=>{const t={id:e.id,role:e.role,permissions:e.permissions};return t.user=e.userId&&r.find((t=>t.id===e.userId))||new o.default,t}))}(this._wsGateway,s.sockets);for(const e of r)super.add(e);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:a.default._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(e=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&e&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),e&&this.stopListening()}}add(e,t){throw new TypeError("The collection is read-only.")}remove(e){throw new TypeError("The collection is read-only.")}_connectToChannel(e,t,s){this._channel=e._getChannel(s,t),this._channel&&(this._addHandler(this._channel,d.default.TYPE,(async t=>{const s=h.default.decode(t,d.default);if(-1===this.getIndex(s.id)){const t={id:s.id,role:s.role,permissions:s.permissions};s.userId&&(t.user=await o.default.get(e,s.userId)),super.add(t)}})),this._addHandler(this._channel,l.default.TYPE,(e=>{const t=h.default.decode(e,l.default);-1!==this.getIndex(t.id)&&super.remove(t.id)})))}async _onWsGatewayStateChange(e){e===a.default.STATE_DISCONNECTED&&this.disconnect(!1),e===a.default.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let e;for(this._isRunning=!0;e=this._eventsQueue.shift();){const t=this._handlers.get(e.eventName);t&&await t(e.data)}this._isRunning=!1}_addHandler(e,t,s){const r=e.getEventName(t,!0);this.listenTo(e,r,(async(e,t)=>{const s=e.name;this._eventsQueue.push({eventName:s,data:t}),await this._runQueue()})),this._handlers.set(r,s)}}t.default=f},7026:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const n=r(s(2690));t._SERVICE=3,t.default=class{static async getConnectedSessions(e,t,s){const r=new n.default(t,s);return await r.connect(e),r}}},1706:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON(e){var t;return{...e,data:e.data?JSON.stringify(e.data):e.data,attributes:e.attributes?JSON.stringify(e.attributes):e.attributes,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString()}}static fromJSON(e){return{...e,data:e.data?JSON.parse(e.data):e.data,attributes:e.attributes?JSON.parse(e.attributes):e.attributes,createdAt:e.createdAt?new Date(e.createdAt):void 0}}}t.default=i,i.DESCRIPTOR_NAME="SuggestionDescriptor",i.DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}}},597:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r={},n=null,i=null){super(),this.id=e,this.documentId=t,this.type=s,this.data=r,this.originalSuggestionId=n,this.attributes=i}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){var t;return new i(e.id,e.documentId,e.type,JSON.parse(e.data),null!==(t=e.originalSuggestionId)&&void 0!==t?t:null,e.attributes?JSON.parse(e.attributes):null)}}t.default=i,i.TYPE="101",i.READABLE_TYPE_NAME="addSuggestion",i.DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}}},3268:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.ids=e,this.documentId=t,this.state=s}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(e){return new i(e.ids,e.documentId,e.state)}}t.default=i,i.TYPE="106",i.READABLE_TYPE_NAME="batchUpdateSuggestionsState",i.DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage",i.DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}}},144:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="105",i.READABLE_TYPE_NAME="connectToSuggestions",i.DESCRIPTOR_NAME="TrackChangesConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},2679:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="102",i.READABLE_TYPE_NAME="getAllSuggestions",i.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},1659:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.id=e,this.documentId=t}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(e){return new i(e.id,e.documentId)}}t.default=i,i.TYPE="103",i.READABLE_TYPE_NAME="getSuggestion",i.DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}}},598:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n,i=null){super(),this.id=e,this.documentId=t,this.hasComments=s,this.isHasCommentsModified=r,this.state=n,this.attributes=i}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new i(e.id,e.documentId,e.hasComments,e.isHasCommentsModified,e.state,e.attributes?JSON.parse(e.attributes):null)}}t.default=i,i.TYPE="104",i.READABLE_TYPE_NAME="updateSuggestion",i.DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},hasComments:{type:"bool",id:3},isHasCommentsModified:{type:"bool",id:4},state:{type:"string",id:5},attributes:{type:"string",id:6}}}},3111:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n,i,o={},a=null){super(),this.id=e,this.authorId=t,this.type=s,this.hasComments=n,this.state=i,this.data=o,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){var e;return{id:this.id,authorId:this.authorId,type:this.type,createdAt:null===(e=this.createdAt)||void 0===e?void 0:e.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new i(e.id,e.authorId,e.type,e.createdAt,e.hasComments,e.state,JSON.parse(e.data),e.attributes?JSON.parse(e.attributes):null)}}t.default=i,i.DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse",i.DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}}},701:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1706));class o extends n.default{constructor(e,t,s){super(),this.channel=e,this._suggestions=t,this._suggestionsV2=s,this.suggestions=(null==s?void 0:s.length)?s:t}toJSON(){var e,t;return{channel:this.channel,suggestions:null===(e=this._suggestions)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),suggestionsV2:null===(t=this._suggestionsV2)||void 0===t?void 0:t.map(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(e.channel,null===(t=e.suggestions)||void 0===t?void 0:t.map((e=>JSON.parse(e))),null===(s=e.suggestionsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="TrackChangesConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}}},3390:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1706));class o extends n.default{constructor(e,t){super(),this._suggestions=e,this._suggestionsV2=t,this.suggestions=(null==t?void 0:t.length)?t:e}toJSON(){var e,t;return{suggestions:null===(e=this._suggestions)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),suggestionsV2:null===(t=this._suggestionsV2)||void 0===t?void 0:t.map(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(null===(t=e.suggestions)||void 0===t?void 0:t.map(a),null===(s=e.suggestionsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}function a(e){const t=JSON.parse(e);return t.createdAt=t.createdAt?new Date(t.createdAt):void 0,t}t.default=o,o.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse",o.DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}}},5930:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n,i,o={},a=null){super(),this.id=e,this.authorId=t,this.type=s,this.hasComments=n,this.state=i,this.data=o,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new i(e.id,e.authorId,e.type,e.createdAt,e.hasComments,e.state,JSON.parse(e.data),e.attributes?JSON.parse(e.attributes):null)}}t.default=i,i.DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse",i.DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}}},125:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(597)),d=o(s(3111)),l=o(s(1659)),h=o(s(5930)),f=o(s(2679)),p=o(s(3390)),y=o(s(598)),m=o(s(144)),v=o(s(701)),x=o(s(357)),g=i(s(7158)),_=o(s(6314)),b=o(s(8801)),w=o(s(3268));t._SERVICE=10;class O{constructor(e){this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(e){if(this._isConnected)return;if(e.state!==g.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new x.default("WebSocket Gateway is not connected.",e);const s=new m.default(this._documentId);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,m.default.TYPE,c.default.encode(s)),n=c.default.decode(r,v.default);return this.listenTo(e,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:g.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,n.channel),this._isConnected=!0,this.fire("connected"),n.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(e,t,s,r=null,n){const i=new u.default(e,this._documentId,t,s,r,n),o=await this._sendRequest(u.default.TYPE,i);return c.default.decode(o,d.default)}async get(e,t=1){const s=new l.default(e,this._documentId);try{const e=await this._sendRequest(l.default.TYPE,s);return c.default.decode(e,h.default)}catch(s){if(s instanceof b.default&&"404"===s.code&&t<5)return await(r=100*t,new Promise((e=>{setTimeout(e,r)}))),this.get(e,t+1);if(s instanceof b.default)throw s;throw b.default.fromPublicError(s)}var r}async getAll(){const e=new f.default(this._documentId),t=await this._sendRequest(f.default.TYPE,e),{suggestions:s}=c.default.decode(t,p.default);return s}async update(e,t={}){const{hasComments:s,state:r,attributes:n}=t,i=void 0!==s,o=new y.default(e,this._documentId,s,i,r,n);await this._sendRequest(y.default.TYPE,o)}async batchUpdateState(e){const t=new w.default(e.ids,this._documentId,e.state);await this._sendRequest(w.default.TYPE,t)}_connectToChannel(e,t){this._channel=e._getChannel(O._SERVICE,t),this._channel&&this.listenTo(this._channel,this._channel.getEventName(y.default.TYPE),((e,t)=>{const s=c.default.decode(t,y.default);this.fire("suggestionUpdated",s)}))}_onWsGatewayStateChange(e){e===g.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,s){if(!this._wsGateway||!this._isConnected)throw new _.default("Track Changes",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(s))}}O._SERVICE=t._SERVICE,(0,a.mix)(O,a.EmitterMixin),t.default=O},7618:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}t.default=i,i.DESCRIPTOR_NAME="UserDescriptor",i.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7204:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.ids=e}toJSON(){return{ids:this.ids}}static fromJSON(e){return new i(e.ids)}}t.default=i,i.TYPE="22",i.READABLE_TYPE_NAME="getManyUsers",i.DESCRIPTOR_NAME="GetManyUsersMessage",i.DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}}},1779:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.id=e}toJSON(){return{id:this.id}}static fromJSON(e){return new i(e.id)}}t.default=i,i.TYPE="21",i.READABLE_TYPE_NAME="getUser",i.DESCRIPTOR_NAME="GetUserMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},624:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.users=e}toJSON(){return{users:this.users.map(o)}}static fromJSON(e){return new i(e.users.map(a))}}function o(e){return{attributes:Object.keys(e).map((t=>({key:t,value:JSON.stringify(e[t])})))}}function a(e){return e.attributes.reduce(((e,t)=>(e[t.key]=t.value?JSON.parse(t.value):null,e)),{})}t.default=i,i.DESCRIPTOR_NAME="GetManyUsersResponse",i.DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}}},2184:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.attributes=e}toJSON(){return{attributes:Object.keys(this.attributes).map((e=>({key:e,value:JSON.stringify(this.attributes[e])})))}}static fromJSON(e){const t=e.attributes.reduce(((e,t)=>(e[t.key]=t.value?JSON.parse(t.value):null,e)),{});return new i(t)}}t.default=i,i.DESCRIPTOR_NAME="GetUserResponse",i.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7530:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(1779)),i=r(s(2184)),o=r(s(3596)),a=r(s(7204)),c=r(s(624));class u{constructor(e={}){this._attributes=new Map;for(const t of Object.keys(e))"id"!==t?(this._attributes.set(t,e[t]),Object.defineProperty(this,t,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(t)})):this.id=e.id}static fromData(e){return new u(e)}static async get(e,t){const s=new n.default(t);try{const t=await e._sendRequest(u._SERVICE,n.default.TYPE,o.default.encode(s)),r=o.default.decode(t,i.default);return new u(r.attributes)}catch(e){return new u({id:t})}}static async getMany(e,t){const s=new a.default(t);try{const t=await e._sendRequest(u._SERVICE,a.default.TYPE,o.default.encode(s));return o.default.decode(t,c.default).users.map((e=>new u(e)))}catch(e){return t.map((e=>new u({id:e})))}}}u._SERVICE=2,t.default=u},6754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="39.0.0"},1573:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=s(2209),i=r(s(3554)),o=r(s(3596));class a{constructor(e,t,s){this._channelName=e,this._wsGateway=t,this._socket=s,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(e,t=!1){let s="";return t&&(s+="all:"),s+="event",e&&(s+=":"+e),s}_subscribeToChannel(){this._socket.on(this._channelName,(e=>{const t=o.default.decode(e,i.default);this.fire(this.getEventName(t.type,!0),t.data,t.socketId),t.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(t.type),t.data,t.socketId)}))}}(0,n.mix)(a,n.EmitterMixin),t.default=a},3554:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.type=e,this.socketId=t,this.data=s}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(e){return new i(e.type,e.socketId,e.data)}}t.default=i,i.DESCRIPTOR_NAME="ChannelMessage",i.DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}}},8735:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(4990)),i=r(s(3596));t.default=class{encode(e,t,s,r="/",o={}){if(t.length>2)throw new Error("PacketParser supports only 2 elements in data");const a={type:e,data:t,id:s,nsp:r};return i.default.encode(n.default.create(a,o))}decode(e){const t=i.default.decode(e,n.default);return{packet:{id:t.id,type:t.type,data:t.packetData,nsp:t.nsp},options:{flags:t.options.flags,rooms:t.options.rooms,except:t.options.except}}}}},2854:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.BUFFER,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="BytesBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}}},4253:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="NumberBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}}},1433:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.NUMBER),u.DESCRIPTOR_NAME="NumberNumberPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}}},2272:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data,e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="NumberObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}}},1692:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.STRING),u.DESCRIPTOR_NAME="NumberStringPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}}},7239:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(e){return new u(e.data&&JSON.parse(e.data),e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.OBJECT,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="ObjectBufferPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}}},9075:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data&&JSON.parse(e.data),e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.OBJECT,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="ObjectObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},799:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{static create(e,t){throw new TypeError("Must be implemented in a child class!")}}t.default=i,e.exports=i},4990:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3596)),i=r(s(3545)),o=r(s(338)),a=r(s(817)),c=r(s(4253)),u=r(s(6335)),d=r(s(2854)),l=r(s(9769)),h=r(s(2272)),f=r(s(9075)),p=r(s(7239)),y=r(s(1797)),m=r(s(1694)),v=r(s(1433)),x=r(s(1692)),g=[c.default,u.default,d.default,l.default,h.default,f.default,p.default,y.default,m.default,v.default,x.default].reduce(((e,t)=>(e[t.TYPE]=t,e)),{});class _ extends i.default{constructor(e,t,s,r="/",n=new o.default){super(),this.type=e,this.data=t,this.id=s,this.nsp=r,this.options=n}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const e=n.default.encode(this.options),t=n.default.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:t,options:e}}static fromJSON(e){const t=Math.floor(e.type/10);return new _(e.type-10*t,n.default.decode(e.data,g[t]),e.id,e.nsp,e.options?n.default.decode(e.options,o.default):new o.default)}static create(e,t={}){var s;const r=a.default.getPacketType(a.default.getType(e.data[0]),a.default.getType(null!==(s=e.data[1])&&void 0!==s?s:e.data[0]));return new _(e.type,g[r].create(e.data[0],e.data[1]),e.id,e.nsp,new o.default(t.flags,t.rooms,t.except))}}t.default=_,_.TYPE=10,_.DESCRIPTOR_NAME="PacketMessage",_.DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}}},338:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t=[],s=[]){super(),this.flags=e,this.rooms=t,this.except=s}toJSON(){var e,t;return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:(null===(e=this.rooms)||void 0===e?void 0:e.length)?this.rooms:void 0,except:(null===(t=this.except)||void 0===t?void 0:t.length)?this.except:void 0}}static fromJSON(e){return new i(e.flags&&JSON.parse(e.flags),e.rooms,e.except)}}t.default=i,i.TYPE=11,i.DESCRIPTOR_NAME="PacketOptionsMessage",i.DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}}},6335:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="StringBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}}},1694:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.NUMBER),u.DESCRIPTOR_NAME="StringNumberPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}}},9769:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data,e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="StringObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},1797:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.STRING),u.DESCRIPTOR_NAME="StringStringPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},2069:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.ENCODED_TYPES=void 0;const n=s(170),i=r(s(8735)),o=r(s(817));t.ENCODED_TYPES=[n.PacketType.EVENT,n.PacketType.ACK,n.PacketType.BINARY_ACK,n.PacketType.BINARY_EVENT];class a extends n.Encoder{constructor(e=new i.default){super(),this._packetParser=e}encode(e){if(t.ENCODED_TYPES.includes(e.type))try{return[this._packetParser.encode(e.type,e.data,e.id,e.nsp)]}catch(e){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:e.message}})}return super.encode(e)}}t.Encoder=a;class c extends n.Decoder{constructor(e=new i.default){super(),this._packetParser=e}add(e){if(!o.default.isBuffer(e))return super.add(e);let t;try{t=this._packetParser.decode(e).packet}catch(t){return super.add(e)}super.emitReserved("decoded",t)}}t.Decoder=c},817:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataTypes=void 0;const s=!("undefined"==typeof process||!process.versions||!process.versions.node);var r,n;(n=r=t.MessageDataTypes||(t.MessageDataTypes={}))[n.BUFFER=1]="BUFFER",n[n.STRING=2]="STRING",n[n.NUMBER=3]="NUMBER",n[n.OBJECT=4]="OBJECT";class i{static getPacketType(...e){let t=0;for(let s=0;s<e.length;s++)t+=e[s]*Math.pow(10,e.length-s-1);return t}static getType(e){if(i.isBuffer(e))return r.BUFFER;const t=typeof e;return"string"===t?r.STRING:"number"===t?r.NUMBER:r.OBJECT}static isBuffer(e){return s&&Buffer.isBuffer(e)||e instanceof ArrayBuffer||e instanceof Uint8Array||this._isBufferView(e)}static _isBufferView(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}t.default=i},1113:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(357));class i{constructor(e,t){this._context=e,this._deferredPromise=function(){let e,t;const s=new Promise(((s,r)=>{e=s,t=r}));return{resolve:e,reject:t,promise:s}}(),this.timeout=setTimeout((()=>this.error(new n.default("Request timeout.",this._context))),t)}get promise(){return this._deferredPromise.promise}response(e){this._deferredPromise.resolve(e)}error(e){this._deferredPromise.reject(e)}}t.default=class{constructor(e){this._context=e,this._requests=new Set}async send(e,t=1e4){const s=this._createRequest(t);try{return e(s),await s.promise}finally{this._finishRequest(s)}}errorAll(e){for(const t of this._requests)t.error(e)}_createRequest(e){const t=new i(this._context,e);return this._requests.add(t),t}_finishRequest(e){this._requests.delete(e),clearTimeout(e.timeout)}}},7158:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WEB_SOCKET_GATEWAY_STATES=void 0;const n=s(8623),i=r(s(9655)),o=s(2209),a=r(s(1573)),c=r(s(7530)),u=r(s(6754)),d=r(s(357)),l=r(s(8801)),h=s(2069),f=r(s(1113));var p,y;(y=p=t.WEB_SOCKET_GATEWAY_STATES||(t.WEB_SOCKET_GATEWAY_STATES={})).DISCONNECTED="disconnected",y.CONNECTING="connecting",y.CONNECTED="connected";class m{constructor(e,t,s={},r=n.io,o=c.default.get){if(this._token=t,this._options=s,this._connectionProvider=r,this._userFactory=o,this._requestsManager=new f.default(this),this._channels=new Map,this._connectionAttempt=0,!e)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=(0,i.default)(e.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state","disconnected"),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",(async(e,t,s)=>{var r;if(this._debugEvent("ws-gw:change:state",s),s!==m.STATE_CONNECTED){if(s===m.STATE_DISCONNECTED)return this._requestsManager.errorAll(new d.default("Not connected.",this))}else try{this.me=await this._userFactory.call(c.default,this,null===(r=this._socketAuth)||void 0===r?void 0:r.userId)}catch(e){}}),{priority:m._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",((e,t)=>{this._options.onError?this._options.onError(t):console.error(t)}))}get sessionId(){return this.socketId}disconnect(){var e;this.state!==p.DISCONNECTED&&(null===(e=this._socket)||void 0===e||e.disconnect(),this._socket=void 0,this.state=p.DISCONNECTED)}async reconnect(){this._socket||this.state!==p.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(e,t="local.cs.dev:443/ws-v2",s={},r=n.io,i=c.default.get){const o=new m(t,e,s,r,i);return await o._connect(),o}_sendRequest(e,t,s){if(!e)throw new d.default("`serviceName` must be provided.",this);if(this.state!==m.STATE_CONNECTED)throw new d.default("Not connected.",this);if(!this._socketAuth||!this._socketAuth.isAuthenticated)throw new d.default("Not authenticated.",this);const r=new ArrayBuffer(s.length+2),n=new Uint8Array(r);return n[0]=e,n[1]=parseInt(t),n.set(s,2),this._emit(1,n)}_getChannel(e,t){const s=""+e+t;return!this._channels.has(s)&&this._socket&&this._channels.set(s,new a.default(s,this,this._socket)),this._channels.get(s)}_connect(){return new Promise(((e,t)=>{const s=this._setupSocket();!this.socketId&&s.io.on("reconnect_error",(()=>{this._debugEvent("reconnect_error"),this._reconnectionAttemptError(t)})),s.once("connect",(async()=>{this._debugEvent("once-connect");try{await this._onConnect(),e()}catch(e){t(e)}})),s.connect()}))}_getPortByProtocol(e){return["http:","ws:"].includes(e)?80:443}_setupSocket(){var e;if(this._socket)return this._socket;const t=this._url.port||this._getPortByProtocol(this._url.protocol),s=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+t,r=this._connectionProvider(s,{parser:{Encoder:h.Encoder,Decoder:h.Decoder},path:"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:u.default},agent:null!==(e=this._options.agent)&&void 0!==e&&e,closeOnBeforeunload:!1});return this.state=p.CONNECTING,r.on("connect",(()=>{this._debugEvent("connect"),this.socketId=r.id})),r.on("connect_error",(e=>{this._debugEvent("connect_error"),this._onError(e)})),r.on("disconnect",(()=>{this._debugEvent("disconnect"),this._onDisconnect()})),r.io.on("reconnect",(async()=>{this._debugEvent("reconnect"),await this._onReconnect()})),r.io.on("reconnect_attempt",(e=>{this._debugEvent("reconnect_attempt",e),this.state=p.CONNECTING,this._connectionAttempt=e})),r.on("unauthorized",(e=>{this._debugEvent("unauthorized"),this._onUnauthorized(e)})),r.on("authenticationRequest",(async e=>{this._debugEvent("authenticationRequest",e.attempt),await this._onReconnect()})),this._socket=r,r}_emit(e,t){const s=this._socket;return this._requestsManager.send((r=>{s.emit(e,t,((e,t)=>{if(e)return r.error(l.default.fromPublicError(e));r.response(t)}))}),this._options.requestTimeout)}_addAuthData(e,t){this._socketAuth={environmentId:e,userId:t,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=p.CONNECTED;const e=async(e,t,s)=>{this._debugEvent("token:value:change");try{await this._authenticate(s)}catch(e){}};this._token.on("change:value",e),this._socket.io.off("reconnect_error"),this.on("disconnect",(()=>{this._token.off("change:value",e)}))}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=p.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const e of this._channels.values())e.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_onError(e){console.warn("Connection to WebSocket server failed. Details: ",{originalError:e})}_debugEvent(e,t){if(!this._isDebugModeEnabled())return;const s=void 0!==t?", data: "+t:"";console.info((new Date).toLocaleString()+" "+e+s)}_reconnectionAttemptError(e){this._connectionAttempt>=2&&(this.disconnect(),e(d.default.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a missing or blocked Internet connection.",action:"Please verify the stability of your Internet connection and ensure that no antivirus or firewall software blocks the Web Socket protocol connections."})))}_onUnauthorized({error:e}){this._removeAuthData(),this.fire("error",l.default.fromPublicError(e))}async _authenticate(e){try{this._debugEvent("authenticate:start");const t=await this._emit(2,{token:e});this._debugEvent("authenticate:success","envId: "+t.environmentId+", userId: "+t.userId),this._addAuthData(t.environmentId,t.userId)}catch(e){throw this._debugEvent("authenticate:error",e.message),this._removeAuthData(),e}}_isDebugModeEnabled(){var e;return!!o.global.window.localStorage&&"true"===(null!==(e=o.global.window.localStorage.getItem("csClientDebugMode"))&&void 0!==e?e:"false").toLowerCase()}}m.STATE_DISCONNECTED=p.DISCONNECTED,m.STATE_CONNECTING=p.CONNECTING,m.STATE_CONNECTED=p.CONNECTED,m._CHANGE_STATE_EVENT_PRIORITY=o.priorities.get("highest")+999999,(0,o.mix)(m,o.ObservableMixin),t.default=m},9933:(e,t,s)=>{"use strict";e.exports=s(6386)},2777:(e,t,s)=>{"use strict";var r=t,n=s(238),i=s(7886);function o(e,t,s,r){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(d%s){",r);for(var i=t.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)t.repeated&&i[o[a]]===t.typeDefault&&e("default:"),e("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",r,i[o[a]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,s,r);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function a(e,t,s,r){if(t.resolvedType)t.resolvedType instanceof n?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,s,r,r):e("d%s=types[%i].toObject(m%s,o)",r,s,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,s=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return s("return new this.ctor");s("var m=new this.ctor");for(var r=0;r<t.length;++r){var a=t[r].resolve(),c=i.safeProp(a.name);a.map?(s("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),o(s,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(s("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),o(s,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof n||s("if(d%s!=null){",c),o(s,a,r,c),a.resolvedType instanceof n||s("}"))}return s("return m")},r.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var s=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],c=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?r:t[u].map?o:c).push(t[u]);if(r.length){for(s("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)s("d%s=[]",i.safeProp(r[u].name));s("}")}if(o.length){for(s("if(o.objects||o.defaults){"),u=0;u<o.length;++u)s("d%s={}",i.safeProp(o[u].name));s("}")}if(c.length){for(s("if(o.defaults){"),u=0;u<c.length;++u){var d=c[u],l=i.safeProp(d.name);if(d.resolvedType instanceof n)s("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var h="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";s("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else s("d%s=%j",l,d.typeDefault)}s("}")}var f=!1;for(u=0;u<t.length;++u){d=t[u];var p=e._fieldsArray.indexOf(d);l=i.safeProp(d.name);d.map?(f||(f=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(s,d,p,l+"[ks2[j]]")("}")):d.repeated?(s("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(s,d,p,l+"[j]")("}")):(s("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),a(s,d,p,l),d.partOf&&s("if(o.oneofs)")("d%s=%j",i.safeProp(d.partOf.name),d.name)),s("}")}return s("return d")}},8159:(e,t,s)=>{"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var s=0;s<e.fieldsArray.length;++s){var a=e._fieldsArray[s].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[a.keyType]?t("k=%j",n.defaults[a.keyType]):t("k=null"),void 0!==n.defaults[c]?t("value=%j",n.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===n.basic[c]?t("value=types[%i].decode(r,r.uint32())",s):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):a.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==n.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===n.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,s):t("%s.push(r.%s())",u,c)):void 0===n.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,s):t("%s=r.%s()",u,c),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<e._fieldsArray.length;++s){var d=e._fieldsArray[s];d.required&&t("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return t("return m")};var r=s(238),n=s(8372),i=s(7886);function o(e){return"missing required '"+e.name+"'"}},8357:(e,t,s)=>{"use strict";e.exports=function(e){for(var t,s=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),d=e._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,h=n.basic[l];t="m"+i.safeProp(u.name),u.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|n.mapKey[u.keyType],u.keyType),void 0===h?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,t):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,t),s("}")("}")):u.repeated?(s("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==n.packed[l]?s("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",l,t)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",t),void 0===h?o(s,u,d,t+"[i]"):s("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,l,t)),s("}")):(u.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===h?o(s,u,d,t):s("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,l,t))}return s("return w")};var r=s(238),n=s(8372),i=s(7886);function o(e,t,s,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,r,(t.id<<3|2)>>>0)}},238:(e,t,s)=>{"use strict";e.exports=o;var r=s(6913);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var n=s(9587),i=s(7886);function o(e,t,s,n,i){if(r.call(this,e,s),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=i||{},this.reserved=void 0,t)for(var o=Object.keys(t),a=0;a<o.length;++a)"number"==typeof t[o[a]]&&(this.valuesById[this.values[o[a]]=t[o[a]]]=o[a])}o.fromJSON=function(e,t){var s=new o(e,t.values,t.options,t.comment,t.comments);return s.reserved=t.reserved,s},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},o.prototype.add=function(e,t,s){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=s||null,this},o.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},o.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},o.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)}},5263:(e,t,s)=>{"use strict";e.exports=u;var r=s(6913);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var n,i=s(238),o=s(8372),a=s(7886),c=/^required|optional|repeated$/;function u(e,t,s,n,i,u,d){if(a.isObject(n)?(d=i,u=n,n=i=void 0):a.isObject(i)&&(d=u,u=i,i=void 0),r.call(this,e,u),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(s))throw TypeError("type must be a string");if(void 0!==n&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=s,this.id=t,this.extend=i||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=d}u.fromJSON=function(e,t){return new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(e,t,s){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,s)},u.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(e,t,s,r){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(n,i){a.decorateType(n.constructor).add(new u(i,e,t,s,{default:r}))}},u._configure=function(e){n=e}},6386:(e,t,s)=>{"use strict";var r=e.exports=s(2877);r.build="light",r.load=function(e,t,s){return"function"==typeof t?(s=t,t=new r.Root):t||(t=new r.Root),t.load(e,s)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=s(8357),r.decoder=s(8159),r.verifier=s(5669),r.converter=s(2777),r.ReflectionObject=s(6913),r.Namespace=s(9587),r.Root=s(6720),r.Enum=s(238),r.Type=s(396),r.Field=s(5263),r.OneOf=s(8930),r.MapField=s(6977),r.Service=s(5280),r.Method=s(9455),r.Message=s(5986),r.wrappers=s(2016),r.types=s(8372),r.util=s(7886),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},2877:(e,t,s)=>{"use strict";var r=t;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=s(3117),r.BufferWriter=s(4766),r.Reader=s(9924),r.BufferReader=s(6515),r.util=s(4652),r.rpc=s(8607),r.roots=s(9188),r.configure=n,n()},6977:(e,t,s)=>{"use strict";e.exports=o;var r=s(5263);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var n=s(8372),i=s(7886);function o(e,t,s,n,o,a){if(r.call(this,e,t,n,void 0,void 0,o,a),!i.isString(s))throw TypeError("keyType must be a string");this.keyType=s,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(e,t){return new o(e,t.id,t.keyType,t.type,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(e,t,s){return"function"==typeof s?s=i.decorateType(s).name:s&&"object"==typeof s&&(s=i.decorateEnum(s).name),function(r,n){i.decorateType(r.constructor).add(new o(n,e,t,s))}}},5986:(e,t,s)=>{"use strict";e.exports=n;var r=s(4652);function n(e){if(e)for(var t=Object.keys(e),s=0;s<t.length;++s)this[t[s]]=e[t[s]]}n.create=function(e){return this.$type.create(e)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.fromObject=function(e){return this.$type.fromObject(e)},n.toObject=function(e,t){return this.$type.toObject(e,t)},n.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},9455:(e,t,s)=>{"use strict";e.exports=i;var r=s(6913);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var n=s(7886);function i(e,t,s,i,o,a,c,u,d){if(n.isObject(o)?(c=o,o=a=void 0):n.isObject(a)&&(c=a,a=void 0),void 0!==t&&!n.isString(t))throw TypeError("type must be a string");if(!n.isString(s))throw TypeError("requestType must be a string");if(!n.isString(i))throw TypeError("responseType must be a string");r.call(this,e,c),this.type=t||"rpc",this.requestType=s,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=d}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},9587:(e,t,s)=>{"use strict";e.exports=l;var r=s(6913);((l.prototype=Object.create(r.prototype)).constructor=l).className="Namespace";var n,i,o,a=s(5263),c=s(8930),u=s(7886);function d(e,t){if(e&&e.length){for(var s={},r=0;r<e.length;++r)s[e[r].name]=e[r].toJSON(t);return s}}function l(e,t){r.call(this,e,t),this.nested=void 0,this._nestedArray=null}function h(e){return e._nestedArray=null,e}l.fromJSON=function(e,t){return new l(e,t.options).addJSON(t.nested)},l.arrayToJSON=d,l.isReservedId=function(e,t){if(e)for(var s=0;s<e.length;++s)if("string"!=typeof e[s]&&e[s][0]<=t&&e[s][1]>t)return!0;return!1},l.isReservedName=function(e,t){if(e)for(var s=0;s<e.length;++s)if(e[s]===t)return!0;return!1},Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),l.prototype.toJSON=function(e){return u.toObject(["options",this.options,"nested",d(this.nestedArray,e)])},l.prototype.addJSON=function(e){if(e)for(var t,s=Object.keys(e),r=0;r<s.length;++r)t=e[s[r]],this.add((void 0!==t.fields?n.fromJSON:void 0!==t.values?o.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:l.fromJSON)(s[r],t));return this},l.prototype.get=function(e){return this.nested&&this.nested[e]||null},l.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof o)return this.nested[e].values;throw Error("no such enum: "+e)},l.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof n||e instanceof o||e instanceof i||e instanceof l||e instanceof c))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof l&&e instanceof l)||t instanceof n||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var s=t.nestedArray,r=0;r<s.length;++r)e.add(s[r]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),h(this)},l.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),h(this)},l.prototype.define=function(e,t){if(u.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var s=this;e.length>0;){var r=e.shift();if(s.nested&&s.nested[r]){if(!((s=s.nested[r])instanceof l))throw Error("path conflicts with non-namespace objects")}else s.add(s=new l(r))}return t&&s.addJSON(t),s},l.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof l?e[t++].resolveAll():e[t++].resolve();return this.resolve()},l.prototype.lookup=function(e,t,s){if("boolean"==typeof t?(s=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),u.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var r=this.get(e[0]);if(r){if(1===e.length){if(!t||t.indexOf(r.constructor)>-1)return r}else if(r instanceof l&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof l&&(r=this._nestedArray[n].lookup(e,t,!0)))return r;return null===this.parent||s?null:this.parent.lookup(e,t)},l.prototype.lookupType=function(e){var t=this.lookup(e,[n]);if(!t)throw Error("no such type: "+e);return t},l.prototype.lookupEnum=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},l.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[n,o]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},l.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},l._configure=function(e,t,s){n=e,i=t,o=s}},6913:(e,t,s)=>{"use strict";e.exports=i,i.className="ReflectionObject";var r,n=s(7886);function i(e,t){if(!n.isString(e))throw TypeError("name must be a string");if(t&&!n.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof r&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,s){return s&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,s){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(s){var i=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var o=i[e];n.setProperty(o,s,t)}else(i={})[e]=n.setProperty({},s,t),r.push(i)}else{var a={};a[e]=t,r.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var s=Object.keys(e),r=0;r<s.length;++r)this.setOption(s[r],e[s[r]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){r=e}},8930:(e,t,s)=>{"use strict";e.exports=o;var r=s(6913);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var n=s(5263),i=s(7886);function o(e,t,s,n){if(Array.isArray(t)||(s=t,t=void 0),r.call(this,e,s),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=n}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}o.fromJSON=function(e,t){return new o(e,t.oneof,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},o.prototype.add=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},o.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},o.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var s=e.get(this.oneof[t]);s&&!s.partOf&&(s.partOf=this,this.fieldsArray.push(s))}a(this)},o.prototype.onRemove=function(e){for(var t,s=0;s<this.fieldsArray.length;++s)(t=this.fieldsArray[s]).parent&&t.parent.remove(t);r.prototype.onRemove.call(this,e)},o.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,s){i.decorateType(t.constructor).add(new o(s,e)),Object.defineProperty(t,s,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},9924:(e,t,s)=>{"use strict";e.exports=c;var r,n=s(4652),i=n.LongBits,o=n.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return n.Buffer?function(e){return(c.create=function(e){return n.Buffer.isBuffer(e)?new r(e):d(e)})(e)}:d};function h(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,s=this.pos+e;if(s>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,s):t===s?new this.buf.constructor(0):this._slice.call(this.buf,t,s)},c.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=n.Long?"toLong":"toNumber";n.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},6515:(e,t,s)=>{"use strict";e.exports=i;var r=s(9924);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4652);function i(e){r.call(this,e)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},6720:(e,t,s)=>{"use strict";e.exports=l;var r=s(9587);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var n,i,o,a=s(5263),c=s(238),u=s(8930),d=s(7886);function l(e){r.call(this,"",e),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(e,t){return t||(t=new l),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function e(t,s,r){"function"==typeof s&&(r=s,s=void 0);var n=this;if(!r)return d.asPromise(e,n,t,s);var a=r===h;function c(e,t){if(r){var s=r;if(r=null,a)throw e;s(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var s=e.substring(t);if(s in o)return s}return null}function l(e,t){try{if(d.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),d.isString(t)){i.filename=e;var r,o=i(t,n,s),l=0;if(o.imports)for(;l<o.imports.length;++l)(r=u(o.imports[l])||n.resolvePath(e,o.imports[l]))&&f(r);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(r=u(o.weakImports[l])||n.resolvePath(e,o.weakImports[l]))&&f(r,!0)}else n.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}a||p||c(null,n)}function f(e,t){if(!(n.files.indexOf(e)>-1))if(n.files.push(e),e in o)a?l(e,o[e]):(++p,setTimeout((function(){--p,l(e,o[e])})));else if(a){var s;try{s=d.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}l(e,s)}else++p,n.fetch(e,(function(s,i){--p,r&&(s?t?p||c(null,n):c(s):l(e,i))}))}var p=0;d.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=n.resolvePath("",t[m]))&&f(y);if(a)return n;p||c(null,n)},l.prototype.loadSync=function(e,t){if(!d.isNode)throw Error("not supported");return this.load(e,t,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(e,t){var s=t.parent.lookup(t.extend);if(s){var r=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.declaringField=t,t.extensionField=r,s.add(r),!0}return!1}l.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof c)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof n)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var s=0;s<e.nestedArray.length;++s)this._handleAdd(e._nestedArray[s]);f.test(e.name)&&(e.parent[e.name]=e)}},l.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var s=0;s<e.nestedArray.length;++s)this._handleRemove(e._nestedArray[s]);f.test(e.name)&&delete e.parent[e.name]}},l._configure=function(e,t,s){n=e,i=t,o=s}},9188:e=>{"use strict";e.exports={}},8607:(e,t,s)=>{"use strict";t.Service=s(8887)},8887:(e,t,s)=>{"use strict";e.exports=n;var r=s(4652);function n(e,t,s){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(s)}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(t,s,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return r.asPromise(e,a,t,s,n,i);if(a.rpcImpl)try{return a.rpcImpl(t,s[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,s){if(e)return a.emit("error",e,t),o(e);if(null!==s){if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(e){return a.emit("error",e,t),o(e)}return a.emit("data",s,t),o(null,s)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},5280:(e,t,s)=>{"use strict";e.exports=a;var r=s(9587);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var n=s(9455),i=s(7886),o=s(8607);function a(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var s=new a(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),i=0;i<r.length;++i)s.add(n.fromJSON(r[i],t.methods[r[i]]));return t.nested&&s.addJSON(t.nested),s.comment=t.comment,s},a.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),s=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",r.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||r.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof n?(this.methods[e.name]=e,e.parent=this,c(this)):r.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof n){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return r.prototype.remove.call(this,e)},a.prototype.create=function(e,t,s){for(var r,n=new o.Service(e,t,s),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");n[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return n}},396:(e,t,s)=>{"use strict";e.exports=x;var r=s(9587);((x.prototype=Object.create(r.prototype)).constructor=x).className="Type";var n=s(238),i=s(8930),o=s(5263),a=s(6977),c=s(5280),u=s(5986),d=s(9924),l=s(3117),h=s(7886),f=s(8357),p=s(8159),y=s(5669),m=s(2777),v=s(2016);function x(e,t){r.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function g(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(x.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var s=this.fields[e[t]],r=s.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=s}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=x.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,u,!0),this._ctor=e;for(var s=0;s<this.fieldsArray.length;++s)this._fieldsArray[s].resolve();var r={};for(s=0;s<this.oneofsArray.length;++s)r[this._oneofsArray[s].resolve().name]={get:h.oneOfGetter(this._oneofsArray[s].oneof),set:h.oneOfSetter(this._oneofsArray[s].oneof)};s&&Object.defineProperties(e.prototype,r)}}}),x.generateConstructor=function(e){for(var t,s=h.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?s("this%s={}",h.safeProp(t.name)):t.repeated&&s("this%s=[]",h.safeProp(t.name));return s("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},x.fromJSON=function(e,t){var s=new x(e,t.options);s.extensions=t.extensions,s.reserved=t.reserved;for(var u=Object.keys(t.fields),d=0;d<u.length;++d)s.add((void 0!==t.fields[u[d]].keyType?a.fromJSON:o.fromJSON)(u[d],t.fields[u[d]]));if(t.oneofs)for(u=Object.keys(t.oneofs),d=0;d<u.length;++d)s.add(i.fromJSON(u[d],t.oneofs[u[d]]));if(t.nested)for(u=Object.keys(t.nested),d=0;d<u.length;++d){var l=t.nested[u[d]];s.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?x.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[d],l))}return t.extensions&&t.extensions.length&&(s.extensions=t.extensions),t.reserved&&t.reserved.length&&(s.reserved=t.reserved),t.group&&(s.group=!0),t.comment&&(s.comment=t.comment),s},x.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),s=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,e),"fields",r.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",s?this.comment:void 0])},x.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var s=this.oneofsArray;for(t=0;t<s.length;)s[t++].resolve();return r.prototype.resolveAll.call(this)},x.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},x.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof o&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),g(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),g(this)):r.prototype.add.call(this,e)},x.prototype.remove=function(e){if(e instanceof o&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),g(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),g(this)}return r.prototype.remove.call(this,e)},x.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},x.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},x.prototype.create=function(e){return new this.ctor(e)},x.prototype.setup=function(){for(var e=this.fullName,t=[],s=0;s<this.fieldsArray.length;++s)t.push(this._fieldsArray[s].resolve().resolvedType);this.encode=f(this)({Writer:l,types:t,util:h}),this.decode=p(this)({Reader:d,types:t,util:h}),this.verify=y(this)({types:t,util:h}),this.fromObject=m.fromObject(this)({types:t,util:h}),this.toObject=m.toObject(this)({types:t,util:h});var r=v[e];if(r){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(n),n.toObject=this.toObject,this.toObject=r.toObject.bind(n)}return this},x.prototype.encode=function(e,t){return this.setup().encode(e,t)},x.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},x.prototype.decode=function(e,t){return this.setup().decode(e,t)},x.prototype.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},x.prototype.verify=function(e){return this.setup().verify(e)},x.prototype.fromObject=function(e){return this.setup().fromObject(e)},x.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},x.d=function(e){return function(t){h.decorateType(t,e)}}},8372:(e,t,s)=>{"use strict";var r=t,n=s(7886),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(e,t){var s=0,r={};for(t|=0;s<e.length;)r[i[s+t]]=e[s++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},7886:(e,t,s)=>{"use strict";var r,n,i=e.exports=s(4652),o=s(9188);i.codegen=s(6348),i.fetch=s(7803),i.path=s(1272),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),s=new Array(t.length),r=0;r<t.length;)s[r]=e[t[r++]];return s}return[]},i.toObject=function(e){for(var t={},s=0;s<e.length;){var r=e[s++],n=e[s++];void 0!==n&&(t[r]=n)}return t};var a=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;r||(r=s(396));var n=new r(t||e.name);return i.decorateRoot.add(n),n.ctor=e,Object.defineProperty(e,"$type",{value:n,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;i.decorateEnum=function(e){if(e.$type)return e.$type;n||(n=s(238));var t=new n("Enum"+d++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,s){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,s,r){var n=s.shift();if("__proto__"===n)return t;if(s.length>0)t[n]=e(t[n]||{},s,r);else{var i=t[n];i&&(r=[].concat(i).concat(r)),t[n]=r}return t}(e,t=t.split("."),s)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(s(6720)))}})},1427:(e,t,s)=>{"use strict";e.exports=n;var r=s(4652);function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var s=e>>>0,r=(e-s)/4294967296>>>0;return t&&(r=~r>>>0,s=~s>>>0,++s>4294967295&&(s=0,++r>4294967295&&(r=0))),new n(s,r)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):i},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,s=~this.hi>>>0;return t||(s=s+1>>>0),-(t+4294967296*s)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===o?i:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},n.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0===s?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:s<128?9:10}},4652:function(e,t,s){"use strict";var r=t;function n(e,t,s){for(var r=Object.keys(t),n=0;n<r.length;++n)void 0!==e[r[n]]&&s||(e[r[n]]=t[r[n]]);return e}function i(e){function t(e,s){if(!(this instanceof t))return new t(e,s);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),s&&n(this,s)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}r.asPromise=s(537),r.base64=s(9745),r.EventEmitter=s(4459),r.float=s(897),r.inquire=s(3229),r.utf8=s(113),r.pool=s(7986),r.LongBits=s(1427),r.isNode=Boolean(void 0!==s.g&&s.g&&s.g.process&&s.g.process.versions&&s.g.process.versions.node),r.global=r.isNode&&s.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var s=e[t];return!(null==s||!e.hasOwnProperty(t))&&("object"!=typeof s||(Array.isArray(s)?s.length:Object.keys(s).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var s=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(s.lo,s.hi,t):s.toNumber(Boolean(t))},r.merge=n,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},s=0;s<e.length;++s)t[e[s]]=1;return function(){for(var e=Object.keys(this),s=e.length-1;s>-1;--s)if(1===t[e[s]]&&void 0!==this[e[s]]&&null!==this[e[s]])return e[s]}},r.oneOfSetter=function(e){return function(t){for(var s=0;s<e.length;++s)e[s]!==t&&delete this[e[s]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,s){return new e(t,s)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},5669:(e,t,s)=>{"use strict";e.exports=function(e){var t=n.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,r={};s.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var u=e._fieldsArray[c].resolve(),d="m"+n.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",d,u.name),u.map)t("if(!util.isObject(%s))",d)("return%j",i(u,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),o(t,u,c,d+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",d)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",d),o(t,u,c,d+"[i]")("}");else{if(u.partOf){var l=n.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",l)}o(t,u,c,d)}u.optional&&t("}")}return t("return null")};var r=s(238),n=s(7886);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function o(e,t,s,n){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(%s){",n)("default:")("return%j",i(t,"enum value"));for(var o=Object.keys(t.resolvedType.values),a=0;a<o.length;++a)e("case %i:",t.resolvedType.values[o[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",s,n)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",n)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',n)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',n)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",n)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(t,"buffer"))}return e}function a(e,t,s){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",s)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",s)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",s)("return%j",i(t,"boolean key"))}return e}},2016:(e,t,s)=>{"use strict";var r=t,n=s(5986);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),s=this.lookup(t);if(s){var r="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:s.encode(s.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var s="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),s=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof n){var o=e.$type.toObject(e,t);return""===s&&(s="type.googleapis.com/"),r=s+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),o["@type"]=r,o}return this.toObject(e,t)}}},3117:(e,t,s)=>{"use strict";e.exports=l;var r,n=s(4652),i=n.LongBits,o=n.base64,a=n.utf8;function c(e,t,s){this.fn=e,this.len=t,this.next=void 0,this.val=s}function u(){}function d(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return n.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(e,t,s){t[s]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,s){for(;e.hi;)t[s++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[s++]=127&e.lo|128,e.lo=e.lo>>>7;t[s++]=e.lo}function m(e,t,s){t[s]=255&e,t[s+1]=e>>>8&255,t[s+2]=e>>>16&255,t[s+3]=e>>>24}l.create=h(),l.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype._push=function(e,t,s){return this.tail=this.tail.next=new c(e,t,s),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,s){for(;e>127;)t[s++]=127&e|128,e>>>=7;t[s]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(y,10,i.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=i.from(e);return this._push(y,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},l.prototype.bool=function(e){return this._push(f,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var v=n.Array.prototype.set?function(e,t,s){t.set(e,s)}:function(e,t,s){for(var r=0;r<e.length;++r)t[s+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(n.isString(e)){var s=l.alloc(t=o.length(e));o.decode(e,s,0),e=s}return this.uint32(t)._push(v,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=e.next,this.tail=t,this.len+=s),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),s=0;e;)e.fn(e.val,t,s),s+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=h(),r._configure()}},4766:(e,t,s)=>{"use strict";e.exports=i;var r=s(3117);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4652);function i(){r.call(this)}function o(e,t,s){e.length<40?n.utf8.write(e,t,s):t.utf8Write?t.utf8Write(e,s):t.write(e,s)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(e,t,s){t.set(e,s)}:function(e,t,s){if(e.copy)e.copy(t,s,0,e.length);else for(var r=0;r<e.length;)t[s++]=e[r++]}},i.prototype.bytes=function(e){n.isString(e)&&(e=n._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=n.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},i._configure()},537:e=>{"use strict";e.exports=function(e,t){var s=new Array(arguments.length-1),r=0,n=2,i=!0;for(;n<arguments.length;)s[r++]=arguments[n++];return new Promise((function(n,o){s[r]=function(e){if(i)if(i=!1,e)o(e);else{for(var t=new Array(arguments.length-1),s=0;s<t.length;)t[s++]=arguments[s];n.apply(null,t)}};try{e.apply(t||null,s)}catch(e){i&&(i=!1,o(e))}}))}},9745:(e,t)=>{"use strict";var s=t;s.length=function(e){var t=e.length;if(!t)return 0;for(var s=0;--t%4>1&&"="===e.charAt(t);)++s;return Math.ceil(3*e.length)/4-s};for(var r=new Array(64),n=new Array(123),i=0;i<64;)n[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;s.encode=function(e,t,s){for(var n,i=null,o=[],a=0,c=0;t<s;){var u=e[t++];switch(c){case 0:o[a++]=r[u>>2],n=(3&u)<<4,c=1;break;case 1:o[a++]=r[n|u>>4],n=(15&u)<<2,c=2;break;case 2:o[a++]=r[n|u>>6],o[a++]=r[63&u],c=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0)}return c&&(o[a++]=r[n],o[a++]=61,1===c&&(o[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var o="invalid encoding";s.decode=function(e,t,s){for(var r,i=s,a=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=n[u]))throw Error(o);switch(a){case 0:r=u,a=1;break;case 1:t[s++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:t[s++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:t[s++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(o);return s-i},s.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},6348:e=>{"use strict";function t(e,s){"string"==typeof e&&(s=e,e=void 0);var r=[];function n(e){if("string"!=typeof e){var s=i();if(t.verbose&&console.log("codegen: "+s),s="return "+s,e){for(var o=Object.keys(e),a=new Array(o.length+1),c=new Array(o.length),u=0;u<o.length;)a[u]=o[u],c[u]=e[o[u++]];return a[u]=s,Function.apply(null,a).apply(null,c)}return Function(s)()}for(var d=new Array(arguments.length-1),l=0;l<d.length;)d[l]=arguments[++l];if(l=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var s=d[l++];switch(t){case"d":case"f":return String(Number(s));case"i":return String(Math.floor(s));case"j":return JSON.stringify(s);case"s":return String(s)}return"%"})),l!==d.length)throw Error("parameter count mismatch");return r.push(e),n}function i(t){return"function "+(t||s||"")+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return n.toString=i,n}e.exports=t,t.verbose=!1},4459:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,s){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:s||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var s=this._listeners[e],r=0;r<s.length;)s[r].fn===t?s.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var s=[],r=1;r<arguments.length;)s.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,s)}return this}},7803:(e,t,s)=>{"use strict";e.exports=i;var r=s(537),n=s(3229)("fs");function i(e,t,s){return"function"==typeof t?(s=t,t={}):t||(t={}),s?!t.xhr&&n&&n.readFile?n.readFile(e,(function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,s):r?s(r):s(null,t.binary?n:n.toString("utf8"))})):i.xhr(e,t,s):r(i,this,e,t)}i.xhr=function(e,t,s){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return s(Error("status "+r.status));if(t.binary){var e=r.response;if(!e){e=[];for(var n=0;n<r.responseText.length;++n)e.push(255&r.responseText.charCodeAt(n))}return s(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return s(null,r.responseText)}},t.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",e),r.send()}},897:e=>{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),s=new Uint8Array(t.buffer),r=128===s[3];function n(e,r,n){t[0]=e,r[n]=s[0],r[n+1]=s[1],r[n+2]=s[2],r[n+3]=s[3]}function i(e,r,n){t[0]=e,r[n]=s[3],r[n+1]=s[2],r[n+2]=s[1],r[n+3]=s[0]}function o(e,r){return s[0]=e[r],s[1]=e[r+1],s[2]=e[r+2],s[3]=e[r+3],t[0]}function a(e,r){return s[3]=e[r],s[2]=e[r+1],s[1]=e[r+2],s[0]=e[r+3],t[0]}e.writeFloatLE=r?n:i,e.writeFloatBE=r?i:n,e.readFloatLE=r?o:a,e.readFloatBE=r?a:o}():function(){function t(e,t,s,r){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,s,r);else if(isNaN(t))e(2143289344,s,r);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,s,r);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,s,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((n<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,s,r)}}function o(e,t,s){var r=e(t,s),n=2*(r>>31)+1,i=r>>>23&255,o=8388607&r;return 255===i?o?NaN:n*(1/0):0===i?1401298464324817e-60*n*o:n*Math.pow(2,i-150)*(o+8388608)}e.writeFloatLE=t.bind(null,s),e.writeFloatBE=t.bind(null,r),e.readFloatLE=o.bind(null,n),e.readFloatBE=o.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),s=new Uint8Array(t.buffer),r=128===s[7];function n(e,r,n){t[0]=e,r[n]=s[0],r[n+1]=s[1],r[n+2]=s[2],r[n+3]=s[3],r[n+4]=s[4],r[n+5]=s[5],r[n+6]=s[6],r[n+7]=s[7]}function i(e,r,n){t[0]=e,r[n]=s[7],r[n+1]=s[6],r[n+2]=s[5],r[n+3]=s[4],r[n+4]=s[3],r[n+5]=s[2],r[n+6]=s[1],r[n+7]=s[0]}function o(e,r){return s[0]=e[r],s[1]=e[r+1],s[2]=e[r+2],s[3]=e[r+3],s[4]=e[r+4],s[5]=e[r+5],s[6]=e[r+6],s[7]=e[r+7],t[0]}function a(e,r){return s[7]=e[r],s[6]=e[r+1],s[5]=e[r+2],s[4]=e[r+3],s[3]=e[r+4],s[2]=e[r+5],s[1]=e[r+6],s[0]=e[r+7],t[0]}e.writeDoubleLE=r?n:i,e.writeDoubleBE=r?i:n,e.readDoubleLE=r?o:a,e.readDoubleBE=r?a:o}():function(){function t(e,t,s,r,n,i){var o=r<0?1:0;if(o&&(r=-r),0===r)e(0,n,i+t),e(1/r>0?0:2147483648,n,i+s);else if(isNaN(r))e(0,n,i+t),e(2146959360,n,i+s);else if(r>17976931348623157e292)e(0,n,i+t),e((o<<31|2146435072)>>>0,n,i+s);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,n,i+t),e((o<<31|a/4294967296)>>>0,n,i+s);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=r*Math.pow(2,-c))>>>0,n,i+t),e((o<<31|c+1023<<20|1048576*a&1048575)>>>0,n,i+s)}}}function o(e,t,s,r,n){var i=e(r,n+t),o=e(r,n+s),a=2*(o>>31)+1,c=o>>>20&2047,u=4294967296*(1048575&o)+i;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,s,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=o.bind(null,n,0,4),e.readDoubleBE=o.bind(null,i,4,0)}(),e}function s(e,t,s){t[s]=255&e,t[s+1]=e>>>8&255,t[s+2]=e>>>16&255,t[s+3]=e>>>24}function r(e,t,s){t[s]=e>>>24,t[s+1]=e>>>16&255,t[s+2]=e>>>8&255,t[s+3]=255&e}function n(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},3229:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},1272:(e,t)=>{"use strict";var s=t,r=s.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},n=s.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),s=r(e),n="";s&&(n=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):s?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return n+t.join("/")};s.resolve=function(e,t,s){return s||(t=n(t)),r(t)?t:(s||(e=n(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?n(e+"/"+t):t)}},7986:e=>{"use strict";e.exports=function(e,t,s){var r=s||8192,n=r>>>1,i=null,o=r;return function(s){if(s<1||s>n)return e(s);o+s>r&&(i=e(r),o=0);var a=t.call(i,o,o+=s);return 7&o&&(o=1+(7|o)),a}}},113:(e,t)=>{"use strict";var s=t;s.length=function(e){for(var t=0,s=0,r=0;r<e.length;++r)(s=e.charCodeAt(r))<128?t+=1:s<2048?t+=2:55296==(64512&s)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},s.read=function(e,t,s){if(s-t<1)return"";for(var r,n=null,i=[],o=0;t<s;)(r=e[t++])<128?i[o++]=r:r>191&&r<224?i[o++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[o++]=55296+(r>>10),i[o++]=56320+(1023&r)):i[o++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,i)),o=0);return n?(o&&n.push(String.fromCharCode.apply(String,i.slice(0,o))),n.join("")):String.fromCharCode.apply(String,i.slice(0,o))},s.write=function(e,t,s){for(var r,n,i=s,o=0;o<e.length;++o)(r=e.charCodeAt(o))<128?t[s++]=r:r<2048?(t[s++]=r>>6|192,t[s++]=63&r|128):55296==(64512&r)&&56320==(64512&(n=e.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&n),++o,t[s++]=r>>18|240,t[s++]=r>>12&63|128,t[s++]=r>>6&63|128,t[s++]=63&r|128):(t[s++]=r>>12|224,t[s++]=r>>6&63|128,t[s++]=63&r|128);return s-i}},3286:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(7758),n=s.n(r)()((function(e){return e[1]}));n.push([e.id,".ck.ck-balloon-panel.ck-tooltip{pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;justify-content:flex-end}.ck.ck-presence-list__counter{color:var(--ck-color-base-text)}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:0;color:inherit;font:inherit;margin-left:var(--ck-spacing-standard);outline:none;padding:0;position:relative}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:3px;position:relative;width:100%}.ck.ck-presence-list--collapsed .ck-presence-list__list{margin-left:var(--ck-spacing-standard);min-width:calc(var(--ck-user-avatar-size)*1.5)}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{margin-left:calc(var(--ck-user-avatar-size)*-1 + 5px)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(5){opacity:.15}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(4){opacity:.35}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(3){opacity:.55}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(2){opacity:.75}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-height:80vh;max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width);overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:0;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]);const i=n},9940:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(7758),n=s.n(r)()((function(e){return e[1]}));n.push([e.id,".ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker:after{color:#fff;content:attr(data-name);display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}.ck .ck-user__marker:hover .ck-user__marker-dot{width:0}.ck .ck-user__marker:hover:after{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-placeholder .ck-user__marker{display:none}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const i=n},7758:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var s=e(t);return t[2]?"@media ".concat(t[2]," {").concat(s,"}"):s})).join("")},t.i=function(e,s,r){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(r)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(n[o]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);r&&n[c[0]]||(s&&(c[2]?c[2]="".concat(s," and ").concat(c[2]):c[2]=s),t.push(c))}},t}},7154:e=>{var t=1e3,s=60*t,r=60*s,n=24*r,i=7*n,o=365.25*n;function a(e,t,s,r){var n=t>=1.5*s;return Math.round(e/s)+" "+r+(n?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*s;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var i=Math.abs(e);if(i>=n)return a(e,i,n,"day");if(i>=r)return a(e,i,r,"hour");if(i>=s)return a(e,i,s,"minute");if(i>=t)return a(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=n)return Math.round(e/n)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=s)return Math.round(e/s)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5579:(e,t,s)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;t.splice(1,0,s,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(n=r))})),t.splice(n,0,s)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=s(3847)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},3847:(e,t,s)=>{e.exports=function(e){function t(e){let s,n,i,o=null;function a(...e){if(!a.enabled)return;const r=a,n=Number(new Date),i=n-(s||n);r.diff=i,r.prev=s,r.curr=n,s=n,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((s,n)=>{if("%%"===s)return"%";o++;const i=t.formatters[n];if("function"==typeof i){const t=e[o];s=i.call(r,t),e.splice(o,1),o--}return s})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(n!==t.namespaces&&(n=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,s){const r=t(this.namespace+(void 0===s?":":s)+e);return r.log=this.log,r}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let s;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(s=0;s<n;s++)r[s]&&("-"===(e=r[s].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let s,r;for(s=0,r=t.skips.length;s<r;s++)if(t.skips[s].test(e))return!1;for(s=0,r=t.names.length;s<r;s++)if(t.names[s].test(e))return!0;return!1},t.humanize=s(7154),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((s=>{t[s]=e[s]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let s=0;for(let t=0;t<e.length;t++)s=(s<<5)-s+e.charCodeAt(t),s|=0;return t.colors[Math.abs(s)%t.colors.length]},t.enable(t.load()),t}},6154:(e,t,s)=>{"use strict";e.exports=s(7278)},6274:(e,t,s)=>{"use strict";var r=t,n=s(4937),i=s(7572);function o(e,t,s,r){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(d%s){",r);for(var i=t.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)t.repeated&&i[o[a]]===t.typeDefault&&e("default:"),e("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",r,i[o[a]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,s,r);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function a(e,t,s,r){if(t.resolvedType)t.resolvedType instanceof n?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,s,r,r):e("d%s=types[%i].toObject(m%s,o)",r,s,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,s=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return s("return new this.ctor");s("var m=new this.ctor");for(var r=0;r<t.length;++r){var a=t[r].resolve(),c=i.safeProp(a.name);a.map?(s("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),o(s,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(s("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),o(s,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof n||s("if(d%s!=null){",c),o(s,a,r,c),a.resolvedType instanceof n||s("}"))}return s("return m")},r.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var s=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],c=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?r:t[u].map?o:c).push(t[u]);if(r.length){for(s("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)s("d%s=[]",i.safeProp(r[u].name));s("}")}if(o.length){for(s("if(o.objects||o.defaults){"),u=0;u<o.length;++u)s("d%s={}",i.safeProp(o[u].name));s("}")}if(c.length){for(s("if(o.defaults){"),u=0;u<c.length;++u){var d=c[u],l=i.safeProp(d.name);if(d.resolvedType instanceof n)s("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var h="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";s("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else s("d%s=%j",l,d.typeDefault)}s("}")}var f=!1;for(u=0;u<t.length;++u){d=t[u];var p=e._fieldsArray.indexOf(d);l=i.safeProp(d.name);d.map?(f||(f=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(s,d,p,l+"[ks2[j]]")("}")):d.repeated?(s("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(s,d,p,l+"[j]")("}")):(s("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),a(s,d,p,l),d.partOf&&s("if(o.oneofs)")("d%s=%j",i.safeProp(d.partOf.name),d.name)),s("}")}return s("return d")}},4799:(e,t,s)=>{"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var s=0;s<e.fieldsArray.length;++s){var a=e._fieldsArray[s].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);t("case %i: {",a.id),a.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[a.keyType]?t("k=%j",n.defaults[a.keyType]):t("k=null"),void 0!==n.defaults[c]?t("value=%j",n.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===n.basic[c]?t("value=types[%i].decode(r,r.uint32())",s):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):a.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==n.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===n.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,s):t("%s.push(r.%s())",u,c)):void 0===n.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,s):t("%s=r.%s()",u,c),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<e._fieldsArray.length;++s){var d=e._fieldsArray[s];d.required&&t("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return t("return m")};var r=s(4937),n=s(8997),i=s(7572);function o(e){return"missing required '"+e.name+"'"}},6382:(e,t,s)=>{"use strict";e.exports=function(e){for(var t,s=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),d=e._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,h=n.basic[l];t="m"+i.safeProp(u.name),u.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|n.mapKey[u.keyType],u.keyType),void 0===h?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,t):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,t),s("}")("}")):u.repeated?(s("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==n.packed[l]?s("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",l,t)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",t),void 0===h?o(s,u,d,t+"[i]"):s("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,l,t)),s("}")):(u.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===h?o(s,u,d,t):s("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,l,t))}return s("return w")};var r=s(4937),n=s(8997),i=s(7572);function o(e,t,s,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,r,(t.id<<3|2)>>>0)}},4937:(e,t,s)=>{"use strict";e.exports=o;var r=s(4154);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var n=s(512),i=s(7572);function o(e,t,s,n,i){if(r.call(this,e,s),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=i||{},this.reserved=void 0,t)for(var o=Object.keys(t),a=0;a<o.length;++a)"number"==typeof t[o[a]]&&(this.valuesById[this.values[o[a]]=t[o[a]]]=o[a])}o.fromJSON=function(e,t){var s=new o(e,t.values,t.options,t.comment,t.comments);return s.reserved=t.reserved,s},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},o.prototype.add=function(e,t,s){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=s||null,this},o.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},o.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},o.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)}},5891:(e,t,s)=>{"use strict";e.exports=u;var r=s(4154);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var n,i=s(4937),o=s(8997),a=s(7572),c=/^required|optional|repeated$/;function u(e,t,s,n,i,u,d){if(a.isObject(n)?(d=i,u=n,n=i=void 0):a.isObject(i)&&(d=u,u=i,i=void 0),r.call(this,e,u),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(s))throw TypeError("type must be a string");if(void 0!==n&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=s,this.id=t,this.extend=i||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=d}u.fromJSON=function(e,t){return new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(e,t,s){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,s)},u.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(e,t,s,r){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(n,i){a.decorateType(n.constructor).add(new u(i,e,t,s,{default:r}))}},u._configure=function(e){n=e}},7278:(e,t,s)=>{"use strict";var r=e.exports=s(3278);r.build="light",r.load=function(e,t,s){return"function"==typeof t?(s=t,t=new r.Root):t||(t=new r.Root),t.load(e,s)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=s(6382),r.decoder=s(4799),r.verifier=s(8600),r.converter=s(6274),r.ReflectionObject=s(4154),r.Namespace=s(512),r.Root=s(2613),r.Enum=s(4937),r.Type=s(4560),r.Field=s(5891),r.OneOf=s(3044),r.MapField=s(8911),r.Service=s(877),r.Method=s(4935),r.Message=s(4777),r.wrappers=s(3375),r.types=s(8997),r.util=s(7572),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},3278:(e,t,s)=>{"use strict";var r=t;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=s(2944),r.BufferWriter=s(2178),r.Reader=s(9867),r.BufferReader=s(2676),r.util=s(4155),r.rpc=s(3290),r.roots=s(284),r.configure=n,n()},8911:(e,t,s)=>{"use strict";e.exports=o;var r=s(5891);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var n=s(8997),i=s(7572);function o(e,t,s,n,o,a){if(r.call(this,e,t,n,void 0,void 0,o,a),!i.isString(s))throw TypeError("keyType must be a string");this.keyType=s,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(e,t){return new o(e,t.id,t.keyType,t.type,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(e,t,s){return"function"==typeof s?s=i.decorateType(s).name:s&&"object"==typeof s&&(s=i.decorateEnum(s).name),function(r,n){i.decorateType(r.constructor).add(new o(n,e,t,s))}}},4777:(e,t,s)=>{"use strict";e.exports=n;var r=s(4155);function n(e){if(e)for(var t=Object.keys(e),s=0;s<t.length;++s)this[t[s]]=e[t[s]]}n.create=function(e){return this.$type.create(e)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.fromObject=function(e){return this.$type.fromObject(e)},n.toObject=function(e,t){return this.$type.toObject(e,t)},n.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},4935:(e,t,s)=>{"use strict";e.exports=i;var r=s(4154);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var n=s(7572);function i(e,t,s,i,o,a,c,u,d){if(n.isObject(o)?(c=o,o=a=void 0):n.isObject(a)&&(c=a,a=void 0),void 0!==t&&!n.isString(t))throw TypeError("type must be a string");if(!n.isString(s))throw TypeError("requestType must be a string");if(!n.isString(i))throw TypeError("responseType must be a string");r.call(this,e,c),this.type=t||"rpc",this.requestType=s,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=d}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},512:(e,t,s)=>{"use strict";e.exports=d;var r=s(4154);((d.prototype=Object.create(r.prototype)).constructor=d).className="Namespace";var n,i,o,a=s(5891),c=s(7572);function u(e,t){if(e&&e.length){for(var s={},r=0;r<e.length;++r)s[e[r].name]=e[r].toJSON(t);return s}}function d(e,t){r.call(this,e,t),this.nested=void 0,this._nestedArray=null}function l(e){return e._nestedArray=null,e}d.fromJSON=function(e,t){return new d(e,t.options).addJSON(t.nested)},d.arrayToJSON=u,d.isReservedId=function(e,t){if(e)for(var s=0;s<e.length;++s)if("string"!=typeof e[s]&&e[s][0]<=t&&e[s][1]>t)return!0;return!1},d.isReservedName=function(e,t){if(e)for(var s=0;s<e.length;++s)if(e[s]===t)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),d.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},d.prototype.addJSON=function(e){if(e)for(var t,s=Object.keys(e),r=0;r<s.length;++r)t=e[s[r]],this.add((void 0!==t.fields?n.fromJSON:void 0!==t.values?o.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:d.fromJSON)(s[r],t));return this},d.prototype.get=function(e){return this.nested&&this.nested[e]||null},d.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof o)return this.nested[e].values;throw Error("no such enum: "+e)},d.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof n||e instanceof o||e instanceof i||e instanceof d))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof d&&e instanceof d)||t instanceof n||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var s=t.nestedArray,r=0;r<s.length;++r)e.add(s[r]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),l(this)},d.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),l(this)},d.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var s=this;e.length>0;){var r=e.shift();if(s.nested&&s.nested[r]){if(!((s=s.nested[r])instanceof d))throw Error("path conflicts with non-namespace objects")}else s.add(s=new d(r))}return t&&s.addJSON(t),s},d.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof d?e[t++].resolveAll():e[t++].resolve();return this.resolve()},d.prototype.lookup=function(e,t,s){if("boolean"==typeof t?(s=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var r=this.get(e[0]);if(r){if(1===e.length){if(!t||t.indexOf(r.constructor)>-1)return r}else if(r instanceof d&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof d&&(r=this._nestedArray[n].lookup(e,t,!0)))return r;return null===this.parent||s?null:this.parent.lookup(e,t)},d.prototype.lookupType=function(e){var t=this.lookup(e,[n]);if(!t)throw Error("no such type: "+e);return t},d.prototype.lookupEnum=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},d.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[n,o]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},d.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},d._configure=function(e,t,s){n=e,i=t,o=s}},4154:(e,t,s)=>{"use strict";e.exports=i,i.className="ReflectionObject";var r,n=s(7572);function i(e,t){if(!n.isString(e))throw TypeError("name must be a string");if(t&&!n.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof r&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,s){return s&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,s){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(s){var i=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var o=i[e];n.setProperty(o,s,t)}else(i={})[e]=n.setProperty({},s,t),r.push(i)}else{var a={};a[e]=t,r.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var s=Object.keys(e),r=0;r<s.length;++r)this.setOption(s[r],e[s[r]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){r=e}},3044:(e,t,s)=>{"use strict";e.exports=o;var r=s(4154);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var n=s(5891),i=s(7572);function o(e,t,s,n){if(Array.isArray(t)||(s=t,t=void 0),r.call(this,e,s),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=n}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}o.fromJSON=function(e,t){return new o(e,t.oneof,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},o.prototype.add=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},o.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},o.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var s=e.get(this.oneof[t]);s&&!s.partOf&&(s.partOf=this,this.fieldsArray.push(s))}a(this)},o.prototype.onRemove=function(e){for(var t,s=0;s<this.fieldsArray.length;++s)(t=this.fieldsArray[s]).parent&&t.parent.remove(t);r.prototype.onRemove.call(this,e)},o.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,s){i.decorateType(t.constructor).add(new o(s,e)),Object.defineProperty(t,s,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},9867:(e,t,s)=>{"use strict";e.exports=c;var r,n=s(4155),i=n.LongBits,o=n.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return n.Buffer?function(e){return(c.create=function(e){return n.Buffer.isBuffer(e)?new r(e):d(e)})(e)}:d};function h(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,s=this.pos+e;if(s>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,s):t===s?new this.buf.constructor(0):this._slice.call(this.buf,t,s)},c.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=n.Long?"toLong":"toNumber";n.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},2676:(e,t,s)=>{"use strict";e.exports=i;var r=s(9867);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4155);function i(e){r.call(this,e)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},2613:(e,t,s)=>{"use strict";e.exports=l;var r=s(512);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var n,i,o,a=s(5891),c=s(4937),u=s(3044),d=s(7572);function l(e){r.call(this,"",e),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(e,t){return t||(t=new l),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function e(t,s,r){"function"==typeof s&&(r=s,s=void 0);var n=this;if(!r)return d.asPromise(e,n,t,s);var a=r===h;function c(e,t){if(r){var s=r;if(r=null,a)throw e;s(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var s=e.substring(t);if(s in o)return s}return null}function l(e,t){try{if(d.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),d.isString(t)){i.filename=e;var r,o=i(t,n,s),l=0;if(o.imports)for(;l<o.imports.length;++l)(r=u(o.imports[l])||n.resolvePath(e,o.imports[l]))&&f(r);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(r=u(o.weakImports[l])||n.resolvePath(e,o.weakImports[l]))&&f(r,!0)}else n.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}a||p||c(null,n)}function f(e,t){if(!(n.files.indexOf(e)>-1))if(n.files.push(e),e in o)a?l(e,o[e]):(++p,setTimeout((function(){--p,l(e,o[e])})));else if(a){var s;try{s=d.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}l(e,s)}else++p,n.fetch(e,(function(s,i){--p,r&&(s?t?p||c(null,n):c(s):l(e,i))}))}var p=0;d.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=n.resolvePath("",t[m]))&&f(y);if(a)return n;p||c(null,n)},l.prototype.loadSync=function(e,t){if(!d.isNode)throw Error("not supported");return this.load(e,t,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(e,t){var s=t.parent.lookup(t.extend);if(s){var r=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.declaringField=t,t.extensionField=r,s.add(r),!0}return!1}l.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof c)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof n)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var s=0;s<e.nestedArray.length;++s)this._handleAdd(e._nestedArray[s]);f.test(e.name)&&(e.parent[e.name]=e)}},l.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var s=0;s<e.nestedArray.length;++s)this._handleRemove(e._nestedArray[s]);f.test(e.name)&&delete e.parent[e.name]}},l._configure=function(e,t,s){n=e,i=t,o=s}},284:e=>{"use strict";e.exports={}},3290:(e,t,s)=>{"use strict";t.Service=s(979)},979:(e,t,s)=>{"use strict";e.exports=n;var r=s(4155);function n(e,t,s){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(s)}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(t,s,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return r.asPromise(e,a,t,s,n,i);if(a.rpcImpl)try{return a.rpcImpl(t,s[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,s){if(e)return a.emit("error",e,t),o(e);if(null!==s){if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(e){return a.emit("error",e,t),o(e)}return a.emit("data",s,t),o(null,s)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},877:(e,t,s)=>{"use strict";e.exports=a;var r=s(512);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var n=s(4935),i=s(7572),o=s(3290);function a(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var s=new a(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),i=0;i<r.length;++i)s.add(n.fromJSON(r[i],t.methods[r[i]]));return t.nested&&s.addJSON(t.nested),s.comment=t.comment,s},a.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),s=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",r.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||r.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof n?(this.methods[e.name]=e,e.parent=this,c(this)):r.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof n){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return r.prototype.remove.call(this,e)},a.prototype.create=function(e,t,s){for(var r,n=new o.Service(e,t,s),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");n[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return n}},4560:(e,t,s)=>{"use strict";e.exports=x;var r=s(512);((x.prototype=Object.create(r.prototype)).constructor=x).className="Type";var n=s(4937),i=s(3044),o=s(5891),a=s(8911),c=s(877),u=s(4777),d=s(9867),l=s(2944),h=s(7572),f=s(6382),p=s(4799),y=s(8600),m=s(6274),v=s(3375);function x(e,t){r.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function g(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(x.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var s=this.fields[e[t]],r=s.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=s}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=x.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,u,!0),this._ctor=e;for(var s=0;s<this.fieldsArray.length;++s)this._fieldsArray[s].resolve();var r={};for(s=0;s<this.oneofsArray.length;++s)r[this._oneofsArray[s].resolve().name]={get:h.oneOfGetter(this._oneofsArray[s].oneof),set:h.oneOfSetter(this._oneofsArray[s].oneof)};s&&Object.defineProperties(e.prototype,r)}}}),x.generateConstructor=function(e){for(var t,s=h.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?s("this%s={}",h.safeProp(t.name)):t.repeated&&s("this%s=[]",h.safeProp(t.name));return s("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},x.fromJSON=function(e,t){var s=new x(e,t.options);s.extensions=t.extensions,s.reserved=t.reserved;for(var u=Object.keys(t.fields),d=0;d<u.length;++d)s.add((void 0!==t.fields[u[d]].keyType?a.fromJSON:o.fromJSON)(u[d],t.fields[u[d]]));if(t.oneofs)for(u=Object.keys(t.oneofs),d=0;d<u.length;++d)s.add(i.fromJSON(u[d],t.oneofs[u[d]]));if(t.nested)for(u=Object.keys(t.nested),d=0;d<u.length;++d){var l=t.nested[u[d]];s.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?x.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[d],l))}return t.extensions&&t.extensions.length&&(s.extensions=t.extensions),t.reserved&&t.reserved.length&&(s.reserved=t.reserved),t.group&&(s.group=!0),t.comment&&(s.comment=t.comment),s},x.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),s=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,e),"fields",r.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",s?this.comment:void 0])},x.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var s=this.oneofsArray;for(t=0;t<s.length;)s[t++].resolve();return r.prototype.resolveAll.call(this)},x.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},x.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof o&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),g(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),g(this)):r.prototype.add.call(this,e)},x.prototype.remove=function(e){if(e instanceof o&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),g(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),g(this)}return r.prototype.remove.call(this,e)},x.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},x.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},x.prototype.create=function(e){return new this.ctor(e)},x.prototype.setup=function(){for(var e=this.fullName,t=[],s=0;s<this.fieldsArray.length;++s)t.push(this._fieldsArray[s].resolve().resolvedType);this.encode=f(this)({Writer:l,types:t,util:h}),this.decode=p(this)({Reader:d,types:t,util:h}),this.verify=y(this)({types:t,util:h}),this.fromObject=m.fromObject(this)({types:t,util:h}),this.toObject=m.toObject(this)({types:t,util:h});var r=v[e];if(r){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(n),n.toObject=this.toObject,this.toObject=r.toObject.bind(n)}return this},x.prototype.encode=function(e,t){return this.setup().encode(e,t)},x.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},x.prototype.decode=function(e,t){return this.setup().decode(e,t)},x.prototype.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},x.prototype.verify=function(e){return this.setup().verify(e)},x.prototype.fromObject=function(e){return this.setup().fromObject(e)},x.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},x.d=function(e){return function(t){h.decorateType(t,e)}}},8997:(e,t,s)=>{"use strict";var r=t,n=s(7572),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(e,t){var s=0,r={};for(t|=0;s<e.length;)r[i[s+t]]=e[s++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},7572:(e,t,s)=>{"use strict";var r,n,i=e.exports=s(4155),o=s(284);i.codegen=s(6348),i.fetch=s(7803),i.path=s(1272),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),s=new Array(t.length),r=0;r<t.length;)s[r]=e[t[r++]];return s}return[]},i.toObject=function(e){for(var t={},s=0;s<e.length;){var r=e[s++],n=e[s++];void 0!==n&&(t[r]=n)}return t};var a=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;r||(r=s(4560));var n=new r(t||e.name);return i.decorateRoot.add(n),n.ctor=e,Object.defineProperty(e,"$type",{value:n,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;i.decorateEnum=function(e){if(e.$type)return e.$type;n||(n=s(4937));var t=new n("Enum"+d++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,s){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,s,r){var n=s.shift();if("__proto__"===n)return t;if(s.length>0)t[n]=e(t[n]||{},s,r);else{var i=t[n];i&&(r=[].concat(i).concat(r)),t[n]=r}return t}(e,t=t.split("."),s)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(s(2613)))}})},8950:(e,t,s)=>{"use strict";e.exports=n;var r=s(4155);function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var s=e>>>0,r=(e-s)/4294967296>>>0;return t&&(r=~r>>>0,s=~s>>>0,++s>4294967295&&(s=0,++r>4294967295&&(r=0))),new n(s,r)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):i},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,s=~this.hi>>>0;return t||(s=s+1>>>0),-(t+4294967296*s)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===o?i:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},n.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0===s?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:s<128?9:10}},4155:function(e,t,s){"use strict";var r=t;function n(e,t,s){for(var r=Object.keys(t),n=0;n<r.length;++n)void 0!==e[r[n]]&&s||(e[r[n]]=t[r[n]]);return e}function i(e){function t(e,s){if(!(this instanceof t))return new t(e,s);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),s&&n(this,s)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:()=>e,set:void 0,enumerable:!1,configurable:!0},toString:{value(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=s(537),r.base64=s(9745),r.EventEmitter=s(4459),r.float=s(897),r.inquire=s(3229),r.utf8=s(113),r.pool=s(7986),r.LongBits=s(8950),r.isNode=Boolean(void 0!==s.g&&s.g&&s.g.process&&s.g.process.versions&&s.g.process.versions.node),r.global=r.isNode&&s.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var s=e[t];return!(null==s||!e.hasOwnProperty(t))&&("object"!=typeof s||(Array.isArray(s)?s.length:Object.keys(s).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var s=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(s.lo,s.hi,t):s.toNumber(Boolean(t))},r.merge=n,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},s=0;s<e.length;++s)t[e[s]]=1;return function(){for(var e=Object.keys(this),s=e.length-1;s>-1;--s)if(1===t[e[s]]&&void 0!==this[e[s]]&&null!==this[e[s]])return e[s]}},r.oneOfSetter=function(e){return function(t){for(var s=0;s<e.length;++s)e[s]!==t&&delete this[e[s]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,s){return new e(t,s)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},8600:(e,t,s)=>{"use strict";e.exports=function(e){var t=n.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,r={};s.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var u=e._fieldsArray[c].resolve(),d="m"+n.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",d,u.name),u.map)t("if(!util.isObject(%s))",d)("return%j",i(u,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),o(t,u,c,d+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",d)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",d),o(t,u,c,d+"[i]")("}");else{if(u.partOf){var l=n.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",l)}o(t,u,c,d)}u.optional&&t("}")}return t("return null")};var r=s(4937),n=s(7572);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function o(e,t,s,n){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(%s){",n)("default:")("return%j",i(t,"enum value"));for(var o=Object.keys(t.resolvedType.values),a=0;a<o.length;++a)e("case %i:",t.resolvedType.values[o[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",s,n)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",n)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',n)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',n)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",n)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(t,"buffer"))}return e}function a(e,t,s){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",s)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",s)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",s)("return%j",i(t,"boolean key"))}return e}},3375:(e,t,s)=>{"use strict";var r=t,n=s(4777);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),s=this.lookup(t);if(s){var r="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:s.encode(s.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var s="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),s=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof n){var o=e.$type.toObject(e,t);return""===s&&(s="type.googleapis.com/"),r=s+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),o["@type"]=r,o}return this.toObject(e,t)}}},2944:(e,t,s)=>{"use strict";e.exports=l;var r,n=s(4155),i=n.LongBits,o=n.base64,a=n.utf8;function c(e,t,s){this.fn=e,this.len=t,this.next=void 0,this.val=s}function u(){}function d(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return n.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(e,t,s){t[s]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,s){for(;e.hi;)t[s++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[s++]=127&e.lo|128,e.lo=e.lo>>>7;t[s++]=e.lo}function m(e,t,s){t[s]=255&e,t[s+1]=e>>>8&255,t[s+2]=e>>>16&255,t[s+3]=e>>>24}l.create=h(),l.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype._push=function(e,t,s){return this.tail=this.tail.next=new c(e,t,s),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,s){for(;e>127;)t[s++]=127&e|128,e>>>=7;t[s]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(y,10,i.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=i.from(e);return this._push(y,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},l.prototype.bool=function(e){return this._push(f,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var v=n.Array.prototype.set?function(e,t,s){t.set(e,s)}:function(e,t,s){for(var r=0;r<e.length;++r)t[s+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(n.isString(e)){var s=l.alloc(t=o.length(e));o.decode(e,s,0),e=s}return this.uint32(t)._push(v,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=e.next,this.tail=t,this.len+=s),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),s=0;e;)e.fn(e.val,t,s),s+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=h(),r._configure()}},2178:(e,t,s)=>{"use strict";e.exports=i;var r=s(2944);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4155);function i(){r.call(this)}function o(e,t,s){e.length<40?n.utf8.write(e,t,s):t.utf8Write?t.utf8Write(e,s):t.write(e,s)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(e,t,s){t.set(e,s)}:function(e,t,s){if(e.copy)e.copy(t,s,0,e.length);else for(var r=0;r<e.length;)t[s++]=e[r++]}},i.prototype.bytes=function(e){n.isString(e)&&(e=n._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=n.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},i._configure()},1829:(e,t)=>{"use strict";var s=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function n(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,i,o=[];for(i in"string"!=typeof t&&(t="?"),e)if(s.call(e,i)){if((r=e[i])||null!=r&&!isNaN(r)||(r=""),i=n(i),r=n(r),null===i||null===r)continue;o.push(i+"="+r)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,s=/([^=?#&]+)=?([^&]*)/g,n={};t=s.exec(e);){var i=r(t[1]),o=r(t[2]);null===i||null===o||i in n||(n[i]=o)}return n}},3722:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},7594:(e,t,s)=>{"use strict";var r,n=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var s=document.querySelector(t);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(e){s=null}e[t]=s}return e[t]}}(),o=[];function a(e){for(var t=-1,s=0;s<o.length;s++)if(o[s].identifier===e){t=s;break}return t}function c(e,t){for(var s={},r=[],n=0;n<e.length;n++){var i=e[n],c=t.base?i[0]+t.base:i[0],u=s[c]||0,d="".concat(c," ").concat(u);s[c]=u+1;var l=a(d),h={css:i[1],media:i[2],sourceMap:i[3]};-1!==l?(o[l].references++,o[l].updater(h)):o.push({identifier:d,updater:m(h,t),references:1}),r.push(d)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var n=s.nc;n&&(r.nonce=n)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var d,l=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function h(e,t,s,r){var n=s?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=l(t,n);else{var i=document.createTextNode(n),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}function f(e,t,s){var r=s.css,n=s.media,i=s.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,y=0;function m(e,t){var s,r,n;if(t.singleton){var i=y++;s=p||(p=u(t)),r=h.bind(null,s,i,!1),n=h.bind(null,s,i,!0)}else s=u(t),r=f.bind(null,s,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(s)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else n()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var s=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<s.length;r++){var n=a(s[r]);o[n].references--}for(var i=c(e,t),u=0;u<s.length;u++){var d=a(s[u]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}s=i}}}},9655:(e,t,s)=>{"use strict";var r=s(3722),n=s(1829),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(e){return(e||"").toString().replace(i,"")}var h=[["#","hash"],["?","query"],function(e,t){return y(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function p(e){var t,r=("undefined"!=typeof window?window:void 0!==s.g?s.g:"undefined"!=typeof self?self:{}).location||{},n={},i=typeof(e=e||r);if("blob:"===e.protocol)n=new v(unescape(e.pathname),{});else if("string"===i)for(t in n=new v(e,{}),f)delete n[t];else if("object"===i){for(t in e)t in f||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=a.test(e.href))}return n}function y(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function m(e,t){e=(e=l(e)).replace(o,""),t=t||{};var s,r=u.exec(e),n=r[1]?r[1].toLowerCase():"",i=!!r[2],a=!!r[3],c=0;return i?a?(s=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(s=r[2]+r[4],c=r[2].length):a?(s=r[3]+r[4],c=r[3].length):s=r[4],"file:"===n?c>=2&&(s=s.slice(2)):y(n)?s=r[4]:n?i&&(s=s.slice(2)):c>=2&&y(t.protocol)&&(s=r[4]),{protocol:n,slashes:i||y(n),slashesCount:c,rest:s}}function v(e,t,s){if(e=(e=l(e)).replace(o,""),!(this instanceof v))return new v(e,t,s);var i,a,c,u,f,x,g=h.slice(),_=typeof t,b=this,w=0;for("object"!==_&&"string"!==_&&(s=t,t=null),s&&"function"!=typeof s&&(s=n.parse),i=!(a=m(e||"",t=p(t))).protocol&&!a.slashes,b.slashes=a.slashes||i&&t.slashes,b.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!y(b.protocol)))&&(g[3]=[/(.*)/,"pathname"]);w<g.length;w++)"function"!=typeof(u=g[w])?(c=u[0],x=u[1],c!=c?b[x]=e:"string"==typeof c?~(f="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof u[2]?(b[x]=e.slice(0,f),e=e.slice(f+u[2])):(b[x]=e.slice(f),e=e.slice(0,f))):(f=c.exec(e))&&(b[x]=f[1],e=e.slice(0,f.index)),b[x]=b[x]||i&&u[3]&&t[x]||"",u[4]&&(b[x]=b[x].toLowerCase())):e=u(e,b);s&&(b.query=s(b.query)),i&&t.slashes&&"/"!==b.pathname.charAt(0)&&(""!==b.pathname||""!==t.pathname)&&(b.pathname=function(e,t){if(""===e)return t;for(var s=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=s.length,n=s[r-1],i=!1,o=0;r--;)"."===s[r]?s.splice(r,1):".."===s[r]?(s.splice(r,1),o++):o&&(0===r&&(i=!0),s.splice(r,1),o--);return i&&s.unshift(""),"."!==n&&".."!==n||s.push(""),s.join("/")}(b.pathname,t.pathname)),"/"!==b.pathname.charAt(0)&&y(b.protocol)&&(b.pathname="/"+b.pathname),r(b.port,b.protocol)||(b.host=b.hostname,b.port=""),b.username=b.password="",b.auth&&(~(f=b.auth.indexOf(":"))?(b.username=b.auth.slice(0,f),b.username=encodeURIComponent(decodeURIComponent(b.username)),b.password=b.auth.slice(f+1),b.password=encodeURIComponent(decodeURIComponent(b.password))):b.username=encodeURIComponent(decodeURIComponent(b.auth)),b.auth=b.password?b.username+":"+b.password:b.username),b.origin="file:"!==b.protocol&&y(b.protocol)&&b.host?b.protocol+"//"+b.host:"null",b.href=b.toString()}v.prototype={set:function(e,t,s){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(s||n.parse)(t)),i[e]=t;break;case"port":i[e]=t,r(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,c.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!s;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";i[e]=t.charAt(0)!==o?o+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(i.username=t.slice(0,a),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(a+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<h.length;u++){var d=h[u];d[4]&&(i[d[1]]=i[d[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&y(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=n.stringify);var t,s=this,r=s.host,i=s.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(s.protocol&&s.slashes||y(s.protocol)?"//":"");return s.username?(o+=s.username,s.password&&(o+=":"+s.password),o+="@"):s.password?(o+=":"+s.password,o+="@"):"file:"!==s.protocol&&y(s.protocol)&&!r&&"/"!==s.pathname&&(o+="@"),(":"===r[r.length-1]||c.test(s.hostname)&&!s.port)&&(r+=":"),o+=r+s.pathname,(t="object"==typeof s.query?e(s.query):s.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),s.hash&&(o+=s.hash),o}},v.extractProtocol=m,v.location=p,v.trimLeft=l,v.qs=n,e.exports=v},5003:(e,t,s)=>{"use strict";var r;s.r(t),s.d(t,{NIL:()=>j,parse:()=>m,stringify:()=>d,v1:()=>y,v3:()=>T,v4:()=>k,v5:()=>R,validate:()=>a,version:()=>N});var n=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)}const o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const a=function(e){return"string"==typeof e&&o.test(e)};for(var c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));const d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!a(s))throw TypeError("Stringified UUID is invalid");return s};var l,h,f=0,p=0;const y=function(e,t,s){var r=t&&s||0,n=t||new Array(16),o=(e=e||{}).node||l,a=void 0!==e.clockseq?e.clockseq:h;if(null==o||null==a){var c=e.random||(e.rng||i)();null==o&&(o=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==a&&(a=h=16383&(c[6]<<8|c[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),y=void 0!==e.nsecs?e.nsecs:p+1,m=u-f+(y-p)/1e4;if(m<0&&void 0===e.clockseq&&(a=a+1&16383),(m<0||u>f)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=u,p=y,h=a;var v=(1e4*(268435455&(u+=122192928e5))+y)%4294967296;n[r++]=v>>>24&255,n[r++]=v>>>16&255,n[r++]=v>>>8&255,n[r++]=255&v;var x=u/4294967296*1e4&268435455;n[r++]=x>>>8&255,n[r++]=255&x,n[r++]=x>>>24&15|16,n[r++]=x>>>16&255,n[r++]=a>>>8|128,n[r++]=255&a;for(var g=0;g<6;++g)n[r+g]=o[g];return t||d(n)};const m=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,s=new Uint8Array(16);return s[0]=(t=parseInt(e.slice(0,8),16))>>>24,s[1]=t>>>16&255,s[2]=t>>>8&255,s[3]=255&t,s[4]=(t=parseInt(e.slice(9,13),16))>>>8,s[5]=255&t,s[6]=(t=parseInt(e.slice(14,18),16))>>>8,s[7]=255&t,s[8]=(t=parseInt(e.slice(19,23),16))>>>8,s[9]=255&t,s[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,s[11]=t/4294967296&255,s[12]=t>>>24&255,s[13]=t>>>16&255,s[14]=t>>>8&255,s[15]=255&t,s};function v(e,t,s){function r(e,r,n,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],s=0;s<e.length;++s)t.push(e.charCodeAt(s));return t}(e)),"string"==typeof r&&(r=m(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+e.length);if(o.set(r),o.set(e,r.length),(o=s(o))[6]=15&o[6]|t,o[8]=63&o[8]|128,n){i=i||0;for(var a=0;a<16;++a)n[i+a]=o[a];return n}return d(o)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function x(e){return 14+(e+64>>>9<<4)+1}function g(e,t){var s=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(s>>16)<<16|65535&s}function _(e,t,s,r,n,i){return g((o=g(g(t,e),g(r,i)))<<(a=n)|o>>>32-a,s);var o,a}function b(e,t,s,r,n,i,o){return _(t&s|~t&r,e,t,n,i,o)}function w(e,t,s,r,n,i,o){return _(t&r|s&~r,e,t,n,i,o)}function O(e,t,s,r,n,i,o){return _(t^s^r,e,t,n,i,o)}function E(e,t,s,r,n,i,o){return _(s^(t|~r),e,t,n,i,o)}const S=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var s=0;s<t.length;++s)e[s]=t.charCodeAt(s)}return function(e){for(var t=[],s=32*e.length,r="0123456789abcdef",n=0;n<s;n+=8){var i=e[n>>5]>>>n%32&255,o=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[x(t)-1]=t;for(var s=1732584193,r=-271733879,n=-1732584194,i=271733878,o=0;o<e.length;o+=16){var a=s,c=r,u=n,d=i;s=b(s,r,n,i,e[o],7,-680876936),i=b(i,s,r,n,e[o+1],12,-389564586),n=b(n,i,s,r,e[o+2],17,606105819),r=b(r,n,i,s,e[o+3],22,-1044525330),s=b(s,r,n,i,e[o+4],7,-176418897),i=b(i,s,r,n,e[o+5],12,1200080426),n=b(n,i,s,r,e[o+6],17,-1473231341),r=b(r,n,i,s,e[o+7],22,-45705983),s=b(s,r,n,i,e[o+8],7,1770035416),i=b(i,s,r,n,e[o+9],12,-1958414417),n=b(n,i,s,r,e[o+10],17,-42063),r=b(r,n,i,s,e[o+11],22,-1990404162),s=b(s,r,n,i,e[o+12],7,1804603682),i=b(i,s,r,n,e[o+13],12,-40341101),n=b(n,i,s,r,e[o+14],17,-1502002290),s=w(s,r=b(r,n,i,s,e[o+15],22,1236535329),n,i,e[o+1],5,-165796510),i=w(i,s,r,n,e[o+6],9,-1069501632),n=w(n,i,s,r,e[o+11],14,643717713),r=w(r,n,i,s,e[o],20,-373897302),s=w(s,r,n,i,e[o+5],5,-701558691),i=w(i,s,r,n,e[o+10],9,38016083),n=w(n,i,s,r,e[o+15],14,-660478335),r=w(r,n,i,s,e[o+4],20,-405537848),s=w(s,r,n,i,e[o+9],5,568446438),i=w(i,s,r,n,e[o+14],9,-1019803690),n=w(n,i,s,r,e[o+3],14,-187363961),r=w(r,n,i,s,e[o+8],20,1163531501),s=w(s,r,n,i,e[o+13],5,-1444681467),i=w(i,s,r,n,e[o+2],9,-51403784),n=w(n,i,s,r,e[o+7],14,1735328473),s=O(s,r=w(r,n,i,s,e[o+12],20,-1926607734),n,i,e[o+5],4,-378558),i=O(i,s,r,n,e[o+8],11,-2022574463),n=O(n,i,s,r,e[o+11],16,1839030562),r=O(r,n,i,s,e[o+14],23,-35309556),s=O(s,r,n,i,e[o+1],4,-1530992060),i=O(i,s,r,n,e[o+4],11,1272893353),n=O(n,i,s,r,e[o+7],16,-155497632),r=O(r,n,i,s,e[o+10],23,-1094730640),s=O(s,r,n,i,e[o+13],4,681279174),i=O(i,s,r,n,e[o],11,-358537222),n=O(n,i,s,r,e[o+3],16,-722521979),r=O(r,n,i,s,e[o+6],23,76029189),s=O(s,r,n,i,e[o+9],4,-640364487),i=O(i,s,r,n,e[o+12],11,-421815835),n=O(n,i,s,r,e[o+15],16,530742520),s=E(s,r=O(r,n,i,s,e[o+2],23,-995338651),n,i,e[o],6,-198630844),i=E(i,s,r,n,e[o+7],10,1126891415),n=E(n,i,s,r,e[o+14],15,-1416354905),r=E(r,n,i,s,e[o+5],21,-57434055),s=E(s,r,n,i,e[o+12],6,1700485571),i=E(i,s,r,n,e[o+3],10,-1894986606),n=E(n,i,s,r,e[o+10],15,-1051523),r=E(r,n,i,s,e[o+1],21,-2054922799),s=E(s,r,n,i,e[o+8],6,1873313359),i=E(i,s,r,n,e[o+15],10,-30611744),n=E(n,i,s,r,e[o+6],15,-1560198380),r=E(r,n,i,s,e[o+13],21,1309151649),s=E(s,r,n,i,e[o+4],6,-145523070),i=E(i,s,r,n,e[o+11],10,-1120210379),n=E(n,i,s,r,e[o+2],15,718787259),r=E(r,n,i,s,e[o+9],21,-343485551),s=g(s,a),r=g(r,c),n=g(n,u),i=g(i,d)}return[s,r,n,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,s=new Uint32Array(x(t)),r=0;r<t;r+=8)s[r>>5]|=(255&e[r/8])<<r%32;return s}(e),8*e.length))};const T=v("v3",48,S);const k=function(e,t,s){var r=(e=e||{}).random||(e.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){s=s||0;for(var n=0;n<16;++n)t[s+n]=r[n];return t}return d(r)};function C(e,t,s,r){switch(e){case 0:return t&s^~t&r;case 1:case 3:return t^s^r;case 2:return t&s^t&r^s&r}}function I(e,t){return e<<t|e>>>32-t}const A=function(e){var t=[1518500249,1859775393,2400959708,3395469782],s=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var n=0;n<r.length;++n)e.push(r.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,o=Math.ceil(i/16),a=new Array(o),c=0;c<o;++c){for(var u=new Uint32Array(16),d=0;d<16;++d)u[d]=e[64*c+4*d]<<24|e[64*c+4*d+1]<<16|e[64*c+4*d+2]<<8|e[64*c+4*d+3];a[c]=u}a[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295;for(var l=0;l<o;++l){for(var h=new Uint32Array(80),f=0;f<16;++f)h[f]=a[l][f];for(var p=16;p<80;++p)h[p]=I(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var y=s[0],m=s[1],v=s[2],x=s[3],g=s[4],_=0;_<80;++_){var b=Math.floor(_/20),w=I(y,5)+C(b,m,v,x)+g+t[b]+h[_]>>>0;g=x,x=v,v=I(m,30)>>>0,m=y,y=w}s[0]=s[0]+y>>>0,s[1]=s[1]+m>>>0,s[2]=s[2]+v>>>0,s[3]=s[3]+x>>>0,s[4]=s[4]+g>>>0}return[s[0]>>24&255,s[0]>>16&255,s[0]>>8&255,255&s[0],s[1]>>24&255,s[1]>>16&255,s[1]>>8&255,255&s[1],s[2]>>24&255,s[2]>>16&255,s[2]>>8&255,255&s[2],s[3]>>24&255,s[3]>>16&255,s[3]>>8&255,255&s[3],s[4]>>24&255,s[4]>>16&255,s[4]>>8&255,255&s[4]]};const R=v("v5",80,A),j="00000000-0000-0000-0000-000000000000";const N=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},2417:(e,t,s)=>{e.exports=s(7720)("./src/collaboration-core.js")},2704:(e,t,s)=>{e.exports=s(7079)("./src/core.js")},1492:(e,t,s)=>{e.exports=s(7079)("./src/engine.js")},9273:(e,t,s)=>{e.exports=s(7079)("./src/ui.js")},2209:(e,t,s)=>{e.exports=s(7079)("./src/utils.js")},7720:e=>{"use strict";e.exports=CKEditor5.collaborationDll},7079:e=>{"use strict";e.exports=CKEditor5.dll},6051:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasCORS=void 0;let s=!1;try{s="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}t.hasCORS=s},8573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0,t.encode=function(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t},t.decode=function(e){let t={},s=e.split("&");for(let e=0,r=s.length;e<r;e++){let r=s[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}},8736:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const s=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.parse=function(e){const t=e,n=e.indexOf("["),i=e.indexOf("]");-1!=n&&-1!=i&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=s.exec(e||""),a={},c=14;for(;c--;)a[r[c]]=o[c]||"";return-1!=n&&-1!=i&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(e,t){const s=/\/{2,9}/g,r=t.replace(s,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,a.path),a.queryKey=function(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(s[t]=r)})),s}(0,a.query),a}},7058:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.yeast=t.decode=t.encode=void 0;const s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r={};let n,i=0,o=0;function a(e){let t="";do{t=s[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}for(t.encode=a,t.decode=function(e){let t=0;for(o=0;o<e.length;o++)t=64*t+r[e.charAt(o)];return t},t.yeast=function(){const e=a(+new Date);return e!==n?(i=0,n=e):e+"."+a(i++)};o<64;o++)r[s[o]]=o},66:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalThisShim=void 0,t.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},5769:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nextTick=t.parse=t.installTimerFunctions=t.transports=t.Transport=t.protocol=t.Socket=void 0;const r=s(1187);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return r.Socket}}),t.protocol=r.Socket.protocol;var n=s(4291);Object.defineProperty(t,"Transport",{enumerable:!0,get:function(){return n.Transport}});var i=s(6449);Object.defineProperty(t,"transports",{enumerable:!0,get:function(){return i.transports}});var o=s(102);Object.defineProperty(t,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var a=s(8736);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return a.parse}});var c=s(9233);Object.defineProperty(t,"nextTick",{enumerable:!0,get:function(){return c.nextTick}})},1187:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=void 0;const n=s(6449),i=s(102),o=s(8573),a=s(8736),c=r(s(5579)),u=s(5867),d=s(4755),l=(0,c.default)("engine.io-client:socket");class h extends u.Emitter{constructor(e,t={}){super(),e&&"object"==typeof e&&(t=e,e=null),e?(e=(0,a.parse)(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=(0,a.parse)(t.host).host),(0,i.installTimerFunctions)(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},t),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=(0,o.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){l('creating transport "%s"',e);const t=Object.assign({},this.opts.query);t.EIO=d.protocol,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return l("options: %j",s),new n.transports[e](s)}open(){let e;if(this.opts.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return l("error while creating transport: %s",e),this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){l("setting transport %s",e.name),this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){l('probing transport "%s"',e);let t=this.createTransport(e),s=!1;h.priorWebsocketSuccess=!1;const r=()=>{s||(l('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(r=>{if(!s)if("pong"===r.type&&"probe"===r.data){if(l('probe transport "%s" pong',e),this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;h.priorWebsocketSuccess="websocket"===t.name,l('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{s||"closed"!==this.readyState&&(l("changing transport and sending upgrade packet"),u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{l('probe transport "%s" failed',e);const s=new Error("probe error");s.transport=t.name,this.emitReserved("upgradeError",s)}})))};function n(){s||(s=!0,u(),t.close(),t=null)}const i=s=>{const r=new Error("probe error: "+s);r.transport=t.name,n(),l('probe transport "%s" failed because of error: %s',e,s),this.emitReserved("upgradeError",r)};function o(){i("transport closed")}function a(){i("socket closed")}function c(e){t&&e.name!==t.name&&(l('"%s" works - aborting "%s"',e.name,t.name),n())}const u=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",o),this.off("close",a),this.off("upgrading",c)};t.once("open",r),t.once("error",i),t.once("close",o),this.once("close",a),this.once("upgrading",c),t.open()}onOpen(){if(l("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){l("starting upgrade probes");let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(l('socket receive: type "%s", data "%s"',e.type,e.data),this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}else l('packet received with socket readyState "%s"',this.readyState)}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();l("flushing %d packets in socket",e.length),this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const s=this.writeBuffer[t].data;if(s&&(e+=(0,i.byteLength)(s)),t>0&&e>this.maxPayload)return l("only send %d out of %d packets",t,this.writeBuffer.length),this.writeBuffer.slice(0,t);e+=2}return l("payload size is %d (max: %d)",e,this.maxPayload),this.writeBuffer}write(e,t,s){return this.sendPacket("message",e,t,s),this}send(e,t,s){return this.sendPacket("message",e,t,s),this}sendPacket(e,t,s,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:e,data:t,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),l("socket closing - telling transport to close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?s():e()})):this.upgrading?s():e()),this}onError(e){l("socket error %j",e),h.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(l('socket close with reason: "%s"',e),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let s=0;const r=e.length;for(;s<r;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}t.Socket=h,h.protocol=d.protocol},4291:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;const n=s(4755),i=s(5867),o=s(102),a=(0,r(s(5579)).default)("engine.io-client:transport");class c extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class u extends i.Emitter{constructor(e){super(),this.writable=!1,(0,o.installTimerFunctions)(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,t,s){return super.emitReserved("error",new c(e,t,s)),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState?this.write(e):a("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=(0,n.decodePacket)(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}t.Transport=u},6449:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transports=void 0;const r=s(3737),n=s(4199);t.transports={websocket:n.WS,polling:r.Polling}},3737:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Request=t.Polling=void 0;const n=s(4291),i=r(s(5579)),o=s(7058),a=s(8573),c=s(4755),u=s(4582),d=s(5867),l=s(102),h=s(66),f=(0,i.default)("engine.io-client:polling");function p(){}const y=null!=new u.XHR({xdomain:!1}).responseType;class m extends n.Transport{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let s=location.port;s||(s=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||s!==e.port,this.xs=e.secure!==t}const t=e&&e.forceBase64;this.supportsBinary=y&&!t}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{f("paused"),this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(f("we are currently polling - waiting to pause"),e++,this.once("pollComplete",(function(){f("pre-pause polling complete"),--e||t()}))),this.writable||(f("we are currently writing - waiting to pause"),e++,this.once("drain",(function(){f("pre-pause writing complete"),--e||t()})))}else t()}poll(){f("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){f("polling got data %s",e);(0,c.decodePayload)(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():f('ignoring poll - transport state "%s"',this.readyState))}doClose(){const e=()=>{f("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(f("transport open - closing"),e()):(f("transport not open - deferring close"),this.once("open",e))}write(e){this.writable=!1,(0,c.encodePayload)(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let e=this.query||{};const t=this.opts.secure?"https":"http";let s="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,o.yeast)()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(s=":"+this.opts.port);const r=(0,a.encode)(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new v(this.uri(),e)}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){f("xhr poll");const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}t.Polling=m;class v extends d.Emitter{constructor(e,t){super(),(0,l.installTimerFunctions)(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.create()}create(){const e=(0,l.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const t=this.xhr=new u.XHR(e);try{f("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&t.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(t.timeout=this.opts.requestTimeout),t.onreadystatechange=()=>{4===t.readyState&&(200===t.status||1223===t.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof t.status?t.status:0)}),0))},f("xhr data %s",this.data),t.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=v.requestsCount++,v.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=p,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete v.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(t.Request=v,v.requestsCount=0,v.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",x);else if("function"==typeof addEventListener){const e="onpagehide"in h.globalThisShim?"pagehide":"unload";addEventListener(e,x,!1)}function x(){for(let e in v.requests)v.requests.hasOwnProperty(e)&&v.requests[e].abort()}},9233:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultBinaryType=t.usingBrowserWebSocket=t.WebSocket=t.nextTick=void 0;const r=s(66);t.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),t.WebSocket=r.globalThisShim.WebSocket||r.globalThisShim.MozWebSocket,t.usingBrowserWebSocket=!0,t.defaultBinaryType="arraybuffer"},4199:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WS=void 0;const n=s(4291),i=s(8573),o=s(7058),a=s(102),c=s(9233),u=r(s(5579)),d=s(4755),l=(0,u.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class f extends n.Transport{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,s=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=c.usingBrowserWebSocket&&!h?t?new c.WebSocket(e,t):new c.WebSocket(e):new c.WebSocket(e,t,s)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||c.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;(0,d.encodePacket)(s,this.supportsBinary,(e=>{const t={};if(!c.usingBrowserWebSocket&&(s.options&&(t.compress=s.options.compress),this.opts.perMessageDeflate)){("string"==typeof e?Buffer.byteLength(e):e.length)<this.opts.perMessageDeflate.threshold&&(t.compress=!1)}try{c.usingBrowserWebSocket?this.ws.send(e):this.ws.send(e,t)}catch(e){l("websocket closed before onclose event")}r&&(0,c.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const t=this.opts.secure?"wss":"ws";let s="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(s=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,o.yeast)()),this.supportsBinary||(e.b64=1);const r=(0,i.encode)(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}check(){return!!c.WebSocket}}t.WS=f},4582:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHR=void 0;const r=s(6051),n=s(66);t.XHR=function(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r.hasCORS))return new XMLHttpRequest}catch(e){}if(!t)try{return new(n.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},102:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.byteLength=t.installTimerFunctions=t.pick=void 0;const r=s(66);t.pick=function(e,...t){return t.reduce(((t,s)=>(e.hasOwnProperty(s)&&(t[s]=e[s]),t)),{})};const n=setTimeout,i=clearTimeout;t.installTimerFunctions=function(e,t){t.useNativeTimers?(e.setTimeoutFn=n.bind(r.globalThisShim),e.clearTimeoutFn=i.bind(r.globalThisShim)):(e.setTimeoutFn=setTimeout.bind(r.globalThisShim),e.clearTimeoutFn=clearTimeout.bind(r.globalThisShim))};t.byteLength=function(e){return"string"==typeof e?function(e){let t=0,s=0;for(let r=0,n=e.length;r<n;r++)t=e.charCodeAt(r),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(r++,s+=4);return s}(e):Math.ceil(1.33*(e.byteLength||e.size))}},9782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_PACKET=t.PACKET_TYPES_REVERSE=t.PACKET_TYPES=void 0;const s=Object.create(null);t.PACKET_TYPES=s,s.open="0",s.close="1",s.ping="2",s.pong="3",s.message="4",s.upgrade="5",s.noop="6";const r=Object.create(null);t.PACKET_TYPES_REVERSE=r,Object.keys(s).forEach((e=>{r[s[e]]=e}));t.ERROR_PACKET={type:"error",data:"parser error"}},6502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<s.length;e++)r[s.charCodeAt(e)]=e;t.encode=e=>{let t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t<n;t+=3)i+=s[r[t]>>2],i+=s[(3&r[t])<<4|r[t+1]>>4],i+=s[(15&r[t+1])<<2|r[t+2]>>6],i+=s[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i};t.decode=e=>{let t,s,n,i,o,a=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const d=new ArrayBuffer(a),l=new Uint8Array(d);for(t=0;t<c;t+=4)s=r[e.charCodeAt(t)],n=r[e.charCodeAt(t+1)],i=r[e.charCodeAt(t+2)],o=r[e.charCodeAt(t+3)],l[u++]=s<<2|n>>4,l[u++]=(15&n)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return d}},3108:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=s(9782),n=s(6502),i="function"==typeof ArrayBuffer,o=(e,t)=>{if(i){const s=(0,n.decode)(e);return a(s,t)}return{base64:!0,data:e}},a=(e,t)=>"blob"===t&&e instanceof ArrayBuffer?new Blob([e]):e;t.default=(e,t)=>{if("string"!=typeof e)return{type:"message",data:a(e,t)};const s=e.charAt(0);if("b"===s)return{type:"message",data:o(e.substring(1),t)};return r.PACKET_TYPES_REVERSE[s]?e.length>1?{type:r.PACKET_TYPES_REVERSE[s],data:e.substring(1)}:{type:r.PACKET_TYPES_REVERSE[s]}:r.ERROR_PACKET}},4895:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=s(9782),n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,o=(e,t)=>{const s=new FileReader;return s.onload=function(){const e=s.result.split(",")[1];t("b"+e)},s.readAsDataURL(e)};t.default=({type:e,data:t},s,a)=>{return n&&t instanceof Blob?s?a(t):o(t,a):i&&(t instanceof ArrayBuffer||(c=t,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer))?s?a(t):o(new Blob([t]),a):a(r.PACKET_TYPES[e]+(t||""));var c}},4755:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodePayload=t.decodePacket=t.encodePayload=t.encodePacket=t.protocol=void 0;const r=s(4895);t.encodePacket=r.default;const n=s(3108);t.decodePacket=n.default;const i=String.fromCharCode(30);t.encodePayload=(e,t)=>{const s=e.length,n=new Array(s);let o=0;e.forEach(((e,a)=>{(0,r.default)(e,!1,(e=>{n[a]=e,++o===s&&t(n.join(i))}))}))};t.decodePayload=(e,t)=>{const s=e.split(i),r=[];for(let e=0;e<s.length;e++){const i=(0,n.default)(s[e],t);if(r.push(i),"error"===i.type)break}return r},t.protocol=4},1067:(e,t)=>{"use strict";function s(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Object.defineProperty(t,"__esModule",{value:!0}),t.Backoff=void 0,t.Backoff=s,s.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-s:e+s}return 0|Math.min(e,this.max)},s.prototype.reset=function(){this.attempts=0},s.prototype.setMin=function(e){this.ms=e},s.prototype.setMax=function(e){this.max=e},s.prototype.setJitter=function(e){this.jitter=e}},8623:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const n=s(4197),i=s(3288);Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=s(3232);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=r(s(5579)).default("socket.io-client"),c={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};const s=n.url(e,t.path||"/socket.io"),r=s.source,o=s.id,u=s.path,d=c[o]&&u in c[o].nsps;let l;return t.forceNew||t["force new connection"]||!1===t.multiplex||d?(a("ignoring socket cache for %s",r),l=new i.Manager(r,t)):(c[o]||(a("new io instance for %s",r),c[o]=new i.Manager(r,t)),l=c[o]),s.query&&!t.query&&(t.query=s.queryKey),l.socket(s.path,t)}t.io=u,t.connect=u,t.default=u,Object.assign(u,{Manager:i.Manager,Socket:o.Socket,io:u,connect:u});var d=s(170);Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return d.protocol}}),e.exports=u},3288:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Manager=void 0;const a=s(5769),c=s(3232),u=i(s(170)),d=s(6263),l=s(1067),h=s(5867),f=o(s(5579)).default("socket.io-client:manager");class p extends h.Emitter{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,a.installTimerFunctions(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=t.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||u;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(f("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;f("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=d.on(t,"open",(function(){s.onopen(),e&&e()})),n=d.on(t,"error",(t=>{f("error"),s.cleanup(),s._readyState="closed",this.emitReserved("error",t),e?e(t):s.maybeReconnectOnOpen()}));if(!1!==this._timeout){const e=this._timeout;f("connect attempt will timeout after %d",e),0===e&&r();const s=this.setTimeoutFn((()=>{f("connect attempt timed out after %d",e),r(),t.close(),t.emit("error",new Error("timeout"))}),e);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}return this.subs.push(r),this.subs.push(n),this}connect(e){return this.open(e)}onopen(){f("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(d.on(e,"ping",this.onping.bind(this)),d.on(e,"data",this.ondata.bind(this)),d.on(e,"error",this.onerror.bind(this)),d.on(e,"close",this.onclose.bind(this)),d.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){a.nextTick((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){f("error",e),this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s||(s=new c.Socket(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return void f("socket %s is still active, skipping close",e)}this._close()}_packet(e){f("writing packet %j",e);const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){f("cleanup"),this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){f("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){f("closed due to %s",e),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();f("will wait %dms before reconnect attempt",t),this._reconnecting=!0;const s=this.setTimeoutFn((()=>{e.skipReconnect||(f("attempting reconnect"),this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(f("reconnect attempt error"),e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):(f("reconnect success"),e.onreconnect())})))}),t);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}t.Manager=p},6263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.on=void 0,t.on=function(e,t,s){return e.on(t,s),function(){e.off(t,s)}}},3232:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=void 0;const n=s(170),i=s(6263),o=s(5867),a=r(s(5579)).default("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends o.Emitter{constructor(e,t,s){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[i.on(e,"open",this.onopen.bind(this)),i.on(e,"packet",this.onpacket.bind(this)),i.on(e,"error",this.onerror.bind(this)),i.on(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(c.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');t.unshift(e);const s={type:n.PacketType.EVENT,data:t,options:{}};if(s.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++;a("emitting packet with ack id %d",e);const r=t.pop();this._registerAckCallback(e,r),s.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)?a("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s),this.flags={},this}_registerAckCallback(e,t){const s=this.flags.timeout;if(void 0===s)return void(this.acks[e]=t);const r=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&(a("removing packet with ack id %d from the buffer",e),this.sendBuffer.splice(t,1));a("event with ack id %d has timed out after %d ms",e,s),t.call(this,new Error("operation has timed out"))}),s);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,[null,...e])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((e=>{this.packet({type:n.PacketType.CONNECT,data:e})})):this.packet({type:n.PacketType.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){a("close (%s)",e),this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case n.PacketType.CONNECT:if(e.data&&e.data.sid){const t=e.data.sid;this.onconnect(t)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case n.PacketType.EVENT:case n.PacketType.BINARY_EVENT:this.onevent(e);break;case n.PacketType.ACK:case n.PacketType.BINARY_ACK:this.onack(e);break;case n.PacketType.DISCONNECT:this.ondisconnect();break;case n.PacketType.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];a("emitting event %j",t),null!=e.id&&(a("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e)}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,a("sending ack %j",r),t.packet({type:n.PacketType.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t?(a("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):a("bad ack %s",e.id)}onconnect(e){a("socket connected with id %s",e),this.id=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:n.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}t.Socket=u},4197:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.url=void 0;const n=s(5769),i=r(s(5579)).default("socket.io-client:url");t.url=function(e,t="",s){let r=e;s=s||"undefined"!=typeof location&&location,null==e&&(e=s.protocol+"//"+s.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?s.protocol+e:s.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==s?s.protocol+"//"+e:"https://"+e),i("parse %s",e),r=n.parse(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(s&&s.port===r.port?"":":"+r.port),r}},2830:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructPacket=t.deconstructPacket=void 0;const r=s(3980);function n(e,t){if(!e)return e;if(r.isBinary(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}if(Array.isArray(e)){const s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=n(e[r],t);return s}if("object"==typeof e&&!(e instanceof Date)){const s={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=n(e[r],t));return s}return e}function i(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=i(e[s],t);else if("object"==typeof e)for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=i(e[s],t));return e}t.deconstructPacket=function(e){const t=[],s=e.data,r=e;return r.data=n(s,t),r.attachments=t.length,{packet:r,buffers:t}},t.reconstructPacket=function(e,t){return e.data=i(e.data,t),e.attachments=void 0,e}},170:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.PacketType=t.protocol=void 0;const r=s(5867),n=s(2830),i=s(3980),o=s(5579).default("socket.io-parser");var a;t.protocol=5,function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(a=t.PacketType||(t.PacketType={}));t.Encoder=class{constructor(e){this.replacer=e}encode(e){return o("encoding packet %j",e),e.type!==a.EVENT&&e.type!==a.ACK||!i.hasBinary(e)?[this.encodeAsString(e)]:(e.type=e.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,this.encodeAsBinary(e))}encodeAsString(e){let t=""+e.type;return e.type!==a.BINARY_EVENT&&e.type!==a.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),o("encoded %j as %s",e,t),t}encodeAsBinary(e){const t=n.deconstructPacket(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}};class c extends r.Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e),t.type===a.BINARY_EVENT||t.type===a.BINARY_ACK?(this.reconstructor=new u(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!i.isBinary(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(void 0===a[s.type])throw new Error("unknown packet type "+s.type);if(s.type===a.BINARY_EVENT||s.type===a.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const n=e.substring(r,t);if(n!=Number(n)||"-"!==e.charAt(t))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}s.nsp=e.substring(r,t)}else s.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const s=e.charAt(t);if(null==s||Number(s)!=s){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!c.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return o("decoded %s as %j",e,s),s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case a.CONNECT:return"object"==typeof t;case a.DISCONNECT:return void 0===t;case a.CONNECT_ERROR:return"string"==typeof t||"object"==typeof t;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(t)&&t.length>0;case a.ACK:case a.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}t.Decoder=c;class u{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},3980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasBinary=t.isBinary=void 0;const s="function"==typeof ArrayBuffer,r=Object.prototype.toString,n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function o(e){return s&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||n&&e instanceof Blob||i&&e instanceof File}t.isBinary=o,t.hasBinary=function e(t,s){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let s=0,r=t.length;s<r;s++)if(e(t[s]))return!0;return!1}if(o(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&e(t[s]))return!0;return!1}},5867:(e,t,s)=>{"use strict";function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}s.r(t),s.d(t,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<r.length;n++)if((s=r[n])===t||s.fn===t){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,t)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var s=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(s.exports,s,s.exports,__webpack_require__),s.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var s in t)__webpack_require__.o(t,s)&&!__webpack_require__.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>Li,CloudServicesRevisionHistoryAdapter:()=>go,CloudServicesTrackChangesAdapter:()=>Zi,PresenceList:()=>ba,RealTimeCollaborativeComments:()=>no,RealTimeCollaborativeEditing:()=>Pi,RealTimeCollaborativeRevisionHistory:()=>So,RealTimeCollaborativeTrackChanges:()=>uo});var e=__webpack_require__(2704),t=__webpack_require__(2209),s=__webpack_require__(1492),r=__webpack_require__(9273),n=__webpack_require__(2417),i=__webpack_require__(7158),o=__webpack_require__.n(i);const a=["listenTo","addToReconnectionStack","websocketgateway-missing-websocket-url","connect","reconnect","_reconnectionStack","delete","disconnected","_domEmitter","stopListening","cloudServices.requestTimeout","cloudServices.connectionTimeout","cloudservices-init","showWarning","isInReconnectionStack","limitExceeded","add","removeFromReconnectionStack","The limit of maximum concurrent connections that the collaboration server can handle has been reached. Try opening the document again in a few minutes. Please contact your system administrator if the problem persists.","init","disconnect","then","catch","Connected users limit exceeded","all","context","CloudServices","online","requires","create","WebSocketGateway","real-time-collaboration","constructor","_shouldPluginsReconnect","token","initialReconnectionInterval","error","config","websocketgateway-plugin-already-registered","_reconnect","connection","webSocketUrl","define","function","connected","destroy","websocketgateway-invalid-plugin-interface","has","state","plugins","change:me","set","get","pluginName","websocketgateway-missing-token","_isBrowserOffline"];var c,u;c=a,u=103,function(e){for(;--e;)c.push(c.shift())}(++u);const d=function(e,t){return a[e-=0]};class l extends e.ContextPlugin{static get[d("0x25")](){return[d("0x23"),r.Notification]}static get[d("0x6")](){return d("0x27")}[d("0x1c")](){const e=this[d("0x22")],s=e.plugins[d("0x5")](d("0x23")),n=e[d("0x2")][d("0x5")](r.Notification);if(!s.token)throw new t.CKEditorError(d("0x7"),this);if(!s[d("0x32")])throw new t.CKEditorError(d("0xb"),this);return this[d("0x4")]("state","connecting"),this[d("0x4")](d("0x8"),!1),this._reconnectionStack=new Set,this[d("0x2a")]=!1,this._domEmitter=Object[d("0x26")](t.DomEmitterMixin),this[d("0x11")].listenTo(window,"offline",(()=>this[d("0x8")]=!0)),this[d("0x11")][d("0x9")](window,d("0x24"),(()=>this[d("0x8")]=!1)),this[d("0x22")][d("0x2e")][d("0x33")](d("0x14"),10),this[d("0x22")][d("0x2e")][d("0x33")]("cloudServices.requestTimeout",20),l[d("0x27")][d("0xc")](s[d("0x2b")],s[d("0x32")],{disconnectOnUnload:!1,timeout:1e3*this[d("0x22")][d("0x2e")][d("0x5")]("cloudServices.connectionTimeout"),requestTimeout:1e3*this.context[d("0x2e")][d("0x5")](d("0x13"))}).then((e=>{if(this[d("0x31")]=e,this.bind(d("0x1")).to(e,d("0x1"),this,d("0x8"),((e,t)=>(d("0x35")!==e&&(this[d("0x2a")]=!0),t||"connected"!==e?d("0x10"):d("0x10")==this[d("0x1")]&&this[d("0x2a")]?(this[d("0x2a")]=!1,this._reconnect(),"connecting"):d("0x35")))),this[d("0x31")].on(d("0x2d"),((e,s)=>{if(d("0x18")!==s.code)throw console[d("0x2d")](s),new t.CKEditorError(d("0x15"),null,{originalError:s});n[d("0x16")](d("0x1b"),{title:d("0x20"),namespace:d("0x28")})})),!e.me)return new Promise((t=>e.on(d("0x3"),t)))}))[d("0x1f")]((e=>{throw console[d("0x2d")](e),new t.CKEditorError(d("0x15"),null,{originalError:e})}))}[d("0xa")](e){if(d("0x34")!=typeof e[d("0xd")])throw new t.CKEditorError(d("0x37"),this);if(this[d("0x17")](e))throw new t.CKEditorError(d("0x2f"),this,{name:e[d("0x29")][d("0x6")]});this[d("0xe")][d("0x19")](e)}[d("0x1a")](e){this[d("0xe")][d("0xf")](e)}[d("0x17")](e){return this[d("0xe")][d("0x0")](e)}[d("0x30")](){return this[d("0x31")][d("0xd")]()[d("0x1e")]((()=>Promise[d("0x21")](Array.from(this[d("0xe")],(e=>e[d("0xd")]()))))).then((()=>this.state=d("0x35")))[d("0x1f")]((e=>{throw console[d("0x2d")](e),new t.CKEditorError("cloudservices-reconnection-error",this[d("0x22")])}))}[d("0x36")](){this[d("0x31")]&&this[d("0x31")][d("0x1d")](),this.state=d("0x10"),this[d("0x11")][d("0x12")](),super[d("0x36")]()}}l[d("0x27")]=o(),l[d("0x2c")]=1e3;const h=["_registeredSessions","allConnectedUsers","get","forEach","size","remove","sessionAdd:","requires","getUser","unregister","_uniqueUsersCount","values","channelSessions","delete","state","mySessionId","sessions-register-already-registered","connected","has","_users","_createUser","role","plugins","getUserBySessionId","sessionId","sessions-unregister-not-exist","set","user","add","change:state","listenTo","context","defineMe","init","clear","getUserSessions","channelConnectedUsers","stopListening","register","_handleSessionRemove","addUser","assign","getUserRole","_handleSessionAdd","fire","Sessions","connection"];var f,p;f=h,p=258,function(e){for(;--e;)f.push(f.shift())}(++p);const y=function(e,t){return h[e-=0]};class m extends e.ContextPlugin{static get pluginName(){return y("0x16")}static get[y("0x1f")](){return[l,n.Users]}[y("0xa")](){const e=this[y("0x8")],s=e[y("0x2e")].get(l);this[y("0x24")]=new Map,this[y("0xd")]=new Map,this[y("0x19")]=new t.Collection,this[y("0x18")]=new Map,this[y("0x22")]=0,this[y("0x2b")]=e.plugins[y("0x1a")](n.Users),this[y("0x7")](s,y("0x6"),((e,t,s)=>{if("connected"!==s)this[y("0x24")][y("0x1b")]((e=>e.clear())),this[y("0xd")][y("0x1b")]((e=>e[y("0xb")]())),this[y("0x19")][y("0xb")]();else for(const[e,t]of this[y("0x18")])for(const s of t)this[y("0x14")](e,s)})),this[y("0x2c")](s[y("0x17")].me,!0)}[y("0xf")](e,s){if(this._registeredSessions[y("0x2a")](e))throw new t.CKEditorError(y("0x28"),null,{channelId:e});this[y("0x18")][y("0x3")](e,s),this[y("0x24")][y("0x3")](e,new t.Collection),this[y("0xd")][y("0x3")](e,new t.Collection),this[y("0x7")](s,y("0x5"),((t,s)=>this._handleSessionAdd(e,s))),this[y("0x7")](s,y("0x1d"),((t,s)=>this[y("0x10")](e,s)));for(const t of s)this[y("0x14")](e,t)}[y("0x21")](e){if(!this[y("0x18")][y("0x2a")](e))throw new t.CKEditorError(y("0x2"),null,{channelId:e});const s=this._registeredSessions[y("0x1a")](e);this[y("0xe")](s);for(const t of s)y("0x29")===this.context[y("0x2e")][y("0x1a")](l)[y("0x26")]&&this[y("0x10")](e,t);this[y("0x18")][y("0x25")](e),this.channelSessions.delete(e),this.channelConnectedUsers[y("0x25")](e)}get[y("0x27")](){return this[y("0x8")].plugins[y("0x1a")](l)[y("0x17")][y("0x1")]}[y("0x0")](e){for(const t of this[y("0x24")].values())for(const s of t)if(s.id===e)return s[y("0x4")]}[y("0xc")](e,t){const s=t?[this[y("0x24")][y("0x1a")](t)]:this.channelSessions[y("0x23")](),r=new Set;for(const t of s)for(const s of t)s[y("0x4")].id===e.id&&r.add(s.id);return r}[y("0x13")](e){for(const t of this[y("0x24")][y("0x23")]())for(const s of t)if(s.user===e)return s[y("0x2d")]}[y("0x14")](e,t){if(y("0x29")!==this[y("0x8")][y("0x2e")][y("0x1a")](l)[y("0x26")])return;const s=t.user,r=this._users[y("0x20")](s.id)||this[y("0x2c")](s),n=Object[y("0x12")]({},t,{user:r});this[y("0x24")][y("0x1a")](e).add(n);const i=this[y("0xd")].get(e);i.has(r.id)||i[y("0x5")](r),this.allConnectedUsers[y("0x2a")](r.id)||this[y("0x19")][y("0x5")](r),this[y("0x15")](y("0x1e")+e,{channelId:e,session:n})}[y("0x10")](e,t){if(y("0x29")!==this[y("0x8")][y("0x2e")].get(l).state)return;const s=this[y("0xd")][y("0x1a")](e),r=t[y("0x4")];this[y("0x24")][y("0x1a")](e)[y("0x1d")](t.id),s[y("0x2a")](r.id)&&!this.getUserSessions(r,e)[y("0x1c")]&&s[y("0x1d")](r.id),this.allConnectedUsers[y("0x1a")](r.id)&&!this[y("0xc")](r).size&&this[y("0x19")][y("0x1d")](r.id)}[y("0x2c")](e,t){const s=this[y("0x2b")][y("0x11")](e);return t&&this[y("0x2b")][y("0x9")](e.id),s.orderNumber=this[y("0x22")]++,s}}var v=__webpack_require__(7594),x=__webpack_require__.n(v),g=__webpack_require__(9940),_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};x()(g.Z,_);g.Z.locals;const b=["markerRange","$text","getRange","editor","isInline","rootName","conversion","start","setCustomProperty","getContainedElement","user:range:","fromRange","enqueueChange","createUIElement","clear","removeMarker","markerName","document","data-session-id","user:","hasDomSelection","isCollapsed","set","markers","checkChild","render","has","editingDowncast","ck-user__selection","end","$graveyard","init","update:user:range","addMarker","undo","userPositionMarker","marker","hasContent","pluginName","split","priority","isObject","orderNumber","detach","startsWith","getMarkerClass","deletionPosition","root","updateMarker","getPositions","schema","highest","newRange","getAttribute","plugins","color","toRange","getCustomProperty","delete","element","_createdBatches","getStart","user:position","nodeAfter","model",'​<span class="ck-user__marker-line"><span class="ck-user__marker-dot"></span></span>',"requires","change","view","innerHTML","name","markerToHighlight","oldRange","createUserMarkerOperations","batch","createRange","user:position:","isSimilar","markerToElement","get","mySessionId","getNearestSelectionRange","size","editing","getUserBySessionId","for","isLimit","ck-user__marker "];var w,O;w=b,O=200,function(e){for(;--e;)w.push(w.shift())}(++O);const E=function(e,t){return b[e-=0]};class S extends e.Plugin{static get[E("0x2a")](){return[m]}static get[E("0xe")](){return"UserMarkers"}[E("0x7")](){const e=this[E("0x43")],t=e[E("0x1e")][E("0x37")](m);e[E("0x46")][E("0x3d")]("editingDowncast")[E("0x36")]({model:E("0x26"),view:(s,{writer:r})=>function(e,t,s,r){const n=e[E("0x50")][E("0xf")](":")[2],i=s.getUserBySessionId(n);if(!i||n===s[E("0x38")])return;if(!r[E("0x28")][E("0x1a")][E("0x0")](e[E("0x40")].start,"$text"))return;const o={class:E("0x3f")+i.color[E("0x15")](),"data-name":i[E("0x2e")],"data-session-id":n},a=r[E("0x28")][E("0x57")][E("0x37")](e.markerName)[E("0x25")](),c=a[E("0x27")],u=r[E("0x28")][E("0x1a")];if(c&&u[E("0x11")](c)&&u[E("0x44")](c)&&!r[E("0x28")][E("0x57")][E("0x37")](E("0x4a")+n)[E("0x42")]()[E("0x55")])return;const d=a.parent;r[E("0x28")][E("0x1a")][E("0x3e")](d)&&!r.model[E("0xd")](d)&&(o.contenteditable=!1);const l=function(e,t){const s=e[E("0x4d")]("span",t);return e[E("0x48")](E("0xb"),!0,s),s[E("0x1")]=function(e){const t=this.toDomElement(e);return t[E("0x2d")]=E("0x29"),t},s[E("0x35")]=function(e){return this[E("0x21")]("userPositionMarker")&&e[E("0x21")](E("0xb"))&&this[E("0x1d")](E("0x52"))==e.getAttribute(E("0x52"))},s}(t,o);return l[E("0x10")]=1e3+i[E("0x12")],l}(s,r,t,e)}),e[E("0x46")][E("0x3d")](E("0x3"))[E("0x2f")]({model:"user:range",view:e=>function(e,t){const s=e[E("0x50")][E("0xf")](":")[2];if(s===t[E("0x38")])return;const r=t[E("0x3c")](s);return r?{id:s,classes:[E("0x4"),r[E("0x1f")].getSelectionClass()],attributes:{"data-session-id":s},priority:2e3+r.orderNumber}:{id:s}}(e,t)}),function(e){const t=e[E("0x28")],r=new Map,n=e.plugins[E("0x37")](m);t[E("0x57")].on(E("0x8"),((i,o,a,c)=>{if(!c&&r[E("0x37")](o[E("0x2e")]))return r.get(o[E("0x2e")])[E("0x13")](),void r.delete(o[E("0x2e")]);const u=o[E("0x2e")][E("0xf")](":")[2];if(u===n.mySessionId)return;const d=E("0x34")+u;t.markers[E("0x2")](d)&&e.editing.reconvertMarker(d),o.on("change:range",((e,n,i)=>{if(E("0x6")!=n[E("0x17")][E("0x45")]&&"$graveyard"==o[E("0x42")]()[E("0x17")][E("0x45")]&&!r.has(o[E("0x2e")])){const e=t[E("0x1a")][E("0x39")](i[E("0x16")]);if(e){const n=s.LiveRange[E("0x4b")](e);r[E("0x56")](o.name,n),n.on("change:range",((e,s,i)=>{if("$graveyard"==n[E("0x17")][E("0x45")]){const e=t[E("0x1a")][E("0x39")](i[E("0x16")]);e?(n[E("0x47")]=e[E("0x47")],n[E("0x5")]=e[E("0x5")]):(r[E("0x22")](o[E("0x2e")]),n[E("0x13")]())}}))}}}))})),t.document.on(E("0x2b"),(()=>{r[E("0x3a")]>0&&t[E("0x4c")]({isUndoable:!1},(e=>{for(const[s,n]of r)E("0x6")==t.markers.get(s).getRange()[E("0x17")][E("0x45")]&&(T(s.split(":")[2],n[E("0x20")](),t,e),n[E("0x13")]());r[E("0x4e")]()}))}))}(e)}afterInit(){const e=this[E("0x43")],t=e.commands[E("0x37")](E("0xa"));t&&e[E("0x28")].on("applyOperation",((s,r)=>{const n=r[0];if(E("0xc")!=n.type||!n.name[E("0x14")](E("0x53")))return;const i=n[E("0x32")];t[E("0x24")][E("0x2")](i)&&(n[E("0x1c")]=n[E("0x30")]?e[E("0x28")][E("0x33")](n[E("0x30")][E("0x47")],n[E("0x30")][E("0x5")]):null)}),{priority:E("0x1b")})}[E("0x31")](){const e=this[E("0x43")],t=e[E("0x28")][E("0x51")],s=e[E("0x1e")][E("0x37")](m);e[E("0x28")].enqueueChange({isUndoable:!1},(r=>{const n=E("0x4a")+s[E("0x38")],i=E("0x34")+s[E("0x38")],o=e.model[E("0x57")].has(n);e[E("0x3b")][E("0x2c")][E("0x54")]?T(s[E("0x38")],t.selection.getFirstRange(),e[E("0x28")],r):o&&(r[E("0x4f")](n),r[E("0x4f")](i))}))}}function T(e,t,s,r){const n=E("0x4a")+e,i=E("0x34")+e,o=t[E("0x49")]();let a=t[E("0x47")];o&&o.is(E("0x23"),"tableCell")&&(a=function(e,t){for(const s of e[E("0x19")]())if(t[E("0x1a")][E("0x0")](s,E("0x41")))return s}(t,s),t=r[E("0x33")](a)),a=r[E("0x33")](a),s[E("0x57")].has(n)?(r[E("0x18")](n,{range:t}),r.updateMarker(i,{range:a})):(r[E("0x9")](n,{range:t,usingOperation:!0}),r.addMarker(i,{range:a,usingOperation:!0}))}function k(e,t,s){const r=e.t;switch(t){case"PENDING_ACTION_SENDING_DATA":return r({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return r("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return r("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return r("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return r("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return r("Synchronization issue");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return r({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},s)}}var C=__webpack_require__(9933),I=__webpack_require__.n(C);const A=function(){this.__data__=[],this.size=0};const R=function(e,t){return e===t||e!=e&&t!=t};const j=function(e,t){for(var s=e.length;s--;)if(R(e[s][0],t))return s;return-1};var N=Array.prototype.splice;const P=function(e){var t=this.__data__,s=j(t,e);return!(s<0)&&(s==t.length-1?t.pop():N.call(t,s,1),--this.size,!0)};const D=function(e){var t=this.__data__,s=j(t,e);return s<0?void 0:t[s][1]};const M=function(e){return j(this.__data__,e)>-1};const B=function(e,t){var s=this.__data__,r=j(s,e);return r<0?(++this.size,s.push([e,t])):s[r][1]=t,this};function J(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}J.prototype.clear=A,J.prototype.delete=P,J.prototype.get=D,J.prototype.has=M,J.prototype.set=B;const U=J;const V=function(){this.__data__=new U,this.size=0};const q=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s};const F=function(e){return this.__data__.get(e)};const L=function(e){return this.__data__.has(e)};const Y="object"==typeof global&&global&&global.Object===Object&&global;var z="object"==typeof self&&self&&self.Object===Object&&self;const G=Y||z||Function("return this")();const $=G.Symbol;var W=Object.prototype,H=W.hasOwnProperty,K=W.toString,Z=$?$.toStringTag:void 0;const X=function(e){var t=H.call(e,Z),s=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var n=K.call(e);return r&&(t?e[Z]=s:delete e[Z]),n};var Q=Object.prototype.toString;const ee=function(e){return Q.call(e)};var te=$?$.toStringTag:void 0;const se=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?X(e):ee(e)};const re=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const ne=function(e){if(!re(e))return!1;var t=se(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const ie=G["__core-js_shared__"];var oe,ae=(oe=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"";const ce=function(e){return!!ae&&ae in e};var ue=Function.prototype.toString;const de=function(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var le=/^\[object .+?Constructor\]$/,he=Function.prototype,fe=Object.prototype,pe=he.toString,ye=fe.hasOwnProperty,me=RegExp("^"+pe.call(ye).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ve=function(e){return!(!re(e)||ce(e))&&(ne(e)?me:le).test(de(e))};const xe=function(e,t){return null==e?void 0:e[t]};const ge=function(e,t){var s=xe(e,t);return ve(s)?s:void 0};const _e=ge(G,"Map");const be=ge(Object,"create");const we=function(){this.__data__=be?be(null):{},this.size=0};const Oe=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var Ee=Object.prototype.hasOwnProperty;const Se=function(e){var t=this.__data__;if(be){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return Ee.call(t,e)?t[e]:void 0};var Te=Object.prototype.hasOwnProperty;const ke=function(e){var t=this.__data__;return be?void 0!==t[e]:Te.call(t,e)};const Ce=function(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=be&&void 0===t?"__lodash_hash_undefined__":t,this};function Ie(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}Ie.prototype.clear=we,Ie.prototype.delete=Oe,Ie.prototype.get=Se,Ie.prototype.has=ke,Ie.prototype.set=Ce;const Ae=Ie;const Re=function(){this.size=0,this.__data__={hash:new Ae,map:new(_e||U),string:new Ae}};const je=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Ne=function(e,t){var s=e.__data__;return je(t)?s["string"==typeof t?"string":"hash"]:s.map};const Pe=function(e){var t=Ne(this,e).delete(e);return this.size-=t?1:0,t};const De=function(e){return Ne(this,e).get(e)};const Me=function(e){return Ne(this,e).has(e)};const Be=function(e,t){var s=Ne(this,e),r=s.size;return s.set(e,t),this.size+=s.size==r?0:1,this};function Je(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}Je.prototype.clear=Re,Je.prototype.delete=Pe,Je.prototype.get=De,Je.prototype.has=Me,Je.prototype.set=Be;const Ue=Je;const Ve=function(e,t){var s=this.__data__;if(s instanceof U){var r=s.__data__;if(!_e||r.length<199)return r.push([e,t]),this.size=++s.size,this;s=this.__data__=new Ue(r)}return s.set(e,t),this.size=s.size,this};function qe(e){var t=this.__data__=new U(e);this.size=t.size}qe.prototype.clear=V,qe.prototype.delete=q,qe.prototype.get=F,qe.prototype.has=L,qe.prototype.set=Ve;const Fe=qe;const Le=function(e,t){for(var s=-1,r=null==e?0:e.length;++s<r&&!1!==t(e[s],s,e););return e};const Ye=function(){try{var e=ge(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const ze=function(e,t,s){"__proto__"==t&&Ye?Ye(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s};var Ge=Object.prototype.hasOwnProperty;const $e=function(e,t,s){var r=e[t];Ge.call(e,t)&&R(r,s)&&(void 0!==s||t in e)||ze(e,t,s)};const We=function(e,t,s,r){var n=!s;s||(s={});for(var i=-1,o=t.length;++i<o;){var a=t[i],c=r?r(s[a],e[a],a,s,e):void 0;void 0===c&&(c=e[a]),n?ze(s,a,c):$e(s,a,c)}return s};const He=function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r};const Ke=function(e){return null!=e&&"object"==typeof e};const Ze=function(e){return Ke(e)&&"[object Arguments]"==se(e)};var Xe=Object.prototype,Qe=Xe.hasOwnProperty,et=Xe.propertyIsEnumerable;const tt=Ze(function(){return arguments}())?Ze:function(e){return Ke(e)&&Qe.call(e,"callee")&&!et.call(e,"callee")};const st=Array.isArray;const rt=function(){return!1};var nt="object"==typeof exports&&exports&&!exports.nodeType&&exports,it=nt&&"object"==typeof module&&module&&!module.nodeType&&module,ot=it&&it.exports===nt?G.Buffer:void 0;const at=(ot?ot.isBuffer:void 0)||rt;var ct=/^(?:0|[1-9]\d*)$/;const ut=function(e,t){var s=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==s||"symbol"!=s&&ct.test(e))&&e>-1&&e%1==0&&e<t};const dt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var lt={};lt["[object Float32Array]"]=lt["[object Float64Array]"]=lt["[object Int8Array]"]=lt["[object Int16Array]"]=lt["[object Int32Array]"]=lt["[object Uint8Array]"]=lt["[object Uint8ClampedArray]"]=lt["[object Uint16Array]"]=lt["[object Uint32Array]"]=!0,lt["[object Arguments]"]=lt["[object Array]"]=lt["[object ArrayBuffer]"]=lt["[object Boolean]"]=lt["[object DataView]"]=lt["[object Date]"]=lt["[object Error]"]=lt["[object Function]"]=lt["[object Map]"]=lt["[object Number]"]=lt["[object Object]"]=lt["[object RegExp]"]=lt["[object Set]"]=lt["[object String]"]=lt["[object WeakMap]"]=!1;const ht=function(e){return Ke(e)&&dt(e.length)&&!!lt[se(e)]};const ft=function(e){return function(t){return e(t)}};var pt="object"==typeof exports&&exports&&!exports.nodeType&&exports,yt=pt&&"object"==typeof module&&module&&!module.nodeType&&module,mt=yt&&yt.exports===pt&&Y.process;const vt=function(){try{var e=yt&&yt.require&&yt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}();var xt=vt&&vt.isTypedArray;const gt=xt?ft(xt):ht;var _t=Object.prototype.hasOwnProperty;const bt=function(e,t){var s=st(e),r=!s&&tt(e),n=!s&&!r&&at(e),i=!s&&!r&&!n&>(e),o=s||r||n||i,a=o?He(e.length,String):[],c=a.length;for(var u in e)!t&&!_t.call(e,u)||o&&("length"==u||n&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ut(u,c))||a.push(u);return a};var wt=Object.prototype;const Ot=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||wt)};const Et=function(e,t){return function(s){return e(t(s))}};const St=Et(Object.keys,Object);var Tt=Object.prototype.hasOwnProperty;const kt=function(e){if(!Ot(e))return St(e);var t=[];for(var s in Object(e))Tt.call(e,s)&&"constructor"!=s&&t.push(s);return t};const Ct=function(e){return null!=e&&dt(e.length)&&!ne(e)};const It=function(e){return Ct(e)?bt(e):kt(e)};const At=function(e,t){return e&&We(t,It(t),e)};const Rt=function(e){var t=[];if(null!=e)for(var s in Object(e))t.push(s);return t};var jt=Object.prototype.hasOwnProperty;const Nt=function(e){if(!re(e))return Rt(e);var t=Ot(e),s=[];for(var r in e)("constructor"!=r||!t&&jt.call(e,r))&&s.push(r);return s};const Pt=function(e){return Ct(e)?bt(e,!0):Nt(e)};const Dt=function(e,t){return e&&We(t,Pt(t),e)};var Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bt=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,Jt=Bt&&Bt.exports===Mt?G.Buffer:void 0,Ut=Jt?Jt.allocUnsafe:void 0;const Vt=function(e,t){if(t)return e.slice();var s=e.length,r=Ut?Ut(s):new e.constructor(s);return e.copy(r),r};const qt=function(e,t){var s=-1,r=e.length;for(t||(t=Array(r));++s<r;)t[s]=e[s];return t};const Ft=function(e,t){for(var s=-1,r=null==e?0:e.length,n=0,i=[];++s<r;){var o=e[s];t(o,s,e)&&(i[n++]=o)}return i};const Lt=function(){return[]};var Yt=Object.prototype.propertyIsEnumerable,zt=Object.getOwnPropertySymbols;const Gt=zt?function(e){return null==e?[]:(e=Object(e),Ft(zt(e),(function(t){return Yt.call(e,t)})))}:Lt;const $t=function(e,t){return We(e,Gt(e),t)};const Wt=function(e,t){for(var s=-1,r=t.length,n=e.length;++s<r;)e[n+s]=t[s];return e};const Ht=Et(Object.getPrototypeOf,Object);const Kt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Wt(t,Gt(e)),e=Ht(e);return t}:Lt;const Zt=function(e,t){return We(e,Kt(e),t)};const Xt=function(e,t,s){var r=t(e);return st(e)?r:Wt(r,s(e))};const Qt=function(e){return Xt(e,It,Gt)};const es=function(e){return Xt(e,Pt,Kt)};const ts=ge(G,"DataView");const ss=ge(G,"Promise");const rs=ge(G,"Set");const ns=ge(G,"WeakMap");var is="[object Map]",os="[object Promise]",as="[object Set]",cs="[object WeakMap]",us="[object DataView]",ds=de(ts),ls=de(_e),hs=de(ss),fs=de(rs),ps=de(ns),ys=se;(ts&&ys(new ts(new ArrayBuffer(1)))!=us||_e&&ys(new _e)!=is||ss&&ys(ss.resolve())!=os||rs&&ys(new rs)!=as||ns&&ys(new ns)!=cs)&&(ys=function(e){var t=se(e),s="[object Object]"==t?e.constructor:void 0,r=s?de(s):"";if(r)switch(r){case ds:return us;case ls:return is;case hs:return os;case fs:return as;case ps:return cs}return t});const ms=ys;var vs=Object.prototype.hasOwnProperty;const xs=function(e){var t=e.length,s=new e.constructor(t);return t&&"string"==typeof e[0]&&vs.call(e,"index")&&(s.index=e.index,s.input=e.input),s};const gs=G.Uint8Array;const _s=function(e){var t=new e.constructor(e.byteLength);return new gs(t).set(new gs(e)),t};const bs=function(e,t){var s=t?_s(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)};var ws=/\w*$/;const Os=function(e){var t=new e.constructor(e.source,ws.exec(e));return t.lastIndex=e.lastIndex,t};var Es=$?$.prototype:void 0,Ss=Es?Es.valueOf:void 0;const Ts=function(e){return Ss?Object(Ss.call(e)):{}};const ks=function(e,t){var s=t?_s(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)};const Cs=function(e,t,s){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return _s(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return bs(e,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ks(e,s);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return Os(e);case"[object Symbol]":return Ts(e)}};var Is=Object.create;const As=function(){function e(){}return function(t){if(!re(t))return{};if(Is)return Is(t);e.prototype=t;var s=new e;return e.prototype=void 0,s}}();const Rs=function(e){return"function"!=typeof e.constructor||Ot(e)?{}:As(Ht(e))};const js=function(e){return Ke(e)&&"[object Map]"==ms(e)};var Ns=vt&&vt.isMap;const Ps=Ns?ft(Ns):js;const Ds=function(e){return Ke(e)&&"[object Set]"==ms(e)};var Ms=vt&&vt.isSet;const Bs=Ms?ft(Ms):Ds;var Js="[object Arguments]",Us="[object Function]",Vs="[object Object]",qs={};qs[Js]=qs["[object Array]"]=qs["[object ArrayBuffer]"]=qs["[object DataView]"]=qs["[object Boolean]"]=qs["[object Date]"]=qs["[object Float32Array]"]=qs["[object Float64Array]"]=qs["[object Int8Array]"]=qs["[object Int16Array]"]=qs["[object Int32Array]"]=qs["[object Map]"]=qs["[object Number]"]=qs["[object Object]"]=qs["[object RegExp]"]=qs["[object Set]"]=qs["[object String]"]=qs["[object Symbol]"]=qs["[object Uint8Array]"]=qs["[object Uint8ClampedArray]"]=qs["[object Uint16Array]"]=qs["[object Uint32Array]"]=!0,qs["[object Error]"]=qs[Us]=qs["[object WeakMap]"]=!1;const Fs=function e(t,s,r,n,i,o){var a,c=1&s,u=2&s,d=4&s;if(r&&(a=i?r(t,n,i,o):r(t)),void 0!==a)return a;if(!re(t))return t;var l=st(t);if(l){if(a=xs(t),!c)return qt(t,a)}else{var h=ms(t),f=h==Us||"[object GeneratorFunction]"==h;if(at(t))return Vt(t,c);if(h==Vs||h==Js||f&&!i){if(a=u||f?{}:Rs(t),!c)return u?Zt(t,Dt(a,t)):$t(t,At(a,t))}else{if(!qs[h])return i?t:{};a=Cs(t,h,c)}}o||(o=new Fe);var p=o.get(t);if(p)return p;o.set(t,a),Bs(t)?t.forEach((function(n){a.add(e(n,s,r,n,t,o))})):Ps(t)&&t.forEach((function(n,i){a.set(i,e(n,s,r,i,t,o))}));var y=l?void 0:(d?u?es:Qt:u?Pt:It)(t);return Le(y||t,(function(n,i){y&&(n=t[i=n]),$e(a,i,e(n,s,r,i,t,o))})),a};const Ls=function(e){return Fs(e,5)},Ys=["getDescriptor","registerDescriptor","finish","toObject","fromJSON","create","decompress","compress","_protobuf","build","protobuffactory-cannot-get-descriptor-before-build","decode","Root","_protobufRoot","lookupType"];var zs,Gs;zs=Ys,Gs=306,function(e){for(;--e;)zs.push(zs.shift())}(++Gs);const $s=function(e,t){return Ys[e-=0]};class Ws{constructor(){this._description={nested:{}}}[$s("0xa")](e,t){this._description.nested[e]=Ls(t)}[$s("0x3")](){this[$s("0x7")]=I()[$s("0x6")][$s("0xd")](this._description)}[$s("0x9")](e){if(!this[$s("0x7")])throw new t.CKEditorError($s("0x4"),this);return new Hs(this[$s("0x7")][$s("0x8")](e))}}class Hs{constructor(e){this[$s("0x2")]=e}[$s("0x1")](e){const t=this._protobuf.verify(e);if(t)throw Error(t);return this[$s("0x2")].encode(this._protobuf[$s("0xe")](e))[$s("0xb")]()}[$s("0x0")](e){return this._protobuf[$s("0xc")](this[$s("0x2")][$s("0x5")](e),{oneofs:!0})}}var Ks,Zs,Xs=["Position","string","repeated","uint32","bool"];Ks=Xs,Zs=183,function(e){for(;--e;)Ks.push(Ks.shift())}(++Zs);var Qs=function(e,t){return Xs[e-=0]};const er={Position:{fields:{root:{type:Qs("0x3"),id:1},rootMain:{type:Qs("0x1"),id:2},rootGraveyard:{type:"bool",id:3},path:{rule:Qs("0x4"),type:Qs("0x0"),id:4},stickiness:{type:"string",id:5}}},Range:{fields:{start:{type:Qs("0x2"),id:1},end:{type:Qs("0x2"),id:2}}},Element:{fields:{name:{type:Qs("0x3"),id:1},children:{rule:Qs("0x4"),type:"Element",id:2},data:{type:Qs("0x3"),id:3},attributesBoolean:{keyType:Qs("0x3"),type:Qs("0x1"),id:4},attributesJson:{type:Qs("0x3"),id:5}}}};const tr=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const sr=function(e){return this.__data__.has(e)};function rr(e){var t=-1,s=null==e?0:e.length;for(this.__data__=new Ue;++t<s;)this.add(e[t])}rr.prototype.add=rr.prototype.push=tr,rr.prototype.has=sr;const nr=rr;const ir=function(e,t){for(var s=-1,r=null==e?0:e.length;++s<r;)if(t(e[s],s,e))return!0;return!1};const or=function(e,t){return e.has(t)};const ar=function(e,t,s,r,n,i){var o=1&s,a=e.length,c=t.length;if(a!=c&&!(o&&c>a))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var l=-1,h=!0,f=2&s?new nr:void 0;for(i.set(e,t),i.set(t,e);++l<a;){var p=e[l],y=t[l];if(r)var m=o?r(y,p,l,t,e,i):r(p,y,l,e,t,i);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!ir(t,(function(e,t){if(!or(f,t)&&(p===e||n(p,e,s,r,i)))return f.push(t)}))){h=!1;break}}else if(p!==y&&!n(p,y,s,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h};const cr=function(e){var t=-1,s=Array(e.size);return e.forEach((function(e,r){s[++t]=[r,e]})),s};const ur=function(e){var t=-1,s=Array(e.size);return e.forEach((function(e){s[++t]=e})),s};var dr=$?$.prototype:void 0,lr=dr?dr.valueOf:void 0;const hr=function(e,t,s,r,n,i,o){switch(s){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new gs(e),new gs(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return R(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=cr;case"[object Set]":var c=1&r;if(a||(a=ur),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;r|=2,o.set(e,t);var d=ar(a(e),a(t),r,n,i,o);return o.delete(e),d;case"[object Symbol]":if(lr)return lr.call(e)==lr.call(t)}return!1};var fr=Object.prototype.hasOwnProperty;const pr=function(e,t,s,r,n,i){var o=1&s,a=Qt(e),c=a.length;if(c!=Qt(t).length&&!o)return!1;for(var u=c;u--;){var d=a[u];if(!(o?d in t:fr.call(t,d)))return!1}var l=i.get(e),h=i.get(t);if(l&&h)return l==t&&h==e;var f=!0;i.set(e,t),i.set(t,e);for(var p=o;++u<c;){var y=e[d=a[u]],m=t[d];if(r)var v=o?r(m,y,d,t,e,i):r(y,m,d,e,t,i);if(!(void 0===v?y===m||n(y,m,s,r,i):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var x=e.constructor,g=t.constructor;x==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof g&&g instanceof g||(f=!1)}return i.delete(e),i.delete(t),f};var yr="[object Arguments]",mr="[object Array]",vr="[object Object]",xr=Object.prototype.hasOwnProperty;const gr=function(e,t,s,r,n,i){var o=st(e),a=st(t),c=o?mr:ms(e),u=a?mr:ms(t),d=(c=c==yr?vr:c)==vr,l=(u=u==yr?vr:u)==vr,h=c==u;if(h&&at(e)){if(!at(t))return!1;o=!0,d=!1}if(h&&!d)return i||(i=new Fe),o||gt(e)?ar(e,t,s,r,n,i):hr(e,t,c,s,r,n,i);if(!(1&s)){var f=d&&xr.call(e,"__wrapped__"),p=l&&xr.call(t,"__wrapped__");if(f||p){var y=f?e.value():e,m=p?t.value():t;return i||(i=new Fe),n(y,m,s,r,i)}}return!!h&&(i||(i=new Fe),pr(e,t,s,r,n,i))};const _r=function e(t,s,r,n,i){return t===s||(null==t||null==s||!Ke(t)&&!Ke(s)?t!=t&&s!=s:gr(t,s,r,n,e,i))};const br=function(e,t){return _r(e,t)},wr=["path","rootGraveyard","root","rootMain","length","nodes","$graveyard","main"];var Or,Er;Or=wr,Er=247,function(e){for(;--e;)Or.push(Or.shift())}(++Er);const Sr=function(e,t){return wr[e-=0]};function Tr(e,t){const s=Ls(e);return s[Sr("0x1")][s[Sr("0x1")][Sr("0x5")]-1]+=t,s}function kr(e,t){return e.root===t.root&&br(e[Sr("0x1")],t[Sr("0x1")])}function Cr(e){Ar(e,(e=>("main"==e[Sr("0x3")]?(e[Sr("0x4")]=!0,delete e[Sr("0x3")]):Sr("0x7")==e[Sr("0x3")]&&(e.rootGraveyard=!0,delete e[Sr("0x3")]),e)))}function Ir(e){Ar(e,(e=>(e[Sr("0x4")]?(e[Sr("0x3")]=Sr("0x0"),delete e.rootMain):e.rootGraveyard&&(e.root=Sr("0x7"),delete e[Sr("0x2")]),e)))}function Ar(e,t){for(const s in e){const r=e[s];Sr("0x6")!==s&&re(r)&&(r.path&&(r[Sr("0x3")]||r.rootMain||r[Sr("0x2")])?e[s]=t(r):Ar(r,t))}return e}const Rr=["operationName","buffers","shift","push","compress","decompress","types","_protobufDescriptor"];var jr,Nr;jr=Rr,Nr=176,function(e){for(;--e;)jr.push(jr.shift())}(++Nr);const Pr=function(e,t){return Rr[e-=0]};class Dr{constructor(e,t,s){this.id=e,this[Pr("0x0")]=t,this[Pr("0x7")]=s}[Pr("0x4")](e,t){const s=t[Pr("0x2")]();Cr(s),e.buffers.push(this[Pr("0x7")].compress(s)),e[Pr("0x6")][Pr("0x3")](this.id)}[Pr("0x5")](e,t){t[Pr("0x6")][Pr("0x2")]();const s=this[Pr("0x7")].decompress(t[Pr("0x1")][Pr("0x2")]());Ir(s),s.__className=this.operationName,e[Pr("0x3")](s)}}const Mr=["bool","stringify","Json","push","compress","string","parse","boolean","__className","operationName","Boolean","buffers","description","Range","oldValue","shift","types","_protobufDescriptor","newValue"];var Br,Jr;Br=Mr,Jr=453,function(e){for(;--e;)Br.push(Br.shift())}(++Jr);const Ur=function(e,t){return Mr[e-=0]};class Vr extends Dr{static get[Ur("0xf")](){return{fields:{range:{type:Ur("0x10"),id:1},key:{type:Ur("0x8"),id:2},oldValueBoolean:{type:Ur("0x3"),id:3},oldValueJson:{type:Ur("0x8"),id:4},newValueBoolean:{type:"bool",id:5},newValueJson:{type:Ur("0x8"),id:6},wasUndone:{type:Ur("0x3"),id:7}}}}[Ur("0x7")](e,t){const s=t[Ur("0x12")]();qr("oldValue",s),qr(Ur("0x2"),s),Cr(s),e[Ur("0xe")][Ur("0x6")](this[Ur("0x1")][Ur("0x7")](s)),e[Ur("0x0")][Ur("0x6")](this.id)}decompress(e,t){const{types:s,buffers:r}=t,n=this[Ur("0x1")].decompress(r[Ur("0x12")]());s[Ur("0x12")](),Fr(Ur("0x11"),n),Fr(Ur("0x2"),n),Ir(n),n[Ur("0xb")]=this[Ur("0xc")],e[Ur("0x6")](n)}}function qr(e,t){const s=t[e];Ur("0xa")==typeof s?t[e+Ur("0xd")]=s:t[e+Ur("0x5")]=JSON[Ur("0x4")](s)}function Fr(e,t){const s=e+"Json";t[s]?(t[e]=JSON[Ur("0x9")](t[s]),delete t[s]):(t[e]=t[e+Ur("0xd")],delete t[e+Ur("0xd")])}const Lr=["parse","children","shift","_protobufDescriptor","attributesBoolean","stringify","keys","types","__className","compress","operationName","push","bool","decompress","description","attributesJson","attributes","Position","nodes","Element"];var Yr,zr;Yr=Lr,zr=156,function(e){for(;--e;)Yr.push(Yr.shift())}(++zr);const Gr=function(e,t){return Lr[e-=0]};class $r extends Dr{static get[Gr("0x12")](){return{fields:{position:{type:Gr("0x1"),id:1},nodes:{rule:"repeated",type:Gr("0x3"),id:2},shouldReceiveAttributes:{type:"bool",id:3},wasUndone:{type:Gr("0x10"),id:4}}}}[Gr("0xd")](e,t){const s=t[Gr("0x6")]();Wr(s[Gr("0x2")]),Cr(s),e.buffers[Gr("0xf")](this[Gr("0x7")][Gr("0xd")](s)),e[Gr("0xb")][Gr("0xf")](this.id)}[Gr("0x11")](e,t){const{types:s,buffers:r}=t,n=this[Gr("0x7")][Gr("0x11")](r.shift());s.shift(),n[Gr("0x2")]||(n[Gr("0x2")]=[]),Hr(n[Gr("0x2")]),Ir(n),n[Gr("0xc")]=this[Gr("0xe")],e[Gr("0xf")](n)}}function Wr(e){for(const t of e){if(t.attributes){const e=t[Gr("0x0")];Kr(e)?t[Gr("0x8")]=e:t[Gr("0x13")]=JSON[Gr("0x9")](e)}t[Gr("0x5")]&&Wr(t[Gr("0x5")])}}function Hr(e){for(const t of e)(t[Gr("0x8")]||t[Gr("0x13")])&&(t.attributesBoolean?(t[Gr("0x0")]=t[Gr("0x8")],delete t.attributesBoolean):(t[Gr("0x0")]=JSON[Gr("0x4")](t.attributesJson),delete t[Gr("0x13")])),t[Gr("0x5")]&&Hr(t[Gr("0x5")])}function Kr(e){return Object[Gr("0xa")](e).every((t=>"boolean"==typeof e[t]))}const Zr=["bool","oldRange","newRange","Range","decompress","string"];var Xr,Qr;Xr=Zr,Qr=446,function(e){for(;--e;)Xr.push(Xr.shift())}(++Qr);const en=function(e,t){return Zr[e-=0]};class tn extends Dr{static get description(){return{fields:{name:{type:en("0x3"),id:1},oldRange:{type:en("0x1"),id:2},newRange:{type:en("0x1"),id:3},affectsData:{type:en("0x4"),id:4},wasUndone:{type:en("0x4"),id:5}}}}[en("0x2")](e,t){super[en("0x2")](e,t);const s=e[e.length-1];s[en("0x5")]||(s.oldRange=null),s.newRange||(s[en("0x0")]=null)}}var sn,rn,nn=["description","Position","bool","uint32"];sn=nn,rn=335,function(e){for(;--e;)sn.push(sn.shift())}(++rn);var on=function(e,t){return nn[e-=0]};class an extends Dr{static get[on("0x1")](){return{fields:{sourcePosition:{type:on("0x2"),id:1},targetPosition:{type:on("0x2"),id:2},graveyardPosition:{type:on("0x2"),id:3},howMany:{type:on("0x0"),id:4},wasUndone:{type:on("0x3"),id:5}}}}}var cn,un,dn=["bool"];cn=dn,un=220,function(e){for(;--e;)cn.push(cn.shift())}(++un);var ln=function(e,t){return dn[e-=0]};class hn extends Dr{static get description(){return{fields:{sourcePosition:{type:"Position",id:1},howMany:{type:"uint32",id:2},targetPosition:{type:"Position",id:3},wasUndone:{type:ln("0x0"),id:4}}}}}var fn,pn,yn=["Position","description","string"];fn=yn,pn=365,function(e){for(;--e;)fn.push(fn.shift())}(++pn);var mn=function(e,t){return yn[e-=0]};class vn extends Dr{static get[mn("0x2")](){return{fields:{position:{type:mn("0x1"),id:1},oldName:{type:mn("0x0"),id:2},newName:{type:mn("0x0"),id:3},wasUndone:{type:"bool",id:4}}}}}const xn=["description","root","range","fields"];var gn,_n;gn=xn,_n=325,function(e){for(;--e;)gn.push(gn.shift())}(++_n);const bn=function(e,t){return xn[e-=0]};class wn extends Vr{static get description(){const e=Vr[bn("0x3")];return delete e[bn("0x2")][bn("0x1")],e[bn("0x2")][bn("0x0")]={type:"string",id:1},e}}var On,En,Sn=["uint32","description","Position"];On=Sn,En=197,function(e){for(;--e;)On.push(On.shift())}(++En);var Tn=function(e,t){return Sn[e-=0]};class kn extends Dr{static get[Tn("0x2")](){return{fields:{splitPosition:{type:Tn("0x0"),id:1},graveyardPosition:{type:"Position",id:2},howMany:{type:Tn("0x1"),id:3},insertionPosition:{type:Tn("0x0"),id:4},wasUndone:{type:"bool",id:5}}}}}var Cn,In,An=["push","types","operationName","decompress","shift","compress"];Cn=An,In=107,function(e){for(;--e;)Cn.push(Cn.shift())}(++In);var Rn=function(e,t){return An[e-=0]};class jn extends Dr{[Rn("0x0")](e,t){t[Rn("0x5")](),e[Rn("0x2")][Rn("0x1")](this.id)}[Rn("0x4")](e,t){t[Rn("0x2")].shift(),e[Rn("0x1")]({__className:this[Rn("0x3")]})}}const Nn=["__className","replace","name","compress","_omittedNamespace","length","decompress","startsWith"];var Pn,Dn;Pn=Nn,Dn=190,function(e){for(;--e;)Pn.push(Pn.shift())}(++Dn);const Mn=function(e,t){return Nn[e-=0]};class Bn extends tn{constructor(e,t,s,r){super(e,t,s),this[Mn("0x6")]=r+":"}[Mn("0x5")](e,t){return!("MarkerOperation"!=t[0][Mn("0x2")]||!t[0].name[Mn("0x1")](this._omittedNamespace)||(t[0].name=t[0][Mn("0x4")][Mn("0x3")](new RegExp("^"+this[Mn("0x6")]),""),super[Mn("0x5")](e,t),0))}[Mn("0x0")](e,t){super.decompress(e,t);const s=e[e[Mn("0x7")]-1];s[Mn("0x4")]=this[Mn("0x6")]+s[Mn("0x4")]}}const Jn=["_compressSingleOperation","shift","_context","_compareOperations","length","_combineNext","types","push","buffers","compress","_splitCurrent"];var Un,Vn;Un=Jn,Vn=182,function(e){for(;--e;)Un.push(Un.shift())}(++Vn);const qn=function(e,t){return Jn[e-=0]};class Fn{constructor(e,t){this.id=e,this[qn("0x7")]=t}[qn("0x3")](e,t){let s;for(;t[qn("0x9")]>1&&this[qn("0x8")](t[0],t[1]);)s?(s=this[qn("0xa")](t.shift(),s),e.types[qn("0x1")](0)):(s=Ls(t.shift()),e[qn("0x0")].push(this.id));return!!s&&(s=this._combineNext(t[qn("0x6")](),s),e[qn("0x0")][qn("0x1")](0),e[qn("0x2")][qn("0x1")](this[qn("0x5")](s)),!0)}decompress(e,t){const s=this._decompressSingleOperation(t);for(;0==t[qn("0x0")][0];)t[qn("0x0")][qn("0x6")](),e[qn("0x1")](this[qn("0x4")](s));e[qn("0x1")](s)}}const Ln=["length","_context","_compressSingleOperation","attributes","compress","every","keys","data","_splitCurrent","buffers","substr","_combineNext","value","wasUndone","_getCompressorByName","InsertOperation","position","from","decompress","__className","iterator","nodes"];var Yn,zn;Yn=Ln,zn=217,function(e){for(;--e;)Yn.push(Yn.shift())}(++zn);const Gn=function(e,t){return Ln[e-=0]};class $n extends Fn{[Gn("0xe")](e,t){return t[Gn("0x2")][0][Gn("0xa")]+=e.nodes[0].data,t}[Gn("0xb")](e){const t=Ls(e),s=t[Gn("0x2")][0],r=e[Gn("0x2")][0],n=r[Gn("0xa")][Symbol[Gn("0x1")]]().next()[Gn("0xf")],i=n[Gn("0x3")];return s[Gn("0xa")]=n,r[Gn("0xa")]=r[Gn("0xa")][Gn("0xd")](i),e.position=Tr(e[Gn("0x13")],i),t}_compareOperations(e,t){if(Wn(e)&&Wn(t)){const s=e.nodes[0].data[Gn("0x3")],r=kr(Tr(e[Gn("0x13")],s),t[Gn("0x13")]),n=e[Gn("0x2")][0],i=t[Gn("0x2")][0];return r&&function(e,t){const s=Object[Gn("0x9")](e[Gn("0x6")]||{}),r=Object.keys(t.attributes||{});return s.length===r[Gn("0x3")]&&s[Gn("0x8")]((s=>t[Gn("0x6")][s]&&t[Gn("0x6")][s]===e[Gn("0x6")][s]))}(n,i)}return!1}[Gn("0x5")](e){const t={types:[],buffers:[],baseVersion:0};return this[Gn("0x4")][Gn("0x11")](Gn("0x12"))[Gn("0x7")](t,[e]),t[Gn("0xc")][0]}_decompressSingleOperation(e){const t=[];return this[Gn("0x4")]._getCompressorByName("InsertOperation")[Gn("0x15")](t,e),t[0]}}function Wn(e){return Gn("0x12")==e[Gn("0x0")]&&1==e[Gn("0x2")][Gn("0x3")]&&e[Gn("0x2")][0][Gn("0xa")]&&!e[Gn("0x10")]&&1==Array[Gn("0x14")](e.nodes[0][Gn("0xa")])[Gn("0x3")]}const Hn=["__className","_getCompressorByName","sourcePosition","_compressSingleOperation","MoveOperation","_combineNext","decompress","$graveyard","compress","howMany","targetPosition","buffers","root","wasUndone","_context","_splitCurrent"];var Kn,Zn;Kn=Hn,Zn=117,function(e){for(;--e;)Kn.push(Kn.shift())}(++Zn);const Xn=function(e,t){return Hn[e-=0]};class Qn extends Fn{[Xn("0x0")](e,t){return t[Xn("0x4")]++,t.sourcePosition=Ls(e[Xn("0xd")]),t}[Xn("0xa")](e){const t=Ls(e);return e[Xn("0x4")]--,t[Xn("0x4")]=1,t[Xn("0xd")]=Tr(t[Xn("0xd")],e.howMany),t}_compareOperations(e,t){return!(!ei(e)||!ei(t))&&kr(Tr(e[Xn("0xd")],-1),t[Xn("0xd")])&&kr(e[Xn("0x5")],t[Xn("0x5")])}[Xn("0xe")](e){const t={types:[],buffers:[],baseVersion:0};return this[Xn("0x9")][Xn("0xc")](Xn("0xf"))[Xn("0x3")](t,[e]),t[Xn("0x6")][0]}_decompressSingleOperation(e){const t=[];return this[Xn("0x9")]._getCompressorByName("MoveOperation")[Xn("0x1")](t,e),t[0]}}function ei(e){return Xn("0xf")==e[Xn("0xb")]&&Xn("0x2")==e[Xn("0x5")][Xn("0x7")]&&1==e[Xn("0x4")]&&!e[Xn("0x8")]}const ti=["MoveOperation","buffers","sourcePosition","$graveyard","root","_combineNext","_splitCurrent","_decompressSingleOperation","_getCompressorByName","targetPosition","decompress","_compressSingleOperation","howMany","_compareOperations","wasUndone","_context"];var si,ri;si=ti,ri=160,function(e){for(;--e;)si.push(si.shift())}(++ri);const ni=function(e,t){return ti[e-=0]};class ii extends Fn{[ni("0x5")](e,t){return t[ni("0xc")]++,t}[ni("0x6")](e){const t=Ls(e);return t.howMany=1,e.howMany--,t}[ni("0xd")](e,t){return!(!oi(e)||!oi(t))&&kr(e.sourcePosition,t[ni("0x2")])&&kr(e.targetPosition,t.targetPosition)}[ni("0xb")](e){const t={types:[],buffers:[],baseVersion:0};return this[ni("0xf")][ni("0x8")](ni("0x0")).compress(t,[e]),t[ni("0x1")][0]}[ni("0x7")](e){const t=[];return this[ni("0xf")][ni("0x8")](ni("0x0"))[ni("0xa")](t,e),t[0]}}function oi(e){return ni("0x0")==e.__className&&ni("0x3")==e[ni("0x9")][ni("0x4")]&&1==e[ni("0xc")]&&!e[ni("0xe")]}const ai=["oldRange","_compressSingleOperation","decompress","shift","buffers","_context","user:","_decompressSingleOperation","toNone","newRange","end","push","user:position:","stickiness","__className","MarkerOperation","_getCompressorByName","types","start","split","name","startsWith","compress"];var ci,ui;ci=ai,ui=489,function(e){for(;--e;)ci.push(ci.shift())}(++ui);const di=function(e,t){return ai[e-=0]};class li extends Fn{compress(e,t){if(s=t[0],r=t[1],!(s&&r&&"MarkerOperation"==s.__className&&"MarkerOperation"==r[di("0x8")]&&s.name[di("0xf")](di("0x0"))&&r[di("0xe")][di("0xf")](di("0x0"))&&s[di("0xe")]!=r[di("0xe")]))return!1;var s,r;const n=t[di("0x14")]();return n[di("0x11")]=null,n[di("0x3")]&&kr(n.newRange[di("0xc")],n[di("0x3")][di("0x4")])&&(n[di("0x3")][di("0x4")]=null),t.shift(),e.types.push(this.id),e[di("0xb")][di("0x5")](0),e.buffers[di("0x5")](this._compressSingleOperation(n)),!0}[di("0x13")](e,t){const s=this[di("0x1")](t);s[di("0x3")]&&!s.newRange[di("0x4")]&&(s.newRange[di("0x4")]=Ls(s[di("0x3")][di("0xc")]));const r=Ls(s);r[di("0x3")]&&(r[di("0x3")][di("0xc")][di("0x7")]=di("0x2"),r[di("0x3")][di("0x4")]=Ls(r[di("0x3")][di("0xc")])),r.name=di("0x6")+r[di("0xe")][di("0xd")](":")[2],t[di("0xb")][di("0x14")](),e[di("0x5")](s),e.push(r)}[di("0x12")](e){const t={types:[],buffers:[],baseVersion:0};return this._context[di("0xa")]("MarkerOperation")[di("0x10")](t,[e]),t[di("0x15")][0]}_decompressSingleOperation(e){const t=[];return this[di("0x16")][di("0xa")](di("0x9"))[di("0x13")](t,e),t[0]}}const hi=["SplitOperation","registerDescriptor","Position","_protobufFactory","TypingAction","_compressorById","_compressorByName","DeletingAction","_registerCompressor","ForwardDeletingAction","decompress","no-operations-provided","set","__className","build","types","CommentMarkerOperation","RenameOperation","SuggestionMarkerOperation","UserSelectionAction","_registerOperationCompressor","baseVersion","AttributeOperation","compress","getDescriptor","Element","get","_registerActionCompressor","NoOperation","RootAttributeOperation","suggestion","MoveOperation","length","_getCompressorByName","MarkerOperation","description"];var fi,pi;fi=hi,pi=395,function(e){for(;--e;)fi.push(fi.shift())}(++pi);const yi=function(e,t){return hi[e-=0]};class mi{constructor(){this[yi("0x6")]=new Map,this[yi("0x7")]=new Map,this[yi("0x4")]=new Ws,this[yi("0x4")][yi("0x2")](yi("0x3"),er[yi("0x3")]),this[yi("0x4")][yi("0x2")]("Range",er.Range),this[yi("0x4")][yi("0x2")]("Element",er[yi("0x1a")]),this[yi("0x4")][yi("0x2")](yi("0x17"),Vr[yi("0x0")]),this._protobufFactory[yi("0x2")]("InsertOperation",$r.description),this._protobufFactory[yi("0x2")](yi("0x23"),tn[yi("0x0")]),this[yi("0x4")].registerDescriptor("MergeOperation",an.description),this[yi("0x4")][yi("0x2")](yi("0x20"),hn[yi("0x0")]),this[yi("0x4")].registerDescriptor("RenameOperation",vn[yi("0x0")]),this[yi("0x4")][yi("0x2")](yi("0x1e"),wn[yi("0x0")]),this[yi("0x4")][yi("0x2")]("SplitOperation",kn[yi("0x0")]),this[yi("0x4")][yi("0xf")](),this._registerCompressor(1,"NoOperation",new jn(1,yi("0x1d"))),this[yi("0x15")](10,yi("0x17"),Vr),this[yi("0x15")](11,"InsertOperation",$r),this[yi("0x15")](12,yi("0x23"),tn),this[yi("0x15")](13,"MergeOperation",an),this[yi("0x15")](14,yi("0x20"),hn),this._registerOperationCompressor(15,yi("0x12"),vn),this[yi("0x15")](16,yi("0x1e"),wn),this[yi("0x15")](17,yi("0x1"),kn);const e=this[yi("0x4")][yi("0x19")](yi("0x23"));this[yi("0x9")](18,yi("0x11"),new Bn(18,yi("0x23"),e,"comment")),this._registerCompressor(19,yi("0x13"),new Bn(19,"MarkerOperation",e,yi("0x1f"))),this._registerActionCompressor(100,yi("0x5"),$n),this[yi("0x1c")](101,"DeletingAction",Qn),this[yi("0x1c")](102,"ForwardDeletingAction",ii),this[yi("0x1c")](103,yi("0x14"),li)}_registerOperationCompressor(e,t,s){const r=new s(e,t,this[yi("0x4")].getDescriptor(t));this[yi("0x9")](e,t,r)}[yi("0x1c")](e,t,s){const r=new s(e,this);this[yi("0x9")](e,t,r)}_registerCompressor(e,t,s){this[yi("0x6")].set(e,s),this[yi("0x7")][yi("0xd")](t,s)}[yi("0x22")](e){return this[yi("0x7")][yi("0x1b")](e)}[yi("0x18")](e){if(!e||!e[0])throw new t.CKEditorError(yi("0xc"),this);const s={types:[],buffers:[],baseVersion:e[0][yi("0x16")]};for(;e[yi("0x21")];)this[yi("0x22")](yi("0x14")).compress(s,e)||this[yi("0x22")](yi("0x5"))[yi("0x18")](s,e)||this._getCompressorByName(yi("0x8")).compress(s,e)||this._getCompressorByName(yi("0xa")).compress(s,e)||this[yi("0x22")](yi("0x11")).compress(s,e)||this._getCompressorByName("SuggestionMarkerOperation")[yi("0x18")](s,e)||this[yi("0x22")](e[0][yi("0xe")])[yi("0x18")](s,e);return s}[yi("0xb")](e){const t=[];for(;e[yi("0x10")][yi("0x21")];)this[yi("0x6")].get(e[yi("0x10")][0])[yi("0xb")](t,e);return t.forEach(((t,s)=>t[yi("0x16")]=e[yi("0x16")]+s)),t}}var vi=__webpack_require__(7622),xi=__webpack_require__.n(vi),gi=__webpack_require__(7530),_i=__webpack_require__.n(gi);const bi=["_lastSyncedOperationId","applyOperation","push","_sendBufferedOperationsDelayId","add","markers","startsWith","_saveOperationInBuffer","includes","editing","reconnection: flushed session","_applyOperationsSet","then","cloud-services-internal-error: Request timeout.","_getOperationsFromInitData","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","real-time-collaboration","end","metadata","destroy","_handleInitialConnectionData","realtimecollaborationclient-sendbufferedoperations","cloudServices.bundleVersion","getOperations","channelSessions","batch","getMany","state","parse","finally","serverHistory","requires","editor","pluginName","_clearPendingAction","_disconnectService","history","addUser","realtimecollaborationclient-initservice-incorrect-server-operation","isEnabled","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","realtimecollaborationclient-init-connection-failed","suppressErrorInCollaboration","plugins","compress","data","_service","_currentBufferDelay","operationsReceived","cloudDocumentVersion","_handleReconnectionResponse","reconnect","lastDocumentSession","isReadOnly","round","code","wasUndone","change:hasDomSelection","_authorId","roots","sessionAdd:","_pendingAction","_updateServerHistory","_hasSynchronizationProblem","_bufferedOperations","permissions","register","_setUpDataInit","409","lastOperationId","connect","connected","_refreshUserSelectionMarkers","marker","_ignoredOperations","connection","_lastServerVersion","disableReadOnlyMode","_isDisconnection","_shouldSendSelectionUpdate","enableReadOnlyMode","return","listenTo","_isEditingAllowed","stop","sessionCreatedAt","createPositionFromPath","_isConnected","realtimecollaborationclient-handleserverresponse","wereChangesApplied","locale","change:_isEditingAllowed","view","bind","_handleServerResponse","addOperation","createdAt","realtimecollaborationclient-init-document-already-initialized","_initThrowingOnDataSet","map","userId","init","_handleReceivedOperations","createRange","_document","get","disconnected","_offset","rtc-offline","_isPendingUpdate","setPermissions","_operationIdentifier","_operationToId","_handleExternalOperations","size","cs:removeUser","filter","affectsData","_shouldSendUpdate","realtimecollaborationclient-init-non-existent-root","_sendBufferedOperationsDelay","removeFromReconnectionStack","_setPendingAction","_crash","404","high","_handleReconnectionError","off","unregister","apply","document","showWarning","_initSessionsHandling","mySessionId","collaboration-missing-channelid","ready","realtimecollaborationclient-init-session-connection-error","PENDING_ACTION_SENDING_DATA","getRoot","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.","setIdForTheLastOperation","isDocumentOperation","_compressor","_handleSendingSelectionMarkers","getIdOfTheLastOperation","getOperationAuthor","_fetchMissingUsers","type","catch","path","Permissions","error","directChange","_assignOperationsMetaData","_channelId","remove","initData","_disconnectionOperations","Synchronization issue","_baseBufferDelay","_decompressOperations","_connectAfterSessionHasBeenFlushed","enqueueChange","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","_sendBufferedOperations","string","version","forEach","_knownOperations","set","_compressOperations","_sendBufferedOperationsDelayed","cloud-services-internal-error: Not connected.","getUser","change:range","decompress","_connectService","slice","_isInit","reset","clone","realtimecollaborationclient-initservice-internal-error","has","define","collaboration","_hasSelectionChanged","model","getDocumentDetails","lastOperationAcceptedAt","getConnectedSessions","sessionId","lastSyncVersion","message","config","baseVersion","length","fire","CollaborativeEditingService"];var wi,Oi;wi=bi,Oi=192,function(e){for(;--e;)wi.push(wi.shift())}(++Oi);const Ei=function(e,t){return bi[e-=0]};let Si=1;class Ti extends e.Plugin{static get[Ei("0x25")](){return[l,m,S,e.PendingActions,n.Users,r.Notification]}static get[Ei("0x27")](){return"RealTimeCollaborationClient"}get[Ei("0x37")](){return this[Ei("0x52")]+this[Ei("0x71")]}get[Ei("0x52")](){return this.serverHistory[Ei("0xac")]-this[Ei("0x71")]}get[Ei("0xc5")](){const e=this[Ei("0x24")].getOperations();for(let t=e[Ei("0x3")]-1;t>=0;t--){const s=e[t];if(!this[Ei("0xa3")][Ei("0xbc")](s))return s[Ei("0x2")]+1-this[Ei("0x71")]}return 0}[Ei("0x6b")](){const e=this.editor,r=e[Ei("0x31")][Ei("0x6f")](n.Users),i=e[Ei("0x31")][Ei("0x6f")](l);if(this[Ei("0x71")]=0,this[Ei("0xc4")]=null,this[Ei("0x24")]=new s.History,this[Ei("0x26")][Ei("0x1")][Ei("0xbd")](Ei("0xbe"),{}),this._channelId=e.config[Ei("0x6f")]("collaboration.channelId"),!this[Ei("0xa0")])throw new t.CKEditorError(Ei("0x8c"),this);this[Ei("0x58")](r,Ei("0x97"),((e,t)=>{const s=t[0];s[Ei("0x40")]&&(e[Ei("0x57")]=r[Ei("0xb3")](s[Ei("0x40")]),e.stop()),null===s[Ei("0x40")]&&(e[Ei("0x57")]=null,e[Ei("0x5a")]())}),{priority:Ei("0x83")});const o=e[Ei("0x1")][Ei("0x6f")](Ei("0x1c"))||t.version;this._service=new(Ti[Ei("0x5")])(o,this[Ei("0xa0")]),this[Ei("0x6e")]=this[Ei("0x26")].model[Ei("0x88")],this[Ei("0x94")]=new mi,this[Ei("0x46")]=[],this[Ei("0xae")]=new WeakSet,this[Ei("0xaf")](Ei("0x73"),!1),this[Ei("0xaf")](Ei("0x45"),!1),this[Ei("0x43")]=null,this[Ei("0xbf")]=!1,this[Ei("0x9")]=null,this[Ei("0xa5")]=300,this[Ei("0x35")]=this[Ei("0xa5")],this[Ei("0x6")]=null,this._disconnectionOperations=new WeakSet,this[Ei("0x75")]=new Ii(this[Ei("0xa3")]),this[Ei("0x58")](e.model[Ei("0x88")].selection,Ei("0xb4"),((e,t)=>{t[Ei("0x9e")]&&this[Ei("0x4e")]()})),this[Ei("0x58")](e[Ei("0xf")][Ei("0x62")],Ei("0x3f"),(()=>{this[Ei("0x4e")]()})),this[Ei("0x68")](),e.model.on(Ei("0x7"),((e,t)=>{const s=t[0];s[Ei("0x93")]&&(this._saveOperationInBuffer(s),this[Ei("0x7c")]()&&this[Ei("0xb1")]())})),this._setUpDataInit(),this[Ei("0x63")](Ei("0x59")).to(i,Ei("0x21"),this,Ei("0x45"),((e,t)=>Ei("0x4d")===e&&!t)),this.on(Ei("0x61"),(()=>{this[Ei("0x59")]?e[Ei("0x53")](Ei("0x72")):e[Ei("0x56")](Ei("0x72"))})),this[Ei("0x59")]?e[Ei("0x53")](Ei("0x72")):e[Ei("0x56")](Ei("0x72")),this[Ei("0xaf")](Ei("0x5d"),!1)}async reconnect(){const e=this.editor[Ei("0x31")][Ei("0x6f")](m),t=this.editor[Ei("0x31")][Ei("0x6f")](l);try{this._isPendingUpdate=!0,e[Ei("0x86")](this._channelId);const s=await this[Ei("0x34")].reconnect(t[Ei("0x51")],this.lastSyncVersion);await this[Ei("0x38")](s)&&(this._isPendingUpdate=!1,this[Ei("0x28")]());const r=await this[Ei("0x34")].getConnectedSessions();e[Ei("0x48")](this[Ei("0xa0")],r),this[Ei("0x95")](),this[Ei("0x5d")]=!0}catch(e){if(r=e,Ei("0x82")===r[Ei("0x3d")]&&this[Ei("0xc4")])await this[Ei("0xa7")]();else if(s=e,Ei("0x4a")===s[Ei("0x3d")]){const e=k(this.editor[Ei("0x60")],"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");this[Ei("0x84")](e)}else{if(!(e instanceof ki))throw e;this._handleReconnectionError()}}var s,r}[Ei("0x19")](){const e=this.editor[Ei("0x31")][Ei("0x6f")](l),t=this[Ei("0x26")][Ei("0x31")][Ei("0x6f")](m);this[Ei("0x26")][Ei("0x56")]("rtc-destroyed"),t[Ei("0x1e")][Ei("0xbc")](this._channelId)&&t[Ei("0x86")](this._channelId),e[Ei("0x7f")](this),this[Ei("0x29")](),super[Ei("0x19")]()}async[Ei("0x38")](e){if(this[Ei("0xc4")]!==e[Ei("0xc4")]&&this[Ei("0x6")]!==e[Ei("0x4b")])throw new ki;return this[Ei("0xc4")]=e[Ei("0xc4")],this._handleServerResponse([],{...e,wereChangesApplied:!1,data:e[Ei("0x33")]},Ei("0x39"))}async[Ei("0xb6")](e,t=!1){const{connection:s}=this.editor[Ei("0x31")][Ei("0x6f")](l);Ti.CollaborativeEditingService[Ei("0xc3")](s,this[Ei("0xa0")])[Ei("0x12")]((e=>this[Ei("0x8a")](e)))[Ei("0x9a")]((e=>{this[Ei("0x81")](Ei("0x8e"),e)})),this[Ei("0x58")](this[Ei("0x34")],Ei("0x36"),this[Ei("0x6c")][Ei("0x63")](this)),this[Ei("0x58")](this[Ei("0x34")],Ei("0x9d"),((e,t)=>{this[Ei("0x81")](Ei("0xbb"),t)})),this.listenTo(this._service,Ei("0x70"),(()=>{this[Ei("0x5d")]=!1}));const r=this[Ei("0x75")].getIdOfTheLastOperation(e),n=await this[Ei("0x34")][Ei("0x4c")](s,this[Ei("0xb0")](e),r);if(this[Ei("0xc4")]=n.sessionId,n[Ei("0x5f")]&&(this._isPendingUpdate=!1,this._clearPendingAction()),t){if(!n[Ei("0x5f")])return void this[Ei("0x84")]();this[Ei("0x24")][Ei("0xb9")](),this._offset=n.offset,this[Ei("0x24")][Ei("0xac")]=this._offset,await this[Ei("0x64")](e,n,Ei("0x10"))}else await this._handleInitialConnectionData(n,e);this[Ei("0x95")](),this[Ei("0x5d")]=!0}_handleSendingSelectionMarkers(){const e=this[Ei("0x26")][Ei("0x31")].get(m),t=e[Ei("0x1e")][Ei("0x6f")](this[Ei("0xa0")]);t&&t[Ei("0x3")]>1?(this[Ei("0xbf")]=!0,this[Ei("0xb1")]()):this[Ei("0x58")](e,Ei("0x42")+this[Ei("0xa0")],(t=>{e[Ei("0x1e")][Ei("0x6f")](this[Ei("0xa0")])[Ei("0x3")]>1&&(this[Ei("0xbf")]=!0,this._sendBufferedOperationsDelayed(),t[Ei("0x85")]())}))}async _handleReceivedOperations(e,t,s,r){if(!this[Ei("0x73")]&&this._document.version==t){const e=this[Ei("0xa6")](s,r);await this._fetchMissingUsers(e),this[Ei("0x77")](e,t,s[Ei("0x4b")])||this[Ei("0x81")](Ei("0x2c"))}}async[Ei("0xa7")](){this[Ei("0x29")]();const{locale:e}=this.editor;let t;try{t=await this._service[Ei("0xc1")]()}catch(t){const s=k(e,Ei("0x15"));return void this[Ei("0x84")](s)}const s=t.currentDocumentSession||t[Ei("0x3a")];if(this._lastSyncedOperationId===s[Ei("0x4b")])await this[Ei("0xb6")](this[Ei("0x26")][Ei("0xc0")].document.history[Ei("0x1d")](),!0);else{const t=k(e,Ei("0x2e"));this[Ei("0x84")](t)}}[Ei("0x29")](){this[Ei("0x34")].disconnect(),this[Ei("0x46")]=[],clearTimeout(this[Ei("0x7e")]),this.stopListening(this._service)}[Ei("0x8a")](e){const t=this[Ei("0x26")][Ei("0x31")][Ei("0x6f")](m);this[Ei("0x58")](t,Ei("0x42")+this[Ei("0xa0")],((e,{session:s})=>{if(s.id===t[Ei("0x8b")]){e[Ei("0x85")]();const t=this[Ei("0x26")].plugins[Ei("0xbc")]("CommentsOnly")&&this.editor[Ei("0x31")][Ei("0x6f")]("CommentsOnly");let r=s[Ei("0x47")];t&&t[Ei("0x2d")]&&(r=r[Ei("0x7a")]((e=>"document:write"!==e))),this[Ei("0x26")][Ei("0x31")][Ei("0x6f")](Ei("0x9c"))[Ei("0x74")](r,this[Ei("0xa0")])}})),t[Ei("0x48")](this[Ei("0xa0")],e)}[Ei("0x68")](){const e=this.editor[Ei("0x33")][Ei("0xaf")];this.editor[Ei("0x33")][Ei("0xaf")]=(...s)=>{if(!s[s.length-1][Ei("0x30")])throw new t.CKEditorError(Ei("0xa9"),this);e[Ei("0x87")](this[Ei("0x26")].data,s)}}[Ei("0x49")](){this[Ei("0x26")][Ei("0x33")].on(Ei("0x6b"),((e,[s])=>{if(this._document[Ei("0xac")])throw new t.CKEditorError(Ei("0x67"),this);e.stop(),this[Ei("0x80")]();const r=this._getOperationsFromInitData(s);e[Ei("0x57")]=this._connectService(r)[Ei("0x12")]((()=>{this.editor[Ei("0x31")][Ei("0x6f")](l).addToReconnectionStack(this),this.editor[Ei("0x33")][Ei("0x4")](Ei("0x8d"))})).catch((e=>this._crash(Ei("0x2f"),e)))[Ei("0x23")]((()=>this[Ei("0x28")]()))}),{priority:Ei("0x83")})}async _fetchMissingUsers(e){const t=this.editor[Ei("0x31")][Ei("0x6f")](n.Users),{connection:s}=this.editor[Ei("0x31")].get(l),r=new Set;for(const s of e){const e=s[Ei("0x40")];e&&!t[Ei("0xb3")](e)&&r.add(e)}if(0===r[Ei("0x78")])return;const i=await _i()[Ei("0x20")](s,Array.from(r));for(const e of i)t[Ei("0xb3")](e.id)||t[Ei("0x2b")](e)}[Ei("0x14")](e){const r=this[Ei("0x26")][Ei("0xc0")],n=[];let i=0;const o=Ei("0xab")==typeof e?{main:e}:e;for(const e of Object.keys(o)){if(!this[Ei("0x6e")][Ei("0x41")].has(e))throw new t.CKEditorError(Ei("0x7d"),this);const a=this.editor.data[Ei("0x22")](o[e]),c=this[Ei("0x6e")][Ei("0x90")](e),u=new s.InsertOperation(r.createPositionAt(c,0),a,i++);n[Ei("0x8")](u);for(const[e,t]of a[Ei("0xb")]){const o=r[Ei("0x6d")](r[Ei("0x5c")](c,t.start[Ei("0x9b")].slice()),r[Ei("0x5c")](c,t[Ei("0x17")].path[Ei("0xb7")]())),a=new s.MarkerOperation(e,null,o,r.markers,!0,i++);n[Ei("0x8")](a)}}return n}async[Ei("0x1a")](e,t){let s;this[Ei("0x71")]=e.offset;const r=e[Ei("0x5f")]&&!e[Ei("0xa2")],n=r?0:e[Ei("0x33")].baseVersion;if(r)s=t,s[Ei("0xad")]((t=>{t[Ei("0x66")]=e[Ei("0x5b")],t._isInit=!0,t[Ei("0x40")]=null})),this[Ei("0x11")](s,r);else{if(e[Ei("0xa2")]){const t=this[Ei("0x14")](e.initData);this[Ei("0x6e")][Ei("0x2a")][Ei("0xac")]=-t.length,t[Ei("0xad")]((s=>{s[Ei("0x2")]-=t[Ei("0x3")],s.createdAt=e.sessionCreatedAt,s[Ei("0xb8")]=!0,s[Ei("0x40")]=null})),this[Ei("0x11")](t,!0),this.serverHistory[Ei("0xac")]=-t[Ei("0x3")]+this[Ei("0x71")],this[Ei("0x44")](t)}this._document[Ei("0x2a")][Ei("0xac")]=n,s=this._decompressOperations(e[Ei("0x33")],e[Ei("0x18")]),await this[Ei("0x98")](s),this[Ei("0x11")](s,r)}e[Ei("0x4b")]&&(this[Ei("0x75")].setIdForTheLastOperation(s,e[Ei("0x4b")]),this[Ei("0x6")]=e[Ei("0x4b")]),this[Ei("0x24")].version=n+this._offset,this[Ei("0x44")](s)}_crash(e,s){throw this._isPendingUpdate=!0,s&&console[Ei("0x9d")](s),new t.CKEditorError(e,this[Ei("0x26")])}[Ei("0xd")](e){this[Ei("0xae")][Ei("0xbc")](e)||(this[Ei("0xae")][Ei("0xa")](e),this[Ei("0x46")][Ei("0x8")](e),this[Ei("0x43")]||Ei("0x4f")==e[Ei("0x99")]&&!e[Ei("0x7b")]||this[Ei("0x80")]())}[Ei("0xb1")](e=!1){!e&&this[Ei("0x73")]||(this[Ei("0x73")]=!0,clearTimeout(this._sendBufferedOperationsDelayId),this[Ei("0x9")]=setTimeout((()=>{this[Ei("0xaa")]()[Ei("0x12")]((e=>{e&&(this[Ei("0x28")](),this._isPendingUpdate=!1)}))[Ei("0x9a")]((e=>{if(this[Ei("0x28")](),this[Ei("0x73")]=!1,!((t=e).message[Ei("0xc")](Ei("0xb2"))||t[Ei("0x0")].startsWith("cloud-services-internal-error: Collaborative Editing Service is not connected.")||t[Ei("0x0")][Ei("0xc")](Ei("0x13"))))throw e;var t}))}),this[Ei("0x35")]))}async _sendBufferedOperations(){const e=this.editor[Ei("0x31")][Ei("0x6f")](S);if(this[Ei("0x55")]()&&(e.createUserMarkerOperations(),this[Ei("0xbf")]=!1),!this[Ei("0x7c")]())return!0;const t=[...this._bufferedOperations];for(const e of t)e[Ei("0x3e")]=this[Ei("0x6e")][Ei("0x2a")].isUndoneOperation(e);const s=this[Ei("0x75")][Ei("0x96")](t),r=Si++,n=this[Ei("0xb0")](t),i=await this[Ei("0x34")].sendOperations(n,n.baseVersion,s);try{return await this[Ei("0x64")](t,i,r)}catch(e){return this._crash(Ei("0x1b"),e)}}async[Ei("0x64")](e,t,s){if(t[Ei("0x9d")])throw t[Ei("0x9d")];let r=!1;if(t[Ei("0x5f")]){t[Ei("0x4b")]&&(this[Ei("0x6")]=t.lastOperationId),this[Ei("0x46")]=this._bufferedOperations[Ei("0x7a")]((t=>!e[Ei("0xe")](t)));for(const s of e)s.createdAt=t[Ei("0xc2")];this._updateServerHistory(e),r=!0,this[Ei("0x35")]=this._baseBufferDelay}else{const e=this._decompressOperations(t.data,t[Ei("0x18")])[Ei("0x7a")]((e=>e.baseVersion>=this[Ei("0x52")]));await this[Ei("0x98")](e),r=this[Ei("0x77")](e,t[Ei("0xac")],t[Ei("0x4b")]),this[Ei("0x35")]=Math[Ei("0x3c")](this._currentBufferDelay/2)}return r?!this._shouldSendUpdate()||(this[Ei("0xb1")](!0),!1):this._crash(Ei("0x5e"))}[Ei("0x77")](e,t,r){try{const n={document:this._document,useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:o,originalOperations:a}=(0,s.transformSets)(e,this[Ei("0x46")],n);Ci(i,this[Ei("0x6e")][Ei("0xac")]),Ci(o,t);for(const e of i){const t=a.get(e);e[Ei("0x40")]=t?t[Ei("0x40")]:null}r&&(this._operationIdentifier.setIdForTheLastOperation(e,r),this[Ei("0x6")]=r),this[Ei("0x46")]=[...o],this[Ei("0x11")](i),this._updateServerHistory(e)}catch(e){return console[Ei("0x9d")](e),!1}return!0}[Ei("0x11")](e,t=!1){this[Ei("0x26")].model[Ei("0xa8")]({isUndoable:!1,isLocal:!1},(t=>{for(const s of e)this[Ei("0xae")][Ei("0xa")](s),t[Ei("0x1f")].addOperation(s),this[Ei("0x26")][Ei("0xc0")][Ei("0x7")](s)}))}[Ei("0x44")](e){e[Ei("0xad")]((e=>{const t=e[Ei("0xba")]();t._authorId=e[Ei("0x40")],t._isInit=!!e[Ei("0xb8")],t[Ei("0x66")]=e[Ei("0x66")],t[Ei("0x2")]+=this[Ei("0x71")],e[Ei("0x54")]&&this._disconnectionOperations[Ei("0xa")](t),this[Ei("0x24")][Ei("0x65")](t)}))}[Ei("0x84")](e){const t=this[Ei("0x26")].plugins[Ei("0x6f")]("Notification"),s=this[Ei("0x26")][Ei("0x60")];e||(e=k(s,Ei("0x91"))),t[Ei("0x89")](e,{title:k(s,Ei("0xa4")),namespace:Ei("0x16")}),this._hasSynchronizationProblem=!0,clearTimeout(this[Ei("0x9")]),this[Ei("0x46")]=[],this[Ei("0x26")][Ei("0x31")][Ei("0x6f")](l)[Ei("0x19")]()}[Ei("0x80")](){this._pendingAction||(this._pendingAction=this[Ei("0x26")][Ei("0x31")].get(e.PendingActions)[Ei("0xa")](k(this[Ei("0x26")][Ei("0x60")],Ei("0x8f"))))}[Ei("0x28")](){this[Ei("0x43")]&&(this[Ei("0x26")][Ei("0x31")].get(e.PendingActions)[Ei("0xa1")](this._pendingAction),this[Ei("0x43")]=null)}_compressOperations(e){const t=e[Ei("0x69")]((e=>e.toJSON()));return this[Ei("0x94")][Ei("0x32")](t)}[Ei("0xa6")](e,t){const r=this[Ei("0x94")][Ei("0xb5")](e)[Ei("0x69")](((e,r)=>{const n=s.OperationFactory.fromJSON(e,this[Ei("0x6e")]);return n.wasUndone=e[Ei("0x3e")],Ei("0x79")===t[r][Ei("0x99")]&&(n._isDisconnection=!0),n}));return this[Ei("0x9f")](r,t),r}[Ei("0x9f")](e,t){for(let s=0;s<e[Ei("0x3")];s++)Ei("0x6b")==t[s][Ei("0x99")]?(e[s]._isInit=!0,e[s][Ei("0x40")]=null):(e[s][Ei("0xb8")]=!1,e[s][Ei("0x40")]=t[s][Ei("0x6a")]),e[s][Ei("0x66")]=t[s].createdAt}_refreshUserSelectionMarkers(){this[Ei("0xbf")]=!0,this[Ei("0x55")]()&&this[Ei("0xb1")]()}[Ei("0x55")](){const e=this[Ei("0x26")][Ei("0x31")][Ei("0x6f")](m)[Ei("0x1e")][Ei("0x6f")](this._channelId);return!this[Ei("0x26")][Ei("0x3b")]&&e&&e.length>1&&this[Ei("0xbf")]}[Ei("0x7c")](){return this[Ei("0x46")][Ei("0x3")]>0||this._shouldSendSelectionUpdate()}}class ki extends Error{}function Ci(e,t){for(const s of e)s[Ei("0x2")]=t++}Ti[Ei("0x5")]=xi();class Ii{constructor(e){this[Ei("0x50")]=e,this[Ei("0x76")]=new WeakMap}getIdOfTheLastOperation(e){let s=e[Ei("0x3")];for(;s--;){const r=e[s];if(!this[Ei("0x50")][Ei("0xbc")](r)){if(!this._operationToId[Ei("0xbc")](r)){const e=(0,t.uid)()[Ei("0xb7")](1,18);this._operationToId[Ei("0xaf")](r,e)}return this[Ei("0x76")][Ei("0x6f")](r)}}}[Ei("0x92")](e,t){if(!t)return;let s=e[Ei("0x3")];for(;s--;){const r=e[s];this[Ei("0x50")][Ei("0xbc")](r)||this[Ei("0x76")][Ei("0xaf")](r,t)}}}var Ai,Ri,ji=["RealTimeCollaborativeEditing","requires","pluginName"];Ai=ji,Ri=364,function(e){for(;--e;)Ai.push(Ai.shift())}(++Ri);var Ni=function(e,t){return ji[e-=0]};class Pi extends e.Plugin{static get[Ni("0x0")](){return[Ti]}static get[Ni("0x1")](){return Ni("0x2")}}var Di=__webpack_require__(125),Mi=__webpack_require__.n(Di),Bi=__webpack_require__(6042),Ji=__webpack_require__.n(Bi);const Ui=["from","permissions","code","setPermissions","get","catch","removeCommentThread","createdAt","has","connect","_setUpService","collaboration.channelId","delete","config","keys","map","getUser","cloud-services-internal-error: Not connected.","404","destroy","disconnect","Permissions","commentId","CommentsService","message","listenTo","getComment","userId","getConnectedSessions","cloud-services-internal-error: Comments Service is not connected.","_getService","update","sessionAdd:","getMany","adapter","_terminateService","size","cloudservicescommentsadapter-service-not-exist","commentAdded","CommentsRepository","mySessionId","commentRemoved","_connectService","_services","getCommentThreads","register","assign","removeComment","addComment","commentThreadId","content","addUser","addCommentThread","comments","reconnect","context","cloudservicescommentsadapter-connect-already-connected","plugins","getCommentThread","hasCommentThread","remove","cloudservicescommentsadapter-disconnect-not-exist","startsWith","_fetchMissingUsersForThreads"];var Vi,qi;Vi=Ui,qi=219,function(e){for(;--e;)Vi.push(Vi.shift())}(++qi);const Fi=function(e,t){return Ui[e-=0]};class Li extends e.ContextPlugin{static get requires(){return[l,Fi("0xc"),m,n.Users]}constructor(e){super(e),this[Fi("0x10")]=new Map}async init(){const t=this[Fi("0x1c")],s=t.plugins[Fi("0x29")]("CommentsRepository");if(t[Fi("0x1e")].get(l).addToReconnectionStack(this),s[Fi("0x7")]={getCommentThread:async({channelId:e,threadId:t})=>{const s=await this._getService(e)[Fi("0x1f")](t)[Fi("0x2a")](zi);return await this[Fi("0x24")]([s]),{threadId:s[Fi("0x16")],comments:s[Fi("0x1a")][Fi("0x34")](Gi)}},removeCommentThread:({channelId:e,threadId:t})=>this[Fi("0x3")](e)[Fi("0x2b")](t)[Fi("0x2a")](Yi).catch(zi),addComment:({channelId:e,threadId:t,commentId:s,content:r,attributes:n})=>this[Fi("0x3")](e)[Fi("0x15")](t,s,r,n)[Fi("0x2a")](zi),updateComment:({channelId:e,threadId:t,commentId:s,content:r,attributes:n})=>this[Fi("0x3")](e).updateComment(t,s,r,n).catch(Yi)[Fi("0x2a")](zi),removeComment:({channelId:e,threadId:t,commentId:s})=>this[Fi("0x3")](e)[Fi("0x14")](t,s)[Fi("0x2a")](Yi).catch(zi)},t instanceof e.Context){const e=t[Fi("0x32")][Fi("0x29")](Fi("0x30")),s=t.plugins[Fi("0x29")](m);await this[Fi("0x2f")](e);const r=await this[Fi("0x10")][Fi("0x29")](e)[Fi("0x1")]();this[Fi("0x3e")](s,Fi("0x5")+e,((t,{session:r})=>{r.id===s[Fi("0xd")]&&(t.off(),this[Fi("0x1c")][Fi("0x1e")][Fi("0x29")](Fi("0x3a"))[Fi("0x28")](r[Fi("0x26")],e))})),s[Fi("0x12")](e,r)}}async _setUpService(e){if(this[Fi("0x10")][Fi("0x2d")](e))throw new t.CKEditorError(Fi("0x1d"),null,{channelId:e});const s=this[Fi("0x1c")][Fi("0x1e")][Fi("0x29")](Fi("0xc")),r=new(Li[Fi("0x3c")])(e);this._services.set(e,r),this[Fi("0x3e")](r,"commentThreadRemoved",((e,{commentThreadId:t})=>{const r=s[Fi("0x1f")](t);r&&r[Fi("0x21")]({isFromAdapter:!0})})),this[Fi("0x3e")](r,Fi("0xb"),((t,r)=>{const n=r[Fi("0x16")];s[Fi("0x20")](n)||s[Fi("0x19")]({channelId:e,threadId:n,isFromAdapter:!0});const i=s[Fi("0x1f")](n);i&&i[Fi("0x15")](Object[Fi("0x13")](Gi(r),{isFromAdapter:!0}))})),this[Fi("0x3e")](r,"commentUpdated",((e,{commentThreadId:t,commentId:r,content:n,attributes:i})=>{const o=s[Fi("0x1f")](t);if(o){const e=o[Fi("0x3f")](r);e&&e[Fi("0x4")]({content:n,attributes:i,isFromAdapter:!0})}})),this[Fi("0x3e")](r,Fi("0xe"),((e,{commentThreadId:t,commentId:r})=>{const n=s[Fi("0x1f")](t);if(n){const e=n.getComment(r);e&&e.remove({isFromAdapter:!0})}})),await this[Fi("0xf")](e)}[Fi("0x38")](){if(this[Fi("0x1c")]instanceof e.Context){const e=this[Fi("0x1c")][Fi("0x32")][Fi("0x29")](Fi("0x30"));this[Fi("0x8")](e)}}[Fi("0x8")](e){if(!this[Fi("0x10")][Fi("0x2d")](e))throw new t.CKEditorError(Fi("0x22"),null,{channelId:e});this[Fi("0x3")](e)[Fi("0x39")](),this[Fi("0x10")][Fi("0x31")](e)}async[Fi("0x1b")](){for(const e of this[Fi("0x10")][Fi("0x33")]())await this[Fi("0xf")](e);if(this[Fi("0x1c")]instanceof e.Context){const e=this.context[Fi("0x32")][Fi("0x29")](Fi("0x30")),t=this[Fi("0x1c")][Fi("0x1e")].get(m);t.unregister(e);const s=await this[Fi("0x10")].get(e)[Fi("0x1")]();t[Fi("0x12")](e,s)}}async[Fi("0xf")](e){const{connection:t}=this[Fi("0x1c")][Fi("0x1e")][Fi("0x29")](l),s=this.context[Fi("0x1e")][Fi("0x29")](Fi("0xc")),r=this[Fi("0x10")][Fi("0x29")](e),n=await r[Fi("0x2e")](t);await this[Fi("0x24")](n);const i=new Set(Array[Fi("0x25")](s[Fi("0x11")]({channelId:e}),(e=>e.id)));for(const e of n)i[Fi("0x31")](e[Fi("0x16")]);for(const e of i)s[Fi("0x1f")](e)[Fi("0x21")]({isFromAdapter:!0});for(const t of n){let r=s.getCommentThread(t[Fi("0x16")]);r||(r=s[Fi("0x19")]({channelId:e,threadId:t[Fi("0x16")],isFromAdapter:!0}));const n=new Set(Array[Fi("0x25")](r[Fi("0x1a")],(e=>e.id)));for(const e of t[Fi("0x1a")])n[Fi("0x31")](e[Fi("0x3b")]);for(const e of n)r.getComment(e)[Fi("0x21")]({isFromAdapter:!0});for(const e of t.comments){const t=r.getComment(e[Fi("0x3b")]);t?t[Fi("0x17")]!==e.content&&t[Fi("0x4")]({content:e[Fi("0x17")],isFromAdapter:!0}):r[Fi("0x15")](Object[Fi("0x13")](Gi(e),{isFromAdapter:!0}))}}}[Fi("0x3")](e){if(!this[Fi("0x10")][Fi("0x2d")](e))throw new t.CKEditorError(Fi("0xa"),null,{channelId:e});return this._services[Fi("0x29")](e)}async[Fi("0x24")](e){const t=this[Fi("0x1c")][Fi("0x1e")][Fi("0x29")](n.Users),{connection:s}=this[Fi("0x1c")][Fi("0x1e")][Fi("0x29")](l),r=new Set;for(const{comments:s}of e)for(const{userId:e}of s)t.getUser(e)||r.add(e);if(0===r[Fi("0x9")])return;const i=await _i()[Fi("0x6")](s,Array[Fi("0x25")](r));for(const e of i)t[Fi("0x35")](e.id)||t[Fi("0x18")](e)}}async function Yi(e){if(Fi("0x37")!==e[Fi("0x27")])throw e}function zi(e){if((t=e).message[Fi("0x23")](Fi("0x2"))||t[Fi("0x3d")].startsWith(Fi("0x36"))||t.message[Fi("0x23")]("cloud-services-internal-error: Request timeout."))return new Promise((()=>{}));var t;throw e}function Gi(e){return{threadId:e[Fi("0x16")],commentId:e[Fi("0x3b")],content:e.content,createdAt:e[Fi("0x2c")],authorId:e[Fi("0x0")],attributes:e.attributes}}Li[Fi("0x3c")]=Ji();const $i=["connected","add","connect","_fetchMissingUsersForThreads","cloud-services-internal-error: Not connected.","_bufferedRequests","type","off","_trackChangesService","getMany","open","get","originalSuggestionId","plugins","cloud-services-internal-error: Request timeout.","editor","listenTo","config","catch","from","getUser","startsWith","message","delete","requires","values","TrackChangesService","init","_waitForServiceReady","attributes","then","hasSuggestion","adapter","suggestionUpdated","connection","state","getSuggestion","addSuggestionData","update","TrackChangesEditing"];var Wi,Hi;Wi=$i,Hi=300,function(e){for(;--e;)Wi.push(Wi.shift())}(++Hi);const Ki=function(e,t){return $i[e-=0]};class Zi extends e.Plugin{static get[Ki("0x4")](){return[Li,"TrackChangesEditing",l]}constructor(e){super(e),this[Ki("0x19")]=new Map}[Ki("0x7")](){const e=this[Ki("0x23")][Ki("0x21")][Ki("0x1f")](l),t=this.editor.plugins[Ki("0x1f")](Ki("0x13")),s=this[Ki("0x23")][Ki("0x25")][Ki("0x1f")]("collaboration.channelId");return this._trackChangesService=new(Zi[Ki("0x6")])(s),t[Ki("0xc")]={getSuggestion:async e=>{await this[Ki("0x8")]();const t=await this[Ki("0x1c")][Ki("0x1f")](e)[Ki("0x26")](Xi);return await this[Ki("0x17")]([t]),t},addSuggestion:async({id:e,type:t,data:s,originalSuggestionId:r,attributes:n})=>{await this._waitForServiceReady();const i={id:e,type:t,data:s,originalSuggestionId:r,attributes:n},o=await this[Ki("0x1c")].add(e,t,s,r,n)[Ki("0x26")]((t=>{if(Qi(t))return new Promise((t=>{this._bufferedRequests.set(e,{resolve:t,suggestionData:i})}));throw t}));return this._bufferedRequests[Ki("0x3")](e),o},updateSuggestion:async(e,t)=>{if(await this[Ki("0x8")](),Ki("0x1e")!==t[Ki("0xf")])return this[Ki("0x1c")][Ki("0x12")](e,t)[Ki("0x26")](Xi)}},this[Ki("0x24")](this[Ki("0x1c")],Ki("0xd"),((e,s)=>{t[Ki("0xb")](s.id)&&(t[Ki("0x10")](s.id)[Ki("0x9")]=s.attributes)})),this._trackChangesService.connect(e[Ki("0xe")]).then((s=>(e.addToReconnectionStack(this),this[Ki("0x17")](s)[Ki("0xa")]((()=>{for(const e of s)t[Ki("0x11")](e)._saved=!0})))))}async reconnect(){const e=this.editor[Ki("0x21")].get(Ki("0x13")),{connection:t}=this.editor.plugins.get(l),s=await this[Ki("0x1c")][Ki("0x16")](t);await this[Ki("0x17")](s);for(const{suggestionData:e,resolve:t}of this._bufferedRequests[Ki("0x5")]()){let r=s.find((t=>t.id===e.id));r||(r=await this[Ki("0x1c")][Ki("0x15")](e.id,e[Ki("0x1a")],e.data,e[Ki("0x20")])),t(r)}for(const t of s)e[Ki("0xb")](t.id)||e[Ki("0x11")](t)}async[Ki("0x8")](){this[Ki("0x1c")].isConnected||await new Promise((e=>{this[Ki("0x24")](this[Ki("0x1c")],Ki("0x14"),(t=>{t[Ki("0x1b")](),e()}))}))}async _fetchMissingUsersForThreads(e){const t=this[Ki("0x23")][Ki("0x21")][Ki("0x1f")](n.Users),{connection:s}=this[Ki("0x23")][Ki("0x21")][Ki("0x1f")](l),r=new Set;for(const{authorId:s}of e)t[Ki("0x0")](s)||r[Ki("0x15")](s);if(0===r.size)return;const i=await _i()[Ki("0x1d")](s,Array[Ki("0x27")](r));for(const e of i)t[Ki("0x0")](e.id)||t.addUser(e)}}function Xi(e){if(Qi(e))return new Promise((()=>{}));throw e}function Qi(e){return e.message[Ki("0x1")](Ki("0x18"))||e[Ki("0x2")][Ki("0x1")](Ki("0x22"))}Zi[Ki("0x6")]=Mi();const eo=["connected","CommentsRepository","collaboration.channelId","data","destroy","_terminateService","CommentsEditing","listenTo","change:state","_setUpService","RealTimeCollaborativeComments","once","Comments","get","isThreadsLoadingPaused","plugins","editor"];var to,so;to=eo,so=471,function(e){for(;--e;)to.push(to.shift())}(++so);const ro=function(e,t){return eo[e-=0]};class no extends e.Plugin{static get requires(){return[ro("0x0"),Li,Pi,l]}static get pluginName(){return ro("0xf")}init(){const e=this[ro("0x4")].plugins[ro("0x1")](l),t=this[ro("0x4")][ro("0x3")][ro("0x1")](ro("0xb")),s=this[ro("0x4")][ro("0x3")][ro("0x1")](Li);return this[ro("0x4")][ro("0x8")][ro("0x10")]("ready",(()=>{this[ro("0xc")](e,"change:state",((e,s,r)=>{t[ro("0x2")]="connected"!==r}))})),this[ro("0xc")](e,ro("0xd"),((e,t,s)=>{this.editor[ro("0x3")][ro("0x1")](ro("0x6")).switchReadOnly(ro("0x5")!==s)})),s[ro("0xe")](this[ro("0x4")].config.get(ro("0x7")))}[ro("0x9")](){this[ro("0x4")][ro("0x3")][ro("0x1")](Li)[ro("0xa")](this.editor.config[ro("0x1")]("collaboration.channelId")),super[ro("0x9")]()}}var io,oo,ao=["RealTimeCollaborativeTrackChanges","TrackChanges"];io=ao,oo=150,function(e){for(;--e;)io.push(io.shift())}(++oo);var co=function(e,t){return ao[e-=0]};class uo extends e.Plugin{static get requires(){return[no,Zi,co("0x1")]}static get pluginName(){return co("0x0")}}var lo=__webpack_require__(8811),ho=__webpack_require__.n(lo),fo=__webpack_require__(8689),po=__webpack_require__.n(fo);const yo=["_bufferUpdate","sendBufferedUpdates","creatorId","_update","bind","change:_isPendingUpdate","_revisionDataBuilder","RevisionTracker","_oldOffset","reverse","_revisions","_bufferedUpdates","keys","_fetchMissingUsers","listenTo","from","buildRevisionData","code","config","catch","type","setSource","then","_createCurrentRevision","sessionId","serverHistory","getRevision","Users","wrongRequestId","currentRevision","addToReconnectionStack","_preventResendingRevisionData","_fixRevision","length","connected","remove","isBundleUploaded","collaboration.channelId","_offset","_handleReconnectionError","_handleRevisionsUpdate","cloud-services-internal-error: Not connected.","cloud-services-internal-error: Request timeout.","repository","adapter","_getLatestVersionFromServerOperations","_waitForServiceReady","connection","fromVersion","getMany","message","reconnect","_lastRequestId","_getLatestVersion","_revisionTracker","editor","getUser","stopListening","addUser","updateRevisions","destroy","off","get","add","_domEmitter","data","cloudServices.bundleVersion","setRevisionData","max","_startingVersion","startsWith","reInit","size","400","plugins","RevisionHistoryService","getRevisions","addRevisionData","isEmptyCurrent","authorsIds","map","toVersion","getOperations","diffData","change:_isConnected","_revisionHistoryService","createdAt"];var mo,vo;mo=yo,vo=288,function(e){for(;--e;)mo.push(mo.shift())}(++vo);const xo=function(e,t){return yo[e-=0]};class go extends e.Plugin{static get requires(){return[l,Ti,xo("0x43"),m,n.Users]}async init(){this[xo("0x19")]=null,this[xo("0x1b")]=this[xo("0x1c")][xo("0x2f")][xo("0x23")]("RevisionTracker");const e=this[xo("0x1c")].plugins[xo("0x23")](Ti),s=e[xo("0x55")],r=this[xo("0x1c")][xo("0x2f")].get(l),n=this[xo("0x1c")][xo("0x4e")][xo("0x23")](xo("0xa"));this[xo("0x3a")]=new(go[xo("0x30")])(n),this[xo("0x1b")][xo("0x51")]({history:s,getLatestVersion:()=>this[xo("0x1a")](),getCurrentRevisionId:()=>e[xo("0x54")]});const i=this[xo("0x1c")][xo("0x4e")][xo("0x23")](xo("0x27"))||t.version,o=await po()[xo("0x9")](r.connection,i);this[xo("0x1b")][xo("0x11")]={getRevision:async({revisionId:e})=>(await this[xo("0x13")](),await this._revisionHistoryService[xo("0x56")](e)),updateRevisions:async e=>{await this[xo("0x13")]();const t=this[xo("0x1b")].currentRevision;if(!o||1!==e.length||e[0].id!==t.id){for(const s of e)s.id===t.id&&(s[xo("0x33")]=s.fromVersion===s[xo("0x36")]);return this._revisionHistoryService[xo("0x20")](e,this[xo("0x19")]).then((e=>{this[xo("0x19")]=e}))[xo("0x4f")]((t=>{if(!(_o(t)||xo("0x2e")===t[xo("0x4d")]&&void 0!==t[xo("0x26")][xo("0x1")]))throw t;for(const t of e)!this._revisionTracker[xo("0x10")].getRevision(t.id)||this[xo("0x1b")][xo("0x3c")](t.id,t,!1);if(_o(t))throw t}))}}},this[xo("0x4a")](this[xo("0x3a")],"revisionsUpdated",((e,{revisionsData:t,requestId:s})=>{Math[xo("0x29")](...t[xo("0x35")]((e=>e[xo("0x36")])))>this[xo("0x12")]()-1?this[xo("0x1a")]().then((()=>{this._handleRevisionsUpdate(t,s)})):this[xo("0xd")](t,s)}));const{revisions:a,requestId:c}=await this[xo("0x3a")].connect(r[xo("0x14")]);r[xo("0x3")](this),this[xo("0x19")]=c,await this[xo("0x49")](a);for(const e of a)this[xo("0x1b")][xo("0x32")](e);this[xo("0x4a")](e,xo("0x39"),((t,s,r)=>{r&&(this[xo("0x44")]=e[xo("0xb")],t.off())})),this[xo("0x1b")][xo("0x40")]("isEnabled").to(r,"state",(e=>"connected"===e))}async[xo("0x18")](){const e=this[xo("0x1c")].plugins[xo("0x23")](l),t=this[xo("0x1c")][xo("0x2f")][xo("0x23")](Ti),s=async()=>{const s=this[xo("0x1b")][xo("0x2")],r=s.id,n=r!==t[xo("0x54")];if(n){const e=t._offset-this[xo("0x44")],n=this[xo("0x12")]();if(this[xo("0x1b")][xo("0x42")][xo("0x2c")](),s[xo("0x36")]+e!==n){const t=s.fromVersion+e,r=this[xo("0x1c")][xo("0x2f")][xo("0x23")](xo("0x0")),i=this[xo("0x1b")][xo("0x4c")]({currentRevision:s,from:t,to:n});i.id=s.id;const o=i[xo("0x34")][xo("0x35")]((e=>r[xo("0x1d")](e)));s[xo("0x3f")]({...i,authors:o},!0),this._revisionTracker[xo("0x3c")](s.id,i,!0)}this[xo("0x1b")][xo("0x2a")]=n,s[xo("0x36")]===s.fromVersion&&!this[xo("0x1b")][xo("0x47")].has(r)&&this[xo("0x1b")][xo("0x10")][xo("0x46")][xo("0x8")](r),this[xo("0x1b")][xo("0x53")](n)}const{revisions:i,requestId:o}=await this._revisionHistoryService[xo("0x18")](e[xo("0x14")],this._lastRequestId);n&&i[xo("0x6")]>0?t[xo("0xc")]():(await this._fetchMissingUsers(i),this[xo("0xd")](i,o),this._revisionTracker[xo("0x3d")]())};return t._isConnected?s():new Promise(((e,r)=>{t.once("change:_isConnected",(()=>{s()[xo("0x52")](e)[xo("0x4f")](r)}))}))}[xo("0x21")](){this._domEmitter&&this[xo("0x25")][xo("0x1e")](),super[xo("0x21")]()}async[xo("0x13")](){this._revisionHistoryService.isConnected||await new Promise((e=>{this[xo("0x4a")](this._revisionHistoryService,xo("0x7"),(t=>{t[xo("0x22")](),e()}))}))}[xo("0x12")](){const e=this.editor[xo("0x2f")][xo("0x23")](Ti)[xo("0x55")];for(const t of e[xo("0x37")]()[xo("0x45")]())if("marker"!==t[xo("0x50")]||t.affectsData)return t.baseVersion+1}[xo("0x1a")](){const e=this[xo("0x1c")].plugins[xo("0x23")](Ti);return new Promise((t=>{e._isPendingUpdate?e.once(xo("0x41"),(()=>{t(this._getLatestVersionFromServerOperations())})):t(this._getLatestVersionFromServerOperations())}))}_handleRevisionsUpdate(e,t){const s=this._revisionTracker[xo("0x10")];this[xo("0x19")]=t;for(const t of e){const e=s.getRevision(t.id);if(e){if((t[xo("0x15")]||t.toVersion)&&(t[xo("0x38")]=null),e===this[xo("0x1b")][xo("0x2")]){const s=Math[xo("0x29")](e.toVersion,t[xo("0x36")]),r=Math[xo("0x29")](e[xo("0x15")],t[xo("0x15")]);let n;e[xo("0x36")]===t[xo("0x36")]&&e[xo("0x15")]===t[xo("0x15")]?(n=!0,this[xo("0x4")](t)):t[xo("0x36")]===s&&t[xo("0x15")]===r?n=!1:(e[xo("0x36")]===s&&e[xo("0x15")]===r||this[xo("0x5")]({revision:e,from:r,to:s}),n=!0),n&&(delete t[xo("0x15")],delete t[xo("0x36")],delete t[xo("0x38")],delete t[xo("0x3b")],delete t[xo("0x34")])}this[xo("0x1b")][xo("0x28")](t),this._preventResendingRevisionData(t)}else this[xo("0x1b")].addRevisionData(t)}const r=s[xo("0x31")]();r.reverse();for(let e=0;e<r.length-1;e++){const t=r[e],s=r[e+1];if(t.fromVersion<s[xo("0x36")]){const e=s[xo("0x36")],r=Math[xo("0x29")](e,t[xo("0x36")]);this[xo("0x5")]({revision:t,from:e,to:r})}}}[xo("0x5")]({revision:e,from:t,to:s}={}){const r=this[xo("0x1c")][xo("0x2f")].get(xo("0x0")),n=this._revisionTracker[xo("0x4c")]({revision:e,from:t,to:s});n.authors=n[xo("0x34")][xo("0x35")]((e=>r[xo("0x1d")](e))),e._update(n)}[xo("0x4")](e){const t={};t.id=e.id;for(const s of Object[xo("0x48")](e))"id"!==s&&(t[s]=void 0);this[xo("0x1b")][xo("0x3c")](t.id,t,!0)}async _fetchMissingUsers(e){const t=this[xo("0x1c")][xo("0x2f")][xo("0x23")](n.Users),{connection:s}=this[xo("0x1c")].plugins[xo("0x23")](l),r=new Set;for(const t of e){for(const e of t[xo("0x34")])o(e);t[xo("0x3e")]&&o(t[xo("0x3e")])}if(0===r[xo("0x2d")])return;const i=await _i()[xo("0x16")](s,Array[xo("0x4b")](r));for(const e of i)t.getUser(e.id)||t[xo("0x1f")](e);function o(e){t[xo("0x1d")](e)||r[xo("0x24")](e)}}}function _o(e){return e.message[xo("0x2b")]("cloud-services-internal-error: Revision History Service is not connected.")||e[xo("0x17")][xo("0x2b")](xo("0xe"))||e[xo("0x17")][xo("0x2b")](xo("0xf"))}go[xo("0x30")]=ho();var bo,wo,Oo=["requires","RealTimeCollaborativeRevisionHistory","RevisionHistory"];bo=Oo,wo=438,function(e){for(;--e;)bo.push(bo.shift())}(++wo);var Eo=function(e,t){return Oo[e-=0]};class So extends e.Plugin{static get[Eo("0x0")](){return[Eo("0x2"),go,Pi]}static get pluginName(){return Eo("0x1")}}var To=Function.prototype,ko=Object.prototype,Co=To.toString,Io=ko.hasOwnProperty,Ao=Co.call(Object);const Ro=function(e){if(!Ke(e)||"[object Object]"!=se(e))return!1;var t=Ht(e);if(null===t)return!0;var s=Io.call(t,"constructor")&&t.constructor;return"function"==typeof s&&s instanceof s&&Co.call(s)==Ao};const jo=function(e){return Ke(e)&&1===e.nodeType&&!Ro(e)},No=["setTemplate","isHidden","ck-presence-list__counter","set","usersCount"];var Po,Do;Po=No,Do=267,function(e){for(;--e;)Po.push(Po.shift())}(++Do);const Mo=function(e,t){return No[e-=0]};class Bo extends r.View{constructor(e){super(e);const t=this.bindTemplate;this.set("usersCount",0),this[Mo("0x1")](Mo("0x4"),!0),this[Mo("0x3")]({tag:"div",attributes:{class:["ck",Mo("0x0"),t.if(Mo("0x4"),"ck-presence-list__counter--hidden")]},children:[{text:t.to(Mo("0x2"),(t=>k(e,"CONNECTED_USERS",t)))}]})}}const Jo=["items","execute","setTemplate","ck-presence-list__list","fire"];var Uo,Vo;Uo=Jo,Vo=459,function(e){for(;--e;)Uo.push(Uo.shift())}(++Vo);const qo=function(e,t){return Jo[e-=0]};class Fo extends r.View{constructor(e){super(e),this[qo("0x1")]=this.createCollection();const t=this.bindTemplate;this[qo("0x3")]({tag:"div",attributes:{class:["ck",qo("0x4")]},children:this[qo("0x1")],on:{click:t.to((()=>this[qo("0x0")](qo("0x2"))))}})}}var Lo=__webpack_require__(3286),Yo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};x()(Lo.Z,Yo);Lo.Z.locals;const zo=["ck-presence-list","counterView","ck-rounded-corners","inlineListView","set","ck-presence-list--collapsed","isCollapsed","first","ck-reset","items","tooltipPosition","div","listenTo","change","locale"];var Go,$o;Go=zo,$o=152,function(e){for(;--e;)Go.push(Go.shift())}(++$o);const Wo=function(e,t){return zo[e-=0]};class Ho extends r.View{constructor(e){super(e);const t=this.bindTemplate;this[Wo("0x2")](Wo("0x4"),!0),this[Wo("0xe")]=new Bo(this[Wo("0xc")]),this[Wo("0x1")]=new Fo(e),this[Wo("0xa")](this[Wo("0x1")][Wo("0x7")],Wo("0xb"),(()=>{for(const e of this.inlineListView.items)e[Wo("0x8")]="s";this[Wo("0x1")].items[Wo("0x5")]&&(this[Wo("0x1")].items[Wo("0x5")][Wo("0x8")]="se")})),this.setTemplate({tag:Wo("0x9"),attributes:{class:["ck",Wo("0xd"),Wo("0x6"),Wo("0x0"),t.if(Wo("0x4"),Wo("0x3"))]},children:[this.counterView,this[Wo("0x1")]]})}}var Ko,Zo,Xo=["items","createCollection","div","ck-presence-list__dropdown-list"];Ko=Xo,Zo=106,function(e){for(;--e;)Ko.push(Ko.shift())}(++Zo);var Qo=function(e,t){return Xo[e-=0]};class ea extends r.View{constructor(e){super(e),this[Qo("0x2")]=this[Qo("0x3")](),this.setTemplate({tag:Qo("0x0"),attributes:{class:["ck",Qo("0x1")]},children:[{tag:"div",attributes:{class:["ck","ck-presence-list__dropdown-list-wrapper"]},children:this.items}]})}}const ta=["ck-presence-list__dropdown-list-item","span","button","userView","div","bindTemplate","ck-user__full-name","getBackgroundColorClass","execute","fire","name","ck-presence-list__marker","tag"];var sa,ra;sa=ta,ra=166,function(e){for(;--e;)sa.push(sa.shift())}(++ra);const na=function(e,t){return ta[e-=0]};class ia extends r.View{constructor(e,t,s){super(e);const r=this[na("0x8")];this[na("0x6")]=new n.UserView(e,t);const i={tag:na("0x7"),attributes:{class:["ck",na("0x3")]},children:[this[na("0x6")],{tag:na("0x4"),attributes:{class:["ck",na("0x9")]},children:[{text:t[na("0x0")]}]},{tag:"span",attributes:{class:["ck",na("0x1"),t.color[na("0xa")]()],"aria-hidden":"true"}}]};s&&(i[na("0x2")]=na("0x5"),i.on={click:r.to((()=>this[na("0xc")](na("0xb"))))}),this.setTemplate(i)}}const oa=["execute","button","tag","span","ck-presence-list__list-item","markerView","getBackgroundColorClass","name","tooltipPosition","set","color","userView","bindTemplate","setTemplate","true","div"];var aa,ca;aa=oa,ca=313,function(e){for(;--e;)aa.push(aa.shift())}(++ca);const ua=function(e,t){return oa[e-=0]};class da extends r.View{constructor(e,t,s){super(e);const r=this[ua("0x3")];this[ua("0x0")]("hasTooltip",!0),this.set(ua("0xf"),""),this[ua("0x2")]=new n.UserView(e,t),this[ua("0xc")]=new la(e,t);const i={tag:ua("0x6"),attributes:{class:["ck",ua("0xb")],"data-cke-tooltip-text":this[ua("0x2")][ua("0xe")],"data-cke-tooltip-position":r.to("tooltipPosition"),"data-cke-tooltip-disabled":r.to("hasTooltip",(e=>!e)),"data-cke-tooltip-class":"ck-presence-list__list-item__tooltip"},children:[this[ua("0x2")],this[ua("0xc")]]};s&&(i[ua("0x9")]=ua("0x8"),i.on={click:r.to((()=>this.fire(ua("0x7"))))}),this[ua("0x4")](i)}}class la extends r.View{constructor(e,t){super(e),this[ua("0x4")]({tag:ua("0xa"),attributes:{class:["ck","ck-presence-list__marker",t[ua("0x1")][ua("0xd")]()],"aria-hidden":ua("0x5")}})}}const ha=["bind","pin","counterView","destroy","inlineListView","_createView","_handleUserAdd","config","get","ck ck-presence-list__balloon","plugins","content","context","presenceList.collapseAt","listenTo","attachToDom","requires","showDropdown","hideDropdown","bindTo","onClick","add","reverse","number","appendChild","presencelist-missing-container","allConnectedUsers","unpin","items","detachFromDom","class","lastConnectedUsers","isVisible","view","presenceList.container","remove","init","presenceDropdownView","_allConnectedUsers","balloonPanelView","define","isRendered","hasTooltip","locale","usersCount","presencelist-collapseat-invalid-format","element","bodyCollection","presenceList","isCollapsed","render","isHidden","execute","_handleUserRemove","using"];var fa,pa;fa=ha,pa=442,function(e){for(;--e;)fa.push(fa.shift())}(++pa);const ya=function(e,t){return ha[e-=0]};class ma extends e.ContextPlugin{constructor(e){super(e),e[ya("0x5")][ya("0x26")](ya("0x2e"),{collapseAt:6});const s=e[ya("0x5")][ya("0x6")](ya("0xb"));if(ya("0x15")!=typeof s)throw new t.CKEditorError(ya("0x2b"),this);if(s<1)throw new t.CKEditorError(ya("0x2b"),this)}static get[ya("0xe")](){return[m]}[ya("0x22")](){const e=this[ya("0xa")];this[ya("0x24")]=e[ya("0x8")][ya("0x6")](m)[ya("0x18")],this.set(ya("0x2a"),0),this[ya("0x1d")]=new t.Collection,this[ya("0x25")]=new r.BalloonPanelView,this[ya("0x25")][ya("0x1c")]=ya("0x7"),this[ya("0x1f")]=this[ya("0x3")](),this[ya("0x23")]=void 0;for(const e of this._allConnectedUsers)this[ya("0x4")](e);this[ya("0xc")](this._allConnectedUsers,ya("0x13"),((e,t)=>{this[ya("0x4")](t)})),this.listenTo(this._allConnectedUsers,ya("0x21"),((e,t)=>{this[ya("0x33")](t)}))}[ya("0x3")](){const e=this[ya("0xa")],s=new Ho(this[ya("0xa")][ya("0x29")]),n=this[ya("0x25")];if(!jo(e[ya("0x5")][ya("0x6")](ya("0x20"))))throw new t.CKEditorError(ya("0x17"),this);return s.counterView.bind(ya("0x2a")).to(this),s[ya("0x35")](ya("0x2f")).to(this,ya("0x2a"),(t=>{const r=t>=e[ya("0x5")][ya("0x6")](ya("0xb"));return s[ya("0x0")][ya("0x31")]=!(1==t||r),r||this[ya("0x10")](),r})),s[ya("0x2")][ya("0x1a")][ya("0x11")](this[ya("0x1d")])[ya("0x34")]((t=>{const r=e[ya("0x5")].get("presenceList"),n=new da(e[ya("0x29")],t,r[ya("0x12")]);return n[ya("0x35")](ya("0x28")).to(s,"isCollapsed",(e=>!e)),r[ya("0x12")]&&this[ya("0xc")](n,"execute",(()=>{this[ya("0x1f")][ya("0x2f")]||r.onClick(t,n[ya("0x2c")])})),n})),this.listenTo(s.inlineListView,ya("0x32"),(()=>{this[ya("0x23")]?this[ya("0x10")]():this[ya("0x1f")][ya("0x2f")]&&this[ya("0xf")]()})),s[ya("0x30")](),n[ya("0x30")](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>n[ya("0x1e")],contextElements:[n[ya("0x2c")],s[ya("0x2")][ya("0x2c")]],callback:()=>this[ya("0x10")]()}),e.config[ya("0x6")](ya("0x20"))[ya("0x16")](s[ya("0x2c")]),this[ya("0x2d")]=new r.BodyCollection(this[ya("0xa")][ya("0x29")]),this[ya("0x2d")][ya("0xd")](),this[ya("0x2d")][ya("0x13")](n),s}[ya("0x4")](e){this[ya("0x2a")]++,5==this[ya("0x1d")].length&&this[ya("0x1d")][ya("0x21")](0),this[ya("0x1d")].add(e)}[ya("0x33")](e){if(this.usersCount--,this[ya("0x1d")][ya("0x6")](e.id)&&(this[ya("0x1d")][ya("0x21")](e.id),this[ya("0x1d")].length<this[ya("0x2a")]))for(const e of Array.from(this[ya("0x24")])[ya("0x14")]())if(!this[ya("0x1d")][ya("0x6")](e.id))return void this[ya("0x1d")][ya("0x13")](e,0)}showDropdown(){if(this[ya("0x23")])return;this[ya("0x23")]=new ea;const e=this[ya("0xa")].config[ya("0x6")]("presenceList");this.presenceDropdownView[ya("0x1a")][ya("0x11")](this._allConnectedUsers)[ya("0x34")]((t=>{const s=new ia(this[ya("0xa")][ya("0x29")],t,!!e[ya("0x12")]);return e.onClick&&this[ya("0xc")](s,ya("0x32"),(()=>{e[ya("0x12")](t,s[ya("0x2c")])})),s})),this[ya("0x25")][ya("0x9")][ya("0x13")](this[ya("0x23")]),this[ya("0x25")][ya("0x36")]({target:this.view[ya("0x2")][ya("0x2c")]})}[ya("0x10")](){this.presenceDropdownView&&(this[ya("0x25")][ya("0x19")](),this[ya("0x25")][ya("0x9")][ya("0x21")](this[ya("0x23")]),this[ya("0x23")][ya("0x1")](),this[ya("0x23")]=void 0)}[ya("0x1")](){super.destroy(),this.view&&this[ya("0x1f")][ya("0x27")]&&this[ya("0x1f")].destroy(),this[ya("0x2d")]&&this[ya("0x2d")][ya("0x1b")]()}}var va,xa,ga=["pluginName","requires"];va=ga,xa=346,function(e){for(;--e;)va.push(va.shift())}(++xa);var _a=function(e,t){return ga[e-=0]};class ba extends e.ContextPlugin{static get[_a("0x1")](){return[m,ma]}static get[_a("0x0")](){return"PresenceList"}}})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
|