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,CAAA,GAAA,yCAAa,EAAE,mBAAmB,GAAG;IACvC;AACD;;;ADxDO,MAAM,kDAAgB,CAAA,GAAA,yCAAe;IAI3C,YAAY,MAAc,EAAE,QAAc,EAAE,OAAY,CAAE;QACzD,KAAK,CAAC,QAAQ,UAAU,eAJhB,gBAAgB,gBACjB,WAAW,IAAI,CAAA,GAAA,cAAM;QAK3B,CAAA;YACA,WAAW,MAAM,OAAO,CAAA,GAAA,wBAAgB,EAAE,IAAI,CAAC,cAAc,EAAG;gBAC/D,aAAa;gBACb,IAAI,IAAI,UAAU,EAAE,SAAS,SAAS;oBACrC,IAAI,CAAC,KAAK;oBACV;gBACD;gBACA,IAAI,CAAC,IAAI,CAAC,QAAQ;YACnB;QACD,CAAA;IACD;IAEmB,MAAM,IAAI,EAAE;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC/C;AACD;;;ADpBO,MAAM,kDAAoB,CAAA,GAAA,yCAAG;;QAA7B,qBACG,eAAkC;qBAC1C;YACA,SAAS,CAAA,GAAA,yCAAM;QAChB;;AACD;;;;;;;;ItBeA,2CAAe,CAAA,GAAA,yCAAG","sources":["lib/exports.ts","lib/util.ts","lib/dataconnection/BufferedConnection/binaryPackChunker.ts","lib/supports.ts","lib/utils/validateId.ts","lib/utils/randomToken.ts","lib/peer.ts","lib/logger.ts","lib/socket.ts","node_modules/eventemitter3/index.js","lib/enums.ts","lib/version.ts","lib/mediaconnection.ts","lib/negotiator.ts","lib/baseconnection.ts","lib/peerError.ts","lib/api.ts","lib/dataconnection/BufferedConnection/BinaryPack.ts","lib/dataconnection/BufferedConnection/BufferedConnection.ts","lib/dataconnection/DataConnection.ts","lib/dataconnection/BufferedConnection/Raw.ts","lib/dataconnection/BufferedConnection/Json.ts","lib/msgPackPeer.ts","lib/dataconnection/StreamConnection/MsgPack.ts","lib/dataconnection/StreamConnection/StreamConnection.ts"],"sourcesContent":["export { util, type Util } from \"./util\";\nimport { Peer } from \"./peer\";\nimport { MsgPackPeer } from \"./msgPackPeer\";\n\nexport type { PeerEvents, PeerOptions } from \"./peer\";\n\nexport type {\n\tPeerJSOption,\n\tPeerConnectOption,\n\tAnswerOption,\n\tCallOption,\n} from \"./optionInterfaces\";\nexport type { UtilSupportsObj } from \"./util\";\nexport type { DataConnection } from \"./dataconnection/DataConnection\";\nexport type { MediaConnection } from \"./mediaconnection\";\nexport type { LogLevel } from \"./logger\";\nexport * from \"./enums\";\n\nexport { BufferedConnection } from \"./dataconnection/BufferedConnection/BufferedConnection\";\nexport { StreamConnection } from \"./dataconnection/StreamConnection/StreamConnection\";\nexport { MsgPack } from \"./dataconnection/StreamConnection/MsgPack\";\nexport type { SerializerMapping } from \"./peer\";\n\nexport { Peer, MsgPackPeer };\n\nexport { PeerError } from \"./peerError\";\nexport default Peer;\n","import { BinaryPackChunker } from \"./dataconnection/BufferedConnection/binaryPackChunker\";\nimport * as BinaryPack from \"peerjs-js-binarypack\";\nimport { Supports } from \"./supports\";\nimport { validateId } from \"./utils/validateId\";\nimport { randomToken } from \"./utils/randomToken\";\n\nexport interface UtilSupportsObj {\n\t/**\n\t * The current browser.\n\t * This property can be useful in determining whether two peers can connect.\n\t *\n\t * ```ts\n\t * if (util.browser === 'firefox') {\n\t * // OK to peer with Firefox peers.\n\t * }\n\t * ```\n\t *\n\t * `util.browser` can currently have the values\n\t * `'firefox', 'chrome', 'safari', 'edge', 'Not a supported browser.', 'Not a browser.' (unknown WebRTC-compatible agent).\n\t */\n\tbrowser: boolean;\n\twebRTC: boolean;\n\t/**\n\t * True if the current browser supports media streams and PeerConnection.\n\t */\n\taudioVideo: boolean;\n\t/**\n\t * True if the current browser supports DataChannel and PeerConnection.\n\t */\n\tdata: boolean;\n\tbinaryBlob: boolean;\n\t/**\n\t * True if the current browser supports reliable DataChannels.\n\t */\n\treliable: boolean;\n}\n\nconst DEFAULT_CONFIG = {\n\ticeServers: [\n\t\t{ urls: \"stun:stun.l.google.com:19302\" },\n\t\t{\n\t\t\turls: [\n\t\t\t\t\"turn:eu-0.turn.peerjs.com:3478\",\n\t\t\t\t\"turn:us-0.turn.peerjs.com:3478\",\n\t\t\t],\n\t\t\tusername: \"peerjs\",\n\t\t\tcredential: \"peerjsp\",\n\t\t},\n\t],\n\tsdpSemantics: \"unified-plan\",\n};\n\nexport class Util extends BinaryPackChunker {\n\tnoop(): void {}\n\n\treadonly CLOUD_HOST = \"0.peerjs.com\";\n\treadonly CLOUD_PORT = 443;\n\n\t// Browsers that need chunking:\n\treadonly chunkedBrowsers = { Chrome: 1, chrome: 1 };\n\n\t// Returns browser-agnostic default config\n\treadonly defaultConfig = DEFAULT_CONFIG;\n\n\treadonly browser = Supports.getBrowser();\n\treadonly browserVersion = Supports.getVersion();\n\n\tpack = BinaryPack.pack;\n\tunpack = BinaryPack.unpack;\n\n\t/**\n\t * A hash of WebRTC features mapped to booleans that correspond to whether the feature is supported by the current browser.\n\t *\n\t * :::caution\n\t * Only the properties documented here are guaranteed to be present on `util.supports`\n\t * :::\n\t */\n\treadonly supports = (function () {\n\t\tconst supported: UtilSupportsObj = {\n\t\t\tbrowser: Supports.isBrowserSupported(),\n\t\t\twebRTC: Supports.isWebRTCSupported(),\n\t\t\taudioVideo: false,\n\t\t\tdata: false,\n\t\t\tbinaryBlob: false,\n\t\t\treliable: false,\n\t\t};\n\n\t\tif (!supported.webRTC) return supported;\n\n\t\tlet pc: RTCPeerConnection;\n\n\t\ttry {\n\t\t\tpc = new RTCPeerConnection(DEFAULT_CONFIG);\n\n\t\t\tsupported.audioVideo = true;\n\n\t\t\tlet dc: RTCDataChannel;\n\n\t\t\ttry {\n\t\t\t\tdc = pc.createDataChannel(\"_PEERJSTEST\", { ordered: true });\n\t\t\t\tsupported.data = true;\n\t\t\t\tsupported.reliable = !!dc.ordered;\n\n\t\t\t\t// Binary test\n\t\t\t\ttry {\n\t\t\t\t\tdc.binaryType = \"blob\";\n\t\t\t\t\tsupported.binaryBlob = !Supports.isIOS;\n\t\t\t\t} catch (e) {}\n\t\t\t} catch (e) {\n\t\t\t} finally {\n\t\t\t\tif (dc) {\n\t\t\t\t\tdc.close();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t} finally {\n\t\t\tif (pc) {\n\t\t\t\tpc.close();\n\t\t\t}\n\t\t}\n\n\t\treturn supported;\n\t})();\n\n\t// Ensure alphanumeric ids\n\tvalidateId = validateId;\n\trandomToken = randomToken;\n\n\tblobToArrayBuffer(\n\t\tblob: Blob,\n\t\tcb: (arg: ArrayBuffer | null) => void,\n\t): FileReader {\n\t\tconst fr = new FileReader();\n\n\t\tfr.onload = function (evt) {\n\t\t\tif (evt.target) {\n\t\t\t\tcb(evt.target.result as ArrayBuffer);\n\t\t\t}\n\t\t};\n\n\t\tfr.readAsArrayBuffer(blob);\n\n\t\treturn fr;\n\t}\n\n\tbinaryStringToArrayBuffer(binary: string): ArrayBuffer | SharedArrayBuffer {\n\t\tconst byteArray = new Uint8Array(binary.length);\n\n\t\tfor (let i = 0; i < binary.length; i++) {\n\t\t\tbyteArray[i] = binary.charCodeAt(i) & 0xff;\n\t\t}\n\n\t\treturn byteArray.buffer;\n\t}\n\tisSecure(): boolean {\n\t\treturn location.protocol === \"https:\";\n\t}\n}\n\n/**\n * Provides a variety of helpful utilities.\n *\n * :::caution\n * Only the utilities documented here are guaranteed to be present on `util`.\n * Undocumented utilities can be removed without warning.\n * We don't consider these to be breaking changes.\n * :::\n */\nexport const util = new Util();\n","export class BinaryPackChunker {\n\treadonly chunkedMTU = 16300; // The original 60000 bytes setting does not work when sending data from Firefox to Chrome, which is \"cut off\" after 16384 bytes and delivered individually.\n\n\t// Binary stuff\n\n\tprivate _dataCount: number = 1;\n\n\tchunk = (\n\t\tblob: ArrayBuffer,\n\t): { __peerData: number; n: number; total: number; data: Uint8Array }[] => {\n\t\tconst chunks = [];\n\t\tconst size = blob.byteLength;\n\t\tconst total = Math.ceil(size / this.chunkedMTU);\n\n\t\tlet index = 0;\n\t\tlet start = 0;\n\n\t\twhile (start < size) {\n\t\t\tconst end = Math.min(size, start + this.chunkedMTU);\n\t\t\tconst b = blob.slice(start, end);\n\n\t\t\tconst chunk = {\n\t\t\t\t__peerData: this._dataCount,\n\t\t\t\tn: index,\n\t\t\t\tdata: b,\n\t\t\t\ttotal,\n\t\t\t};\n\n\t\t\tchunks.push(chunk);\n\n\t\t\tstart = end;\n\t\t\tindex++;\n\t\t}\n\n\t\tthis._dataCount++;\n\n\t\treturn chunks;\n\t};\n}\n\nexport function concatArrayBuffers(bufs: Uint8Array[]) {\n\tlet size = 0;\n\tfor (const buf of bufs) {\n\t\tsize += buf.byteLength;\n\t}\n\tconst result = new Uint8Array(size);\n\tlet offset = 0;\n\tfor (const buf of bufs) {\n\t\tresult.set(buf, offset);\n\t\toffset += buf.byteLength;\n\t}\n\treturn result;\n}\n","import webRTCAdapter_import from \"webrtc-adapter\";\n\nconst webRTCAdapter: typeof webRTCAdapter_import =\n\t//@ts-ignore\n\twebRTCAdapter_import.default || webRTCAdapter_import;\n\nexport const Supports = new (class {\n\treadonly isIOS =\n\t\ttypeof navigator !== \"undefined\"\n\t\t\t? [\"iPad\", \"iPhone\", \"iPod\"].includes(navigator.platform)\n\t\t\t: false;\n\treadonly supportedBrowsers = [\"firefox\", \"chrome\", \"safari\"];\n\n\treadonly minFirefoxVersion = 59;\n\treadonly minChromeVersion = 72;\n\treadonly minSafariVersion = 605;\n\n\tisWebRTCSupported(): boolean {\n\t\treturn typeof RTCPeerConnection !== \"undefined\";\n\t}\n\n\tisBrowserSupported(): boolean {\n\t\tconst browser = this.getBrowser();\n\t\tconst version = this.getVersion();\n\n\t\tconst validBrowser = this.supportedBrowsers.includes(browser);\n\n\t\tif (!validBrowser) return false;\n\n\t\tif (browser === \"chrome\") return version >= this.minChromeVersion;\n\t\tif (browser === \"firefox\") return version >= this.minFirefoxVersion;\n\t\tif (browser === \"safari\")\n\t\t\treturn !this.isIOS && version >= this.minSafariVersion;\n\n\t\treturn false;\n\t}\n\n\tgetBrowser(): string {\n\t\treturn webRTCAdapter.browserDetails.browser;\n\t}\n\n\tgetVersion(): number {\n\t\treturn webRTCAdapter.browserDetails.version || 0;\n\t}\n\n\tisUnifiedPlanSupported(): boolean {\n\t\tconst browser = this.getBrowser();\n\t\tconst version = webRTCAdapter.browserDetails.version || 0;\n\n\t\tif (browser === \"chrome\" && version < this.minChromeVersion) return false;\n\t\tif (browser === \"firefox\" && version >= this.minFirefoxVersion) return true;\n\t\tif (\n\t\t\t!window.RTCRtpTransceiver ||\n\t\t\t!(\"currentDirection\" in RTCRtpTransceiver.prototype)\n\t\t)\n\t\t\treturn false;\n\n\t\tlet tempPc: RTCPeerConnection;\n\t\tlet supported = false;\n\n\t\ttry {\n\t\t\ttempPc = new RTCPeerConnection();\n\t\t\ttempPc.addTransceiver(\"audio\");\n\t\t\tsupported = true;\n\t\t} catch (e) {\n\t\t} finally {\n\t\t\tif (tempPc) {\n\t\t\t\ttempPc.close();\n\t\t\t}\n\t\t}\n\n\t\treturn supported;\n\t}\n\n\ttoString(): string {\n\t\treturn `Supports:\n browser:${this.getBrowser()}\n version:${this.getVersion()}\n isIOS:${this.isIOS}\n isWebRTCSupported:${this.isWebRTCSupported()}\n isBrowserSupported:${this.isBrowserSupported()}\n isUnifiedPlanSupported:${this.isUnifiedPlanSupported()}`;\n\t}\n})();\n","export const validateId = (id: string): boolean => {\n\t// Allow empty ids\n\treturn !id || /^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.test(id);\n};\n","export const randomToken = () => Math.random().toString(36).slice(2);\n","import { util } from \"./util\";\nimport logger, { LogLevel } from \"./logger\";\nimport { Socket } from \"./socket\";\nimport { MediaConnection } from \"./mediaconnection\";\nimport type { DataConnection } from \"./dataconnection/DataConnection\";\nimport {\n\tConnectionType,\n\tPeerErrorType,\n\tServerMessageType,\n\tSocketEventType,\n} from \"./enums\";\nimport type { ServerMessage } from \"./servermessage\";\nimport { API } from \"./api\";\nimport type {\n\tCallOption,\n\tPeerConnectOption,\n\tPeerJSOption,\n} from \"./optionInterfaces\";\nimport { BinaryPack } from \"./dataconnection/BufferedConnection/BinaryPack\";\nimport { Raw } from \"./dataconnection/BufferedConnection/Raw\";\nimport { Json } from \"./dataconnection/BufferedConnection/Json\";\n\nimport { EventEmitterWithError, PeerError } from \"./peerError\";\n\nclass PeerOptions implements PeerJSOption {\n\t/**\n\t * Prints log messages depending on the debug level passed in.\n\t */\n\tdebug?: LogLevel;\n\t/**\n\t * Server host. Defaults to `0.peerjs.com`.\n\t * Also accepts `'/'` to signify relative hostname.\n\t */\n\thost?: string;\n\t/**\n\t * Server port. Defaults to `443`.\n\t */\n\tport?: number;\n\t/**\n\t * The path where your self-hosted PeerServer is running. Defaults to `'/'`\n\t */\n\tpath?: string;\n\t/**\n\t * API key for the PeerServer.\n\t * This is not used anymore.\n\t * @deprecated\n\t */\n\tkey?: string;\n\ttoken?: string;\n\t/**\n\t * Configuration hash passed to RTCPeerConnection.\n\t * This hash contains any custom ICE/TURN server configuration.\n\t *\n\t * Defaults to {@apilink util.defaultConfig}\n\t */\n\tconfig?: any;\n\t/**\n\t * Set to true `true` if you're using TLS.\n\t * :::danger\n\t * If possible *always use TLS*\n\t * :::\n\t */\n\tsecure?: boolean;\n\tpingInterval?: number;\n\treferrerPolicy?: ReferrerPolicy;\n\tlogFunction?: (logLevel: LogLevel, ...rest: any[]) => void;\n\tserializers?: SerializerMapping;\n}\n\nexport { type PeerOptions };\n\nexport interface SerializerMapping {\n\t[key: string]: new (\n\t\tpeerId: string,\n\t\tprovider: Peer,\n\t\toptions: any,\n\t) => DataConnection;\n}\n\nexport interface PeerEvents {\n\t/**\n\t * Emitted when a connection to the PeerServer is established.\n\t *\n\t * You may use the peer before this is emitted, but messages to the server will be queued. id is the brokering ID of the peer (which was either provided in the constructor or assigned by the server).You should not wait for this event before connecting to other peers if connection speed is important.\n\t */\n\topen: (id: string) => void;\n\t/**\n\t * Emitted when a new data connection is established from a remote peer.\n\t */\n\tconnection: (dataConnection: DataConnection) => void;\n\t/**\n\t * Emitted when a remote peer attempts to call you.\n\t */\n\tcall: (mediaConnection: MediaConnection) => void;\n\t/**\n\t * Emitted when the peer is destroyed and can no longer accept or create any new connections.\n\t */\n\tclose: () => void;\n\t/**\n\t * Emitted when the peer is disconnected from the signalling server\n\t */\n\tdisconnected: (currentId: string) => void;\n\t/**\n\t * Errors on the peer are almost always fatal and will destroy the peer.\n\t *\n\t * Errors from the underlying socket and PeerConnections are forwarded here.\n\t */\n\terror: (error: PeerError<`${PeerErrorType}`>) => void;\n}\n/**\n * A peer who can initiate connections with other peers.\n */\nexport class Peer extends EventEmitterWithError {\n\tprivate static readonly DEFAULT_KEY = \"peerjs\";\n\n\tprotected readonly _serializers: SerializerMapping = {\n\t\traw: Raw,\n\t\tjson: Json,\n\t\tbinary: BinaryPack,\n\t\t\"binary-utf8\": BinaryPack,\n\n\t\tdefault: BinaryPack,\n\t};\n\tprivate readonly _options: PeerOptions;\n\tprivate readonly _api: API;\n\tprivate readonly _socket: Socket;\n\n\tprivate _id: string | null = null;\n\tprivate _lastServerId: string | null = null;\n\n\t// States.\n\tprivate _destroyed = false; // Connections have been killed\n\tprivate _disconnected = false; // Connection to PeerServer killed but P2P connections still active\n\tprivate _open = false; // Sockets and such are not yet open.\n\tprivate readonly _connections: Map<\n\t\tstring,\n\t\t(DataConnection | MediaConnection)[]\n\t> = new Map(); // All connections for this peer.\n\tprivate readonly _lostMessages: Map = new Map(); // src => [list of messages]\n\t/**\n\t * The brokering ID of this peer\n\t *\n\t * If no ID was specified in {@apilink Peer | the constructor},\n\t * this will be `undefined` until the {@apilink PeerEvents | `open`} event is emitted.\n\t */\n\tget id() {\n\t\treturn this._id;\n\t}\n\n\tget options() {\n\t\treturn this._options;\n\t}\n\n\tget open() {\n\t\treturn this._open;\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tget socket() {\n\t\treturn this._socket;\n\t}\n\n\t/**\n\t * A hash of all connections associated with this peer, keyed by the remote peer's ID.\n\t * @deprecated\n\t * Return type will change from Object to Map\n\t */\n\tget connections(): Object {\n\t\tconst plainConnections = Object.create(null);\n\n\t\tfor (const [k, v] of this._connections) {\n\t\t\tplainConnections[k] = v;\n\t\t}\n\n\t\treturn plainConnections;\n\t}\n\n\t/**\n\t * true if this peer and all of its connections can no longer be used.\n\t */\n\tget destroyed() {\n\t\treturn this._destroyed;\n\t}\n\t/**\n\t * false if there is an active connection to the PeerServer.\n\t */\n\tget disconnected() {\n\t\treturn this._disconnected;\n\t}\n\n\t/**\n\t * A peer can connect to other peers and listen for connections.\n\t */\n\tconstructor();\n\n\t/**\n\t * A peer can connect to other peers and listen for connections.\n\t * @param options for specifying details about PeerServer\n\t */\n\tconstructor(options: PeerOptions);\n\n\t/**\n\t * A peer can connect to other peers and listen for connections.\n\t * @param id Other peers can connect to this peer using the provided ID.\n\t * If no ID is given, one will be generated by the brokering server.\n\t * The ID must start and end with an alphanumeric character (lower or upper case character or a digit). In the middle of the ID spaces, dashes (-) and underscores (_) are allowed. Use {@apilink PeerOptions.metadata } to send identifying information.\n\t * @param options for specifying details about PeerServer\n\t */\n\tconstructor(id: string, options?: PeerOptions);\n\n\tconstructor(id?: string | PeerOptions, options?: PeerOptions) {\n\t\tsuper();\n\n\t\tlet userId: string | undefined;\n\n\t\t// Deal with overloading\n\t\tif (id && id.constructor == Object) {\n\t\t\toptions = id as PeerOptions;\n\t\t} else if (id) {\n\t\t\tuserId = id.toString();\n\t\t}\n\n\t\t// Configurize options\n\t\toptions = {\n\t\t\tdebug: 0, // 1: Errors, 2: Warnings, 3: All logs\n\t\t\thost: util.CLOUD_HOST,\n\t\t\tport: util.CLOUD_PORT,\n\t\t\tpath: \"/\",\n\t\t\tkey: Peer.DEFAULT_KEY,\n\t\t\ttoken: util.randomToken(),\n\t\t\tconfig: util.defaultConfig,\n\t\t\treferrerPolicy: \"strict-origin-when-cross-origin\",\n\t\t\tserializers: {},\n\t\t\t...options,\n\t\t};\n\t\tthis._options = options;\n\t\tthis._serializers = { ...this._serializers, ...this.options.serializers };\n\n\t\t// Detect relative URL host.\n\t\tif (this._options.host === \"/\") {\n\t\t\tthis._options.host = window.location.hostname;\n\t\t}\n\n\t\t// Set path correctly.\n\t\tif (this._options.path) {\n\t\t\tif (this._options.path[0] !== \"/\") {\n\t\t\t\tthis._options.path = \"/\" + this._options.path;\n\t\t\t}\n\t\t\tif (this._options.path[this._options.path.length - 1] !== \"/\") {\n\t\t\t\tthis._options.path += \"/\";\n\t\t\t}\n\t\t}\n\n\t\t// Set whether we use SSL to same as current host\n\t\tif (\n\t\t\tthis._options.secure === undefined &&\n\t\t\tthis._options.host !== util.CLOUD_HOST\n\t\t) {\n\t\t\tthis._options.secure = util.isSecure();\n\t\t} else if (this._options.host == util.CLOUD_HOST) {\n\t\t\tthis._options.secure = true;\n\t\t}\n\t\t// Set a custom log function if present\n\t\tif (this._options.logFunction) {\n\t\t\tlogger.setLogFunction(this._options.logFunction);\n\t\t}\n\n\t\tlogger.logLevel = this._options.debug || 0;\n\n\t\tthis._api = new API(options);\n\t\tthis._socket = this._createServerConnection();\n\n\t\t// Sanity checks\n\t\t// Ensure WebRTC supported\n\t\tif (!util.supports.audioVideo && !util.supports.data) {\n\t\t\tthis._delayedAbort(\n\t\t\t\tPeerErrorType.BrowserIncompatible,\n\t\t\t\t\"The current browser does not support WebRTC\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure alphanumeric id\n\t\tif (!!userId && !util.validateId(userId)) {\n\t\t\tthis._delayedAbort(PeerErrorType.InvalidID, `ID \"${userId}\" is invalid`);\n\t\t\treturn;\n\t\t}\n\n\t\tif (userId) {\n\t\t\tthis._initialize(userId);\n\t\t} else {\n\t\t\tthis._api\n\t\t\t\t.retrieveId()\n\t\t\t\t.then((id) => this._initialize(id))\n\t\t\t\t.catch((error) => this._abort(PeerErrorType.ServerError, error));\n\t\t}\n\t}\n\n\tprivate _createServerConnection(): Socket {\n\t\tconst socket = new Socket(\n\t\t\tthis._options.secure,\n\t\t\tthis._options.host!,\n\t\t\tthis._options.port!,\n\t\t\tthis._options.path!,\n\t\t\tthis._options.key!,\n\t\t\tthis._options.pingInterval,\n\t\t);\n\n\t\tsocket.on(SocketEventType.Message, (data: ServerMessage) => {\n\t\t\tthis._handleMessage(data);\n\t\t});\n\n\t\tsocket.on(SocketEventType.Error, (error: string) => {\n\t\t\tthis._abort(PeerErrorType.SocketError, error);\n\t\t});\n\n\t\tsocket.on(SocketEventType.Disconnected, () => {\n\t\t\tif (this.disconnected) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.emitError(PeerErrorType.Network, \"Lost connection to server.\");\n\t\t\tthis.disconnect();\n\t\t});\n\n\t\tsocket.on(SocketEventType.Close, () => {\n\t\t\tif (this.disconnected) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._abort(\n\t\t\t\tPeerErrorType.SocketClosed,\n\t\t\t\t\"Underlying socket is already closed.\",\n\t\t\t);\n\t\t});\n\n\t\treturn socket;\n\t}\n\n\t/** Initialize a connection with the server. */\n\tprivate _initialize(id: string): void {\n\t\tthis._id = id;\n\t\tthis.socket.start(id, this._options.token!);\n\t}\n\n\t/** Handles messages from the server. */\n\tprivate _handleMessage(message: ServerMessage): void {\n\t\tconst type = message.type;\n\t\tconst payload = message.payload;\n\t\tconst peerId = message.src;\n\n\t\tswitch (type) {\n\t\t\tcase ServerMessageType.Open: // The connection to the server is open.\n\t\t\t\tthis._lastServerId = this.id;\n\t\t\t\tthis._open = true;\n\t\t\t\tthis.emit(\"open\", this.id);\n\t\t\t\tbreak;\n\t\t\tcase ServerMessageType.Error: // Server error.\n\t\t\t\tthis._abort(PeerErrorType.ServerError, payload.msg);\n\t\t\t\tbreak;\n\t\t\tcase ServerMessageType.IdTaken: // The selected ID is taken.\n\t\t\t\tthis._abort(PeerErrorType.UnavailableID, `ID \"${this.id}\" is taken`);\n\t\t\t\tbreak;\n\t\t\tcase ServerMessageType.InvalidKey: // The given API key cannot be found.\n\t\t\t\tthis._abort(\n\t\t\t\t\tPeerErrorType.InvalidKey,\n\t\t\t\t\t`API KEY \"${this._options.key}\" is invalid`,\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase ServerMessageType.Leave: // Another peer has closed its connection to this peer.\n\t\t\t\tlogger.log(`Received leave message from ${peerId}`);\n\t\t\t\tthis._cleanupPeer(peerId);\n\t\t\t\tthis._connections.delete(peerId);\n\t\t\t\tbreak;\n\t\t\tcase ServerMessageType.Expire: // The offer sent to a peer has expired without response.\n\t\t\t\tthis.emitError(\n\t\t\t\t\tPeerErrorType.PeerUnavailable,\n\t\t\t\t\t`Could not connect to peer ${peerId}`,\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase ServerMessageType.Offer: {\n\t\t\t\t// we should consider switching this to CALL/CONNECT, but this is the least breaking option.\n\t\t\t\tconst connectionId = payload.connectionId;\n\t\t\t\tlet connection = this.getConnection(peerId, connectionId);\n\n\t\t\t\tif (connection) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t`Offer received for existing Connection ID:${connectionId}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Create a new connection.\n\t\t\t\tif (payload.type === ConnectionType.Media) {\n\t\t\t\t\tconst mediaConnection = new MediaConnection(peerId, this, {\n\t\t\t\t\t\tconnectionId: connectionId,\n\t\t\t\t\t\t_payload: payload,\n\t\t\t\t\t\tmetadata: payload.metadata,\n\t\t\t\t\t});\n\t\t\t\t\tconnection = mediaConnection;\n\t\t\t\t\tthis._addConnection(peerId, connection);\n\t\t\t\t\tthis.emit(\"call\", mediaConnection);\n\t\t\t\t} else if (payload.type === ConnectionType.Data) {\n\t\t\t\t\tconst dataConnection = new this._serializers[payload.serialization](\n\t\t\t\t\t\tpeerId,\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconnectionId: connectionId,\n\t\t\t\t\t\t\t_payload: payload,\n\t\t\t\t\t\t\tmetadata: payload.metadata,\n\t\t\t\t\t\t\tlabel: payload.label,\n\t\t\t\t\t\t\tserialization: payload.serialization,\n\t\t\t\t\t\t\treliable: payload.reliable,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\tconnection = dataConnection;\n\n\t\t\t\t\tthis._addConnection(peerId, connection);\n\t\t\t\t\tthis.emit(\"connection\", dataConnection);\n\t\t\t\t} else {\n\t\t\t\t\tlogger.warn(`Received malformed connection type:${payload.type}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Find messages.\n\t\t\t\tconst messages = this._getMessages(connectionId);\n\t\t\t\tfor (const message of messages) {\n\t\t\t\t\tconnection.handleMessage(message);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tif (!payload) {\n\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t`You received a malformed message from ${peerId} of type ${type}`,\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst connectionId = payload.connectionId;\n\t\t\t\tconst connection = this.getConnection(peerId, connectionId);\n\n\t\t\t\tif (connection && connection.peerConnection) {\n\t\t\t\t\t// Pass it on.\n\t\t\t\t\tconnection.handleMessage(message);\n\t\t\t\t} else if (connectionId) {\n\t\t\t\t\t// Store for possible later use\n\t\t\t\t\tthis._storeMessage(connectionId, message);\n\t\t\t\t} else {\n\t\t\t\t\tlogger.warn(\"You received an unrecognized message:\", message);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Stores messages without a set up connection, to be claimed later. */\n\tprivate _storeMessage(connectionId: string, message: ServerMessage): void {\n\t\tif (!this._lostMessages.has(connectionId)) {\n\t\t\tthis._lostMessages.set(connectionId, []);\n\t\t}\n\n\t\tthis._lostMessages.get(connectionId).push(message);\n\t}\n\n\t/**\n\t * Retrieve messages from lost message store\n\t * @internal\n\t */\n\t//TODO Change it to private\n\tpublic _getMessages(connectionId: string): ServerMessage[] {\n\t\tconst messages = this._lostMessages.get(connectionId);\n\n\t\tif (messages) {\n\t\t\tthis._lostMessages.delete(connectionId);\n\t\t\treturn messages;\n\t\t}\n\n\t\treturn [];\n\t}\n\n\t/**\n\t * Connects to the remote peer specified by id and returns a data connection.\n\t * @param peer The brokering ID of the remote peer (their {@apilink Peer.id}).\n\t * @param options for specifying details about Peer Connection\n\t */\n\tconnect(peer: string, options: PeerConnectOption = {}): DataConnection {\n\t\toptions = {\n\t\t\tserialization: \"default\",\n\t\t\t...options,\n\t\t};\n\t\tif (this.disconnected) {\n\t\t\tlogger.warn(\n\t\t\t\t\"You cannot connect to a new Peer because you called \" +\n\t\t\t\t\t\".disconnect() on this Peer and ended your connection with the \" +\n\t\t\t\t\t\"server. You can create a new Peer to reconnect, or call reconnect \" +\n\t\t\t\t\t\"on this peer if you believe its ID to still be available.\",\n\t\t\t);\n\t\t\tthis.emitError(\n\t\t\t\tPeerErrorType.Disconnected,\n\t\t\t\t\"Cannot connect to new Peer after disconnecting from server.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst dataConnection = new this._serializers[options.serialization](\n\t\t\tpeer,\n\t\t\tthis,\n\t\t\toptions,\n\t\t);\n\t\tthis._addConnection(peer, dataConnection);\n\t\treturn dataConnection;\n\t}\n\n\t/**\n\t * Calls the remote peer specified by id and returns a media connection.\n\t * @param peer The brokering ID of the remote peer (their peer.id).\n\t * @param stream The caller's media stream\n\t * @param options Metadata associated with the connection, passed in by whoever initiated the connection.\n\t */\n\tcall(\n\t\tpeer: string,\n\t\tstream: MediaStream,\n\t\toptions: CallOption = {},\n\t): MediaConnection {\n\t\tif (this.disconnected) {\n\t\t\tlogger.warn(\n\t\t\t\t\"You cannot connect to a new Peer because you called \" +\n\t\t\t\t\t\".disconnect() on this Peer and ended your connection with the \" +\n\t\t\t\t\t\"server. You can create a new Peer to reconnect.\",\n\t\t\t);\n\t\t\tthis.emitError(\n\t\t\t\tPeerErrorType.Disconnected,\n\t\t\t\t\"Cannot connect to new Peer after disconnecting from server.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!stream) {\n\t\t\tlogger.error(\n\t\t\t\t\"To call a peer, you must provide a stream from your browser's `getUserMedia`.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaConnection = new MediaConnection(peer, this, {\n\t\t\t...options,\n\t\t\t_stream: stream,\n\t\t});\n\t\tthis._addConnection(peer, mediaConnection);\n\t\treturn mediaConnection;\n\t}\n\n\t/** Add a data/media connection to this peer. */\n\tprivate _addConnection(\n\t\tpeerId: string,\n\t\tconnection: MediaConnection | DataConnection,\n\t): void {\n\t\tlogger.log(\n\t\t\t`add connection ${connection.type}:${connection.connectionId} to peerId:${peerId}`,\n\t\t);\n\n\t\tif (!this._connections.has(peerId)) {\n\t\t\tthis._connections.set(peerId, []);\n\t\t}\n\t\tthis._connections.get(peerId).push(connection);\n\t}\n\n\t//TODO should be private\n\t_removeConnection(connection: DataConnection | MediaConnection): void {\n\t\tconst connections = this._connections.get(connection.peer);\n\n\t\tif (connections) {\n\t\t\tconst index = connections.indexOf(connection);\n\n\t\t\tif (index !== -1) {\n\t\t\t\tconnections.splice(index, 1);\n\t\t\t}\n\t\t}\n\n\t\t//remove from lost messages\n\t\tthis._lostMessages.delete(connection.connectionId);\n\t}\n\n\t/** Retrieve a data/media connection for this peer. */\n\tgetConnection(\n\t\tpeerId: string,\n\t\tconnectionId: string,\n\t): null | DataConnection | MediaConnection {\n\t\tconst connections = this._connections.get(peerId);\n\t\tif (!connections) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (const connection of connections) {\n\t\t\tif (connection.connectionId === connectionId) {\n\t\t\t\treturn connection;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tprivate _delayedAbort(type: PeerErrorType, message: string | Error): void {\n\t\tsetTimeout(() => {\n\t\t\tthis._abort(type, message);\n\t\t}, 0);\n\t}\n\n\t/**\n\t * Emits an error message and destroys the Peer.\n\t * The Peer is not destroyed if it's in a disconnected state, in which case\n\t * it retains its disconnected state and its existing connections.\n\t */\n\tprivate _abort(type: PeerErrorType, message: string | Error): void {\n\t\tlogger.error(\"Aborting!\");\n\n\t\tthis.emitError(type, message);\n\n\t\tif (!this._lastServerId) {\n\t\t\tthis.destroy();\n\t\t} else {\n\t\t\tthis.disconnect();\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the Peer: closes all active connections as well as the connection\n\t * to the server.\n\t *\n\t * :::caution\n\t * This cannot be undone; the respective peer object will no longer be able\n\t * to create or receive any connections, its ID will be forfeited on the server,\n\t * and all of its data and media connections will be closed.\n\t * :::\n\t */\n\tdestroy(): void {\n\t\tif (this.destroyed) {\n\t\t\treturn;\n\t\t}\n\n\t\tlogger.log(`Destroy peer with ID:${this.id}`);\n\n\t\tthis.disconnect();\n\t\tthis._cleanup();\n\n\t\tthis._destroyed = true;\n\n\t\tthis.emit(\"close\");\n\t}\n\n\t/** Disconnects every connection on this peer. */\n\tprivate _cleanup(): void {\n\t\tfor (const peerId of this._connections.keys()) {\n\t\t\tthis._cleanupPeer(peerId);\n\t\t\tthis._connections.delete(peerId);\n\t\t}\n\n\t\tthis.socket.removeAllListeners();\n\t}\n\n\t/** Closes all connections to this peer. */\n\tprivate _cleanupPeer(peerId: string): void {\n\t\tconst connections = this._connections.get(peerId);\n\n\t\tif (!connections) return;\n\n\t\tfor (const connection of connections) {\n\t\t\tconnection.close();\n\t\t}\n\t}\n\n\t/**\n\t * Disconnects the Peer's connection to the PeerServer. Does not close any\n\t * active connections.\n\t * Warning: The peer can no longer create or accept connections after being\n\t * disconnected. It also cannot reconnect to the server.\n\t */\n\tdisconnect(): void {\n\t\tif (this.disconnected) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentId = this.id;\n\n\t\tlogger.log(`Disconnect peer with ID:${currentId}`);\n\n\t\tthis._disconnected = true;\n\t\tthis._open = false;\n\n\t\tthis.socket.close();\n\n\t\tthis._lastServerId = currentId;\n\t\tthis._id = null;\n\n\t\tthis.emit(\"disconnected\", currentId);\n\t}\n\n\t/** Attempts to reconnect with the same ID.\n\t *\n\t * Only {@apilink Peer.disconnect | disconnected peers} can be reconnected.\n\t * Destroyed peers cannot be reconnected.\n\t * If the connection fails (as an example, if the peer's old ID is now taken),\n\t * the peer's existing connections will not close, but any associated errors events will fire.\n\t */\n\treconnect(): void {\n\t\tif (this.disconnected && !this.destroyed) {\n\t\t\tlogger.log(\n\t\t\t\t`Attempting reconnection to server with ID ${this._lastServerId}`,\n\t\t\t);\n\t\t\tthis._disconnected = false;\n\t\t\tthis._initialize(this._lastServerId!);\n\t\t} else if (this.destroyed) {\n\t\t\tthrow new Error(\n\t\t\t\t\"This peer cannot reconnect to the server. It has already been destroyed.\",\n\t\t\t);\n\t\t} else if (!this.disconnected && !this.open) {\n\t\t\t// Do nothing. We're still connecting the first time.\n\t\t\tlogger.error(\n\t\t\t\t\"In a hurry? We're still trying to make the initial connection!\",\n\t\t\t);\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\t`Peer ${this.id} cannot reconnect because it is not disconnected from the server!`,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Get a list of available peer IDs. If you're running your own server, you'll\n\t * want to set allow_discovery: true in the PeerServer options. If you're using\n\t * the cloud server, email team@peerjs.com to get the functionality enabled for\n\t * your key.\n\t */\n\tlistAllPeers(cb = (_: any[]) => {}): void {\n\t\tthis._api\n\t\t\t.listAllPeers()\n\t\t\t.then((peers) => cb(peers))\n\t\t\t.catch((error) => this._abort(PeerErrorType.ServerError, error));\n\t}\n}\n","const LOG_PREFIX = \"PeerJS: \";\n\n/*\nPrints log messages depending on the debug level passed in. Defaults to 0.\n0 Prints no logs.\n1 Prints only errors.\n2 Prints errors and warnings.\n3 Prints all logs.\n*/\nexport enum LogLevel {\n\t/**\n\t * Prints no logs.\n\t */\n\tDisabled,\n\t/**\n\t * Prints only errors.\n\t */\n\tErrors,\n\t/**\n\t * Prints errors and warnings.\n\t */\n\tWarnings,\n\t/**\n\t * Prints all logs.\n\t */\n\tAll,\n}\n\nclass Logger {\n\tprivate _logLevel = LogLevel.Disabled;\n\n\tget logLevel(): LogLevel {\n\t\treturn this._logLevel;\n\t}\n\n\tset logLevel(logLevel: LogLevel) {\n\t\tthis._logLevel = logLevel;\n\t}\n\n\tlog(...args: any[]) {\n\t\tif (this._logLevel >= LogLevel.All) {\n\t\t\tthis._print(LogLevel.All, ...args);\n\t\t}\n\t}\n\n\twarn(...args: any[]) {\n\t\tif (this._logLevel >= LogLevel.Warnings) {\n\t\t\tthis._print(LogLevel.Warnings, ...args);\n\t\t}\n\t}\n\n\terror(...args: any[]) {\n\t\tif (this._logLevel >= LogLevel.Errors) {\n\t\t\tthis._print(LogLevel.Errors, ...args);\n\t\t}\n\t}\n\n\tsetLogFunction(fn: (logLevel: LogLevel, ..._: any[]) => void): void {\n\t\tthis._print = fn;\n\t}\n\n\tprivate _print(logLevel: LogLevel, ...rest: any[]): void {\n\t\tconst copy = [LOG_PREFIX, ...rest];\n\n\t\tfor (const i in copy) {\n\t\t\tif (copy[i] instanceof Error) {\n\t\t\t\tcopy[i] = \"(\" + copy[i].name + \") \" + copy[i].message;\n\t\t\t}\n\t\t}\n\n\t\tif (logLevel >= LogLevel.All) {\n\t\t\tconsole.log(...copy);\n\t\t} else if (logLevel >= LogLevel.Warnings) {\n\t\t\tconsole.warn(\"WARNING\", ...copy);\n\t\t} else if (logLevel >= LogLevel.Errors) {\n\t\t\tconsole.error(\"ERROR\", ...copy);\n\t\t}\n\t}\n}\n\nexport default new Logger();\n","import { EventEmitter } from \"eventemitter3\";\nimport logger from \"./logger\";\nimport { ServerMessageType, SocketEventType } from \"./enums\";\nimport { version } from \"./version\";\n\n/**\n * An abstraction on top of WebSockets to provide fastest\n * possible connection for peers.\n */\nexport class Socket extends EventEmitter {\n\tprivate _disconnected: boolean = true;\n\tprivate _id?: string;\n\tprivate _messagesQueue: Array