diff --git a/openvidu-server/src/angular/frontend/src/app/services/rest.service.ts b/openvidu-server/src/angular/frontend/src/app/services/rest.service.ts index 95f35225..8e96fc1a 100644 --- a/openvidu-server/src/angular/frontend/src/app/services/rest.service.ts +++ b/openvidu-server/src/angular/frontend/src/app/services/rest.service.ts @@ -11,7 +11,7 @@ export class RestService { if (!!this.openviduPublicUrl) { resolve(this.openviduPublicUrl); } else { - const url = location.protocol + '//' + location.hostname + ':' + (!!location.port ? location.port : '8443') + + const url = location.protocol + '//' + location.hostname + ((!!location.port) ? (':' + location.port) : '') + '/config/openvidu-publicurl'; const http = new XMLHttpRequest(); diff --git a/openvidu-server/src/main/java/io/openvidu/server/OpenViduServer.java b/openvidu-server/src/main/java/io/openvidu/server/OpenViduServer.java index 4a257b26..607fb075 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/OpenViduServer.java +++ b/openvidu-server/src/main/java/io/openvidu/server/OpenViduServer.java @@ -16,9 +16,11 @@ package io.openvidu.server; import java.io.IOException; +import java.net.MalformedURLException; import java.net.URL; import java.util.List; +import javax.annotation.PostConstruct; import javax.ws.rs.ProcessingException; import org.kurento.jsonrpc.JsonUtils; @@ -31,7 +33,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.core.env.Environment; @@ -125,15 +126,37 @@ public class OpenViduServer implements JsonRpcConfigurer { public CallDetailRecord cdr() { return new CallDetailRecord(); } + + @Bean + @ConditionalOnMissingBean + public OpenviduConfig openviduConfig() { + return new OpenviduConfig(); + } + + @Bean + @ConditionalOnMissingBean + public ComposedRecordingService composedRecordingService() { + return new ComposedRecordingService(); + } @Override public void registerJsonRpcHandlers(JsonRpcHandlerRegistry registry) { registry.addHandler(rpcHandler().withPingWatchdog(true), "/room"); } + private static String getContainerIp() throws IOException, InterruptedException { + return CommandExecutor.execCommand("/bin/sh", "-c", "hostname -i | awk '{print $1}'"); + } + public static void main(String[] args) throws Exception { - ConfigurableApplicationContext context = start(args); - OpenviduConfig openviduConf = context.getBean(OpenviduConfig.class); + log.info("Using /dev/urandom for secure random generation"); + System.setProperty("java.security.egd", "file:/dev/./urandom"); + SpringApplication.run(OpenViduServer.class, args); + } + + @PostConstruct + public void init() throws MalformedURLException, InterruptedException { + OpenviduConfig openviduConf = openviduConfig(); String publicUrl = openviduConf.getOpenViduPublicUrl(); String type = publicUrl; @@ -142,10 +165,15 @@ public class OpenViduServer implements JsonRpcConfigurer { case "ngrok": try { NgrokRestController ngrok = new NgrokRestController(); + String ngrokAppUrl = ngrok.getNgrokAppUrl(); + if (ngrokAppUrl.isEmpty()) { + ngrokAppUrl = "(No tunnel 'app' found in ngrok.yml)"; + } final String NEW_LINE = System.getProperty("line.separator"); - String str = NEW_LINE + " PUBLIC IP " + + String str = NEW_LINE + + NEW_LINE + " APP PUBLIC IP " + NEW_LINE + "-------------------------" + - NEW_LINE + ngrok.getNgrokAppUrl() + + NEW_LINE + ngrokAppUrl + NEW_LINE + "-------------------------" + NEW_LINE; log.info(str); @@ -210,7 +238,7 @@ public class OpenViduServer implements JsonRpcConfigurer { boolean recordingModuleEnabled = openviduConf.isRecordingModuleEnabled(); if (recordingModuleEnabled) { - ComposedRecordingService recordingService = context.getBean(ComposedRecordingService.class); + ComposedRecordingService recordingService = composedRecordingService(); recordingService.setRecordingVersion(openviduConf.getOpenViduRecordingVersion()); log.info("Recording module required: Downloading openvidu/openvidu-recording:" + openviduConf.getOpenViduRecordingVersion() + " Docker image (800 MB aprox)"); @@ -257,21 +285,10 @@ public class OpenViduServer implements JsonRpcConfigurer { t.join(); log.info("Docker image available"); } - + recordingService.initRecordingPath(); } - log.info("OpenVidu Server using " + type + " URL: [" + OpenViduServer.publicUrl + "]"); } - private static String getContainerIp() throws IOException, InterruptedException { - return CommandExecutor.execCommand("/bin/sh", "-c", "hostname -i | awk '{print $1}'"); - } - - public static ConfigurableApplicationContext start(String[] args) { - log.info("Using /dev/urandom for secure random generation"); - System.setProperty("java.security.egd", "file:/dev/./urandom"); - return SpringApplication.run(OpenViduServer.class, args); - } - } diff --git a/openvidu-server/src/main/resources/static/inline.bundle.js.map b/openvidu-server/src/main/resources/static/inline.bundle.js.map index de833754..4be72e8a 100644 --- a/openvidu-server/src/main/resources/static/inline.bundle.js.map +++ b/openvidu-server/src/main/resources/static/inline.bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack/bootstrap ea96a76fbedd04f4a59b"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ea96a76fbedd04f4a59b"],"sourceRoot":"webpack:///"} \ No newline at end of file +{"version":3,"sources":["webpack/bootstrap 2a3452e6cdd2c2100283"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2a3452e6cdd2c2100283"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/openvidu-server/src/main/resources/static/main.bundle.js b/openvidu-server/src/main/resources/static/main.bundle.js index 8427e3c6..3b8e15c1 100644 --- a/openvidu-server/src/main/resources/static/main.bundle.js +++ b/openvidu-server/src/main/resources/static/main.bundle.js @@ -16018,7 +16018,7 @@ var RestService = (function () { resolve(_this.openviduPublicUrl); } else { - var url = location.protocol + '//' + location.hostname + ':' + (!!location.port ? location.port : '8443') + + var url = location.protocol + '//' + location.hostname + ((!!location.port) ? (':' + location.port) : '') + '/config/openvidu-publicurl'; var http_1 = new XMLHttpRequest(); http_1.onreadystatechange = function () { diff --git a/openvidu-server/src/main/resources/static/main.bundle.js.map b/openvidu-server/src/main/resources/static/main.bundle.js.map index b31d3ad6..e4e6f89c 100644 --- a/openvidu-server/src/main/resources/static/main.bundle.js.map +++ b/openvidu-server/src/main/resources/static/main.bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/DetectRTC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/Mapper.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-utils-js/WebRtcPeer.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-utils-js/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/OpenVidu.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Publisher.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Session.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Subscriber.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Connection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/LocalRecorder.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/OpenViduError.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/OpenViduInternal.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/SessionInternal.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Stream.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/WebRtcStats.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/ScreenSharing/Screen-Capturing-Auto.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/stun.json","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/turn.json","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/hark/hark.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/inherits/inherits_browser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/merge/merge.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/normalice/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/rtcpeerconnection-shim/rtcpeerconnection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/grammar.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/parser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/writer.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/interop.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/transform.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp/sdp.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/rng-browser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v1.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v4.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_core.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_factory.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/common_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/edge/edge_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/edge/getusermedia.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/safari/safari_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/utils.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wildemitter/wildemitter.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js","./src/$_lazy_route_resource lazy","./src/app/app.component.css","./src/app/app.component.html","./src/app/app.component.ts","./src/app/app.material.module.ts","./src/app/app.module.ts","./src/app/app.routing.ts","./src/app/components/dashboard/credentials-dialog.component.ts","./src/app/components/dashboard/dashboard.component.css","./src/app/components/dashboard/dashboard.component.html","./src/app/components/dashboard/dashboard.component.ts","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","./src/app/components/layouts/openvidu-layout.ts","./src/app/components/session-details/session-details.component.css","./src/app/components/session-details/session-details.component.html","./src/app/components/session-details/session-details.component.ts","./src/app/services/info.service.ts","./src/app/services/rest.service.ts","./src/environments/environment.ts","./src/main.ts"],"names":[],"mappings":";;;;;;uHAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,IAAI,SAAS,IAAI,EAAE,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,8EAA8E,EAAE;AAChF,aAAa,eAAe,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AAAA;AACT;AACA,CAAC;AACD,qC;;;;;;;;ACt6BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yC;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY;AACjB,CAAC;AACD;AACA,uBAAuB;AACvB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qD;;;;;;;;AC5MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kCAAkC;AACjF,+CAA+C,kCAAkC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,mBAAmB,EAAE;AACrB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,iBAAiB,qCAAqC;AACtD;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACxmBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;ACVA;AACA;AACA;AACA;AACA,iC;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sC;;;;;;;ACrpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS,cAAc;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,mCAAmC;AACnC,qCAAqC;AACrC,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oC;;;;;;;;ACpPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,qDAAqD,sBAAsB;AAC3E;AACA;AACA;AACA,0DAA0D,uBAAuB;AACjF,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,2DAA2D;AACxG,aAAa;AACb,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D,2BAA2B,uBAAuB;AAClD;AACA,+DAA+D;AAC/D,2BAA2B,uBAAuB;AAClD;AACA,+DAA+D;AAC/D,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,EAAE,wBAAwB,YAAY,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,2CAA2C,qBAAqB;AAChE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS,cAAc;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,4BAA4B;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,6CAA6C;AAC5G;AACA;AACA;AACA,yCAAyC,gEAAgE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C,gDAAgD;AAChD,qDAAqD;AACrD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,4C;;;;;;;;AC7VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,qCAAqC;AAC9G;AACA,kEAAkE,qCAAqC;AACvG;AACA,qEAAqE,gBAAgB;AACrF;AACA,sEAAsE,mBAAmB;AACzF;AACA;AACA,gEAAgE,gBAAgB;AAChF;AACA,kEAAkE,iBAAiB;AACnF;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS,8BAA8B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kDAAkD;AACvG,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qDAAqD,kDAAkD;AACvG,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,aAAa;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iDAAiD,kDAAkD;AACnG,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,uBAAuB,oCAAoC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,2C;;;;;;;;AC/hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF;AAChF;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,yCAAyC;AACtI;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;;ACpkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,yDAAyD,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,oBAAoB,EAAE;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;ACvRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iD;;;;;;;;ACxIA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB;;AAEA,6BAA6B;AAC7B,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;ACxGA,6V;;;;;;;ACAA,mB;;;;;;;ACAA;;AAEA;AACA;AACA;;AAEA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,uDAAuD,mCAAmC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,mCAAmC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;;AAGA;AACA;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,gBAAgB,WAAW;;AAE3B;;AAEA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,IAAI;;AAEJ;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;;AAE9B;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,KAAK;;AAEL;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,YAAY;;AAEZ;;AAEA;;AAEA;;AAEA,EAAE;;AAEF;;AAEA;;AAEA,CAAC,gG;;;;;;;;AC9KD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;;AAEA;AACA;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,sCAAsC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,gCAAgC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa;AACtB;;AAEA;AACA;AACA;AACA,SAAS,aAAa;AACtB;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B;;AAE/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,mBAAmB,8BAA8B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gCAAgC;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,aAAa;AACb;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;ACvuDA;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAC7B,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,UAAU;AACV,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uCAAuC,UAAU;AACjD,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;AChQD;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+CAA+C;;AAE/C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,uCAAuC;AACvC;;AAEA,mBAAmB,kCAAkC;AACrD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,4BAA4B;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;AC5FA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gBAAgB,KAAK,KAAK;AAC1B;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,KAAK;AACpD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,cAAc;;AAEd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,yBAAyB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;;;;;;;ACl3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;AC9GA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB,0BAA0B;AAC1B;AACA;AACA;AACA,yDAAyD;AACzD,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;ACnqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA,6BAA6B;AAC7B,kDAAkD;;AAElD;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA,0CAA0C;AAC1C;;AAEA;AACA;;AAEA;;AAEA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,8CAA8C,EAAE;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;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;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA,yCAAyC;AACzC;AACA,0BAA0B;AAC1B;AACA,+BAA+B;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,IAAI;AAChC;;AAEA;AACA;;AAEA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,wDAAwD;AACxD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AAAA;AACb,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;AC/iCD;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;AChCA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,iCAAiC,sBAAsB;;;;;;;;;;ACZvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,+DAA+D;AAC/D;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yBAAyB,gCAAgC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxuBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,YAAY;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA,gDAAgD;AAChD;AACA;AACA,yDAAyD,oBAAoB;AAC7E,yDAAyD;AACzD;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA,+BAA+B,wBAAwB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;;;;;;;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,8BAA8B;AAC9B,oCAAoC,EAAE;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gEAAgE;AAC7E,aAAa;AACb;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gCAAgC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0DAA0D;AAC1D;AACA;AACA;AACA,KAAK;AACL,4DAA4D;AAC5D;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC7KA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC;;AAED;;AAEA,CAAC;;AAED;AACA;AACA;;AAEA;;AAEA,wBAAwB;;AAExB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;ACxJA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,MAAM;AACrB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,KAAK;AACpB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,2BAA2B,mBAAmB;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AAAA;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,WAAW;;;;;;;;ACreZ;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,4CAA4C,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FAAgF;AAEzE,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,KAAK;CAClB,CAAC;;;;;;;;;;;;;;ACP6C;AAC4B;AAE9B;AACY;AAEzD,EAAE,CAAC,CAAC,8EAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3B,+EAAc,EAAE,CAAC;AACnB,CAAC;AAED,yGAAsB,EAAE,CAAC,eAAe,CAAC,kEAAS,CAAC,CAAC","file":"main.bundle.js","sourcesContent":["'use strict';\n// Last Updated On: 2017-12-09 2:29:22 PM UTC\n// ________________\n// DetectRTC v1.3.6\n// Open-Sourced: https://github.com/muaz-khan/DetectRTC\n// --------------------------------------------------\n// Muaz Khan - www.MuazKhan.com\n// MIT License - www.WebRTC-Experiment.com/licence\n// --------------------------------------------------\n(function () {\n var browserFakeUserAgent = 'Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45';\n var isNodejs = typeof process === 'object' && typeof process.versions === 'object' && process.versions.node && /*node-process*/ !process.browser;\n if (isNodejs) {\n var version = process.versions.node.toString().replace('v', '');\n browserFakeUserAgent = 'Nodejs/' + version + ' (NodeOS) AppleWebKit/' + version + ' (KHTML, like Gecko) Nodejs/' + version + ' Nodejs/' + version;\n }\n (function (that) {\n if (typeof window !== 'undefined') {\n return;\n }\n if (typeof window === 'undefined' && typeof global !== 'undefined') {\n global.navigator = {\n userAgent: browserFakeUserAgent,\n getUserMedia: function () { }\n };\n /*global window:true */\n that.window = global;\n }\n else if (typeof window === 'undefined') {\n // window = this;\n }\n if (typeof location === 'undefined') {\n /*global location:true */\n that.location = {\n protocol: 'file:',\n href: '',\n hash: ''\n };\n }\n if (typeof screen === 'undefined') {\n /*global screen:true */\n that.screen = {\n width: 0,\n height: 0\n };\n }\n })(typeof global !== 'undefined' ? global : window);\n /*global navigator:true */\n var navigator = window.navigator;\n if (typeof navigator !== 'undefined') {\n if (typeof navigator.webkitGetUserMedia !== 'undefined') {\n navigator.getUserMedia = navigator.webkitGetUserMedia;\n }\n if (typeof navigator.mozGetUserMedia !== 'undefined') {\n navigator.getUserMedia = navigator.mozGetUserMedia;\n }\n }\n else {\n navigator = {\n getUserMedia: function () { },\n userAgent: browserFakeUserAgent\n };\n }\n var isMobileDevice = !!(/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(navigator.userAgent || ''));\n var isEdge = navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveOrOpenBlob || !!navigator.msSaveBlob);\n var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;\n var isFirefox = typeof window.InstallTrigger !== 'undefined';\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n var isChrome = !!window.chrome && !isOpera;\n var isIE = typeof document !== 'undefined' && !!document.documentMode && !isEdge;\n // this one can also be used:\n // https://www.websocket.org/js/stuff.js (DetectBrowser.js)\n function getBrowserInfo() {\n var nVer = navigator.appVersion;\n var nAgt = navigator.userAgent;\n var browserName = navigator.appName;\n var fullVersion = '' + parseFloat(navigator.appVersion);\n var majorVersion = parseInt(navigator.appVersion, 10);\n var nameOffset, verOffset, ix;\n // In Opera, the true version is after 'Opera' or after 'Version'\n if (isOpera) {\n browserName = 'Opera';\n try {\n fullVersion = navigator.userAgent.split('OPR/')[1].split(' ')[0];\n majorVersion = fullVersion.split('.')[0];\n }\n catch (e) {\n fullVersion = '0.0.0.0';\n majorVersion = 0;\n }\n }\n else if (isIE) {\n verOffset = nAgt.indexOf('rv:');\n if (verOffset > 0) {\n fullVersion = nAgt.substring(verOffset + 3);\n }\n else {\n verOffset = nAgt.indexOf('MSIE');\n fullVersion = nAgt.substring(verOffset + 5);\n }\n browserName = 'IE';\n }\n else if (isChrome) {\n verOffset = nAgt.indexOf('Chrome');\n browserName = 'Chrome';\n fullVersion = nAgt.substring(verOffset + 7);\n }\n else if (isSafari) {\n verOffset = nAgt.indexOf('Safari');\n browserName = 'Safari';\n fullVersion = nAgt.substring(verOffset + 7);\n if ((verOffset = nAgt.indexOf('Version')) !== -1) {\n fullVersion = nAgt.substring(verOffset + 8);\n }\n if (navigator.userAgent.indexOf('Version/') !== -1) {\n fullVersion = navigator.userAgent.split('Version/')[1].split(' ')[0];\n }\n }\n else if (isFirefox) {\n verOffset = nAgt.indexOf('Firefox');\n browserName = 'Firefox';\n fullVersion = nAgt.substring(verOffset + 8);\n }\n else if ((nameOffset = nAgt.lastIndexOf(' ') + 1) < (verOffset = nAgt.lastIndexOf('/'))) {\n browserName = nAgt.substring(nameOffset, verOffset);\n fullVersion = nAgt.substring(verOffset + 1);\n if (browserName.toLowerCase() === browserName.toUpperCase()) {\n browserName = navigator.appName;\n }\n }\n if (isEdge) {\n browserName = 'Edge';\n fullVersion = navigator.userAgent.split('Edge/')[1];\n // fullVersion = parseInt(navigator.userAgent.match(/Edge\\/(\\d+).(\\d+)$/)[2], 10).toString();\n }\n // trim the fullVersion string at semicolon/space/bracket if present\n if ((ix = fullVersion.search(/[; \\)]/)) !== -1) {\n fullVersion = fullVersion.substring(0, ix);\n }\n majorVersion = parseInt('' + fullVersion, 10);\n if (isNaN(majorVersion)) {\n fullVersion = '' + parseFloat(navigator.appVersion);\n majorVersion = parseInt(navigator.appVersion, 10);\n }\n return {\n fullVersion: fullVersion,\n version: majorVersion,\n name: browserName,\n isPrivateBrowsing: false\n };\n }\n // via: https://gist.github.com/cou929/7973956\n function retry(isDone, next) {\n var currentTrial = 0, maxRetry = 50, interval = 10, isTimeout = false;\n var id = window.setInterval(function () {\n if (isDone()) {\n window.clearInterval(id);\n next(isTimeout);\n }\n if (currentTrial++ > maxRetry) {\n window.clearInterval(id);\n isTimeout = true;\n next(isTimeout);\n }\n }, 10);\n }\n function isIE10OrLater(userAgent) {\n var ua = userAgent.toLowerCase();\n if (ua.indexOf('msie') === 0 && ua.indexOf('trident') === 0) {\n return false;\n }\n var match = /(?:msie|rv:)\\s?([\\d\\.]+)/.exec(ua);\n if (match && parseInt(match[1], 10) >= 10) {\n return true;\n }\n return false;\n }\n function detectPrivateMode(callback) {\n var isPrivate;\n try {\n if (window.webkitRequestFileSystem) {\n window.webkitRequestFileSystem(window.TEMPORARY, 1, function () {\n isPrivate = false;\n }, function (e) {\n isPrivate = true;\n });\n }\n else if (window.indexedDB && /Firefox/.test(window.navigator.userAgent)) {\n var db;\n try {\n db = window.indexedDB.open('test');\n db.onerror = function () {\n return true;\n };\n }\n catch (e) {\n isPrivate = true;\n }\n if (typeof isPrivate === 'undefined') {\n retry(function isDone() {\n return db.readyState === 'done' ? true : false;\n }, function next(isTimeout) {\n if (!isTimeout) {\n isPrivate = db.result ? false : true;\n }\n });\n }\n }\n else if (isIE10OrLater(window.navigator.userAgent)) {\n isPrivate = false;\n try {\n if (!window.indexedDB) {\n isPrivate = true;\n }\n }\n catch (e) {\n isPrivate = true;\n }\n }\n else if (window.localStorage && /Safari/.test(window.navigator.userAgent)) {\n try {\n window.localStorage.setItem('test', 1);\n }\n catch (e) {\n isPrivate = true;\n }\n if (typeof isPrivate === 'undefined') {\n isPrivate = false;\n window.localStorage.removeItem('test');\n }\n }\n }\n catch (e) {\n isPrivate = false;\n }\n retry(function isDone() {\n return typeof isPrivate !== 'undefined' ? true : false;\n }, function next(isTimeout) {\n callback(isPrivate);\n });\n }\n var isMobile = {\n Android: function () {\n return navigator.userAgent.match(/Android/i);\n },\n BlackBerry: function () {\n return navigator.userAgent.match(/BlackBerry|BB10/i);\n },\n iOS: function () {\n return navigator.userAgent.match(/iPhone|iPad|iPod/i);\n },\n Opera: function () {\n return navigator.userAgent.match(/Opera Mini/i);\n },\n Windows: function () {\n return navigator.userAgent.match(/IEMobile/i);\n },\n any: function () {\n return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());\n },\n getOsName: function () {\n var osName = 'Unknown OS';\n if (isMobile.Android()) {\n osName = 'Android';\n }\n if (isMobile.BlackBerry()) {\n osName = 'BlackBerry';\n }\n if (isMobile.iOS()) {\n osName = 'iOS';\n }\n if (isMobile.Opera()) {\n osName = 'Opera Mini';\n }\n if (isMobile.Windows()) {\n osName = 'Windows';\n }\n return osName;\n }\n };\n // via: http://jsfiddle.net/ChristianL/AVyND/\n function detectDesktopOS() {\n var unknown = '-';\n var nVer = navigator.appVersion;\n var nAgt = navigator.userAgent;\n var os = unknown;\n var clientStrings = [{\n s: 'Windows 10',\n r: /(Windows 10.0|Windows NT 10.0)/\n }, {\n s: 'Windows 8.1',\n r: /(Windows 8.1|Windows NT 6.3)/\n }, {\n s: 'Windows 8',\n r: /(Windows 8|Windows NT 6.2)/\n }, {\n s: 'Windows 7',\n r: /(Windows 7|Windows NT 6.1)/\n }, {\n s: 'Windows Vista',\n r: /Windows NT 6.0/\n }, {\n s: 'Windows Server 2003',\n r: /Windows NT 5.2/\n }, {\n s: 'Windows XP',\n r: /(Windows NT 5.1|Windows XP)/\n }, {\n s: 'Windows 2000',\n r: /(Windows NT 5.0|Windows 2000)/\n }, {\n s: 'Windows ME',\n r: /(Win 9x 4.90|Windows ME)/\n }, {\n s: 'Windows 98',\n r: /(Windows 98|Win98)/\n }, {\n s: 'Windows 95',\n r: /(Windows 95|Win95|Windows_95)/\n }, {\n s: 'Windows NT 4.0',\n r: /(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/\n }, {\n s: 'Windows CE',\n r: /Windows CE/\n }, {\n s: 'Windows 3.11',\n r: /Win16/\n }, {\n s: 'Android',\n r: /Android/\n }, {\n s: 'Open BSD',\n r: /OpenBSD/\n }, {\n s: 'Sun OS',\n r: /SunOS/\n }, {\n s: 'Linux',\n r: /(Linux|X11)/\n }, {\n s: 'iOS',\n r: /(iPhone|iPad|iPod)/\n }, {\n s: 'Mac OS X',\n r: /Mac OS X/\n }, {\n s: 'Mac OS',\n r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/\n }, {\n s: 'QNX',\n r: /QNX/\n }, {\n s: 'UNIX',\n r: /UNIX/\n }, {\n s: 'BeOS',\n r: /BeOS/\n }, {\n s: 'OS/2',\n r: /OS\\/2/\n }, {\n s: 'Search Bot',\n r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\\/Teoma|ia_archiver)/\n }];\n for (var i = 0, cs; cs = clientStrings[i]; i++) {\n if (cs.r.test(nAgt)) {\n os = cs.s;\n break;\n }\n }\n var osVersion = unknown;\n if (/Windows/.test(os)) {\n if (/Windows (.*)/.test(os)) {\n osVersion = /Windows (.*)/.exec(os)[1];\n }\n os = 'Windows';\n }\n switch (os) {\n case 'Mac OS X':\n if (/Mac OS X (10[\\.\\_\\d]+)/.test(nAgt)) {\n osVersion = /Mac OS X (10[\\.\\_\\d]+)/.exec(nAgt)[1];\n }\n break;\n case 'Android':\n if (/Android ([\\.\\_\\d]+)/.test(nAgt)) {\n osVersion = /Android ([\\.\\_\\d]+)/.exec(nAgt)[1];\n }\n break;\n case 'iOS':\n if (/OS (\\d+)_(\\d+)_?(\\d+)?/.test(nAgt)) {\n osVersion = /OS (\\d+)_(\\d+)_?(\\d+)?/.exec(nVer);\n osVersion = osVersion[1] + '.' + osVersion[2] + '.' + (osVersion[3] | 0);\n }\n break;\n }\n return {\n osName: os,\n osVersion: osVersion\n };\n }\n var osName = 'Unknown OS';\n var osVersion = 'Unknown OS Version';\n function getAndroidVersion(ua) {\n ua = (ua || navigator.userAgent).toLowerCase();\n var match = ua.match(/android\\s([0-9\\.]*)/);\n return match ? match[1] : false;\n }\n var osInfo = detectDesktopOS();\n if (osInfo && osInfo.osName && osInfo.osName != '-') {\n osName = osInfo.osName;\n osVersion = osInfo.osVersion;\n }\n else if (isMobile.any()) {\n osName = isMobile.getOsName();\n if (osName == 'Android') {\n osVersion = getAndroidVersion();\n }\n }\n var isNodejs = typeof process === 'object' && typeof process.versions === 'object' && process.versions.node;\n if (osName === 'Unknown OS' && isNodejs) {\n osName = 'Nodejs';\n osVersion = process.versions.node.toString().replace('v', '');\n }\n var isCanvasSupportsStreamCapturing = false;\n var isVideoSupportsStreamCapturing = false;\n ['captureStream', 'mozCaptureStream', 'webkitCaptureStream'].forEach(function (item) {\n if (typeof document === 'undefined' || typeof document.createElement !== 'function') {\n return;\n }\n if (!isCanvasSupportsStreamCapturing && item in document.createElement('canvas')) {\n isCanvasSupportsStreamCapturing = true;\n }\n if (!isVideoSupportsStreamCapturing && item in document.createElement('video')) {\n isVideoSupportsStreamCapturing = true;\n }\n });\n // via: https://github.com/diafygi/webrtc-ips\n function DetectLocalIPAddress(callback, stream) {\n if (!DetectRTC.isWebRTCSupported) {\n return;\n }\n getIPs(function (ip) {\n if (ip.match(/^(192\\.168\\.|169\\.254\\.|10\\.|172\\.(1[6-9]|2\\d|3[01]))/)) {\n callback('Local: ' + ip);\n }\n else {\n callback('Public: ' + ip);\n }\n }, stream);\n }\n function getIPs(callback, stream) {\n if (typeof document === 'undefined' || typeof document.getElementById !== 'function') {\n return;\n }\n var ipDuplicates = {};\n var RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;\n if (!RTCPeerConnection) {\n var iframe = document.getElementById('iframe');\n if (!iframe) {\n return;\n }\n var win = iframe.contentWindow;\n RTCPeerConnection = win.RTCPeerConnection || win.mozRTCPeerConnection || win.webkitRTCPeerConnection;\n }\n if (!RTCPeerConnection) {\n return;\n }\n var peerConfig = null;\n if (DetectRTC.browser === 'Chrome' && DetectRTC.browser.version < 58) {\n // todo: add support for older Opera\n peerConfig = {\n optional: [{\n RtpDataChannels: true\n }]\n };\n }\n var servers = {\n iceServers: [{\n urls: 'stun:stun.l.google.com:19302'\n }]\n };\n var pc = new RTCPeerConnection(servers, peerConfig);\n if (stream) {\n if (pc.addStream) {\n pc.addStream(stream);\n }\n else if (pc.addTrack && stream.getTracks()[0]) {\n pc.addTrack(stream.getTracks()[0], stream);\n }\n }\n function handleCandidate(candidate) {\n var ipRegex = /([0-9]{1,3}(\\.[0-9]{1,3}){3})/;\n var match = ipRegex.exec(candidate);\n if (!match) {\n return;\n }\n var ipAddress = match[1];\n if (ipDuplicates[ipAddress] === undefined) {\n callback(ipAddress);\n }\n ipDuplicates[ipAddress] = true;\n }\n // listen for candidate events\n pc.onicecandidate = function (ice) {\n if (ice.candidate) {\n handleCandidate(ice.candidate.candidate);\n }\n };\n // create data channel\n if (!stream) {\n try {\n pc.createDataChannel('sctp', {});\n }\n catch (e) { }\n }\n // create an offer sdp\n if (DetectRTC.isPromisesSupported) {\n pc.createOffer().then(function (result) {\n pc.setLocalDescription(result).then(afterCreateOffer);\n });\n }\n else {\n pc.createOffer(function (result) {\n pc.setLocalDescription(result, afterCreateOffer, function () { });\n }, function () { });\n }\n function afterCreateOffer() {\n var lines = pc.localDescription.sdp.split('\\n');\n lines.forEach(function (line) {\n if (line.indexOf('a=candidate:') === 0) {\n handleCandidate(line);\n }\n });\n }\n }\n var MediaDevices = [];\n var audioInputDevices = [];\n var audioOutputDevices = [];\n var videoInputDevices = [];\n if (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) {\n // Firefox 38+ seems having support of enumerateDevices\n // Thanks @xdumaine/enumerateDevices\n navigator.enumerateDevices = function (callback) {\n var enumerateDevices = navigator.mediaDevices.enumerateDevices();\n if (enumerateDevices && enumerateDevices.then) {\n navigator.mediaDevices.enumerateDevices().then(callback).catch(function () {\n callback([]);\n });\n }\n else {\n callback([]);\n }\n };\n }\n // Media Devices detection\n var canEnumerate = false;\n /*global MediaStreamTrack:true */\n if (typeof MediaStreamTrack !== 'undefined' && 'getSources' in MediaStreamTrack) {\n canEnumerate = true;\n }\n else if (navigator.mediaDevices && !!navigator.mediaDevices.enumerateDevices) {\n canEnumerate = true;\n }\n var hasMicrophone = false;\n var hasSpeakers = false;\n var hasWebcam = false;\n var isWebsiteHasMicrophonePermissions = false;\n var isWebsiteHasWebcamPermissions = false;\n // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediadevices\n function checkDeviceSupport(callback) {\n if (!canEnumerate) {\n if (callback) {\n callback();\n }\n return;\n }\n if (!navigator.enumerateDevices && window.MediaStreamTrack && window.MediaStreamTrack.getSources) {\n navigator.enumerateDevices = window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack);\n }\n if (!navigator.enumerateDevices && navigator.enumerateDevices) {\n navigator.enumerateDevices = navigator.enumerateDevices.bind(navigator);\n }\n if (!navigator.enumerateDevices) {\n if (callback) {\n callback();\n }\n return;\n }\n MediaDevices = [];\n audioInputDevices = [];\n audioOutputDevices = [];\n videoInputDevices = [];\n hasMicrophone = false;\n hasSpeakers = false;\n hasWebcam = false;\n isWebsiteHasMicrophonePermissions = false;\n isWebsiteHasWebcamPermissions = false;\n // to prevent duplication\n var alreadyUsedDevices = {};\n navigator.enumerateDevices(function (devices) {\n devices.forEach(function (_device) {\n var device = {};\n for (var d in _device) {\n try {\n if (typeof _device[d] !== 'function') {\n device[d] = _device[d];\n }\n }\n catch (e) { }\n }\n if (alreadyUsedDevices[device.deviceId + device.label + device.kind]) {\n return;\n }\n // if it is MediaStreamTrack.getSources\n if (device.kind === 'audio') {\n device.kind = 'audioinput';\n }\n if (device.kind === 'video') {\n device.kind = 'videoinput';\n }\n if (!device.deviceId) {\n device.deviceId = device.id;\n }\n if (!device.id) {\n device.id = device.deviceId;\n }\n if (!device.label) {\n device.isCustomLabel = true;\n if (device.kind === 'videoinput') {\n device.label = 'Camera ' + (videoInputDevices.length + 1);\n }\n else if (device.kind === 'audioinput') {\n device.label = 'Microphone ' + (audioInputDevices.length + 1);\n }\n else if (device.kind === 'audiooutput') {\n device.label = 'Speaker ' + (audioOutputDevices.length + 1);\n }\n else {\n device.label = 'Please invoke getUserMedia once.';\n }\n if (typeof DetectRTC !== 'undefined' && DetectRTC.browser.isChrome && DetectRTC.browser.version >= 46 && !/^(https:|chrome-extension:)$/g.test(location.protocol || '')) {\n if (typeof document !== 'undefined' && typeof document.domain === 'string' && document.domain.search && document.domain.search(/localhost|127.0./g) === -1) {\n device.label = 'HTTPs is required to get label of this ' + device.kind + ' device.';\n }\n }\n }\n else {\n // Firefox on Android still returns empty label\n if (device.kind === 'videoinput' && !isWebsiteHasWebcamPermissions) {\n isWebsiteHasWebcamPermissions = true;\n }\n if (device.kind === 'audioinput' && !isWebsiteHasMicrophonePermissions) {\n isWebsiteHasMicrophonePermissions = true;\n }\n }\n if (device.kind === 'audioinput') {\n hasMicrophone = true;\n if (audioInputDevices.indexOf(device) === -1) {\n audioInputDevices.push(device);\n }\n }\n if (device.kind === 'audiooutput') {\n hasSpeakers = true;\n if (audioOutputDevices.indexOf(device) === -1) {\n audioOutputDevices.push(device);\n }\n }\n if (device.kind === 'videoinput') {\n hasWebcam = true;\n if (videoInputDevices.indexOf(device) === -1) {\n videoInputDevices.push(device);\n }\n }\n // there is no 'videoouput' in the spec.\n MediaDevices.push(device);\n alreadyUsedDevices[device.deviceId + device.label + device.kind] = device;\n });\n if (typeof DetectRTC !== 'undefined') {\n // to sync latest outputs\n DetectRTC.MediaDevices = MediaDevices;\n DetectRTC.hasMicrophone = hasMicrophone;\n DetectRTC.hasSpeakers = hasSpeakers;\n DetectRTC.hasWebcam = hasWebcam;\n DetectRTC.isWebsiteHasWebcamPermissions = isWebsiteHasWebcamPermissions;\n DetectRTC.isWebsiteHasMicrophonePermissions = isWebsiteHasMicrophonePermissions;\n DetectRTC.audioInputDevices = audioInputDevices;\n DetectRTC.audioOutputDevices = audioOutputDevices;\n DetectRTC.videoInputDevices = videoInputDevices;\n }\n if (callback) {\n callback();\n }\n });\n }\n var DetectRTC = window.DetectRTC || {};\n // ----------\n // DetectRTC.browser.name || DetectRTC.browser.version || DetectRTC.browser.fullVersion\n DetectRTC.browser = getBrowserInfo();\n detectPrivateMode(function (isPrivateBrowsing) {\n DetectRTC.browser.isPrivateBrowsing = !!isPrivateBrowsing;\n });\n // DetectRTC.isChrome || DetectRTC.isFirefox || DetectRTC.isEdge\n DetectRTC.browser['is' + DetectRTC.browser.name] = true;\n // -----------\n DetectRTC.osName = osName;\n DetectRTC.osVersion = osVersion;\n var isNodeWebkit = typeof process === 'object' && typeof process.versions === 'object' && process.versions['node-webkit'];\n // --------- Detect if system supports WebRTC 1.0 or WebRTC 1.1.\n var isWebRTCSupported = false;\n ['RTCPeerConnection', 'webkitRTCPeerConnection', 'mozRTCPeerConnection', 'RTCIceGatherer'].forEach(function (item) {\n if (isWebRTCSupported) {\n return;\n }\n if (item in window) {\n isWebRTCSupported = true;\n }\n });\n DetectRTC.isWebRTCSupported = isWebRTCSupported;\n //-------\n DetectRTC.isORTCSupported = typeof RTCIceGatherer !== 'undefined';\n // --------- Detect if WebAudio API are supported\n var webAudio = {\n isSupported: false,\n isCreateMediaStreamSourceSupported: false\n };\n ['AudioContext', 'webkitAudioContext', 'mozAudioContext', 'msAudioContext'].forEach(function (item) {\n if (webAudio.isSupported) {\n return;\n }\n if (item in window) {\n webAudio.isSupported = true;\n if (window[item] && 'createMediaStreamSource' in window[item].prototype) {\n webAudio.isCreateMediaStreamSourceSupported = true;\n }\n }\n });\n DetectRTC.isAudioContextSupported = webAudio.isSupported;\n DetectRTC.isCreateMediaStreamSourceSupported = webAudio.isCreateMediaStreamSourceSupported;\n // ---------- Detect if SCTP/RTP channels are supported.\n var isRtpDataChannelsSupported = false;\n if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 31) {\n isRtpDataChannelsSupported = true;\n }\n DetectRTC.isRtpDataChannelsSupported = isRtpDataChannelsSupported;\n var isSCTPSupportd = false;\n if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 28) {\n isSCTPSupportd = true;\n }\n else if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 25) {\n isSCTPSupportd = true;\n }\n else if (DetectRTC.browser.isOpera && DetectRTC.browser.version >= 11) {\n isSCTPSupportd = true;\n }\n DetectRTC.isSctpDataChannelsSupported = isSCTPSupportd;\n // ---------\n DetectRTC.isMobileDevice = isMobileDevice; // \"isMobileDevice\" boolean is defined in \"getBrowserInfo.js\"\n // ------\n var isGetUserMediaSupported = false;\n if (navigator.getUserMedia) {\n isGetUserMediaSupported = true;\n }\n else if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {\n isGetUserMediaSupported = true;\n }\n if (DetectRTC.browser.isChrome && DetectRTC.browser.version >= 46 && !/^(https:|chrome-extension:)$/g.test(location.protocol || '')) {\n if (typeof document !== 'undefined' && typeof document.domain === 'string' && document.domain.search && document.domain.search(/localhost|127.0./g) === -1) {\n isGetUserMediaSupported = 'Requires HTTPs';\n }\n }\n if (DetectRTC.osName === 'Nodejs') {\n isGetUserMediaSupported = false;\n }\n DetectRTC.isGetUserMediaSupported = isGetUserMediaSupported;\n var displayResolution = '';\n if (screen.width) {\n var width = (screen.width) ? screen.width : '';\n var height = (screen.height) ? screen.height : '';\n displayResolution += '' + width + ' x ' + height;\n }\n DetectRTC.displayResolution = displayResolution;\n function getAspectRatio(w, h) {\n function gcd(a, b) {\n return (b == 0) ? a : gcd(b, a % b);\n }\n var r = gcd(w, h);\n return (w / r) / (h / r);\n }\n DetectRTC.displayAspectRatio = getAspectRatio(screen.width, screen.height).toFixed(2);\n // ----------\n DetectRTC.isCanvasSupportsStreamCapturing = isCanvasSupportsStreamCapturing;\n DetectRTC.isVideoSupportsStreamCapturing = isVideoSupportsStreamCapturing;\n if (DetectRTC.browser.name == 'Chrome' && DetectRTC.browser.version >= 53) {\n if (!DetectRTC.isCanvasSupportsStreamCapturing) {\n DetectRTC.isCanvasSupportsStreamCapturing = 'Requires chrome flag: enable-experimental-web-platform-features';\n }\n if (!DetectRTC.isVideoSupportsStreamCapturing) {\n DetectRTC.isVideoSupportsStreamCapturing = 'Requires chrome flag: enable-experimental-web-platform-features';\n }\n }\n // ------\n DetectRTC.DetectLocalIPAddress = DetectLocalIPAddress;\n DetectRTC.isWebSocketsSupported = 'WebSocket' in window && 2 === window.WebSocket.CLOSING;\n DetectRTC.isWebSocketsBlocked = !DetectRTC.isWebSocketsSupported;\n if (DetectRTC.osName === 'Nodejs') {\n DetectRTC.isWebSocketsSupported = true;\n DetectRTC.isWebSocketsBlocked = false;\n }\n DetectRTC.checkWebSocketsSupport = function (callback) {\n callback = callback || function () { };\n try {\n var starttime;\n var websocket = new WebSocket('wss://echo.websocket.org:443/');\n websocket.onopen = function () {\n DetectRTC.isWebSocketsBlocked = false;\n starttime = (new Date).getTime();\n websocket.send('ping');\n };\n websocket.onmessage = function () {\n DetectRTC.WebsocketLatency = (new Date).getTime() - starttime + 'ms';\n callback();\n websocket.close();\n websocket = null;\n };\n websocket.onerror = function () {\n DetectRTC.isWebSocketsBlocked = true;\n callback();\n };\n }\n catch (e) {\n DetectRTC.isWebSocketsBlocked = true;\n callback();\n }\n };\n // -------\n DetectRTC.load = function (callback) {\n callback = callback || function () { };\n checkDeviceSupport(callback);\n };\n // check for microphone/camera support!\n if (typeof checkDeviceSupport === 'function') {\n // checkDeviceSupport();\n }\n if (typeof MediaDevices !== 'undefined') {\n DetectRTC.MediaDevices = MediaDevices;\n }\n else {\n DetectRTC.MediaDevices = [];\n }\n DetectRTC.hasMicrophone = hasMicrophone;\n DetectRTC.hasSpeakers = hasSpeakers;\n DetectRTC.hasWebcam = hasWebcam;\n DetectRTC.isWebsiteHasWebcamPermissions = isWebsiteHasWebcamPermissions;\n DetectRTC.isWebsiteHasMicrophonePermissions = isWebsiteHasMicrophonePermissions;\n DetectRTC.audioInputDevices = audioInputDevices;\n DetectRTC.audioOutputDevices = audioOutputDevices;\n DetectRTC.videoInputDevices = videoInputDevices;\n // ------\n var isSetSinkIdSupported = false;\n if (typeof document !== 'undefined' && typeof document.createElement === 'function' && 'setSinkId' in document.createElement('video')) {\n isSetSinkIdSupported = true;\n }\n DetectRTC.isSetSinkIdSupported = isSetSinkIdSupported;\n // -----\n var isRTPSenderReplaceTracksSupported = false;\n if (DetectRTC.browser.isFirefox && typeof mozRTCPeerConnection !== 'undefined' /*&& DetectRTC.browser.version > 39*/) {\n /*global mozRTCPeerConnection:true */\n if ('getSenders' in mozRTCPeerConnection.prototype) {\n isRTPSenderReplaceTracksSupported = true;\n }\n }\n else if (DetectRTC.browser.isChrome && typeof webkitRTCPeerConnection !== 'undefined') {\n /*global webkitRTCPeerConnection:true */\n if ('getSenders' in webkitRTCPeerConnection.prototype) {\n isRTPSenderReplaceTracksSupported = true;\n }\n }\n DetectRTC.isRTPSenderReplaceTracksSupported = isRTPSenderReplaceTracksSupported;\n //------\n var isRemoteStreamProcessingSupported = false;\n if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 38) {\n isRemoteStreamProcessingSupported = true;\n }\n DetectRTC.isRemoteStreamProcessingSupported = isRemoteStreamProcessingSupported;\n //-------\n var isApplyConstraintsSupported = false;\n /*global MediaStreamTrack:true */\n if (typeof MediaStreamTrack !== 'undefined' && 'applyConstraints' in MediaStreamTrack.prototype) {\n isApplyConstraintsSupported = true;\n }\n DetectRTC.isApplyConstraintsSupported = isApplyConstraintsSupported;\n //-------\n var isMultiMonitorScreenCapturingSupported = false;\n if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 43) {\n // version 43 merely supports platforms for multi-monitors\n // version 44 will support exact multi-monitor selection i.e. you can select any monitor for screen capturing.\n isMultiMonitorScreenCapturingSupported = true;\n }\n DetectRTC.isMultiMonitorScreenCapturingSupported = isMultiMonitorScreenCapturingSupported;\n DetectRTC.isPromisesSupported = !!('Promise' in window);\n if (typeof DetectRTC === 'undefined') {\n window.DetectRTC = {};\n }\n var MediaStream = window.MediaStream;\n if (typeof MediaStream === 'undefined' && typeof webkitMediaStream !== 'undefined') {\n MediaStream = webkitMediaStream;\n }\n if (typeof MediaStream !== 'undefined') {\n DetectRTC.MediaStream = Object.keys(MediaStream.prototype);\n }\n else\n DetectRTC.MediaStream = false;\n if (typeof MediaStreamTrack !== 'undefined') {\n DetectRTC.MediaStreamTrack = Object.keys(MediaStreamTrack.prototype);\n }\n else\n DetectRTC.MediaStreamTrack = false;\n var RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;\n if (typeof RTCPeerConnection !== 'undefined') {\n DetectRTC.RTCPeerConnection = Object.keys(RTCPeerConnection.prototype);\n }\n else\n DetectRTC.RTCPeerConnection = false;\n window.DetectRTC = DetectRTC;\n if (typeof module !== 'undefined' /* && !!module.exports*/) {\n module.exports = DetectRTC;\n }\n if (typeof define === 'function' && define.amd) {\n define('DetectRTC', [], function () {\n return DetectRTC;\n });\n }\n})();\n//# sourceMappingURL=DetectRTC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/DetectRTC.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/DetectRTC.js\n// module chunks = main","function Mapper() {\n var sources = {};\n this.forEach = function (callback) {\n for (var key in sources) {\n var source = sources[key];\n for (var key2 in source)\n callback(source[key2]);\n }\n ;\n };\n this.get = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return undefined;\n return ids[id];\n };\n this.remove = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return;\n delete ids[id];\n // Check it's empty\n for (var i in ids) {\n return false;\n }\n delete sources[source];\n };\n this.set = function (value, id, source) {\n if (value == undefined)\n return this.remove(id, source);\n var ids = sources[source];\n if (ids == undefined)\n sources[source] = ids = {};\n ids[id] = value;\n };\n}\n;\nMapper.prototype.pop = function (id, source) {\n var value = this.get(id, source);\n if (value == undefined)\n return undefined;\n this.remove(id, source);\n return value;\n};\nmodule.exports = Mapper;\n//# sourceMappingURL=Mapper.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar JsonRpcClient = require('./jsonrpcclient');\nexports.JsonRpcClient = JsonRpcClient;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar RpcBuilder = require('../');\nvar WebSocketWithReconnection = require('./transports/webSocketWithReconnection');\nDate.now = Date.now || function () {\n return +new Date;\n};\nvar PING_INTERVAL = 5000;\nvar RECONNECTING = 'RECONNECTING';\nvar CONNECTED = 'CONNECTED';\nvar DISCONNECTED = 'DISCONNECTED';\nvar Logger = console;\n/**\n *\n * heartbeat: interval in ms for each heartbeat message,\n * sendCloseMessage : true / false, before closing the connection, it sends a closeSession message\n *
\n * ws : {\n * \turi : URI to conntect to,\n *  useSockJS : true (use SockJS) / false (use WebSocket) by default,\n * \tonconnected : callback method to invoke when connection is successful,\n * \tondisconnect : callback method to invoke when the connection is lost,\n * \tonreconnecting : callback method to invoke when the client is reconnecting,\n * \tonreconnected : callback method to invoke when the client succesfully reconnects,\n * \tonerror : callback method to invoke when there is an error\n * },\n * rpc : {\n * \trequestTimeout : timeout for a request,\n * \tsessionStatusChanged: callback method for changes in session status,\n * \tmediaRenegotiation: mediaRenegotiation\n * }\n * 
\n */\nfunction JsonRpcClient(configuration) {\n var self = this;\n var wsConfig = configuration.ws;\n var notReconnectIfNumLessThan = -1;\n var pingNextNum = 0;\n var enabledPings = true;\n var pingPongStarted = false;\n var pingInterval;\n var status = DISCONNECTED;\n var onreconnecting = wsConfig.onreconnecting;\n var onreconnected = wsConfig.onreconnected;\n var onconnected = wsConfig.onconnected;\n var onerror = wsConfig.onerror;\n configuration.rpc.pull = function (params, request) {\n request.reply(null, \"push\");\n };\n wsConfig.onreconnecting = function () {\n Logger.debug(\"--------- ONRECONNECTING -----------\");\n if (status === RECONNECTING) {\n Logger.error(\"Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it\");\n return;\n }\n status = RECONNECTING;\n if (onreconnecting) {\n onreconnecting();\n }\n };\n wsConfig.onreconnected = function () {\n Logger.debug(\"--------- ONRECONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n updateNotReconnectIfLessThan();\n usePing();\n if (onreconnected) {\n onreconnected();\n }\n };\n wsConfig.onconnected = function () {\n Logger.debug(\"--------- ONCONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n usePing();\n if (onconnected) {\n onconnected();\n }\n };\n wsConfig.onerror = function (error) {\n Logger.debug(\"--------- ONERROR -----------\");\n status = DISCONNECTED;\n if (onerror) {\n onerror(error);\n }\n };\n var ws = new WebSocketWithReconnection(wsConfig);\n Logger.debug('Connecting websocket to URI: ' + wsConfig.uri);\n var rpcBuilderOptions = {\n request_timeout: configuration.rpc.requestTimeout,\n ping_request_timeout: configuration.rpc.heartbeatRequestTimeout\n };\n var rpc = new RpcBuilder(RpcBuilder.packers.JsonRPC, rpcBuilderOptions, ws, function (request) {\n Logger.debug('Received request: ' + JSON.stringify(request));\n try {\n var func = configuration.rpc[request.method];\n if (func === undefined) {\n Logger.error(\"Method \" + request.method + \" not registered in client\");\n }\n else {\n func(request.params, request);\n }\n }\n catch (err) {\n Logger.error('Exception processing request: ' + JSON.stringify(request));\n Logger.error(err);\n }\n });\n this.send = function (method, params, callback) {\n if (method !== 'ping') {\n Logger.debug('Request: method:' + method + \" params:\" + JSON.stringify(params));\n }\n var requestTime = Date.now();\n rpc.encode(method, params, function (error, result) {\n if (error) {\n try {\n Logger.error(\"ERROR:\" + error.message + \" in Request: method:\" +\n method + \" params:\" + JSON.stringify(params) + \" request:\" +\n error.request);\n if (error.data) {\n Logger.error(\"ERROR DATA:\" + JSON.stringify(error.data));\n }\n }\n catch (e) { }\n error.requestTime = requestTime;\n }\n if (callback) {\n if (result != undefined && result.value !== 'pong') {\n Logger.debug('Response: ' + JSON.stringify(result));\n }\n callback(error, result);\n }\n });\n };\n function updateNotReconnectIfLessThan() {\n Logger.debug(\"notReconnectIfNumLessThan = \" + pingNextNum + ' (old=' +\n notReconnectIfNumLessThan + ')');\n notReconnectIfNumLessThan = pingNextNum;\n }\n function sendPing() {\n if (enabledPings) {\n var params = null;\n if (pingNextNum == 0 || pingNextNum == notReconnectIfNumLessThan) {\n params = {\n interval: configuration.heartbeat || PING_INTERVAL\n };\n }\n pingNextNum++;\n self.send('ping', params, (function (pingNum) {\n return function (error, result) {\n if (error) {\n Logger.debug(\"Error in ping request #\" + pingNum + \" (\" +\n error.message + \")\");\n if (pingNum > notReconnectIfNumLessThan) {\n enabledPings = false;\n updateNotReconnectIfLessThan();\n Logger.debug(\"Server did not respond to ping message #\" +\n pingNum + \". Reconnecting... \");\n ws.reconnectWs();\n }\n }\n };\n })(pingNextNum));\n }\n else {\n Logger.debug(\"Trying to send ping, but ping is not enabled\");\n }\n }\n /*\n * If configuration.hearbeat has any value, the ping-pong will work with the interval\n * of configuration.hearbeat\n */\n function usePing() {\n if (!pingPongStarted) {\n Logger.debug(\"Starting ping (if configured)\");\n pingPongStarted = true;\n if (configuration.heartbeat != undefined) {\n pingInterval = setInterval(sendPing, configuration.heartbeat);\n sendPing();\n }\n }\n }\n this.close = function () {\n Logger.debug(\"Closing jsonRpcClient explicitly by client\");\n if (pingInterval != undefined) {\n Logger.debug(\"Clearing ping interval\");\n clearInterval(pingInterval);\n }\n pingPongStarted = false;\n enabledPings = false;\n if (configuration.sendCloseMessage) {\n Logger.debug(\"Sending close message\");\n this.send('closeSession', null, function (error, result) {\n if (error) {\n Logger.error(\"Error sending close message: \" + JSON.stringify(error));\n }\n ws.close();\n });\n }\n else {\n ws.close();\n }\n };\n // This method is only for testing\n this.forceClose = function (millis) {\n ws.forceClose(millis);\n };\n this.reconnect = function () {\n ws.reconnectWs();\n };\n}\nmodule.exports = JsonRpcClient;\n//# sourceMappingURL=jsonrpcclient.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar WebSocketWithReconnection = require('./webSocketWithReconnection');\nexports.WebSocketWithReconnection = WebSocketWithReconnection;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module chunks = main","/*\n * (C) Copyright 2013-2015 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\"use strict\";\nvar BrowserWebSocket = global.WebSocket || global.MozWebSocket;\nvar Logger = console;\n/**\n * Get either the `WebSocket` or `MozWebSocket` globals\n * in the browser or try to resolve WebSocket-compatible\n * interface exposed by `ws` for Node-like environment.\n */\n/*var WebSocket = BrowserWebSocket;\nif (!WebSocket && typeof window === 'undefined') {\n try {\n WebSocket = require('ws');\n } catch (e) { }\n}*/\n//var SockJS = require('sockjs-client');\nvar MAX_RETRIES = 2000; // Forever...\nvar RETRY_TIME_MS = 3000; // FIXME: Implement exponential wait times...\nvar CONNECTING = 0;\nvar OPEN = 1;\nvar CLOSING = 2;\nvar CLOSED = 3;\n/*\nconfig = {\n uri : wsUri,\n useSockJS : true (use SockJS) / false (use WebSocket) by default,\n onconnected : callback method to invoke when connection is successful,\n ondisconnect : callback method to invoke when the connection is lost,\n onreconnecting : callback method to invoke when the client is reconnecting,\n onreconnected : callback method to invoke when the client succesfully reconnects,\n };\n*/\nfunction WebSocketWithReconnection(config) {\n var closing = false;\n var registerMessageHandler;\n var wsUri = config.uri;\n var useSockJS = config.useSockJS;\n var reconnecting = false;\n var forcingDisconnection = false;\n var ws;\n if (useSockJS) {\n ws = new SockJS(wsUri);\n }\n else {\n ws = new WebSocket(wsUri);\n }\n ws.onopen = function () {\n logConnected(ws, wsUri);\n if (config.onconnected) {\n config.onconnected();\n }\n };\n ws.onerror = function (error) {\n Logger.error(\"Could not connect to \" + wsUri + \" (invoking onerror if defined)\", error);\n if (config.onerror) {\n config.onerror(error);\n }\n };\n function logConnected(ws, wsUri) {\n try {\n Logger.debug(\"WebSocket connected to \" + wsUri);\n }\n catch (e) {\n Logger.error(e);\n }\n }\n var reconnectionOnClose = function () {\n if (ws.readyState === CLOSED) {\n if (closing) {\n Logger.debug(\"Connection closed by user\");\n }\n else {\n Logger.debug(\"Connection closed unexpectecly. Reconnecting...\");\n reconnectToSameUri(MAX_RETRIES, 1);\n }\n }\n else {\n Logger.debug(\"Close callback from previous websocket. Ignoring it\");\n }\n };\n ws.onclose = reconnectionOnClose;\n function reconnectToSameUri(maxRetries, numRetries) {\n Logger.debug(\"reconnectToSameUri (attempt #\" + numRetries + \", max=\" + maxRetries + \")\");\n if (numRetries === 1) {\n if (reconnecting) {\n Logger.warn(\"Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.\");\n return;\n }\n else {\n reconnecting = true;\n }\n if (config.onreconnecting) {\n config.onreconnecting();\n }\n }\n if (forcingDisconnection) {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n else {\n if (config.newWsUriOnReconnection) {\n config.newWsUriOnReconnection(function (error, newWsUri) {\n if (error) {\n Logger.debug(error);\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, newWsUri);\n }\n });\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n }\n }\n // TODO Test retries. How to force not connection?\n function reconnectToNewUri(maxRetries, numRetries, reconnectWsUri) {\n Logger.debug(\"Reconnection attempt #\" + numRetries);\n ws.close();\n wsUri = reconnectWsUri || wsUri;\n var newWs;\n if (useSockJS) {\n newWs = new SockJS(wsUri);\n }\n else {\n newWs = new WebSocket(wsUri);\n }\n newWs.onopen = function () {\n Logger.debug(\"Reconnected after \" + numRetries + \" attempts...\");\n logConnected(newWs, wsUri);\n reconnecting = false;\n registerMessageHandler();\n if (config.onreconnected()) {\n config.onreconnected();\n }\n newWs.onclose = reconnectionOnClose;\n };\n var onErrorOrClose = function (error) {\n Logger.warn(\"Reconnection error: \", error);\n if (numRetries === maxRetries) {\n if (config.ondisconnect) {\n config.ondisconnect();\n }\n }\n else {\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n };\n newWs.onerror = onErrorOrClose;\n ws = newWs;\n }\n this.close = function () {\n closing = true;\n ws.close();\n };\n // This method is only for testing\n this.forceClose = function (millis) {\n Logger.debug(\"Testing: Force WebSocket close\");\n if (millis) {\n Logger.debug(\"Testing: Change wsUri for \" + millis + \" millis to simulate net failure\");\n var goodWsUri = wsUri;\n wsUri = \"wss://21.234.12.34.4:443/\";\n forcingDisconnection = true;\n setTimeout(function () {\n Logger.debug(\"Testing: Recover good wsUri \" + goodWsUri);\n wsUri = goodWsUri;\n forcingDisconnection = false;\n }, millis);\n }\n ws.close();\n };\n this.reconnectWs = function () {\n Logger.debug(\"reconnectWs\");\n reconnectToSameUri(MAX_RETRIES, 1, wsUri);\n };\n this.send = function (message) {\n ws.send(message);\n };\n this.addEventListener = function (type, callback) {\n registerMessageHandler = function () {\n ws.addEventListener(type, callback);\n };\n registerMessageHandler();\n };\n}\nmodule.exports = WebSocketWithReconnection;\n//# sourceMappingURL=webSocketWithReconnection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar defineProperty_IE8 = false;\nif (Object.defineProperty) {\n try {\n Object.defineProperty({}, \"x\", {});\n }\n catch (e) {\n defineProperty_IE8 = true;\n }\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind\nif (!Function.prototype.bind) {\n Function.prototype.bind = function (oThis) {\n if (typeof this !== 'function') {\n // closest thing possible to the ECMAScript 5\n // internal IsCallable function\n throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n }\n var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () { }, fBound = function () {\n return fToBind.apply(this instanceof fNOP && oThis\n ? this\n : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n fNOP.prototype = this.prototype;\n fBound.prototype = new fNOP();\n return fBound;\n };\n}\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('inherits');\nvar packers = require('./packers');\nvar Mapper = require('./Mapper');\nvar BASE_TIMEOUT = 5000;\nfunction unifyResponseMethods(responseMethods) {\n if (!responseMethods)\n return {};\n for (var key in responseMethods) {\n var value = responseMethods[key];\n if (typeof value == 'string')\n responseMethods[key] =\n {\n response: value\n };\n }\n ;\n return responseMethods;\n}\n;\nfunction unifyTransport(transport) {\n if (!transport)\n return;\n // Transport as a function\n if (transport instanceof Function)\n return { send: transport };\n // WebSocket & DataChannel\n if (transport.send instanceof Function)\n return transport;\n // Message API (Inter-window & WebWorker)\n if (transport.postMessage instanceof Function) {\n transport.send = transport.postMessage;\n return transport;\n }\n // Stream API\n if (transport.write instanceof Function) {\n transport.send = transport.write;\n return transport;\n }\n // Transports that only can receive messages, but not send\n if (transport.onmessage !== undefined)\n return;\n if (transport.pause instanceof Function)\n return;\n throw new SyntaxError(\"Transport is not a function nor a valid object\");\n}\n;\n/**\n * Representation of a RPC notification\n *\n * @class\n *\n * @constructor\n *\n * @param {String} method -method of the notification\n * @param params - parameters of the notification\n */\nfunction RpcNotification(method, params) {\n if (defineProperty_IE8) {\n this.method = method;\n this.params = params;\n }\n else {\n Object.defineProperty(this, 'method', { value: method, enumerable: true });\n Object.defineProperty(this, 'params', { value: params, enumerable: true });\n }\n}\n;\n/**\n * @class\n *\n * @constructor\n *\n * @param {object} packer\n *\n * @param {object} [options]\n *\n * @param {object} [transport]\n *\n * @param {Function} [onRequest]\n */\nfunction RpcBuilder(packer, options, transport, onRequest) {\n var self = this;\n if (!packer)\n throw new SyntaxError('Packer is not defined');\n if (!packer.pack || !packer.unpack)\n throw new SyntaxError('Packer is invalid');\n var responseMethods = unifyResponseMethods(packer.responseMethods);\n if (options instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = options;\n transport = undefined;\n options = undefined;\n }\n ;\n if (options && options.send instanceof Function) {\n if (transport && !(transport instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n onRequest = transport;\n transport = options;\n options = undefined;\n }\n ;\n if (transport instanceof Function) {\n if (onRequest != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = transport;\n transport = undefined;\n }\n ;\n if (transport && transport.send instanceof Function)\n if (onRequest && !(onRequest instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n options = options || {};\n EventEmitter.call(this);\n if (onRequest)\n this.on('request', onRequest);\n if (defineProperty_IE8)\n this.peerID = options.peerID;\n else\n Object.defineProperty(this, 'peerID', { value: options.peerID });\n var max_retries = options.max_retries || 0;\n function transportMessage(event) {\n self.decode(event.data || event);\n }\n ;\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n // Remove listener from old transport\n if (transport) {\n // W3C transports\n if (transport.removeEventListener)\n transport.removeEventListener('message', transportMessage);\n else if (transport.removeListener)\n transport.removeListener('data', transportMessage);\n }\n ;\n // Set listener on new transport\n if (value) {\n // W3C transports\n if (value.addEventListener)\n value.addEventListener('message', transportMessage);\n else if (value.addListener)\n value.addListener('data', transportMessage);\n }\n ;\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n this.setTransport(transport);\n var request_timeout = options.request_timeout || BASE_TIMEOUT;\n var ping_request_timeout = options.ping_request_timeout || request_timeout;\n var response_timeout = options.response_timeout || BASE_TIMEOUT;\n var duplicates_timeout = options.duplicates_timeout || BASE_TIMEOUT;\n var requestID = 0;\n var requests = new Mapper();\n var responses = new Mapper();\n var processedResponses = new Mapper();\n var message2Key = {};\n /**\n * Store the response to prevent to process duplicate request later\n */\n function storeResponse(message, id, dest) {\n var response = {\n message: message,\n /** Timeout to auto-clean old responses */\n timeout: setTimeout(function () {\n responses.remove(id, dest);\n }, response_timeout)\n };\n responses.set(response, id, dest);\n }\n ;\n /**\n * Store the response to ignore duplicated messages later\n */\n function storeProcessedResponse(ack, from) {\n var timeout = setTimeout(function () {\n processedResponses.remove(ack, from);\n }, duplicates_timeout);\n processedResponses.set(timeout, ack, from);\n }\n ;\n /**\n * Representation of a RPC request\n *\n * @class\n * @extends RpcNotification\n *\n * @constructor\n *\n * @param {String} method -method of the notification\n * @param params - parameters of the notification\n * @param {Integer} id - identifier of the request\n * @param [from] - source of the notification\n */\n function RpcRequest(method, params, id, from, transport) {\n RpcNotification.call(this, method, params);\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n var response = responses.get(id, from);\n /**\n * @constant {Boolean} duplicated\n */\n if (!(transport || self.getTransport())) {\n if (defineProperty_IE8)\n this.duplicated = Boolean(response);\n else\n Object.defineProperty(this, 'duplicated', {\n value: Boolean(response)\n });\n }\n var responseMethod = responseMethods[method];\n this.pack = packer.pack.bind(packer, this, id);\n /**\n * Generate a response to this request\n *\n * @param {Error} [error]\n * @param {*} [result]\n *\n * @returns {string}\n */\n this.reply = function (error, result, transport) {\n // Fix optional parameters\n if (error instanceof Function || error && error.send instanceof Function) {\n if (result != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = error;\n result = null;\n error = undefined;\n }\n else if (result instanceof Function\n || result && result.send instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = result;\n result = null;\n }\n ;\n transport = unifyTransport(transport);\n // Duplicated request, remove old response timeout\n if (response)\n clearTimeout(response.timeout);\n if (from != undefined) {\n if (error)\n error.dest = from;\n if (result)\n result.dest = from;\n }\n ;\n var message;\n // New request or overriden one, create new response with provided data\n if (error || result != undefined) {\n if (self.peerID != undefined) {\n if (error)\n error.from = self.peerID;\n else\n result.from = self.peerID;\n }\n // Protocol indicates that responses has own request methods\n if (responseMethod) {\n if (responseMethod.error == undefined && error)\n message =\n {\n error: error\n };\n else {\n var method = error\n ? responseMethod.error\n : responseMethod.response;\n message =\n {\n method: method,\n params: error || result\n };\n }\n }\n else\n message =\n {\n error: error,\n result: result\n };\n message = packer.pack(message, id);\n }\n else if (response)\n message = response.message;\n else\n message = packer.pack({ result: null }, id);\n // Store the response to prevent to process a duplicated request later\n storeResponse(message, id, from);\n // Return the stored response so it can be directly send back\n transport = transport || this.getTransport() || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n }\n ;\n inherits(RpcRequest, RpcNotification);\n function cancel(message) {\n var key = message2Key[message];\n if (!key)\n return;\n delete message2Key[message];\n var request = requests.pop(key.id, key.dest);\n if (!request)\n return;\n clearTimeout(request.timeout);\n // Start duplicated responses timeout\n storeProcessedResponse(key.id, key.dest);\n }\n ;\n /**\n * Allow to cancel a request and don't wait for a response\n *\n * If `message` is not given, cancel all the request\n */\n this.cancel = function (message) {\n if (message)\n return cancel(message);\n for (var message in message2Key)\n cancel(message);\n };\n this.close = function () {\n // Prevent to receive new messages\n var transport = this.getTransport();\n if (transport && transport.close)\n transport.close();\n // Request & processed responses\n this.cancel();\n processedResponses.forEach(clearTimeout);\n // Responses\n responses.forEach(function (response) {\n clearTimeout(response.timeout);\n });\n };\n /**\n * Generates and encode a JsonRPC 2.0 message\n *\n * @param {String} method -method of the notification\n * @param params - parameters of the notification\n * @param [dest] - destination of the notification\n * @param {object} [transport] - transport where to send the message\n * @param [callback] - function called when a response to this request is\n * received. If not defined, a notification will be send instead\n *\n * @returns {string} A raw JsonRPC 2.0 request or notification string\n */\n this.encode = function (method, params, dest, transport, callback) {\n // Fix optional parameters\n if (params instanceof Function) {\n if (dest != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = params;\n transport = undefined;\n dest = undefined;\n params = undefined;\n }\n else if (dest instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = dest;\n transport = undefined;\n dest = undefined;\n }\n else if (transport instanceof Function) {\n if (callback != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = transport;\n transport = undefined;\n }\n ;\n if (self.peerID != undefined) {\n params = params || {};\n params.from = self.peerID;\n }\n ;\n if (dest != undefined) {\n params = params || {};\n params.dest = dest;\n }\n ;\n // Encode message\n var message = {\n method: method,\n params: params\n };\n if (callback) {\n var id = requestID++;\n var retried = 0;\n message = packer.pack(message, id);\n function dispatchCallback(error, result) {\n self.cancel(message);\n callback(error, result);\n }\n ;\n var request = {\n message: message,\n callback: dispatchCallback,\n responseMethods: responseMethods[method] || {}\n };\n var encode_transport = unifyTransport(transport);\n function sendRequest(transport) {\n var rt = (method === 'ping' ? ping_request_timeout : request_timeout);\n request.timeout = setTimeout(timeout, rt * Math.pow(2, retried++));\n message2Key[message] = { id: id, dest: dest };\n requests.set(request, id, dest);\n transport = transport || encode_transport || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n }\n ;\n function retry(transport) {\n transport = unifyTransport(transport);\n console.warn(retried + ' retry for request message:', message);\n var timeout = processedResponses.pop(id, dest);\n clearTimeout(timeout);\n return sendRequest(transport);\n }\n ;\n function timeout() {\n if (retried < max_retries)\n return retry(transport);\n var error = new Error('Request has timed out');\n error.request = message;\n error.retry = retry;\n dispatchCallback(error);\n }\n ;\n return sendRequest(transport);\n }\n ;\n // Return the packed message\n message = packer.pack(message);\n transport = transport || this.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n /**\n * Decode and process a JsonRPC 2.0 message\n *\n * @param {string} message - string with the content of the message\n *\n * @returns {RpcNotification|RpcRequest|undefined} - the representation of the\n * notification or the request. If a response was processed, it will return\n * `undefined` to notify that it was processed\n *\n * @throws {TypeError} - Message is not defined\n */\n this.decode = function (message, transport) {\n if (!message)\n throw new TypeError(\"Message is not defined\");\n try {\n message = packer.unpack(message);\n }\n catch (e) {\n // Ignore invalid messages\n return console.debug(e, message);\n }\n ;\n var id = message.id;\n var ack = message.ack;\n var method = message.method;\n var params = message.params || {};\n var from = params.from;\n var dest = params.dest;\n // Ignore messages send by us\n if (self.peerID != undefined && from == self.peerID)\n return;\n // Notification\n if (id == undefined && ack == undefined) {\n var notification = new RpcNotification(method, params);\n if (self.emit('request', notification))\n return;\n return notification;\n }\n ;\n function processRequest() {\n // If we have a transport and it's a duplicated request, reply inmediatly\n transport = unifyTransport(transport) || self.getTransport();\n if (transport) {\n var response = responses.get(id, from);\n if (response)\n return transport.send(response.message);\n }\n ;\n var idAck = (id != undefined) ? id : ack;\n var request = new RpcRequest(method, params, idAck, from, transport);\n if (self.emit('request', request))\n return;\n return request;\n }\n ;\n function processResponse(request, error, result) {\n request.callback(error, result);\n }\n ;\n function duplicatedResponse(timeout) {\n console.warn(\"Response already processed\", message);\n // Update duplicated responses timeout\n clearTimeout(timeout);\n storeProcessedResponse(ack, from);\n }\n ;\n // Request, or response with own method\n if (method) {\n // Check if it's a response with own method\n if (dest == undefined || dest == self.peerID) {\n var request = requests.get(ack, from);\n if (request) {\n var responseMethods = request.responseMethods;\n if (method == responseMethods.error)\n return processResponse(request, params);\n if (method == responseMethods.response)\n return processResponse(request, null, params);\n return processRequest();\n }\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n }\n // Request\n return processRequest();\n }\n ;\n var error = message.error;\n var result = message.result;\n // Ignore responses not send to us\n if (error && error.dest && error.dest != self.peerID)\n return;\n if (result && result.dest && result.dest != self.peerID)\n return;\n // Response\n var request = requests.get(ack, from);\n if (!request) {\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n return console.warn(\"No callback was defined for this message\", message);\n }\n ;\n // Process response\n processResponse(request, error, result);\n };\n}\n;\ninherits(RpcBuilder, EventEmitter);\nRpcBuilder.RpcNotification = RpcNotification;\nmodule.exports = RpcBuilder;\nvar clients = require('./clients');\nvar transports = require('./clients/transports');\nRpcBuilder.clients = clients;\nRpcBuilder.clients.transports = transports;\nRpcBuilder.packers = packers;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/index.js\n// module chunks = main","/**\n * JsonRPC 2.0 packer\n */\n/**\n * Pack a JsonRPC 2.0 message\n *\n * @param {Object} message - object to be packaged. It requires to have all the\n * fields needed by the JsonRPC 2.0 message that it's going to be generated\n *\n * @return {String} - the stringified JsonRPC 2.0 message\n */\nfunction pack(message, id) {\n var result = {\n jsonrpc: \"2.0\"\n };\n // Request\n if (message.method) {\n result.method = message.method;\n if (message.params)\n result.params = message.params;\n // Request is a notification\n if (id != undefined)\n result.id = id;\n }\n else if (id != undefined) {\n if (message.error) {\n if (message.result !== undefined)\n throw new TypeError(\"Both result and error are defined\");\n result.error = message.error;\n }\n else if (message.result !== undefined)\n result.result = message.result;\n else\n throw new TypeError(\"No result or error is defined\");\n result.id = id;\n }\n ;\n return JSON.stringify(result);\n}\n;\n/**\n * Unpack a JsonRPC 2.0 message\n *\n * @param {String} message - string with the content of the JsonRPC 2.0 message\n *\n * @throws {TypeError} - Invalid JsonRPC version\n *\n * @return {Object} - object filled with the JsonRPC 2.0 message content\n */\nfunction unpack(message) {\n var result = message;\n if (typeof message === 'string' || message instanceof String) {\n result = JSON.parse(message);\n }\n // Check if it's a valid message\n var version = result.jsonrpc;\n if (version !== '2.0')\n throw new TypeError(\"Invalid JsonRPC version '\" + version + \"': \" + message);\n // Response\n if (result.method == undefined) {\n if (result.id == undefined)\n throw new TypeError(\"Invalid message: \" + message);\n var result_defined = result.result !== undefined;\n var error_defined = result.error !== undefined;\n // Check only result or error is defined, not both or none\n if (result_defined && error_defined)\n throw new TypeError(\"Both result and error are defined: \" + message);\n if (!result_defined && !error_defined)\n throw new TypeError(\"No result or error is defined: \" + message);\n result.ack = result.id;\n delete result.id;\n }\n // Return unpacked message\n return result;\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=JsonRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module chunks = main","function pack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nfunction unpack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=XmlRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module chunks = main","var JsonRPC = require('./JsonRPC');\nvar XmlRPC = require('./XmlRPC');\nexports.JsonRPC = JsonRPC;\nexports.XmlRPC = XmlRPC;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module chunks = main","/*\n * (C) Copyright 2014-2015 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar freeice = require('freeice');\nvar inherits = require('inherits');\nvar UAParser = require('ua-parser-js');\nvar uuid = require('uuid');\nvar hark = require('hark');\nvar EventEmitter = require('events').EventEmitter;\nvar recursive = require('merge').recursive.bind(undefined, true);\nvar sdpTranslator = require('sdp-translator');\nvar logger = window.Logger || console;\n// var gUM = navigator.mediaDevices.getUserMedia || function (constraints) {\n// return new Promise(navigator.getUserMedia(constraints, function (stream) {\n// videoStream = stream\n// start()\n// }).eror(callback));\n// }\n/*try {\n require('kurento-browser-extensions')\n} catch (error) {\n if (typeof getScreenConstraints === 'undefined') {\n logger.warn('screen sharing is not available')\n\n getScreenConstraints = function getScreenConstraints(sendSource, callback) {\n callback(new Error(\"This library is not enabled for screen sharing\"))\n }\n }\n}*/\nvar MEDIA_CONSTRAINTS = {\n audio: true,\n video: {\n width: 640,\n framerate: 15\n }\n};\n// Somehow, the UAParser constructor gets an empty window object.\n// We need to pass the user agent string in order to get information\nvar ua = (window && window.navigator) ? window.navigator.userAgent : '';\nvar parser = new UAParser(ua);\nvar browser = parser.getBrowser();\nvar usePlanB = false;\nif (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug(browser.name + \": using SDP PlanB\");\n usePlanB = true;\n}\nfunction noop(error) {\n if (error)\n logger.error(error);\n}\nfunction trackStop(track) {\n track.stop && track.stop();\n}\nfunction streamStop(stream) {\n stream.getTracks().forEach(trackStop);\n}\n/**\n * Returns a string representation of a SessionDescription object.\n */\nvar dumpSDP = function (description) {\n if (typeof description === 'undefined' || description === null) {\n return '';\n }\n return 'type: ' + description.type + '\\r\\n' + description.sdp;\n};\nfunction bufferizeCandidates(pc, onerror) {\n var candidatesQueue = [];\n pc.addEventListener('signalingstatechange', function () {\n if (this.signalingState === 'stable') {\n while (candidatesQueue.length) {\n var entry = candidatesQueue.shift();\n pc.addIceCandidate(entry.candidate, entry.callback, entry.callback);\n }\n }\n });\n return function (candidate, callback) {\n callback = callback || onerror;\n switch (pc.signalingState) {\n case 'closed':\n callback(new Error('PeerConnection object is closed'));\n break;\n case 'stable':\n if (pc.remoteDescription) {\n pc.addIceCandidate(candidate, callback, callback);\n }\n break;\n default:\n candidatesQueue.push({\n candidate: candidate,\n callback: callback\n });\n }\n };\n}\n/* Simulcast utilities */\nfunction removeFIDFromOffer(sdp) {\n var n = sdp.indexOf(\"a=ssrc-group:FID\");\n if (n > 0) {\n return sdp.slice(0, n);\n }\n else {\n return sdp;\n }\n}\nfunction getSimulcastInfo(videoStream) {\n var videoTracks = videoStream.getVideoTracks();\n if (!videoTracks.length) {\n logger.warn('No video tracks available in the video stream');\n return '';\n }\n var lines = [\n 'a=x-google-flag:conference',\n 'a=ssrc-group:SIM 1 2 3',\n 'a=ssrc:1 cname:localVideo',\n 'a=ssrc:1 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:1 mslabel:' + videoStream.id,\n 'a=ssrc:1 label:' + videoTracks[0].id,\n 'a=ssrc:2 cname:localVideo',\n 'a=ssrc:2 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:2 mslabel:' + videoStream.id,\n 'a=ssrc:2 label:' + videoTracks[0].id,\n 'a=ssrc:3 cname:localVideo',\n 'a=ssrc:3 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:3 mslabel:' + videoStream.id,\n 'a=ssrc:3 label:' + videoTracks[0].id\n ];\n lines.push('');\n return lines.join('\\n');\n}\n/**\n * Wrapper object of an RTCPeerConnection. This object is aimed to simplify the\n * development of WebRTC-based applications.\n *\n * @constructor module:kurentoUtils.WebRtcPeer\n *\n * @param {String} mode Mode in which the PeerConnection will be configured.\n * Valid values are: 'recv', 'send', and 'sendRecv'\n * @param localVideo Video tag for the local stream\n * @param remoteVideo Video tag for the remote stream\n * @param {MediaStream} videoStream Stream to be used as primary source\n * (typically video and audio, or only video if combined with audioStream) for\n * localVideo and to be added as stream to the RTCPeerConnection\n * @param {MediaStream} audioStream Stream to be used as second source\n * (typically for audio) for localVideo and to be added as stream to the\n * RTCPeerConnection\n */\nfunction WebRtcPeer(mode, options, callback) {\n if (!(this instanceof WebRtcPeer)) {\n return new WebRtcPeer(mode, options, callback);\n }\n WebRtcPeer.super_.call(this);\n if (options instanceof Function) {\n callback = options;\n options = undefined;\n }\n options = options || {};\n callback = (callback || noop).bind(this);\n var self = this;\n var localVideo = options.localVideo;\n var remoteVideo = options.remoteVideo;\n var videoStream = options.videoStream;\n var audioStream = options.audioStream;\n var mediaConstraints = options.mediaConstraints;\n var connectionConstraints = options.connectionConstraints;\n var pc = options.peerConnection;\n var sendSource = options.sendSource || 'webcam';\n var dataChannelConfig = options.dataChannelConfig;\n var useDataChannels = options.dataChannels || false;\n var dataChannel;\n var guid = uuid.v4();\n var configuration = recursive({\n iceServers: freeice()\n }, options.configuration);\n var onicecandidate = options.onicecandidate;\n if (onicecandidate)\n this.on('icecandidate', onicecandidate);\n var oncandidategatheringdone = options.oncandidategatheringdone;\n if (oncandidategatheringdone) {\n this.on('candidategatheringdone', oncandidategatheringdone);\n }\n var simulcast = options.simulcast;\n var multistream = options.multistream;\n var interop = new sdpTranslator.Interop();\n var candidatesQueueOut = [];\n var candidategatheringdone = false;\n Object.defineProperties(this, {\n 'peerConnection': {\n get: function () {\n return pc;\n }\n },\n 'id': {\n value: options.id || guid,\n writable: false\n },\n 'remoteVideo': {\n get: function () {\n return remoteVideo;\n }\n },\n 'localVideo': {\n get: function () {\n return localVideo;\n }\n },\n 'dataChannel': {\n get: function () {\n return dataChannel;\n }\n },\n /**\n * @member {(external:ImageData|undefined)} currentFrame\n */\n 'currentFrame': {\n get: function () {\n // [ToDo] Find solution when we have a remote stream but we didn't set\n // a remoteVideo tag\n if (!remoteVideo)\n return;\n if (remoteVideo.readyState < remoteVideo.HAVE_CURRENT_DATA)\n throw new Error('No video stream data available');\n var canvas = document.createElement('canvas');\n canvas.width = remoteVideo.videoWidth;\n canvas.height = remoteVideo.videoHeight;\n canvas.getContext('2d').drawImage(remoteVideo, 0, 0);\n return canvas;\n }\n }\n });\n // Init PeerConnection\n if (!pc) {\n pc = new RTCPeerConnection(configuration);\n if (useDataChannels && !dataChannel) {\n var dcId = 'WebRtcPeer-' + self.id;\n var dcOptions = undefined;\n if (dataChannelConfig) {\n dcId = dataChannelConfig.id || dcId;\n dcOptions = dataChannelConfig.options;\n }\n dataChannel = pc.createDataChannel(dcId, dcOptions);\n if (dataChannelConfig) {\n dataChannel.onopen = dataChannelConfig.onopen;\n dataChannel.onclose = dataChannelConfig.onclose;\n dataChannel.onmessage = dataChannelConfig.onmessage;\n dataChannel.onbufferedamountlow = dataChannelConfig.onbufferedamountlow;\n dataChannel.onerror = dataChannelConfig.onerror || noop;\n }\n }\n }\n pc.addEventListener('icecandidate', function (event) {\n var candidate = event.candidate;\n if (EventEmitter.listenerCount(self, 'icecandidate') ||\n EventEmitter.listenerCount(self, 'candidategatheringdone')) {\n if (candidate) {\n var cand;\n if (multistream && usePlanB) {\n cand = interop.candidateToUnifiedPlan(candidate);\n }\n else {\n cand = candidate;\n }\n self.emit('icecandidate', cand);\n candidategatheringdone = false;\n }\n else if (!candidategatheringdone) {\n self.emit('candidategatheringdone');\n candidategatheringdone = true;\n }\n }\n else if (!candidategatheringdone) {\n // Not listening to 'icecandidate' or 'candidategatheringdone' events, queue\n // the candidate until one of them is listened\n candidatesQueueOut.push(candidate);\n if (!candidate)\n candidategatheringdone = true;\n }\n });\n pc.onaddstream = options.onaddstream;\n pc.onnegotiationneeded = options.onnegotiationneeded;\n this.on('newListener', function (event, listener) {\n if (event === 'icecandidate' || event === 'candidategatheringdone') {\n while (candidatesQueueOut.length) {\n var candidate = candidatesQueueOut.shift();\n if (!candidate === (event === 'candidategatheringdone')) {\n listener(candidate);\n }\n }\n }\n });\n var addIceCandidate = bufferizeCandidates(pc);\n /**\n * Callback function invoked when an ICE candidate is received. Developers are\n * expected to invoke this function in order to complete the SDP negotiation.\n *\n * @function module:kurentoUtils.WebRtcPeer.prototype.addIceCandidate\n *\n * @param iceCandidate - Literal object with the ICE candidate description\n * @param callback - Called when the ICE candidate has been added.\n */\n this.addIceCandidate = function (iceCandidate, callback) {\n var candidate;\n if (multistream && usePlanB) {\n candidate = interop.candidateToPlanB(iceCandidate);\n }\n else {\n candidate = new RTCIceCandidate(iceCandidate);\n }\n logger.debug('Remote ICE candidate received', iceCandidate);\n callback = (callback || noop).bind(this);\n addIceCandidate(candidate, callback);\n };\n this.generateOffer = function (callback) {\n callback = callback.bind(this);\n var offerAudio = true;\n var offerVideo = true;\n // Constraints must have both blocks\n if (mediaConstraints) {\n offerAudio = (typeof mediaConstraints.audio === 'boolean') ?\n mediaConstraints.audio : true;\n offerVideo = (typeof mediaConstraints.video === 'boolean') ?\n mediaConstraints.video : true;\n }\n var browserDependantConstraints = {\n offerToReceiveAudio: (mode !== 'sendonly' && offerAudio),\n offerToReceiveVideo: (mode !== 'sendonly' && offerVideo)\n };\n //FIXME: clarify possible constraints passed to createOffer()\n /*var constraints = recursive(browserDependantConstraints,\n connectionConstraints)*/\n var constraints = browserDependantConstraints;\n logger.debug('constraints: ' + JSON.stringify(constraints));\n pc.createOffer(constraints).then(function (offer) {\n logger.debug('Created SDP offer');\n offer = mangleSdpToAddSimulcast(offer);\n return pc.setLocalDescription(offer);\n }).then(function () {\n var localDescription = pc.localDescription;\n logger.debug('Local description set', localDescription.sdp);\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('offer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n callback(null, localDescription.sdp, self.processAnswer.bind(self));\n }).catch(callback);\n };\n this.getLocalSessionDescriptor = function () {\n return pc.localDescription;\n };\n this.getRemoteSessionDescriptor = function () {\n return pc.remoteDescription;\n };\n function setRemoteVideo() {\n if (remoteVideo) {\n remoteVideo.pause();\n var stream = pc.getRemoteStreams()[0];\n remoteVideo.srcObject = stream;\n logger.debug('Remote stream:', stream);\n remoteVideo.load();\n }\n }\n this.showLocalVideo = function () {\n localVideo.srcObject = videoStream;\n localVideo.muted = true;\n };\n this.send = function (data) {\n if (dataChannel && dataChannel.readyState === 'open') {\n dataChannel.send(data);\n }\n else {\n logger.warn('Trying to send data over a non-existing or closed data channel');\n }\n };\n /**\n * Callback function invoked when a SDP answer is received. Developers are\n * expected to invoke this function in order to complete the SDP negotiation.\n *\n * @function module:kurentoUtils.WebRtcPeer.prototype.processAnswer\n *\n * @param sdpAnswer - Description of sdpAnswer\n * @param callback -\n * Invoked after the SDP answer is processed, or there is an error.\n */\n this.processAnswer = function (sdpAnswer, callback) {\n callback = (callback || noop).bind(this);\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n if (multistream && usePlanB) {\n var planBAnswer = interop.toPlanB(answer);\n logger.debug('asnwer::planB', dumpSDP(planBAnswer));\n answer = planBAnswer;\n }\n logger.debug('SDP answer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(answer, function () {\n setRemoteVideo();\n callback();\n }, callback);\n };\n /**\n * Callback function invoked when a SDP offer is received. Developers are\n * expected to invoke this function in order to complete the SDP negotiation.\n *\n * @function module:kurentoUtils.WebRtcPeer.prototype.processOffer\n *\n * @param sdpOffer - Description of sdpOffer\n * @param callback - Called when the remote description has been set\n * successfully.\n */\n this.processOffer = function (sdpOffer, callback) {\n callback = callback.bind(this);\n var offer = new RTCSessionDescription({\n type: 'offer',\n sdp: sdpOffer\n });\n if (multistream && usePlanB) {\n var planBOffer = interop.toPlanB(offer);\n logger.debug('offer::planB', dumpSDP(planBOffer));\n offer = planBOffer;\n }\n logger.debug('SDP offer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(offer).then(function () {\n return setRemoteVideo();\n }).then(function () {\n return pc.createAnswer();\n }).then(function (answer) {\n answer = mangleSdpToAddSimulcast(answer);\n logger.debug('Created SDP answer');\n return pc.setLocalDescription(answer);\n }).then(function () {\n var localDescription = pc.localDescription;\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('answer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n logger.debug('Local description set', localDescription.sdp);\n callback(null, localDescription.sdp);\n }).catch(callback);\n };\n function mangleSdpToAddSimulcast(answer) {\n if (simulcast) {\n if (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug('Adding multicast info');\n answer = new RTCSessionDescription({\n 'type': answer.type,\n 'sdp': removeFIDFromOffer(answer.sdp) + getSimulcastInfo(videoStream)\n });\n }\n else {\n logger.warn('Simulcast is only available in Chrome browser.');\n }\n }\n return answer;\n }\n /**\n * This function creates the RTCPeerConnection object taking into account the\n * properties received in the constructor. It starts the SDP negotiation\n * process: generates the SDP offer and invokes the onsdpoffer callback. This\n * callback is expected to send the SDP offer, in order to obtain an SDP\n * answer from another peer.\n */\n function start() {\n if (pc.signalingState === 'closed') {\n callback('The peer connection object is in \"closed\" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue');\n }\n if (videoStream && localVideo) {\n self.showLocalVideo();\n }\n if (videoStream) {\n pc.addStream(videoStream);\n }\n if (audioStream) {\n pc.addStream(audioStream);\n }\n // [Hack] https://code.google.com/p/chromium/issues/detail?id=443558\n var browser = parser.getBrowser();\n if (mode === 'sendonly' &&\n (browser.name === 'Chrome' || browser.name === 'Chromium') &&\n browser.major === 39) {\n mode = 'sendrecv';\n }\n callback();\n }\n if (mode !== 'recvonly' && !videoStream && !audioStream) {\n function getMedia(constraints) {\n if (constraints === undefined) {\n constraints = MEDIA_CONSTRAINTS;\n }\n navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n videoStream = stream;\n start();\n }).catch(callback);\n }\n if (sendSource === 'webcam') {\n getMedia(mediaConstraints);\n }\n else {\n getScreenConstraints(sendSource, function (error, constraints_) {\n if (error)\n return callback(error);\n constraints = [mediaConstraints];\n constraints.unshift(constraints_);\n getMedia(recursive.apply(undefined, constraints));\n }, guid);\n }\n }\n else {\n setTimeout(start, 0);\n }\n this.on('_dispose', function () {\n if (localVideo) {\n localVideo.pause();\n localVideo.srcObject = null;\n localVideo.load();\n //Unmute local video in case the video tag is later used for remote video\n localVideo.muted = false;\n }\n if (remoteVideo) {\n remoteVideo.pause();\n remoteVideo.srcObject = null;\n remoteVideo.load();\n }\n self.removeAllListeners();\n if (window.cancelChooseDesktopMedia !== undefined) {\n window.cancelChooseDesktopMedia(guid);\n }\n });\n}\ninherits(WebRtcPeer, EventEmitter);\nfunction createEnableDescriptor(type) {\n var method = 'get' + type + 'Tracks';\n return {\n enumerable: true,\n get: function () {\n // [ToDo] Should return undefined if not all tracks have the same value?\n if (!this.peerConnection)\n return;\n var streams = this.peerConnection.getLocalStreams();\n if (!streams.length)\n return;\n for (var i = 0, stream; stream = streams[i]; i++) {\n var tracks = stream[method]();\n for (var j = 0, track; track = tracks[j]; j++)\n if (!track.enabled)\n return false;\n }\n return true;\n },\n set: function (value) {\n function trackSetEnable(track) {\n track.enabled = value;\n }\n this.peerConnection.getLocalStreams().forEach(function (stream) {\n stream[method]().forEach(trackSetEnable);\n });\n }\n };\n}\nObject.defineProperties(WebRtcPeer.prototype, {\n 'enabled': {\n enumerable: true,\n get: function () {\n return this.audioEnabled && this.videoEnabled;\n },\n set: function (value) {\n this.audioEnabled = this.videoEnabled = value;\n }\n },\n 'audioEnabled': createEnableDescriptor('Audio'),\n 'videoEnabled': createEnableDescriptor('Video')\n});\nWebRtcPeer.prototype.getLocalStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getLocalStreams()[index || 0];\n }\n};\nWebRtcPeer.prototype.getRemoteStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getRemoteStreams()[index || 0];\n }\n};\n/**\n * @description This method frees the resources used by WebRtcPeer.\n *\n * @function module:kurentoUtils.WebRtcPeer.prototype.dispose\n */\nWebRtcPeer.prototype.dispose = function () {\n logger.debug('Disposing WebRtcPeer');\n var pc = this.peerConnection;\n var dc = this.dataChannel;\n try {\n if (dc) {\n if (dc.signalingState === 'closed')\n return;\n dc.close();\n }\n if (pc) {\n if (pc.signalingState === 'closed')\n return;\n pc.getLocalStreams().forEach(streamStop);\n // FIXME This is not yet implemented in firefox\n // if(videoStream) pc.removeStream(videoStream);\n // if(audioStream) pc.removeStream(audioStream);\n pc.close();\n }\n }\n catch (err) {\n logger.warn('Exception disposing webrtc peer ' + err);\n }\n this.emit('_dispose');\n};\n//\n// Specialized child classes\n//\nfunction WebRtcPeerRecvonly(options, callback) {\n if (!(this instanceof WebRtcPeerRecvonly)) {\n return new WebRtcPeerRecvonly(options, callback);\n }\n WebRtcPeerRecvonly.super_.call(this, 'recvonly', options, callback);\n}\ninherits(WebRtcPeerRecvonly, WebRtcPeer);\nfunction WebRtcPeerSendonly(options, callback) {\n if (!(this instanceof WebRtcPeerSendonly)) {\n return new WebRtcPeerSendonly(options, callback);\n }\n WebRtcPeerSendonly.super_.call(this, 'sendonly', options, callback);\n}\ninherits(WebRtcPeerSendonly, WebRtcPeer);\nfunction WebRtcPeerSendrecv(options, callback) {\n if (!(this instanceof WebRtcPeerSendrecv)) {\n return new WebRtcPeerSendrecv(options, callback);\n }\n WebRtcPeerSendrecv.super_.call(this, 'sendrecv', options, callback);\n}\ninherits(WebRtcPeerSendrecv, WebRtcPeer);\nfunction harkUtils(stream, options) {\n return hark(stream, options);\n}\nexports.bufferizeCandidates = bufferizeCandidates;\nexports.WebRtcPeerRecvonly = WebRtcPeerRecvonly;\nexports.WebRtcPeerSendonly = WebRtcPeerSendonly;\nexports.WebRtcPeerSendrecv = WebRtcPeerSendrecv;\nexports.hark = harkUtils;\n//# sourceMappingURL=WebRtcPeer.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n/**\n * This module contains a set of reusable components that have been found useful\n * during the development of the WebRTC applications with Kurento.\n *\n * @module kurentoUtils\n *\n * @copyright 2014 Kurento (http://kurento.org/)\n * @license ALv2\n */\nvar WebRtcPeer = require('./WebRtcPeer');\nexports.WebRtcPeer = WebRtcPeer;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-utils-js/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-utils-js/index.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\n/*\n * (C) Copyright 2017 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar OpenViduInternal_1 = require(\"../OpenViduInternal/OpenViduInternal\");\nvar Session_1 = require(\"./Session\");\nvar Publisher_1 = require(\"./Publisher\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/OpenViduError\");\nvar LocalRecorder_1 = require(\"../OpenViduInternal/LocalRecorder\");\nvar adapter = require(\"webrtc-adapter\");\nvar screenSharingAuto = require(\"../ScreenSharing/Screen-Capturing-Auto.js\");\nvar DetectRTC = require(\"../KurentoUtils/DetectRTC\");\nif (window) {\n window[\"adapter\"] = adapter;\n}\nvar OpenVidu = /** @class */ (function () {\n function OpenVidu() {\n this.openVidu = new OpenViduInternal_1.OpenViduInternal();\n console.info(\"'OpenVidu' initialized\");\n }\n ;\n OpenVidu.prototype.initSession = function (param1, param2) {\n if (typeof param2 == \"string\") {\n return new Session_1.Session(this.openVidu.initSession(param2), this);\n }\n else {\n return new Session_1.Session(this.openVidu.initSession(param1), this);\n }\n };\n OpenVidu.prototype.initPublisher = function (parentId, cameraOptions, callback) {\n var publisher;\n if (cameraOptions != null) {\n cameraOptions.audio = cameraOptions.audio != null ? cameraOptions.audio : true;\n cameraOptions.video = cameraOptions.video != null ? cameraOptions.video : true;\n if (!cameraOptions.screen) {\n // Webcam and/or microphone is being requested\n var cameraOptionsAux = {\n sendAudio: cameraOptions.audio != null ? cameraOptions.audio : true,\n sendVideo: cameraOptions.video != null ? cameraOptions.video : true,\n activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,\n activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,\n dataChannel: true,\n mediaConstraints: this.openVidu.generateMediaConstraints(cameraOptions)\n };\n cameraOptions = cameraOptionsAux;\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(parentId, cameraOptions, true, callback), parentId, false);\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n else {\n // Screen share is being requested\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherScreen(parentId, true, callback), parentId, true);\n if (DetectRTC.browser.name === 'Firefox' && DetectRTC.browser.version >= 52) {\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n cameraOptions = {\n sendAudio: cameraOptions.audio,\n sendVideo: cameraOptions.video,\n activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,\n activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,\n dataChannel: true,\n mediaConstraints: {\n video: screenConstraints.video,\n audio: false\n }\n };\n publisher.stream.configureScreenOptions(cameraOptions);\n console.info(\"'Publisher' initialized\");\n publisher.stream.ee.emitEvent('can-request-screen');\n });\n return publisher;\n }\n else if (DetectRTC.browser.name === 'Chrome') {\n // Screen is being requested\n /*screenSharing.isChromeExtensionAvailable((availability) => {\n switch (availability) {\n case 'available':\n console.warn('EXTENSION AVAILABLE!!!');\n screenSharing.getScreenConstraints((error, screenConstraints) => {\n if (!error) {\n console.warn(screenConstraints);\n }\n });\n break;\n case 'unavailable':\n console.warn('EXTENSION NOT AVAILABLE!!!');\n break;\n case 'isFirefox':\n console.warn('IT IS FIREFOX!!!');\n screenSharing.getScreenConstraints((error, screenConstraints) => {\n if (!error) {\n console.warn(screenConstraints);\n }\n });\n break;\n }\n });*/\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n if (error === 'not-installed') {\n var error_1 = new OpenViduError_1.OpenViduError(\"SCREEN_EXTENSION_NOT_INSTALLED\" /* SCREEN_EXTENSION_NOT_INSTALLED */, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');\n console.error(error_1);\n if (callback)\n callback(error_1);\n return;\n }\n else if (error === 'permission-denied') {\n var error_2 = new OpenViduError_1.OpenViduError(\"SCREEN_CAPTURE_DENIED\" /* SCREEN_CAPTURE_DENIED */, 'You must allow access to one window of your desktop');\n console.error(error_2);\n if (callback)\n callback(error_2);\n return;\n }\n cameraOptions = {\n sendAudio: cameraOptions.audio != null ? cameraOptions.audio : true,\n sendVideo: cameraOptions.video != null ? cameraOptions.video : true,\n activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,\n activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,\n dataChannel: true,\n mediaConstraints: {\n video: screenConstraints.video,\n audio: false\n }\n };\n publisher.stream.configureScreenOptions(cameraOptions);\n publisher.stream.ee.emitEvent('can-request-screen');\n }, function (error) {\n console.error('getScreenId error', error);\n return;\n });\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n else {\n console.error('Screen sharing not supported on ' + DetectRTC.browser.name);\n if (!!callback)\n callback(new OpenViduError_1.OpenViduError(\"SCREEN_SHARING_NOT_SUPPORTED\" /* SCREEN_SHARING_NOT_SUPPORTED */, 'Screen sharing not supported on ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version));\n }\n }\n }\n else {\n cameraOptions = {\n sendAudio: true,\n sendVideo: true,\n activeAudio: true,\n activeVideo: true,\n dataChannel: true,\n mediaConstraints: {\n audio: true,\n video: { width: { ideal: 1280 } }\n }\n };\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(parentId, cameraOptions, true, callback), parentId, false);\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n };\n OpenVidu.prototype.reinitPublisher = function (publisher) {\n if (publisher.stream.typeOfVideo !== 'SCREEN') {\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(publisher.stream.getParentId(), publisher.stream.outboundOptions, false), publisher.stream.getParentId(), false);\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n else {\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherScreen(publisher.stream.getParentId(), false), publisher.stream.getParentId(), true);\n if (DetectRTC.browser.name === 'Firefox' && DetectRTC.browser.version >= 52) {\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n publisher.stream.outboundOptions.mediaConstraints.video = screenConstraints.video;\n publisher.stream.configureScreenOptions(publisher.stream.outboundOptions);\n console.info(\"'Publisher' initialized\");\n publisher.stream.ee.emitEvent('can-request-screen');\n });\n return publisher;\n }\n else if (DetectRTC.browser.name === 'Chrome') {\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n if (error === 'not-installed') {\n var error_3 = new OpenViduError_1.OpenViduError(\"SCREEN_EXTENSION_NOT_INSTALLED\" /* SCREEN_EXTENSION_NOT_INSTALLED */, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');\n console.error(error_3);\n return;\n }\n else if (error === 'permission-denied') {\n var error_4 = new OpenViduError_1.OpenViduError(\"SCREEN_CAPTURE_DENIED\" /* SCREEN_CAPTURE_DENIED */, 'You must allow access to one window of your desktop');\n console.error(error_4);\n return;\n }\n publisher.stream.outboundOptions.mediaConstraints.video = screenConstraints.video;\n publisher.stream.configureScreenOptions(publisher.stream.outboundOptions);\n publisher.stream.ee.emitEvent('can-request-screen');\n }, function (error) {\n console.error('getScreenId error', error);\n return;\n });\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n else {\n console.error('Screen sharing not supported on ' + DetectRTC.browser.name);\n }\n }\n };\n OpenVidu.prototype.checkSystemRequirements = function () {\n var defaultWebRTCSupport = DetectRTC.isWebRTCSupported;\n var browser = DetectRTC.browser.name;\n var version = DetectRTC.browser.version;\n if ((browser !== 'Chrome') && (browser !== 'Firefox') && (browser !== 'Opera') && (browser !== 'Safari')) {\n return 0;\n }\n else {\n return defaultWebRTCSupport ? 1 : 0;\n }\n };\n OpenVidu.prototype.getDevices = function (callback) {\n navigator.mediaDevices.enumerateDevices().then(function (deviceInfos) {\n callback(null, deviceInfos);\n })[\"catch\"](function (error) {\n console.error(\"Error getting devices\", error);\n callback(error, null);\n });\n };\n OpenVidu.prototype.enableProdMode = function () {\n console.log = function () { };\n console.debug = function () { };\n console.info = function () { };\n console.warn = function () { };\n };\n OpenVidu.prototype.initLocalRecorder = function (stream) {\n return new LocalRecorder_1.LocalRecorder(stream);\n };\n return OpenVidu;\n}());\nexports.OpenVidu = OpenVidu;\n//# sourceMappingURL=OpenVidu.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar Publisher = /** @class */ (function () {\n function Publisher(stream, parentId, isScreenRequested) {\n var _this = this;\n this.ee = new EventEmitter();\n this.accessAllowed = false;\n this.isScreenRequested = false;\n this.stream = stream;\n this.isScreenRequested = isScreenRequested;\n // Listens to the deactivation of the default behaviour upon the deletion of a Stream object\n this.ee.addListener('stream-destroyed-default', function (event) {\n var s = event.stream;\n s.addOnceEventListener('video-removed', function () {\n _this.ee.emitEvent('videoElementDestroyed');\n });\n s.removeVideo();\n });\n if (document.getElementById(parentId) != null) {\n this.element = document.getElementById(parentId);\n }\n }\n Publisher.prototype.publishAudio = function (value) {\n this.stream.getWebRtcPeer().audioEnabled = value;\n };\n Publisher.prototype.publishVideo = function (value) {\n this.stream.getWebRtcPeer().videoEnabled = value;\n };\n Publisher.prototype.destroy = function () {\n if (!!this.session)\n this.session.unpublish(this);\n this.stream.dispose();\n this.stream.removeVideo(this.element);\n return this;\n };\n Publisher.prototype.subscribeToRemote = function () {\n this.stream.subscribeToMyRemote();\n };\n Publisher.prototype.on = function (eventName, callback) {\n var _this = this;\n this.ee.addListener(eventName, function (event) {\n if (event) {\n console.info(\"Event '\" + eventName + \"' triggered by 'Publisher'\", event);\n }\n else {\n console.info(\"Event '\" + eventName + \"' triggered by 'Publisher'\");\n }\n callback(event);\n });\n if (eventName == 'streamCreated') {\n if (this.stream.isPublisherPublished) {\n this.ee.emitEvent('streamCreated', [{ stream: this.stream }]);\n }\n else {\n this.stream.addEventListener('stream-created-by-publisher', function () {\n _this.ee.emitEvent('streamCreated', [{ stream: _this.stream }]);\n });\n }\n }\n if (eventName == 'videoElementCreated') {\n if (this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addEventListener('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [{\n element: element.element\n }]);\n });\n }\n }\n if (eventName == 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused == false &&\n video.ended == false &&\n video.readyState == 4) {\n this.ee.emitEvent('videoPlaying', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addEventListener('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [{\n element: element.element\n }]);\n });\n }\n }\n if (eventName == 'remoteVideoPlaying') {\n var video = this.stream.getVideoElement();\n if (this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused == false &&\n video.ended == false &&\n video.readyState == 4) {\n this.ee.emitEvent('remoteVideoPlaying', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addEventListener('remote-video-is-playing', function (element) {\n _this.ee.emitEvent('remoteVideoPlaying', [{\n element: element.element\n }]);\n });\n }\n }\n if (eventName == 'accessAllowed') {\n if (this.stream.accessIsAllowed) {\n this.ee.emitEvent('accessAllowed');\n }\n else {\n this.stream.addEventListener('access-allowed-by-publisher', function () {\n _this.ee.emitEvent('accessAllowed');\n });\n }\n }\n if (eventName == 'accessDenied') {\n if (this.stream.accessIsDenied) {\n this.ee.emitEvent('accessDenied');\n }\n else {\n this.stream.addEventListener('access-denied-by-publisher', function () {\n _this.ee.emitEvent('accessDenied');\n });\n }\n }\n };\n return Publisher;\n}());\nexports.Publisher = Publisher;\n//# sourceMappingURL=Publisher.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Publisher.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Publisher.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenViduError_1 = require(\"../OpenViduInternal/OpenViduError\");\nvar Subscriber_1 = require(\"./Subscriber\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar DetectRTC = require(\"../KurentoUtils/DetectRTC\");\nvar Session = /** @class */ (function () {\n function Session(session, openVidu) {\n var _this = this;\n this.session = session;\n this.openVidu = openVidu;\n this.ee = new EventEmitter();\n this.sessionId = session.getSessionId();\n // Listens to the deactivation of the default behaviour upon the deletion of a Stream object\n this.session.addEventListener('stream-destroyed-default', function (event) {\n event.stream.removeVideo();\n });\n // Listens to the deactivation of the default behaviour upon the disconnection of a Session\n this.session.addEventListener('session-disconnected-default', function () {\n var s;\n for (var streamId in _this.session.getRemoteStreams()) {\n _this.session.getRemoteStreams()[streamId].removeVideo();\n }\n if (_this.connection && (Object.keys(_this.connection.getStreams()).length > 0)) {\n for (var streamId in _this.connection.getStreams()) {\n _this.connection.getStreams()[streamId].removeVideo();\n }\n }\n });\n // Sets or updates the value of 'connection' property. Triggered by SessionInternal when succesful connection\n this.session.addEventListener('update-connection-object', function (event) {\n _this.connection = event.connection;\n });\n }\n Session.prototype.connect = function (param1, param2, param3) {\n // Early configuration to deactivate automatic subscription to streams\n if (param3) {\n if (this.openVidu.checkSystemRequirements()) {\n this.session.configure({\n sessionId: this.session.getSessionId(),\n participantId: param1,\n metadata: this.session.stringClientMetadata(param2),\n subscribeToStreams: false\n });\n this.session.connect(param1, param3);\n }\n else {\n param3(new OpenViduError_1.OpenViduError(\"BROWSER_NOT_SUPPORTED\" /* BROWSER_NOT_SUPPORTED */, 'Browser ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version + ' is not supported in OpenVidu'));\n }\n }\n else {\n if (this.openVidu.checkSystemRequirements()) {\n this.session.configure({\n sessionId: this.session.getSessionId(),\n participantId: param1,\n metadata: '',\n subscribeToStreams: false\n });\n this.session.connect(param1, param2);\n }\n else {\n param2(new OpenViduError_1.OpenViduError(\"BROWSER_NOT_SUPPORTED\" /* BROWSER_NOT_SUPPORTED */, 'Browser ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version + ' is not supported in OpenVidu'));\n }\n }\n };\n Session.prototype.disconnect = function () {\n var _this = this;\n this.openVidu.openVidu.close(false);\n this.session.emitEvent('sessionDisconnected', [{\n preventDefault: function () { _this.session.removeEvent('session-disconnected-default'); }\n }]);\n this.session.emitEvent('session-disconnected-default', [{}]);\n };\n Session.prototype.publish = function (publisher) {\n var _this = this;\n if (!publisher.stream.isPublisherPublished) {\n if (publisher.isScreenRequested) {\n if (!publisher.stream.isScreenRequestedReady) {\n publisher.stream.addOnceEventListener('screen-ready', function () {\n _this.streamPublish(publisher);\n });\n }\n else {\n this.streamPublish(publisher);\n }\n }\n else {\n this.streamPublish(publisher);\n }\n }\n else {\n publisher = this.openVidu.reinitPublisher(publisher);\n if (publisher.isScreenRequested && !publisher.stream.isScreenRequestedReady) {\n publisher.stream.addOnceEventListener('screen-ready', function () {\n _this.streamPublish(publisher);\n });\n }\n else {\n this.streamPublish(publisher);\n }\n }\n };\n Session.prototype.streamPublish = function (publisher) {\n publisher.session = this;\n this.connection.addStream(publisher.stream);\n publisher.stream.publish();\n };\n Session.prototype.unpublish = function (publisher) {\n this.session.unpublish(publisher);\n };\n Session.prototype.on = function (eventName, callback) {\n this.session.addEventListener(eventName, function (event) {\n if (event) {\n console.info(\"Event '\" + eventName + \"' triggered by 'Session'\", event);\n }\n else {\n console.info(\"Event '\" + eventName + \"' triggered by 'Session'\");\n }\n callback(event);\n });\n };\n Session.prototype.once = function (eventName, callback) {\n this.session.addOnceEventListener(eventName, function (event) {\n callback(event);\n });\n };\n Session.prototype.off = function (eventName, eventHandler) {\n this.session.removeListener(eventName, eventHandler);\n };\n Session.prototype.subscribe = function (param1, param2, param3) {\n // Subscription\n this.session.subscribe(param1);\n var subscriber = new Subscriber_1.Subscriber(param1, param2);\n param1.playOnlyVideo(param2, null);\n return subscriber;\n };\n Session.prototype.unsubscribe = function (subscriber) {\n this.session.unsubscribe(subscriber.stream);\n subscriber.stream.removeVideo();\n };\n Session.prototype.signal = function (signal, completionHandler) {\n var signalMessage = {};\n if (signal.to && signal.to.length > 0) {\n var connectionIds = [];\n for (var i = 0; i < signal.to.length; i++) {\n connectionIds.push(signal.to[i].connectionId);\n }\n signalMessage['to'] = connectionIds;\n }\n else {\n signalMessage['to'] = [];\n }\n signalMessage['data'] = signal.data ? signal.data : '';\n signalMessage['type'] = signal.type ? signal.type : '';\n this.openVidu.openVidu.sendMessage(JSON.stringify(signalMessage));\n };\n return Session;\n}());\nexports.Session = Session;\n//# sourceMappingURL=Session.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Session.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Session.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar Subscriber = /** @class */ (function () {\n function Subscriber(stream, parentId) {\n var _this = this;\n this.ee = new EventEmitter();\n this.stream = stream;\n if (document.getElementById(parentId) != null) {\n this.element = document.getElementById(parentId);\n }\n // Listens to deletion of the HTML video element of the Subscriber\n this.stream.addEventListener('video-removed', function () {\n _this.ee.emitEvent('videoElementDestroyed');\n });\n }\n Subscriber.prototype.on = function (eventName, callback) {\n var _this = this;\n this.ee.addListener(eventName, function (event) {\n if (event) {\n console.info(\"Event '\" + eventName + \"' triggered by 'Subscriber'\", event);\n }\n else {\n console.info(\"Event '\" + eventName + \"' triggered by 'Subscriber'\");\n }\n callback(event);\n });\n if (eventName == 'videoElementCreated') {\n if (this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addOnceEventListener('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [{\n element: element\n }]);\n });\n }\n }\n if (eventName == 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused == false &&\n video.ended == false &&\n video.readyState == 4) {\n this.ee.emitEvent('videoPlaying', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addOnceEventListener('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [{\n element: element.element\n }]);\n });\n }\n }\n };\n return Subscriber;\n}());\nexports.Subscriber = Subscriber;\n//# sourceMappingURL=Subscriber.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Subscriber.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Subscriber.js\n// module chunks = main","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nexports.__esModule = true;\n__export(require(\"./OpenVidu\"));\n__export(require(\"./Session\"));\n__export(require(\"./Publisher\"));\n__export(require(\"./Subscriber\"));\n__export(require(\"../OpenViduInternal/Stream\"));\n__export(require(\"../OpenViduInternal/Connection\"));\n__export(require(\"../OpenViduInternal/LocalRecorder\"));\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/index.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/index.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar Stream_1 = require(\"./Stream\");\nvar Connection = /** @class */ (function () {\n function Connection(openVidu, local, room, options) {\n this.openVidu = openVidu;\n this.local = local;\n this.room = room;\n this.options = options;\n this.streams = {};\n console.info(\"'Connection' created (\" + (local ? \"local\" : \"remote\") + \")\" + (local ? \"\" : \", with 'connectionId' [\" + (options ? options.id : '') + \"] \"));\n if (options && !local) {\n this.connectionId = options.id;\n if (options.metadata) {\n this.data = options.metadata;\n }\n if (options.streams) {\n this.initRemoteStreams(options);\n }\n }\n }\n Connection.prototype.addStream = function (stream) {\n stream.connection = this;\n this.streams[stream.streamId] = stream;\n //this.room.getStreams()[stream.streamId] = stream;\n };\n Connection.prototype.removeStream = function (key) {\n delete this.streams[key];\n //delete this.room.getStreams()[key];\n delete this.inboundStreamsOpts;\n };\n Connection.prototype.setOptions = function (options) {\n this.options = options;\n };\n Connection.prototype.getStreams = function () {\n return this.streams;\n };\n Connection.prototype.dispose = function () {\n for (var key in this.streams) {\n this.streams[key].dispose();\n }\n };\n Connection.prototype.sendIceCandidate = function (candidate) {\n console.debug((this.local ? \"Local\" : \"Remote\"), \"candidate for\", this.connectionId, JSON.stringify(candidate));\n this.openVidu.sendRequest(\"onIceCandidate\", {\n endpointName: this.connectionId,\n candidate: candidate.candidate,\n sdpMid: candidate.sdpMid,\n sdpMLineIndex: candidate.sdpMLineIndex\n }, function (error, response) {\n if (error) {\n console.error(\"Error sending ICE candidate: \"\n + JSON.stringify(error));\n }\n });\n };\n Connection.prototype.initRemoteStreams = function (options) {\n var opts;\n for (var _i = 0, _a = options.streams; _i < _a.length; _i++) {\n opts = _a[_i];\n var streamOptions = {\n id: opts.id,\n connection: this,\n recvAudio: (opts.audioActive == null ? true : opts.audioActive),\n recvVideo: (opts.videoActive == null ? true : opts.videoActive),\n typeOfVideo: opts.typeOfVideo\n };\n var stream = new Stream_1.Stream(this.openVidu, false, this.room, streamOptions);\n this.addStream(stream);\n this.inboundStreamsOpts = streamOptions;\n }\n console.info(\"Remote 'Connection' with 'connectionId' [\" + this.connectionId + \"] is now configured for receiving Streams with options: \", this.inboundStreamsOpts);\n };\n return Connection;\n}());\nexports.Connection = Connection;\n//# sourceMappingURL=Connection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Connection.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Connection.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar LocalRecorder = /** @class */ (function () {\n function LocalRecorder(stream) {\n this.chunks = [];\n this.count = 0;\n this.stream = stream;\n this.connectionId = (!!this.stream.connection) ? this.stream.connection.connectionId : 'default-connection';\n this.id = this.stream.streamId + '_' + this.connectionId + '_localrecord';\n this.state = \"READY\" /* READY */;\n }\n LocalRecorder.prototype.record = function () {\n var _this = this;\n if (typeof MediaRecorder === 'undefined') {\n console.error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder');\n throw (Error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder'));\n }\n if (this.state !== \"READY\" /* READY */) {\n throw (Error('\\'LocalRecord.record()\\' needs \\'LocalRecord.state\\' to be \\'READY\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.clean()\\' or init a new LocalRecorder before'));\n }\n console.log(\"Starting local recording of stream '\" + this.stream.streamId + \"' of connection '\" + this.connectionId + \"'\");\n if (typeof MediaRecorder.isTypeSupported == 'function') {\n var options = void 0;\n if (MediaRecorder.isTypeSupported('video/webm;codecs=vp9')) {\n options = { mimeType: 'video/webm;codecs=vp9' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=h264')) {\n options = { mimeType: 'video/webm;codecs=h264' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=vp8')) {\n options = { mimeType: 'video/webm;codecs=vp8' };\n }\n console.log('Using mimeType ' + options.mimeType);\n this.mediaRecorder = new MediaRecorder(this.stream.getMediaStream(), options);\n }\n else {\n console.warn('isTypeSupported is not supported, using default codecs for browser');\n this.mediaRecorder = new MediaRecorder(this.stream.getMediaStream());\n }\n this.mediaRecorder.start(10);\n this.mediaRecorder.ondataavailable = function (e) {\n _this.chunks.push(e.data);\n };\n this.mediaRecorder.onerror = function (e) {\n console.error('MediaRecorder error: ', e);\n };\n this.mediaRecorder.onstart = function () {\n console.log('MediaRecorder started (state=' + _this.mediaRecorder.state + \")\");\n };\n this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n };\n this.mediaRecorder.onpause = function () {\n console.log('MediaRecorder paused (state=' + _this.mediaRecorder.state + \")\");\n };\n this.mediaRecorder.onresume = function () {\n console.log('MediaRecorder resumed (state=' + _this.mediaRecorder.state + \")\");\n };\n this.mediaRecorder.onwarning = function (e) {\n console.log('MediaRecorder warning: ' + e);\n };\n this.state = \"RECORDING\" /* RECORDING */;\n };\n LocalRecorder.prototype.stop = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state === \"READY\" /* READY */ || _this.state === \"FINISHED\" /* FINISHED */) {\n throw (Error('\\'LocalRecord.stop()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' or \\'PAUSED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.start()\\' before'));\n }\n _this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n resolve();\n };\n }\n catch (e) {\n reject(e);\n }\n try {\n _this.mediaRecorder.stop();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n LocalRecorder.prototype.pause = function () {\n if (this.state !== \"RECORDING\" /* RECORDING */) {\n throw (Error('\\'LocalRecord.pause()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.start()\\' or \\'LocalRecorder.resume()\\' before'));\n }\n this.mediaRecorder.pause();\n this.state = \"PAUSED\" /* PAUSED */;\n };\n LocalRecorder.prototype.resume = function () {\n if (this.state !== \"PAUSED\" /* PAUSED */) {\n throw (Error('\\'LocalRecord.resume()\\' needs \\'LocalRecord.state\\' to be \\'PAUSED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.pause()\\' before'));\n }\n this.mediaRecorder.resume();\n this.state = \"RECORDING\" /* RECORDING */;\n };\n LocalRecorder.prototype.preview = function (parentElement) {\n if (this.state !== \"FINISHED\" /* FINISHED */) {\n throw (Error('\\'LocalRecord.preview()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n this.videoPreview = document.createElement('video');\n this.videoPreview.id = this.id;\n this.videoPreview.autoplay = true;\n if (typeof parentElement === \"string\") {\n this.htmlParentElementId = parentElement;\n var parentElementDom = document.getElementById(parentElement);\n if (parentElementDom) {\n this.videoPreview = parentElementDom.appendChild(this.videoPreview);\n }\n }\n else {\n this.htmlParentElementId = parentElement.id;\n this.videoPreview = parentElement.appendChild(this.videoPreview);\n }\n this.videoPreview.src = this.videoPreviewSrc;\n return this.videoPreview;\n };\n LocalRecorder.prototype.clean = function () {\n var _this = this;\n var f = function () {\n delete _this.blob;\n _this.chunks = [];\n _this.count = 0;\n delete _this.mediaRecorder;\n _this.state = \"READY\" /* READY */;\n };\n if (this.state === \"RECORDING\" /* RECORDING */ || this.state === \"PAUSED\" /* PAUSED */) {\n this.stop().then(function () { return f(); })[\"catch\"](function () { return f(); });\n }\n else {\n f();\n }\n };\n LocalRecorder.prototype.download = function () {\n if (this.state !== \"FINISHED\" /* FINISHED */) {\n throw (Error('\\'LocalRecord.download()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var a = document.createElement(\"a\");\n a.style.display = 'none';\n document.body.appendChild(a);\n var url = window.URL.createObjectURL(this.blob);\n a.href = url;\n a.download = this.id + '.webm';\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n }\n };\n LocalRecorder.prototype.getBlob = function () {\n if (this.state !== \"FINISHED\" /* FINISHED */) {\n throw (Error('Call \\'LocalRecord.stop()\\' before getting Blob file'));\n }\n else {\n return this.blob;\n }\n };\n LocalRecorder.prototype.uploadAsBinary = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== \"FINISHED\" /* FINISHED */) {\n reject(Error('\\'LocalRecord.uploadAsBinary()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_1 = new XMLHttpRequest();\n http_1.open(\"POST\", endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_1.setRequestHeader(key, headers[key]);\n }\n }\n http_1.onreadystatechange = function () {\n if (http_1.readyState === 4) {\n if (http_1.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_1.responseText);\n }\n else {\n reject(Error(\"Upload error: \" + http_1.status));\n }\n }\n };\n http_1.send(_this.blob);\n }\n });\n };\n LocalRecorder.prototype.uploadAsMultipartfile = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== \"FINISHED\" /* FINISHED */) {\n reject(Error('\\'LocalRecord.uploadAsMultipartfile()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_2 = new XMLHttpRequest();\n http_2.open(\"POST\", endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_2.setRequestHeader(key, headers[key]);\n }\n }\n var sendable = new FormData();\n sendable.append(\"file\", _this.blob, _this.id + \".webm\");\n http_2.onreadystatechange = function () {\n if (http_2.readyState === 4) {\n if (http_2.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_2.responseText);\n }\n else {\n reject(Error(\"Upload error: \" + http_2.status));\n }\n }\n };\n http_2.send(sendable);\n }\n });\n };\n LocalRecorder.prototype.onStopDefault = function () {\n console.log('MediaRecorder stopped (state=' + this.mediaRecorder.state + \")\");\n this.blob = new Blob(this.chunks, { type: \"video/webm\" });\n this.chunks = [];\n this.videoPreviewSrc = window.URL.createObjectURL(this.blob);\n this.state = \"FINISHED\" /* FINISHED */;\n };\n return LocalRecorder;\n}());\nexports.LocalRecorder = LocalRecorder;\n//# sourceMappingURL=LocalRecorder.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/LocalRecorder.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/LocalRecorder.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenViduError = /** @class */ (function () {\n function OpenViduError(name, message) {\n this.name = name;\n this.message = message;\n }\n return OpenViduError;\n}());\nexports.OpenViduError = OpenViduError;\n//# sourceMappingURL=OpenViduError.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/OpenViduError.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/OpenViduError.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\n/*\n * (C) Copyright 2017 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar SessionInternal_1 = require(\"./SessionInternal\");\nvar OpenViduError_1 = require(\"./OpenViduError\");\nvar Stream_1 = require(\"./Stream\");\nvar RpcBuilder = require(\"../KurentoUtils/kurento-jsonrpc\");\nvar OpenViduInternal = /** @class */ (function () {\n function OpenViduInternal() {\n this.recorder = false;\n }\n /* NEW METHODS */\n OpenViduInternal.prototype.initSession = function (sessionId) {\n console.info(\"'Session' initialized with 'sessionId' [\" + sessionId + \"]\");\n this.session = new SessionInternal_1.SessionInternal(this, sessionId);\n return this.session;\n };\n OpenViduInternal.prototype.initPublisherTagged = function (parentId, cameraOptions, newStream, callback) {\n var _this = this;\n if (newStream) {\n if (cameraOptions == null) {\n cameraOptions = {\n sendAudio: true,\n sendVideo: true,\n activeAudio: true,\n activeVideo: true,\n dataChannel: true,\n mediaConstraints: {\n audio: true,\n video: { width: { ideal: 1280 } }\n }\n };\n }\n this.localStream = new Stream_1.Stream(this, true, this.session, cameraOptions);\n }\n this.localStream.requestCameraAccess(function (error, localStream) {\n if (error) {\n // Neither localStream or microphone device is allowed/able to capture media\n console.error(error);\n if (callback) {\n callback(error);\n }\n _this.localStream.ee.emitEvent('access-denied-by-publisher');\n }\n else {\n _this.localStream.setVideoElement(_this.cameraReady(localStream, parentId));\n if (callback) {\n callback(undefined);\n }\n }\n });\n return this.localStream;\n };\n OpenViduInternal.prototype.initPublisherScreen = function (parentId, newStream, callback) {\n var _this = this;\n if (newStream) {\n this.localStream = new Stream_1.Stream(this, true, this.session, 'screen-options');\n }\n this.localStream.addOnceEventListener('can-request-screen', function () {\n _this.localStream.requestCameraAccess(function (error, localStream) {\n if (error) {\n _this.localStream.ee.emitEvent('access-denied-by-publisher');\n var errorName = \"SCREEN_CAPTURE_DENIED\" /* SCREEN_CAPTURE_DENIED */;\n var errorMessage = 'You must allow access to one window of your desktop';\n var e = new OpenViduError_1.OpenViduError(errorName, errorMessage);\n console.error(e);\n if (callback) {\n callback(e);\n }\n }\n else {\n _this.localStream.setVideoElement(_this.cameraReady(localStream, parentId));\n if (_this.localStream.getSendAudio()) {\n // If the user wants to send audio with the screen capturing\n navigator.mediaDevices.getUserMedia({ audio: true, video: false })\n .then(function (userStream) {\n _this.localStream.getMediaStream().addTrack(userStream.getAudioTracks()[0]);\n // Mute audio if 'activeAudio' property is false\n if (userStream.getAudioTracks()[0] != null) {\n userStream.getAudioTracks()[0].enabled = _this.localStream.outboundOptions.activeAudio;\n }\n _this.localStream.isScreenRequestedReady = true;\n _this.localStream.ee.emitEvent('screen-ready');\n if (callback) {\n callback(undefined);\n }\n })[\"catch\"](function (error) {\n _this.localStream.ee.emitEvent('access-denied-by-publisher');\n console.error(\"Error accessing the microphone\", error);\n if (callback) {\n var errorName = \"MICROPHONE_ACCESS_DENIED\" /* MICROPHONE_ACCESS_DENIED */;\n var errorMessage = error.toString();\n callback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n }\n });\n }\n else {\n _this.localStream.isScreenRequestedReady = true;\n _this.localStream.ee.emitEvent('screen-ready');\n if (callback) {\n callback(undefined);\n }\n }\n }\n });\n });\n return this.localStream;\n };\n OpenViduInternal.prototype.cameraReady = function (localStream, parentId) {\n this.localStream = localStream;\n var videoElement = this.localStream.playOnlyVideo(parentId, null);\n this.localStream.emitStreamReadyEvent();\n return videoElement;\n };\n OpenViduInternal.prototype.getLocalStream = function () {\n return this.localStream;\n };\n /* NEW METHODS */\n OpenViduInternal.prototype.getWsUri = function () {\n return this.wsUri;\n };\n OpenViduInternal.prototype.setWsUri = function (wsUri) {\n this.wsUri = wsUri;\n };\n OpenViduInternal.prototype.getSecret = function () {\n return this.secret;\n };\n OpenViduInternal.prototype.setSecret = function (secret) {\n this.secret = secret;\n };\n OpenViduInternal.prototype.getRecorder = function () {\n return this.recorder;\n };\n OpenViduInternal.prototype.setRecorder = function (recorder) {\n this.recorder = recorder;\n };\n OpenViduInternal.prototype.getOpenViduServerURL = function () {\n return 'https://' + this.wsUri.split(\"wss://\")[1].split(\"/room\")[0];\n };\n OpenViduInternal.prototype.getRoom = function () {\n return this.session;\n };\n OpenViduInternal.prototype.connect = function (callback) {\n this.callback = callback;\n this.initJsonRpcClient(this.wsUri);\n };\n OpenViduInternal.prototype.initJsonRpcClient = function (wsUri) {\n var config = {\n heartbeat: 3000,\n sendCloseMessage: false,\n ws: {\n uri: wsUri,\n useSockJS: false,\n onconnected: this.connectCallback.bind(this),\n ondisconnect: this.disconnectCallback.bind(this),\n onreconnecting: this.reconnectingCallback.bind(this),\n onreconnected: this.reconnectedCallback.bind(this)\n },\n rpc: {\n requestTimeout: 15000,\n //notifications\n participantJoined: this.onParticipantJoined.bind(this),\n participantPublished: this.onParticipantPublished.bind(this),\n participantUnpublished: this.onParticipantUnpublished.bind(this),\n participantLeft: this.onParticipantLeft.bind(this),\n participantEvicted: this.onParticipantEvicted.bind(this),\n sendMessage: this.onNewMessage.bind(this),\n iceCandidate: this.iceCandidateEvent.bind(this),\n mediaError: this.onMediaError.bind(this)\n }\n };\n this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config);\n };\n OpenViduInternal.prototype.connectCallback = function (error) {\n if (error) {\n this.callback(error);\n }\n else {\n this.callback(null);\n }\n };\n OpenViduInternal.prototype.isRoomAvailable = function () {\n if (this.session !== undefined && this.session instanceof SessionInternal_1.SessionInternal) {\n return true;\n }\n else {\n console.warn('Session instance not found');\n return false;\n }\n };\n OpenViduInternal.prototype.disconnectCallback = function () {\n console.warn('Websocket connection lost');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenViduInternal.prototype.reconnectingCallback = function () {\n console.warn('Websocket connection lost (reconnecting)');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenViduInternal.prototype.reconnectedCallback = function () {\n console.warn('Websocket reconnected');\n };\n OpenViduInternal.prototype.onParticipantJoined = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantJoined(params);\n }\n };\n OpenViduInternal.prototype.onParticipantPublished = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantPublished(params);\n }\n };\n OpenViduInternal.prototype.onParticipantUnpublished = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantUnpublished(params);\n }\n };\n OpenViduInternal.prototype.onParticipantLeft = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantLeft(params);\n }\n };\n OpenViduInternal.prototype.onParticipantEvicted = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantEvicted(params);\n }\n };\n OpenViduInternal.prototype.onNewMessage = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onNewMessage(params);\n }\n };\n OpenViduInternal.prototype.iceCandidateEvent = function (params) {\n if (this.isRoomAvailable()) {\n this.session.recvIceCandidate(params);\n }\n };\n OpenViduInternal.prototype.onRoomClosed = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onRoomClosed(params);\n }\n };\n OpenViduInternal.prototype.onMediaError = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onMediaError(params);\n }\n };\n OpenViduInternal.prototype.setRpcParams = function (params) {\n this.rpcParams = params;\n };\n OpenViduInternal.prototype.sendRequest = function (method, params, callback) {\n if (params && params instanceof Function) {\n callback = params;\n params = undefined;\n }\n params = params || {};\n if (this.rpcParams && this.rpcParams !== null && this.rpcParams !== undefined) {\n for (var index in this.rpcParams) {\n if (this.rpcParams.hasOwnProperty(index)) {\n params[index] = this.rpcParams[index];\n console.debug('RPC param added to request {' + index + ': ' + this.rpcParams[index] + '}');\n }\n }\n }\n console.debug('Sending request: {method:\"' + method + '\", params: ' + JSON.stringify(params) + '}');\n this.jsonRpcClient.send(method, params, callback);\n };\n OpenViduInternal.prototype.close = function (forced) {\n if (this.isRoomAvailable()) {\n this.session.leave(forced, this.jsonRpcClient);\n }\n };\n ;\n OpenViduInternal.prototype.disconnectParticipant = function (stream) {\n if (this.isRoomAvailable()) {\n this.session.disconnect(stream);\n }\n };\n //CHAT\n OpenViduInternal.prototype.sendMessage = function (message) {\n this.sendRequest('sendMessage', {\n message: message\n }, function (error, response) {\n if (error) {\n console.error(error);\n }\n });\n };\n ;\n OpenViduInternal.prototype.generateMediaConstraints = function (cameraOptions) {\n var mediaConstraints = {\n audio: cameraOptions.audio,\n video: {}\n };\n if (!cameraOptions.video) {\n mediaConstraints.video = false;\n }\n else {\n var w = void 0, h = void 0;\n switch (cameraOptions.quality) {\n case 'LOW':\n w = 320;\n h = 240;\n break;\n case 'MEDIUM':\n w = 640;\n h = 480;\n break;\n case 'HIGH':\n w = 1280;\n h = 720;\n break;\n default:\n w = 640;\n h = 480;\n }\n mediaConstraints.video['width'] = { exact: w };\n mediaConstraints.video['height'] = { exact: h };\n //mediaConstraints.video['frameRate'] = { ideal: Number((document.getElementById('frameRate')).value) };\n }\n return mediaConstraints;\n };\n return OpenViduInternal;\n}());\nexports.OpenViduInternal = OpenViduInternal;\n//# sourceMappingURL=OpenViduInternal.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/OpenViduInternal.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/OpenViduInternal.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar Connection_1 = require(\"./Connection\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar SECRET_PARAM = '?secret=';\nvar RECORDER_PARAM = '&recorder=';\nvar SessionInternal = /** @class */ (function () {\n function SessionInternal(openVidu, sessionId) {\n this.openVidu = openVidu;\n this.ee = new EventEmitter();\n this.remoteStreams = {};\n this.participants = {};\n this.publishersSpeaking = [];\n this.connected = false;\n this.sessionId = this.getUrlWithoutSecret(sessionId);\n this.localParticipant = new Connection_1.Connection(this.openVidu, true, this);\n if (!this.openVidu.getWsUri() && !!sessionId) {\n this.processOpenViduUrl(sessionId);\n }\n }\n SessionInternal.prototype.processOpenViduUrl = function (url) {\n var secret = this.getSecretFromUrl(url);\n var recorder = this.getRecorderFromUrl(url);\n if (!(secret == null)) {\n this.openVidu.setSecret(secret);\n }\n if (!(recorder == null)) {\n this.openVidu.setRecorder(recorder);\n }\n this.openVidu.setWsUri(this.getFinalUrl(url));\n };\n SessionInternal.prototype.getSecretFromUrl = function (url) {\n var secret = '';\n if (url.indexOf(SECRET_PARAM) !== -1) {\n var endOfSecret = url.lastIndexOf(RECORDER_PARAM);\n if (endOfSecret !== -1) {\n secret = url.substring(url.lastIndexOf(SECRET_PARAM) + SECRET_PARAM.length, endOfSecret);\n }\n else {\n secret = url.substring(url.lastIndexOf(SECRET_PARAM) + SECRET_PARAM.length, url.length);\n }\n }\n return secret;\n };\n SessionInternal.prototype.getRecorderFromUrl = function (url) {\n var recorder = '';\n if (url.indexOf(RECORDER_PARAM) !== -1) {\n recorder = url.substring(url.lastIndexOf(RECORDER_PARAM) + RECORDER_PARAM.length, url.length);\n }\n return new Boolean(recorder).valueOf();\n ;\n };\n SessionInternal.prototype.getUrlWithoutSecret = function (url) {\n if (!url) {\n console.error('sessionId is not defined');\n }\n if (url.indexOf(SECRET_PARAM) !== -1) {\n url = url.substring(0, url.lastIndexOf(SECRET_PARAM));\n }\n return url;\n };\n SessionInternal.prototype.getFinalUrl = function (url) {\n url = this.getUrlWithoutSecret(url).substring(0, url.lastIndexOf('/')) + '/room';\n if (url.indexOf(\".ngrok.io\") !== -1) {\n // OpenVidu server URL referes to a ngrok IP: secure wss protocol and delete port of URL\n url = url.replace(\"ws://\", \"wss://\");\n var regex = /\\.ngrok\\.io:\\d+/;\n url = url.replace(regex, \".ngrok.io\");\n }\n else if ((url.indexOf(\"localhost\") !== -1) || (url.indexOf(\"127.0.0.1\") != -1)) {\n // OpenVidu server URL referes to localhost IP\n }\n return url;\n };\n /* NEW METHODS */\n SessionInternal.prototype.connect = function (token, callback) {\n var _this = this;\n this.openVidu.connect(function (error) {\n if (error) {\n callback('ERROR CONNECTING TO OPENVIDU');\n }\n else {\n if (!token) {\n token = _this.randomToken();\n }\n var joinParams = {\n token: token,\n session: _this.sessionId,\n metadata: _this.options.metadata,\n secret: _this.openVidu.getSecret(),\n recorder: _this.openVidu.getRecorder(),\n dataChannels: false\n };\n if (_this.localParticipant) {\n if (Object.keys(_this.localParticipant.getStreams()).some(function (streamId) {\n return _this.remoteStreams[streamId].isDataChannelEnabled();\n })) {\n joinParams.dataChannels = true;\n }\n }\n _this.openVidu.sendRequest('joinRoom', joinParams, function (error, response) {\n if (error) {\n callback(error);\n }\n else {\n _this.connected = true;\n var exParticipants = response.value;\n // IMPORTANT: Update connectionId with value send by server\n _this.localParticipant.connectionId = response.id;\n _this.participants[response.id] = _this.localParticipant;\n var roomEvent = {\n participants: new Array(),\n streams: new Array()\n };\n var length_1 = exParticipants.length;\n for (var i = 0; i < length_1; i++) {\n var connection = new Connection_1.Connection(_this.openVidu, false, _this, exParticipants[i]);\n connection.creationTime = new Date().getTime();\n _this.participants[connection.connectionId] = connection;\n roomEvent.participants.push(connection);\n var streams = connection.getStreams();\n for (var key in streams) {\n roomEvent.streams.push(streams[key]);\n if (_this.subscribeToStreams) {\n streams[key].subscribe();\n }\n }\n }\n // Update local Connection object properties with values returned by server\n _this.localParticipant.data = response.metadata;\n _this.localParticipant.creationTime = new Date().getTime();\n // Updates the value of property 'connection' in Session object\n _this.ee.emitEvent('update-connection-object', [{ connection: _this.localParticipant }]);\n // Own connection created event\n _this.ee.emitEvent('connectionCreated', [{ connection: _this.localParticipant }]);\n // One connection created event for each existing connection in the session\n for (var _i = 0, _a = roomEvent.participants; _i < _a.length; _i++) {\n var part = _a[_i];\n _this.ee.emitEvent('connectionCreated', [{ connection: part }]);\n }\n //if (this.subscribeToStreams) {\n for (var _b = 0, _c = roomEvent.streams; _b < _c.length; _b++) {\n var stream = _c[_b];\n _this.ee.emitEvent('streamCreated', [{ stream: stream }]);\n // Store the remote stream\n _this.remoteStreams[stream.streamId] = stream;\n }\n callback(undefined);\n }\n });\n }\n });\n };\n /* NEW METHODS */\n SessionInternal.prototype.configure = function (options) {\n this.options = options;\n this.id = options.sessionId;\n this.subscribeToStreams = options.subscribeToStreams == null ? true : options.subscribeToStreams;\n this.updateSpeakerInterval = options.updateSpeakerInterval || 1500;\n this.thresholdSpeaker = options.thresholdSpeaker || -50;\n this.activateUpdateMainSpeaker();\n if (!this.openVidu.getWsUri()) {\n this.processOpenViduUrl(options.sessionId);\n }\n };\n SessionInternal.prototype.getId = function () {\n return this.id;\n };\n SessionInternal.prototype.getSessionId = function () {\n return this.sessionId;\n };\n SessionInternal.prototype.activateUpdateMainSpeaker = function () {\n /*setInterval(() => {\n if (this.publishersSpeaking.length > 0) {\n this.ee.emitEvent('publisherStartSpeaking', [{\n participantId: this.publishersSpeaking[this.publishersSpeaking.length - 1]\n }]);\n }\n }, this.updateSpeakerInterval);*/\n };\n SessionInternal.prototype.getLocalParticipant = function () {\n return this.localParticipant;\n };\n SessionInternal.prototype.addEventListener = function (eventName, listener) {\n this.ee.on(eventName, listener);\n };\n SessionInternal.prototype.addOnceEventListener = function (eventName, listener) {\n this.ee.once(eventName, listener);\n };\n SessionInternal.prototype.removeListener = function (eventName, listener) {\n this.ee.off(eventName, listener);\n };\n SessionInternal.prototype.removeEvent = function (eventName) {\n this.ee.removeEvent(eventName);\n };\n SessionInternal.prototype.emitEvent = function (eventName, eventsArray) {\n this.ee.emitEvent(eventName, eventsArray);\n };\n SessionInternal.prototype.subscribe = function (stream) {\n stream.subscribe();\n };\n SessionInternal.prototype.unsubscribe = function (stream) {\n console.info(\"Unsubscribing from \" + stream.connection.connectionId);\n this.openVidu.sendRequest('unsubscribeFromVideo', {\n sender: stream.connection.connectionId\n }, function (error, response) {\n if (error) {\n console.error(\"Error unsubscribing from Subscriber\", error);\n }\n else {\n console.info(\"Unsubscribed correctly from \" + stream.connection.connectionId);\n }\n stream.dispose();\n });\n };\n SessionInternal.prototype.onParticipantPublished = function (response) {\n // Get the existing Connection created on 'onParticipantJoined' for\n // existing participants or create a new one for new participants\n var connection = this.participants[response.id];\n if (connection != null) {\n // Update existing Connection\n response.metadata = connection.data;\n connection.setOptions(response);\n connection.initRemoteStreams(response);\n }\n else {\n // Create new Connection\n connection = new Connection_1.Connection(this.openVidu, false, this, response);\n }\n var pid = connection.connectionId;\n if (!(pid in this.participants)) {\n console.debug(\"Remote Connection not found in connections list by its id [\" + pid + \"]\");\n }\n else {\n console.debug(\"Remote Connection found in connections list by its id [\" + pid + \"]\");\n }\n this.participants[pid] = connection;\n var streams = connection.getStreams();\n for (var key in streams) {\n var stream = streams[key];\n if (!this.remoteStreams[stream.streamId]) {\n // Avoid race condition between stream.subscribe() in \"onParticipantPublished\" and in \"joinRoom\" rpc callback\n // This condition is false if openvidu-server sends \"participantPublished\" event to a subscriber participant that has\n // already subscribed to certain stream in the callback of \"joinRoom\" method\n if (this.subscribeToStreams) {\n stream.subscribe();\n }\n this.ee.emitEvent('streamCreated', [{ stream: stream }]);\n // Store the remote stream\n this.remoteStreams[stream.streamId] = stream;\n }\n }\n };\n SessionInternal.prototype.onParticipantUnpublished = function (msg) {\n var _this = this;\n var connection = this.participants[msg.name];\n if (connection !== undefined) {\n var streams = connection.getStreams();\n for (var key in streams) {\n this.ee.emitEvent('streamDestroyed', [{\n stream: streams[key],\n preventDefault: function () { _this.ee.removeEvent('stream-destroyed-default'); }\n }]);\n this.ee.emitEvent('stream-destroyed-default', [{\n stream: streams[key]\n }]);\n // Deleting the remote stream\n var streamId = streams[key].streamId;\n var stream = this.remoteStreams[streamId];\n stream.dispose();\n delete this.remoteStreams[stream.streamId];\n connection.removeStream(stream.streamId);\n }\n }\n else {\n console.warn(\"Participant \" + msg.name\n + \" unknown. Participants: \"\n + JSON.stringify(this.participants));\n }\n };\n SessionInternal.prototype.onParticipantJoined = function (response) {\n var connection = new Connection_1.Connection(this.openVidu, false, this, response);\n connection.creationTime = new Date().getTime();\n var pid = connection.connectionId;\n if (!(pid in this.participants)) {\n this.participants[pid] = connection;\n }\n else {\n //use existing so that we don't lose streams info\n console.warn(\"Connection already exists in connections list with \" +\n \"the same connectionId, old:\", this.participants[pid], \", joined now:\", connection);\n connection = this.participants[pid];\n }\n this.ee.emitEvent('participant-joined', [{\n connection: connection\n }]);\n this.ee.emitEvent('connectionCreated', [{\n connection: connection\n }]);\n };\n SessionInternal.prototype.onParticipantLeft = function (msg) {\n var _this = this;\n var connection = this.participants[msg.name];\n if (connection !== undefined) {\n this.ee.emitEvent('participant-left', [{\n connection: connection\n }]);\n var streams = connection.getStreams();\n for (var key in streams) {\n this.ee.emitEvent('streamDestroyed', [{\n stream: streams[key],\n preventDefault: function () { _this.ee.removeEvent('stream-destroyed-default'); }\n }]);\n this.ee.emitEvent('stream-destroyed-default', [{\n stream: streams[key]\n }]);\n // Deleting the remote stream\n var streamId = streams[key].streamId;\n delete this.remoteStreams[streamId];\n }\n connection.dispose();\n delete this.participants[msg.name];\n this.ee.emitEvent('connectionDestroyed', [{\n connection: connection\n }]);\n }\n else {\n console.warn(\"Participant \" + msg.name\n + \" unknown. Participants: \"\n + JSON.stringify(this.participants));\n }\n };\n ;\n SessionInternal.prototype.onParticipantEvicted = function (msg) {\n this.ee.emitEvent('participant-evicted', [{\n localParticipant: this.localParticipant\n }]);\n };\n ;\n SessionInternal.prototype.onNewMessage = function (msg) {\n console.info(\"New signal: \" + JSON.stringify(msg));\n this.ee.emitEvent('signal', [{\n data: msg.data,\n from: this.participants[msg.from],\n type: msg.type\n }]);\n this.ee.emitEvent('signal:' + msg.type, [{\n data: msg.data,\n from: this.participants[msg.from],\n type: msg.type\n }]);\n };\n SessionInternal.prototype.recvIceCandidate = function (msg) {\n var candidate = {\n candidate: msg.candidate,\n sdpMid: msg.sdpMid,\n sdpMLineIndex: msg.sdpMLineIndex\n };\n var connection = this.participants[msg.endpointName];\n if (!connection) {\n console.error(\"Participant not found for endpoint \" +\n msg.endpointName + \". Ice candidate will be ignored.\", candidate);\n return;\n }\n var streams = connection.getStreams();\n var _loop_1 = function (key) {\n var stream = streams[key];\n stream.getWebRtcPeer().addIceCandidate(candidate, function (error) {\n if (error) {\n console.error(\"Error adding candidate for \" + key\n + \" stream of endpoint \" + msg.endpointName\n + \": \" + error);\n }\n });\n };\n for (var key in streams) {\n _loop_1(key);\n }\n };\n SessionInternal.prototype.onRoomClosed = function (msg) {\n console.info(\"Session closed: \" + JSON.stringify(msg));\n var room = msg.room;\n if (room !== undefined) {\n this.ee.emitEvent('room-closed', [{\n room: room\n }]);\n }\n else {\n console.warn(\"Session undefined on session closed\", msg);\n }\n };\n SessionInternal.prototype.onLostConnection = function () {\n if (!this.connected) {\n console.warn('Not connected to session: if you are not debugging, this is probably a certificate error');\n if (window.confirm('If you are not debugging, this is probably a certificate error at \\\"' + this.openVidu.getOpenViduServerURL() + '\\\"\\n\\nClick OK to navigate and accept it')) {\n location.assign(this.openVidu.getOpenViduServerURL() + '/accept-certificate');\n }\n ;\n return;\n }\n console.warn('Lost connection in Session ' + this.id);\n var room = this.id;\n if (room !== undefined) {\n this.ee.emitEvent('lost-connection', [{ room: room }]);\n }\n else {\n console.warn('Session undefined when lost connection');\n }\n };\n SessionInternal.prototype.onMediaError = function (params) {\n console.error(\"Media error: \" + JSON.stringify(params));\n var error = params.error;\n if (error) {\n this.ee.emitEvent('error-media', [{\n error: error\n }]);\n }\n else {\n console.warn(\"Received undefined media error. Params:\", params);\n }\n };\n /*\n * forced means the user was evicted, no need to send the 'leaveRoom' request\n */\n SessionInternal.prototype.leave = function (forced, jsonRpcClient) {\n forced = !!forced;\n console.info(\"Leaving Session (forced=\" + forced + \")\");\n if (this.connected && !forced) {\n this.openVidu.sendRequest('leaveRoom', function (error, response) {\n if (error) {\n console.error(error);\n }\n jsonRpcClient.close();\n });\n }\n else {\n jsonRpcClient.close();\n }\n this.connected = false;\n if (this.participants) {\n for (var pid in this.participants) {\n this.participants[pid].dispose();\n delete this.participants[pid];\n }\n }\n };\n SessionInternal.prototype.disconnect = function (stream) {\n var connection = stream.getParticipant();\n if (!connection) {\n console.error(\"Stream to disconnect has no participant\", stream);\n return;\n }\n delete this.participants[connection.connectionId];\n connection.dispose();\n if (connection === this.localParticipant) {\n console.info(\"Unpublishing my media (I'm \" + connection.connectionId + \")\");\n delete this.localParticipant;\n this.openVidu.sendRequest('unpublishVideo', function (error, response) {\n if (error) {\n console.error(error);\n }\n else {\n console.info(\"Media unpublished correctly\");\n }\n });\n }\n else {\n this.unsubscribe(stream);\n }\n };\n SessionInternal.prototype.unpublish = function (publisher) {\n var _this = this;\n var stream = publisher.stream;\n if (!stream.connection) {\n console.error(\"The associated Connection object of this Publisher is null\", stream);\n return;\n }\n else if (stream.connection !== this.localParticipant) {\n console.error(\"The associated Connection object of this Publisher is not your local Connection.\" +\n \"Only moderators can force unpublish on remote Streams via 'forceUnpublish' method\", stream);\n return;\n }\n else {\n stream.dispose();\n console.info(\"Unpublishing local media (\" + stream.connection.connectionId + \")\");\n this.openVidu.sendRequest('unpublishVideo', function (error, response) {\n if (error) {\n console.error(error);\n }\n else {\n console.info(\"Media unpublished correctly\");\n }\n });\n stream.isReadyToPublish = false;\n stream.isScreenRequestedReady = false;\n delete stream.connection.getStreams()[stream.streamId];\n publisher.ee.emitEvent('streamDestroyed', [{\n stream: publisher.stream,\n preventDefault: function () { _this.ee.removeEvent('stream-destroyed-default'); }\n }]);\n publisher.ee.emitEvent('stream-destroyed-default', [{\n stream: publisher.stream\n }]);\n }\n };\n SessionInternal.prototype.getRemoteStreams = function () {\n return this.remoteStreams;\n };\n SessionInternal.prototype.addParticipantSpeaking = function (participantId) {\n this.publishersSpeaking.push(participantId);\n this.ee.emitEvent('publisherStartSpeaking', [{\n participantId: participantId\n }]);\n };\n SessionInternal.prototype.removeParticipantSpeaking = function (participantId) {\n var pos = -1;\n for (var i = 0; i < this.publishersSpeaking.length; i++) {\n if (this.publishersSpeaking[i] == participantId) {\n pos = i;\n break;\n }\n }\n if (pos != -1) {\n this.publishersSpeaking.splice(pos, 1);\n this.ee.emitEvent('publisherStopSpeaking', [{\n participantId: participantId\n }]);\n }\n };\n SessionInternal.prototype.stringClientMetadata = function (metadata) {\n if (!(typeof metadata === 'string')) {\n return JSON.stringify(metadata);\n }\n else {\n return metadata;\n }\n };\n SessionInternal.prototype.randomToken = function () {\n return Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2);\n };\n return SessionInternal;\n}());\nexports.SessionInternal = SessionInternal;\n//# sourceMappingURL=SessionInternal.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/SessionInternal.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/SessionInternal.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenViduError_1 = require(\"./OpenViduError\");\nvar WebRtcStats_1 = require(\"./WebRtcStats\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar kurentoUtils = require(\"../KurentoUtils/kurento-utils-js\");\nvar adapter = require(\"webrtc-adapter\");\nif (window) {\n window[\"adapter\"] = adapter;\n}\nfunction jq(id) {\n return id.replace(/(@|:|\\.|\\[|\\]|,)/g, \"\\\\$1\");\n}\nfunction show(id) {\n document.getElementById(jq(id)).style.display = 'block';\n}\nfunction hide(id) {\n document.getElementById(jq(id)).style.display = 'none';\n}\nvar Stream = /** @class */ (function () {\n function Stream(openVidu, local, room, options) {\n var _this = this;\n this.openVidu = openVidu;\n this.local = local;\n this.room = room;\n this.ee = new EventEmitter();\n this.showMyRemote = false;\n this.localMirrored = false;\n this.chanId = 0;\n this.dataChannelOpened = false;\n this.isReadyToPublish = false;\n this.isPublisherPublished = false;\n this.isVideoELementCreated = false;\n this.accessIsAllowed = false;\n this.accessIsDenied = false;\n this.isScreenRequestedReady = false;\n this.isScreenRequested = false;\n if (options !== 'screen-options') {\n // Outbound stream (not screen share) or Inbound stream\n if ('id' in options) {\n this.inboundOptions = options;\n }\n else {\n this.outboundOptions = options;\n }\n this.streamId = (options.id != null) ? options.id : ((options.sendVideo) ? \"CAMERA\" : \"MICRO\");\n this.typeOfVideo = (options.typeOfVideo != null) ? options.typeOfVideo : '';\n if ('recvAudio' in options) {\n // Set Connection for an Inbound stream (for Outbound streams will be set on Session.Publish(Publisher))\n this.connection = options.connection;\n }\n }\n else {\n // Outbound stream for screen share\n this.isScreenRequested = true;\n this.typeOfVideo = 'SCREEN';\n }\n this.addEventListener('mediastream-updated', function () {\n if (_this.video)\n _this.video.srcObject = _this.mediaStream;\n console.debug(\"Video srcObject [\" + _this.mediaStream + \"] added to stream [\" + _this.streamId + \"]\");\n });\n }\n Stream.prototype.emitStreamReadyEvent = function () {\n this.ee.emitEvent('stream-ready');\n };\n Stream.prototype.removeVideo = function (parentElement) {\n if (this.video) {\n if (typeof parentElement === \"string\") {\n document.getElementById(parentElement).removeChild(this.video);\n this.ee.emitEvent('video-removed');\n }\n else if (parentElement instanceof Element) {\n parentElement.removeChild(this.video);\n this.ee.emitEvent('video-removed');\n }\n else if (!parentElement) {\n if (document.getElementById(this.parentId)) {\n document.getElementById(this.parentId).removeChild(this.video);\n this.ee.emitEvent('video-removed');\n }\n }\n delete this.video;\n }\n };\n Stream.prototype.getVideoElement = function () {\n return this.video;\n };\n Stream.prototype.setVideoElement = function (video) {\n if (!!video)\n this.video = video;\n };\n Stream.prototype.getParentId = function () {\n return this.parentId;\n };\n Stream.prototype.getRecvVideo = function () {\n return this.inboundOptions.recvVideo;\n };\n Stream.prototype.getRecvAudio = function () {\n return this.inboundOptions.recvAudio;\n };\n Stream.prototype.getSendVideo = function () {\n return this.outboundOptions.sendVideo;\n };\n Stream.prototype.getSendAudio = function () {\n return this.outboundOptions.sendAudio;\n };\n Stream.prototype.subscribeToMyRemote = function () {\n this.showMyRemote = true;\n };\n Stream.prototype.displayMyRemote = function () {\n return this.showMyRemote;\n };\n Stream.prototype.mirrorLocalStream = function (wr) {\n this.showMyRemote = true;\n this.localMirrored = true;\n if (wr) {\n this.mediaStream = wr;\n this.ee.emitEvent('mediastream-updated');\n }\n };\n Stream.prototype.isLocalMirrored = function () {\n return this.localMirrored;\n };\n Stream.prototype.getChannelName = function () {\n return this.streamId + '_' + this.chanId++;\n };\n Stream.prototype.isDataChannelEnabled = function () {\n return this.outboundOptions.dataChannel;\n };\n Stream.prototype.isDataChannelOpened = function () {\n return this.dataChannelOpened;\n };\n Stream.prototype.onDataChannelOpen = function (event) {\n console.debug('Data channel is opened');\n this.dataChannelOpened = true;\n };\n Stream.prototype.onDataChannelClosed = function (event) {\n console.debug('Data channel is closed');\n this.dataChannelOpened = false;\n };\n Stream.prototype.sendData = function (data) {\n if (this.wp === undefined) {\n throw new Error('WebRTC peer has not been created yet');\n }\n if (!this.dataChannelOpened) {\n throw new Error('Data channel is not opened');\n }\n console.info(\"Sending through data channel: \" + data);\n this.wp.send(data);\n };\n Stream.prototype.getMediaStream = function () {\n return this.mediaStream;\n };\n Stream.prototype.getWebRtcPeer = function () {\n return this.wp;\n };\n Stream.prototype.getRTCPeerConnection = function () {\n return this.wp.peerConnection;\n };\n Stream.prototype.addEventListener = function (eventName, listener) {\n this.ee.addListener(eventName, listener);\n };\n Stream.prototype.addOnceEventListener = function (eventName, listener) {\n this.ee.addOnceListener(eventName, listener);\n };\n Stream.prototype.removeListener = function (eventName) {\n this.ee.removeAllListeners(eventName);\n };\n Stream.prototype.showSpinner = function (spinnerParentId) {\n var progress = document.createElement('div');\n progress.id = 'progress-' + this.streamId;\n progress.style.background = \"center transparent url('img/spinner.gif') no-repeat\";\n var spinnerParent = document.getElementById(spinnerParentId);\n if (spinnerParent) {\n spinnerParent.appendChild(progress);\n }\n };\n Stream.prototype.hideSpinner = function (spinnerId) {\n spinnerId = (spinnerId === undefined) ? this.streamId : spinnerId;\n hide('progress-' + spinnerId);\n };\n Stream.prototype.playOnlyVideo = function (parentElement, thumbnailId) {\n var _this = this;\n if (!!parentElement) {\n this.video = document.createElement('video');\n this.video.id = (this.local ? 'local-' : 'remote-') + 'video-' + this.streamId;\n this.video.autoplay = true;\n this.video.controls = false;\n this.ee.emitEvent('mediastream-updated');\n if (this.local && !this.displayMyRemote()) {\n this.video.muted = true;\n this.video.oncanplay = function () {\n console.info(\"Local 'Stream' with id [\" + _this.streamId + \"] video is now playing\");\n _this.ee.emitEvent('video-is-playing', [{\n element: _this.video\n }]);\n };\n }\n else {\n this.video.title = this.streamId;\n }\n if (typeof parentElement === \"string\") {\n this.parentId = parentElement;\n var parentElementDom = document.getElementById(parentElement);\n if (parentElementDom) {\n this.video = parentElementDom.appendChild(this.video);\n this.ee.emitEvent('video-element-created-by-stream', [{\n element: this.video\n }]);\n this.isVideoELementCreated = true;\n }\n }\n else {\n this.parentId = parentElement.id;\n this.video = parentElement.appendChild(this.video);\n }\n this.isReadyToPublish = true;\n return this.video;\n }\n this.isReadyToPublish = true;\n return null;\n };\n Stream.prototype.playThumbnail = function (thumbnailId) {\n var container = document.createElement('div');\n container.className = \"participant\";\n container.id = this.streamId;\n var thumbnail = document.getElementById(thumbnailId);\n if (thumbnail) {\n thumbnail.appendChild(container);\n }\n var name = document.createElement('div');\n container.appendChild(name);\n var userName = this.streamId.replace('_webcam', '');\n if (userName.length >= 16) {\n userName = userName.substring(0, 16) + \"...\";\n }\n name.appendChild(document.createTextNode(userName));\n name.id = \"name-\" + this.streamId;\n name.className = \"name\";\n name.title = this.streamId;\n this.showSpinner(thumbnailId);\n return this.playOnlyVideo(container, thumbnailId);\n };\n Stream.prototype.getParticipant = function () {\n return this.connection;\n };\n Stream.prototype.requestCameraAccess = function (callback) {\n var _this = this;\n var constraints = this.outboundOptions.mediaConstraints;\n /*let constraints2 = {\n audio: true,\n video: {\n width: {\n ideal: 1280\n },\n frameRate: {\n ideal: 15\n }\n }\n };*/\n this.userMediaHasVideo(function (hasVideo) {\n if (!hasVideo) {\n if (_this.outboundOptions.sendVideo) {\n callback(new OpenViduError_1.OpenViduError(\"NO_VIDEO_DEVICE\" /* NO_VIDEO_DEVICE */, 'You have requested camera access but there is no video input device available. Trying to connect with an audio input device only'), _this);\n }\n if (!_this.outboundOptions.sendAudio) {\n callback(new OpenViduError_1.OpenViduError(\"NO_INPUT_DEVICE\" /* NO_INPUT_DEVICE */, 'You must init Publisher object with audio or video streams enabled'), undefined);\n }\n else {\n constraints.video = false;\n _this.outboundOptions.sendVideo = false;\n _this.requestCameraAccesAux(constraints, callback);\n }\n }\n else {\n _this.requestCameraAccesAux(constraints, callback);\n }\n });\n };\n Stream.prototype.requestCameraAccesAux = function (constraints, callback) {\n var _this = this;\n console.log(constraints);\n navigator.mediaDevices.getUserMedia(constraints)\n .then(function (userStream) {\n _this.cameraAccessSuccess(userStream, callback);\n })[\"catch\"](function (error) {\n _this.accessIsDenied = true;\n _this.accessIsAllowed = false;\n var errorName;\n var errorMessage = error.toString();\n ;\n if (!_this.isScreenRequested) {\n errorName = _this.outboundOptions.sendVideo ? \"CAMERA_ACCESS_DENIED\" /* CAMERA_ACCESS_DENIED */ : \"MICROPHONE_ACCESS_DENIED\" /* MICROPHONE_ACCESS_DENIED */;\n }\n else {\n errorName = \"SCREEN_CAPTURE_DENIED\" /* SCREEN_CAPTURE_DENIED */; // This code is only reachable for Firefox\n }\n callback(new OpenViduError_1.OpenViduError(errorName, errorMessage), undefined);\n });\n };\n Stream.prototype.cameraAccessSuccess = function (userStream, callback) {\n this.accessIsAllowed = true;\n this.accessIsDenied = false;\n this.ee.emitEvent('access-allowed-by-publisher');\n if (userStream.getAudioTracks()[0] != null) {\n userStream.getAudioTracks()[0].enabled = this.outboundOptions.activeAudio;\n }\n if (userStream.getVideoTracks()[0] != null) {\n userStream.getVideoTracks()[0].enabled = this.outboundOptions.activeVideo;\n }\n this.mediaStream = userStream;\n this.ee.emitEvent('mediastream-updated');\n callback(undefined, this);\n };\n Stream.prototype.userMediaHasVideo = function (callback) {\n // If the user is going to publish its screen there's a video source\n if (this.isScreenRequested) {\n callback(true);\n return;\n }\n else {\n // List all input devices and serach for a video kind\n navigator.mediaDevices.enumerateDevices().then(function (mediaDevices) {\n var videoInput = mediaDevices.filter(function (deviceInfo) {\n return deviceInfo.kind === 'videoinput';\n })[0];\n callback(videoInput != null);\n });\n }\n };\n Stream.prototype.publishVideoCallback = function (error, sdpOfferParam, wp) {\n var _this = this;\n if (error) {\n return console.error(\"(publish) SDP offer error: \"\n + JSON.stringify(error));\n }\n console.debug(\"Sending SDP offer to publish as \"\n + this.streamId, sdpOfferParam);\n this.openVidu.sendRequest(\"publishVideo\", {\n sdpOffer: sdpOfferParam,\n doLoopback: this.displayMyRemote() || false,\n audioActive: this.outboundOptions.sendAudio,\n videoActive: this.outboundOptions.sendVideo,\n typeOfVideo: ((this.outboundOptions.sendVideo) ? ((this.isScreenRequested) ? 'SCREEN' : 'CAMERA') : '')\n }, function (error, response) {\n if (error) {\n console.error(\"Error on publishVideo: \" + JSON.stringify(error));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer);\n console.info(\"'Publisher' succesfully published to session\");\n }\n });\n };\n Stream.prototype.startVideoCallback = function (error, sdpOfferParam, wp) {\n var _this = this;\n if (error) {\n return console.error(\"(subscribe) SDP offer error: \"\n + JSON.stringify(error));\n }\n console.debug(\"Sending SDP offer to subscribe to \"\n + this.streamId, sdpOfferParam);\n this.openVidu.sendRequest(\"receiveVideoFrom\", {\n sender: this.streamId,\n sdpOffer: sdpOfferParam\n }, function (error, response) {\n if (error) {\n console.error(\"Error on recvVideoFrom: \" + JSON.stringify(error));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer);\n }\n });\n };\n Stream.prototype.initWebRtcPeer = function (sdpOfferCallback) {\n var _this = this;\n if (this.local) {\n var userMediaConstraints = {\n audio: this.outboundOptions.sendAudio,\n video: this.outboundOptions.sendVideo\n };\n var options = {\n videoStream: this.mediaStream,\n mediaConstraints: userMediaConstraints,\n onicecandidate: this.connection.sendIceCandidate.bind(this.connection)\n };\n if (this.outboundOptions.dataChannel) {\n options.dataChannelConfig = {\n id: this.getChannelName(),\n onopen: this.onDataChannelOpen,\n onclose: this.onDataChannelClosed\n };\n options.dataChannels = true;\n }\n if (this.displayMyRemote()) {\n this.wp = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (error) {\n if (error) {\n return console.error(error);\n }\n _this.wp.generateOffer(sdpOfferCallback.bind(_this));\n });\n }\n else {\n this.wp = kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) {\n if (error) {\n return console.error(error);\n }\n _this.wp.generateOffer(sdpOfferCallback.bind(_this));\n });\n }\n this.isPublisherPublished = true;\n this.ee.emitEvent('stream-created-by-publisher');\n }\n else {\n var offerConstraints = {\n audio: this.inboundOptions.recvAudio,\n video: this.inboundOptions.recvVideo\n };\n console.debug(\"'Session.subscribe(Stream)' called. Constraints of generate SDP offer\", offerConstraints);\n var options = {\n onicecandidate: this.connection.sendIceCandidate.bind(this.connection),\n mediaConstraints: offerConstraints\n };\n this.wp = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) {\n if (error) {\n return console.error(error);\n }\n _this.wp.generateOffer(sdpOfferCallback.bind(_this));\n });\n }\n console.debug(\"Waiting for SDP offer to be generated (\"\n + (this.local ? \"local\" : \"remote\") + \" 'Stream': \" + this.streamId + \")\");\n };\n Stream.prototype.publish = function () {\n var _this = this;\n // FIXME: Throw error when stream is not local\n if (this.isReadyToPublish) {\n this.initWebRtcPeer(this.publishVideoCallback);\n }\n else {\n this.ee.once('stream-ready', function (streamEvent) {\n _this.publish();\n });\n }\n // FIXME: Now we have coupled connecting to a room and adding a\n // stream to this room. But in the new API, there are two steps.\n // This is the second step. For now, it do nothing.\n };\n Stream.prototype.subscribe = function () {\n // FIXME: In the current implementation all participants are subscribed\n // automatically to all other participants. We use this method only to\n // negotiate SDP\n this.initWebRtcPeer(this.startVideoCallback);\n };\n Stream.prototype.processSdpAnswer = function (sdpAnswer) {\n var _this = this;\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n console.debug(this.streamId + \": set peer connection with recvd SDP answer\", sdpAnswer);\n var participantId = this.streamId;\n var pc = this.wp.peerConnection;\n pc.setRemoteDescription(answer, function () {\n // Avoids to subscribe to your own stream remotely \n // except when showMyRemote is true\n if (!_this.local || _this.displayMyRemote()) {\n _this.mediaStream = pc.getRemoteStreams()[0];\n console.debug(\"Peer remote stream\", _this.mediaStream);\n if (_this.mediaStream != undefined) {\n _this.ee.emitEvent('mediastream-updated');\n if (_this.mediaStream.getAudioTracks()[0] != null) {\n _this.speechEvent = kurentoUtils.WebRtcPeer.hark(_this.mediaStream, { threshold: _this.room.thresholdSpeaker });\n _this.speechEvent.on('speaking', function () {\n //this.room.addParticipantSpeaking(participantId);\n _this.room.emitEvent('publisherStartSpeaking', [{\n connection: _this.connection,\n streamId: _this.streamId\n }]);\n });\n _this.speechEvent.on('stopped_speaking', function () {\n //this.room.removeParticipantSpeaking(participantId);\n _this.room.emitEvent('publisherStopSpeaking', [{\n connection: _this.connection,\n streamId: _this.streamId\n }]);\n });\n }\n }\n if (!!_this.video) {\n // let thumbnailId = this.video.thumb;\n _this.video.oncanplay = function () {\n if (_this.local && _this.displayMyRemote()) {\n console.info(\"Your own remote 'Stream' with id [\" + _this.streamId + \"] video is now playing\");\n _this.ee.emitEvent('remote-video-is-playing', [{\n element: _this.video\n }]);\n }\n else if (!_this.local && !_this.displayMyRemote()) {\n console.info(\"Remote 'Stream' with id [\" + _this.streamId + \"] video is now playing\");\n _this.ee.emitEvent('video-is-playing', [{\n element: _this.video\n }]);\n }\n //show(thumbnailId);\n //this.hideSpinner(this.streamId);\n };\n }\n _this.room.emitEvent('stream-subscribed', [{\n stream: _this\n }]);\n }\n _this.initWebRtcStats();\n }, function (error) {\n console.error(_this.streamId + \": Error setting SDP to the peer connection: \"\n + JSON.stringify(error));\n });\n };\n Stream.prototype.unpublish = function () {\n if (this.wp) {\n this.wp.dispose();\n }\n else {\n if (this.mediaStream) {\n this.mediaStream.getAudioTracks().forEach(function (track) {\n track.stop && track.stop();\n });\n this.mediaStream.getVideoTracks().forEach(function (track) {\n track.stop && track.stop();\n });\n }\n }\n if (this.speechEvent) {\n this.speechEvent.stop();\n }\n console.info(this.streamId + \": Stream '\" + this.streamId + \"' unpublished\");\n };\n Stream.prototype.dispose = function () {\n function disposeElement(element) {\n if (element && element.parentNode) {\n element.parentNode.removeChild(element);\n }\n }\n disposeElement(\"progress-\" + this.streamId);\n if (this.wp) {\n this.wp.dispose();\n }\n else {\n if (this.mediaStream) {\n this.mediaStream.getAudioTracks().forEach(function (track) {\n track.stop && track.stop();\n });\n this.mediaStream.getVideoTracks().forEach(function (track) {\n track.stop && track.stop();\n });\n }\n }\n if (this.speechEvent) {\n this.speechEvent.stop();\n }\n this.stopWebRtcStats();\n console.info((this.local ? \"Local \" : \"Remote \") + \"'Stream' with id [\" + this.streamId + \"]' has been succesfully disposed\");\n };\n Stream.prototype.configureScreenOptions = function (options) {\n this.outboundOptions = options;\n this.streamId = \"SCREEN\";\n };\n Stream.prototype.initWebRtcStats = function () {\n this.webRtcStats = new WebRtcStats_1.WebRtcStats(this);\n this.webRtcStats.initWebRtcStats();\n };\n Stream.prototype.stopWebRtcStats = function () {\n if (this.webRtcStats != null && this.webRtcStats.isEnabled()) {\n this.webRtcStats.stopWebRtcStats();\n }\n };\n return Stream;\n}());\nexports.Stream = Stream;\n//# sourceMappingURL=Stream.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Stream.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Stream.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar DetectRTC = require(\"../KurentoUtils/DetectRTC\");\nvar WebRtcStats = /** @class */ (function () {\n function WebRtcStats(stream) {\n this.stream = stream;\n this.webRtcStatsEnabled = false;\n this.statsInterval = 1;\n this.stats = {\n \"inbound\": {\n \"audio\": {\n \"bytesReceived\": 0,\n \"packetsReceived\": 0,\n \"packetsLost\": 0\n },\n \"video\": {\n \"bytesReceived\": 0,\n \"packetsReceived\": 0,\n \"packetsLost\": 0,\n \"framesDecoded\": 0,\n \"nackCount\": 0\n }\n },\n \"outbound\": {\n \"audio\": {\n \"bytesSent\": 0,\n \"packetsSent\": 0\n },\n \"video\": {\n \"bytesSent\": 0,\n \"packetsSent\": 0,\n \"framesEncoded\": 0,\n \"nackCount\": 0\n }\n }\n };\n }\n WebRtcStats.prototype.isEnabled = function () {\n return this.webRtcStatsEnabled;\n };\n WebRtcStats.prototype.initWebRtcStats = function () {\n var _this = this;\n var elastestInstrumentation = localStorage.getItem('elastest-instrumentation');\n if (elastestInstrumentation) {\n // ElasTest instrumentation object found in local storage\n console.warn(\"WebRtc stats enabled for stream \" + this.stream.streamId + \" of connection \" + this.stream.connection.connectionId);\n this.webRtcStatsEnabled = true;\n var instrumentation_1 = JSON.parse(elastestInstrumentation);\n this.statsInterval = instrumentation_1.webrtc.interval; // Interval in seconds\n console.warn(\"localStorage item: \" + JSON.stringify(instrumentation_1));\n this.webRtcStatsIntervalId = setInterval(function () {\n _this.sendStatsToHttpEndpoint(instrumentation_1);\n }, this.statsInterval * 1000);\n return;\n }\n console.debug(\"WebRtc stats not enabled\");\n };\n WebRtcStats.prototype.stopWebRtcStats = function () {\n if (this.webRtcStatsEnabled) {\n clearInterval(this.webRtcStatsIntervalId);\n console.warn(\"WebRtc stats stopped for disposed stream \" + this.stream.streamId + \" of connection \" + this.stream.connection.connectionId);\n }\n };\n WebRtcStats.prototype.sendStatsToHttpEndpoint = function (instrumentation) {\n var _this = this;\n var sendPost = function (json) {\n var http = new XMLHttpRequest();\n var url = instrumentation.webrtc.httpEndpoint;\n http.open(\"POST\", url, true);\n http.setRequestHeader(\"Content-type\", \"application/json\");\n http.onreadystatechange = function () {\n if (http.readyState == 4 && http.status == 200) {\n console.log(\"WebRtc stats succesfully sent to \" + url + \" for stream \" + _this.stream.streamId + \" of connection \" + _this.stream.connection.connectionId);\n }\n };\n http.send(json);\n };\n var f = function (stats) {\n if (DetectRTC.browser.name === 'Firefox') {\n stats.forEach(function (stat) {\n var json = {};\n if ((stat.type === 'inbound-rtp') &&\n (\n // Avoid firefox empty outbound-rtp statistics\n stat.nackCount != null &&\n stat.isRemote === false &&\n stat.id.startsWith('inbound') &&\n stat.remoteId.startsWith('inbound'))) {\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var jitter = stat.jitter * 1000;\n var metrics = {\n \"bytesReceived\": (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n \"jitter\": jitter,\n \"packetsReceived\": (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n \"packetsLost\": (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n \"bytesReceived\": \"bytes\",\n \"jitter\": \"ms\",\n \"packetsReceived\": \"packets\",\n \"packetsLost\": \"packets\"\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.nackCount - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = \"frames\";\n units['nackCount'] = \"packets\";\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.nackCount;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n \"@timestamp\": new Date(stat.timestamp).toISOString(),\n \"exec\": instrumentation.exec,\n \"component\": instrumentation.component,\n \"stream\": \"webRtc\",\n \"type\": metricId,\n \"stream_type\": \"composed_metrics\",\n \"units\": units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ((stat.type === 'outbound-rtp') &&\n (\n // Avoid firefox empty inbound-rtp statistics\n stat.isRemote === false &&\n stat.id.toLowerCase().includes('outbound'))) {\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n \"bytesSent\": (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n \"packetsSent\": (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n \"bytesSent\": \"bytes\",\n \"packetsSent\": \"packets\"\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = \"frames\";\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n \"@timestamp\": new Date(stat.timestamp).toISOString(),\n \"exec\": instrumentation.exec,\n \"component\": instrumentation.component,\n \"stream\": \"webRtc\",\n \"type\": metricId,\n \"stream_type\": \"composed_metrics\",\n \"units\": units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n });\n }\n else if (DetectRTC.browser.name === 'Chrome') {\n for (var _i = 0, _a = Object.keys(stats); _i < _a.length; _i++) {\n var key = _a[_i];\n var stat = stats[key];\n if (stat.type === 'ssrc') {\n var json = {};\n if ('bytesReceived' in stat && ((stat.mediaType === 'audio' && 'audioOutputLevel' in stat) ||\n (stat.mediaType === 'video' && 'qpSum' in stat))) {\n // inbound-rtp\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n \"bytesReceived\": (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n \"jitter\": stat.googJitterBufferMs,\n \"packetsReceived\": (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n \"packetsLost\": (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n \"bytesReceived\": \"bytes\",\n \"jitter\": \"ms\",\n \"packetsReceived\": \"packets\",\n \"packetsLost\": \"packets\"\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.googNacksSent - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = \"frames\";\n units['nackCount'] = \"packets\";\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.googNacksSent;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n \"@timestamp\": new Date(stat.timestamp).toISOString(),\n \"exec\": instrumentation.exec,\n \"component\": instrumentation.component,\n \"stream\": \"webRtc\",\n \"type\": metricId,\n \"stream_type\": \"composed_metrics\",\n \"units\": units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ('bytesSent' in stat) {\n // outbound-rtp\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n \"bytesSent\": (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n \"packetsSent\": (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n \"bytesSent\": \"bytes\",\n \"packetsSent\": \"packets\"\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = \"frames\";\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n \"@timestamp\": new Date(stat.timestamp).toISOString(),\n \"exec\": instrumentation.exec,\n \"component\": instrumentation.component,\n \"stream\": \"webRtc\",\n \"type\": metricId,\n \"stream_type\": \"composed_metrics\",\n \"units\": units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n }\n }\n }\n };\n this.getStatsAgnostic(this.stream.getRTCPeerConnection(), null, f, function (error) { console.log(error); });\n };\n WebRtcStats.prototype.standardizeReport = function (response) {\n if (DetectRTC.browser.name === 'Firefox') {\n return response;\n }\n var standardReport = {};\n response.result().forEach(function (report) {\n var standardStats = {\n id: report.id,\n timestamp: report.timestamp,\n type: report.type\n };\n report.names().forEach(function (name) {\n standardStats[name] = report.stat(name);\n });\n standardReport[standardStats.id] = standardStats;\n });\n return standardReport;\n };\n WebRtcStats.prototype.getStatsAgnostic = function (pc, selector, successCb, failureCb) {\n var _this = this;\n if (DetectRTC.browser.name === 'Firefox') {\n // getStats takes args in different order in Chrome and Firefox\n return pc.getStats(selector, function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, failureCb);\n }\n else if (DetectRTC.browser.name === 'Chrome') {\n // In Chrome, the first two arguments are reversed\n return pc.getStats(function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, selector, failureCb);\n }\n };\n return WebRtcStats;\n}());\nexports.WebRtcStats = WebRtcStats;\n//# sourceMappingURL=WebRtcStats.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/WebRtcStats.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/WebRtcStats.js\n// module chunks = main","// Last time updated at Feb 16, 2017, 08:32:23\n// Latest file can be found here: https://cdn.webrtc-experiment.com/getScreenId.js\n// Muaz Khan - www.MuazKhan.com\n// MIT License - www.WebRTC-Experiment.com/licence\n// Documentation - https://github.com/muaz-khan/getScreenId.\n// ______________\n// getScreenId.js\n/*\ngetScreenId(function (error, sourceId, screen_constraints) {\n // error == null || 'permission-denied' || 'not-installed' || 'installed-disabled' || 'not-chrome'\n // sourceId == null || 'string' || 'firefox'\n \n if(sourceId == 'firefox') {\n navigator.mozGetUserMedia(screen_constraints, onSuccess, onFailure);\n }\n else navigator.webkitGetUserMedia(screen_constraints, onSuccess, onFailure);\n});\n*/\nwindow.getScreenId = function (callback) {\n // for Firefox:\n // sourceId == 'firefox'\n // screen_constraints = {...}\n if (!!navigator.mozGetUserMedia) {\n callback(null, 'firefox', {\n video: {\n mozMediaSource: 'window',\n mediaSource: 'window'\n }\n });\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeMediaSourceId) {\n if (event.data.chromeMediaSourceId === 'PermissionDeniedError') {\n callback('permission-denied');\n }\n else\n callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId));\n }\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus));\n }\n // this event listener is no more needed\n window.removeEventListener('message', onIFrameCallback);\n }\n setTimeout(postGetSourceIdMessage, 100);\n};\nfunction getScreenConstraints(error, sourceId) {\n var screen_constraints = {\n audio: false,\n video: {\n mandatory: {\n chromeMediaSource: error ? 'screen' : 'desktop',\n maxWidth: window.screen.width > 1920 ? window.screen.width : 1920,\n maxHeight: window.screen.height > 1080 ? window.screen.height : 1080\n },\n optional: []\n }\n };\n if (sourceId) {\n screen_constraints.video.mandatory.chromeMediaSourceId = sourceId;\n }\n return screen_constraints;\n}\nfunction postGetSourceIdMessage() {\n if (!iframe) {\n loadIFrame(postGetSourceIdMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetSourceIdMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n captureSourceId: true\n }, '*');\n}\nvar iframe;\n// this function is used in RTCMultiConnection v3\nwindow.getScreenConstraints = function (callback) {\n loadIFrame(function () {\n getScreenId(function (error, sourceId, screen_constraints) {\n callback(error, screen_constraints.video);\n });\n });\n};\nfunction loadIFrame(loadCallback) {\n if (iframe) {\n loadCallback();\n return;\n }\n iframe = document.createElement('iframe');\n iframe.onload = function () {\n iframe.isLoaded = true;\n loadCallback();\n };\n iframe.src = 'https://www.webrtc-experiment.com/getSourceId/'; // https://wwww.yourdomain.com/getScreenId.html\n iframe.style.display = 'none';\n (document.body || document.documentElement).appendChild(iframe);\n}\nwindow.getChromeExtensionStatus = function (callback) {\n // for Firefox:\n if (!!navigator.mozGetUserMedia) {\n callback('installed-enabled');\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus);\n }\n // this event listener is no more needed\n window.removeEventListener('message', onIFrameCallback);\n }\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n};\nfunction postGetChromeExtensionStatusMessage() {\n if (!iframe) {\n loadIFrame(postGetChromeExtensionStatusMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n getChromeExtensionStatus: true\n }, '*');\n}\nexports.getScreenId = getScreenId;\nexports.getChromeExtensionStatus = getChromeExtensionStatus;\n//# sourceMappingURL=Screen-Capturing-Auto.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/ScreenSharing/Screen-Capturing-Auto.js\n// module id = ../../../../openvidu-browser/lib/ScreenSharing/Screen-Capturing-Auto.js\n// module chunks = main","/* jshint node: true */\n'use strict';\n\nvar normalice = require('normalice');\n\n/**\n # freeice\n\n The `freeice` module is a simple way of getting random STUN or TURN server\n for your WebRTC application. The list of servers (just STUN at this stage)\n were sourced from this [gist](https://gist.github.com/zziuni/3741933).\n\n ## Example Use\n\n The following demonstrates how you can use `freeice` with\n [rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect):\n\n <<< examples/quickconnect.js\n\n As the `freeice` module generates ice servers in a list compliant with the\n WebRTC spec you will be able to use it with raw `RTCPeerConnection`\n constructors and other WebRTC libraries.\n\n ## Hey, don't use my STUN/TURN server!\n\n If for some reason your free STUN or TURN server ends up in the\n list of servers ([stun](https://github.com/DamonOehlman/freeice/blob/master/stun.json) or\n [turn](https://github.com/DamonOehlman/freeice/blob/master/turn.json))\n that is used in this module, you can feel\n free to open an issue on this repository and those servers will be removed\n within 24 hours (or sooner). This is the quickest and probably the most\n polite way to have something removed (and provides us some visibility\n if someone opens a pull request requesting that a server is added).\n\n ## Please add my server!\n\n If you have a server that you wish to add to the list, that's awesome! I'm\n sure I speak on behalf of a whole pile of WebRTC developers who say thanks.\n To get it into the list, feel free to either open a pull request or if you\n find that process a bit daunting then just create an issue requesting\n the addition of the server (make sure you provide all the details, and if\n you have a Terms of Service then including that in the PR/issue would be\n awesome).\n\n ## I know of a free server, can I add it?\n\n Sure, if you do your homework and make sure it is ok to use (I'm currently\n in the process of reviewing the terms of those STUN servers included from\n the original list). If it's ok to go, then please see the previous entry\n for how to add it.\n\n ## Current List of Servers\n\n * current as at the time of last `README.md` file generation\n\n ### STUN\n\n <<< stun.json\n\n ### TURN\n\n <<< turn.json\n\n**/\n\nvar freeice = module.exports = function(opts) {\n // if a list of servers has been provided, then use it instead of defaults\n var servers = {\n stun: (opts || {}).stun || require('./stun.json'),\n turn: (opts || {}).turn || require('./turn.json')\n };\n\n var stunCount = (opts || {}).stunCount || 2;\n var turnCount = (opts || {}).turnCount || 0;\n var selected;\n\n function getServers(type, count) {\n var out = [];\n var input = [].concat(servers[type]);\n var idx;\n\n while (input.length && out.length < count) {\n idx = (Math.random() * input.length) | 0;\n out = out.concat(input.splice(idx, 1));\n }\n\n return out.map(function(url) {\n //If it's a not a string, don't try to \"normalice\" it otherwise using type:url will screw it up\n if ((typeof url !== 'string') && (! (url instanceof String))) {\n return url;\n } else {\n return normalice(type + ':' + url);\n }\n });\n }\n\n // add stun servers\n selected = [].concat(getServers('stun', stunCount));\n\n if (turnCount) {\n selected = selected.concat(getServers('turn', turnCount));\n }\n\n return selected;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/index.js\n// module id = ../../../../openvidu-browser/node_modules/freeice/index.js\n// module chunks = main","module.exports = [\"stun.l.google.com:19302\",\"stun1.l.google.com:19302\",\"stun2.l.google.com:19302\",\"stun3.l.google.com:19302\",\"stun4.l.google.com:19302\",\"stun.ekiga.net\",\"stun.ideasip.com\",\"stun.schlund.de\",\"stun.stunprotocol.org:3478\",\"stun.voiparound.com\",\"stun.voipbuster.com\",\"stun.voipstunt.com\",\"stun.voxgratia.org\",\"stun.services.mozilla.com\"]\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/stun.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/stun.json\n// module chunks = main","module.exports = []\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/turn.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/turn.json\n// module chunks = main","var WildEmitter = require('wildemitter');\n\nfunction getMaxVolume (analyser, fftBins) {\n var maxVolume = -Infinity;\n analyser.getFloatFrequencyData(fftBins);\n\n for(var i=4, ii=fftBins.length; i < ii; i++) {\n if (fftBins[i] > maxVolume && fftBins[i] < 0) {\n maxVolume = fftBins[i];\n }\n };\n\n return maxVolume;\n}\n\n\nvar audioContextType;\nif (typeof window !== 'undefined') {\n audioContextType = window.AudioContext || window.webkitAudioContext;\n}\n// use a single audio context due to hardware limits\nvar audioContext = null;\nmodule.exports = function(stream, options) {\n var harker = new WildEmitter();\n\n\n // make it not break in non-supported browsers\n if (!audioContextType) return harker;\n\n //Config\n var options = options || {},\n smoothing = (options.smoothing || 0.1),\n interval = (options.interval || 50),\n threshold = options.threshold,\n play = options.play,\n history = options.history || 10,\n running = true;\n\n //Setup Audio Context\n if (!audioContext) {\n audioContext = new audioContextType();\n }\n var sourceNode, fftBins, analyser;\n\n analyser = audioContext.createAnalyser();\n analyser.fftSize = 512;\n analyser.smoothingTimeConstant = smoothing;\n fftBins = new Float32Array(analyser.frequencyBinCount);\n\n if (stream.jquery) stream = stream[0];\n if (stream instanceof HTMLAudioElement || stream instanceof HTMLVideoElement) {\n //Audio Tag\n sourceNode = audioContext.createMediaElementSource(stream);\n if (typeof play === 'undefined') play = true;\n threshold = threshold || -50;\n } else {\n //WebRTC Stream\n sourceNode = audioContext.createMediaStreamSource(stream);\n threshold = threshold || -50;\n }\n\n sourceNode.connect(analyser);\n if (play) analyser.connect(audioContext.destination);\n\n harker.speaking = false;\n\n harker.setThreshold = function(t) {\n threshold = t;\n };\n\n harker.setInterval = function(i) {\n interval = i;\n };\n\n harker.stop = function() {\n running = false;\n harker.emit('volume_change', -100, threshold);\n if (harker.speaking) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n analyser.disconnect();\n sourceNode.disconnect();\n };\n harker.speakingHistory = [];\n for (var i = 0; i < history; i++) {\n harker.speakingHistory.push(0);\n }\n\n // Poll the analyser node to determine if speaking\n // and emit events if changed\n var looper = function() {\n setTimeout(function() {\n\n //check if stop has been called\n if(!running) {\n return;\n }\n\n var currentVolume = getMaxVolume(analyser, fftBins);\n\n harker.emit('volume_change', currentVolume, threshold);\n\n var history = 0;\n if (currentVolume > threshold && !harker.speaking) {\n // trigger quickly, short history\n for (var i = harker.speakingHistory.length - 3; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history >= 2) {\n harker.speaking = true;\n harker.emit('speaking');\n }\n } else if (currentVolume < threshold && harker.speaking) {\n for (var i = 0; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history == 0) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n }\n harker.speakingHistory.shift();\n harker.speakingHistory.push(0 + (currentVolume > threshold));\n\n looper();\n }, interval);\n };\n looper();\n\n\n return harker;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/hark/hark.js\n// module id = ../../../../openvidu-browser/node_modules/hark/hark.js\n// module chunks = main","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/inherits/inherits_browser.js\n// module id = ../../../../openvidu-browser/node_modules/inherits/inherits_browser.js\n// module chunks = main","/*!\r\n * @name JavaScript/NodeJS Merge v1.2.0\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\r\n\r\n;(function(isNode) {\r\n\r\n\t/**\r\n\t * Merge one or more objects \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tvar Public = function(clone) {\r\n\r\n\t\treturn merge(clone === true, false, arguments);\r\n\r\n\t}, publicName = 'merge';\r\n\r\n\t/**\r\n\t * Merge two or more objects recursively \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tPublic.recursive = function(clone) {\r\n\r\n\t\treturn merge(clone === true, true, arguments);\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Clone the input removing any reference\r\n\t * @param mixed input\r\n\t * @return mixed\r\n\t */\r\n\r\n\tPublic.clone = function(input) {\r\n\r\n\t\tvar output = input,\r\n\t\t\ttype = typeOf(input),\r\n\t\t\tindex, size;\r\n\r\n\t\tif (type === 'array') {\r\n\r\n\t\t\toutput = [];\r\n\t\t\tsize = input.length;\r\n\r\n\t\t\tfor (index=0;index 1) {\n url = parts[1];\n parts = parts[0].split(':');\n\n // add the output credential and username\n output.username = parts[0];\n output.credential = (input || {}).credential || parts[1] || '';\n }\n\n output.url = protocol + url;\n output.urls = [ output.url ];\n\n return output;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/normalice/index.js\n// module id = ../../../../openvidu-browser/node_modules/normalice/index.js\n// module chunks = main","/*\n * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar SDPUtils = require('sdp');\n\nfunction writeMediaSection(transceiver, caps, type, stream, dtlsRole) {\n var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);\n\n // Map ICE parameters (ufrag, pwd) to SDP.\n sdp += SDPUtils.writeIceParameters(\n transceiver.iceGatherer.getLocalParameters());\n\n // Map DTLS parameters to SDP.\n sdp += SDPUtils.writeDtlsParameters(\n transceiver.dtlsTransport.getLocalParameters(),\n type === 'offer' ? 'actpass' : dtlsRole || 'active');\n\n sdp += 'a=mid:' + transceiver.mid + '\\r\\n';\n\n if (transceiver.rtpSender && transceiver.rtpReceiver) {\n sdp += 'a=sendrecv\\r\\n';\n } else if (transceiver.rtpSender) {\n sdp += 'a=sendonly\\r\\n';\n } else if (transceiver.rtpReceiver) {\n sdp += 'a=recvonly\\r\\n';\n } else {\n sdp += 'a=inactive\\r\\n';\n }\n\n if (transceiver.rtpSender) {\n var trackId = transceiver.rtpSender._initialTrackId ||\n transceiver.rtpSender.track.id;\n transceiver.rtpSender._initialTrackId = trackId;\n // spec.\n var msid = 'msid:' + (stream ? stream.id : '-') + ' ' +\n trackId + '\\r\\n';\n sdp += 'a=' + msid;\n // for Chrome. Legacy should no longer be required.\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc +\n ' ' + msid;\n\n // RTX\n if (transceiver.sendEncodingParameters[0].rtx) {\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +\n ' ' + msid;\n sdp += 'a=ssrc-group:FID ' +\n transceiver.sendEncodingParameters[0].ssrc + ' ' +\n transceiver.sendEncodingParameters[0].rtx.ssrc +\n '\\r\\n';\n }\n }\n // FIXME: this should be written by writeRtpDescription.\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc +\n ' cname:' + SDPUtils.localCName + '\\r\\n';\n if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) {\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +\n ' cname:' + SDPUtils.localCName + '\\r\\n';\n }\n return sdp;\n}\n\n// Edge does not like\n// 1) stun: filtered after 14393 unless ?transport=udp is present\n// 2) turn: that does not have all of turn:host:port?transport=udp\n// 3) turn: with ipv6 addresses\n// 4) turn: occurring muliple times\nfunction filterIceServers(iceServers, edgeVersion) {\n var hasTurn = false;\n iceServers = JSON.parse(JSON.stringify(iceServers));\n return iceServers.filter(function(server) {\n if (server && (server.urls || server.url)) {\n var urls = server.urls || server.url;\n if (server.url && !server.urls) {\n console.warn('RTCIceServer.url is deprecated! Use urls instead.');\n }\n var isString = typeof urls === 'string';\n if (isString) {\n urls = [urls];\n }\n urls = urls.filter(function(url) {\n var validTurn = url.indexOf('turn:') === 0 &&\n url.indexOf('transport=udp') !== -1 &&\n url.indexOf('turn:[') === -1 &&\n !hasTurn;\n\n if (validTurn) {\n hasTurn = true;\n return true;\n }\n return url.indexOf('stun:') === 0 && edgeVersion >= 14393 &&\n url.indexOf('?transport=udp') === -1;\n });\n\n delete server.url;\n server.urls = isString ? urls[0] : urls;\n return !!urls.length;\n }\n });\n}\n\n// Determines the intersection of local and remote capabilities.\nfunction getCommonCapabilities(localCapabilities, remoteCapabilities) {\n var commonCapabilities = {\n codecs: [],\n headerExtensions: [],\n fecMechanisms: []\n };\n\n var findCodecByPayloadType = function(pt, codecs) {\n pt = parseInt(pt, 10);\n for (var i = 0; i < codecs.length; i++) {\n if (codecs[i].payloadType === pt ||\n codecs[i].preferredPayloadType === pt) {\n return codecs[i];\n }\n }\n };\n\n var rtxCapabilityMatches = function(lRtx, rRtx, lCodecs, rCodecs) {\n var lCodec = findCodecByPayloadType(lRtx.parameters.apt, lCodecs);\n var rCodec = findCodecByPayloadType(rRtx.parameters.apt, rCodecs);\n return lCodec && rCodec &&\n lCodec.name.toLowerCase() === rCodec.name.toLowerCase();\n };\n\n localCapabilities.codecs.forEach(function(lCodec) {\n for (var i = 0; i < remoteCapabilities.codecs.length; i++) {\n var rCodec = remoteCapabilities.codecs[i];\n if (lCodec.name.toLowerCase() === rCodec.name.toLowerCase() &&\n lCodec.clockRate === rCodec.clockRate) {\n if (lCodec.name.toLowerCase() === 'rtx' &&\n lCodec.parameters && rCodec.parameters.apt) {\n // for RTX we need to find the local rtx that has a apt\n // which points to the same local codec as the remote one.\n if (!rtxCapabilityMatches(lCodec, rCodec,\n localCapabilities.codecs, remoteCapabilities.codecs)) {\n continue;\n }\n }\n rCodec = JSON.parse(JSON.stringify(rCodec)); // deepcopy\n // number of channels is the highest common number of channels\n rCodec.numChannels = Math.min(lCodec.numChannels,\n rCodec.numChannels);\n // push rCodec so we reply with offerer payload type\n commonCapabilities.codecs.push(rCodec);\n\n // determine common feedback mechanisms\n rCodec.rtcpFeedback = rCodec.rtcpFeedback.filter(function(fb) {\n for (var j = 0; j < lCodec.rtcpFeedback.length; j++) {\n if (lCodec.rtcpFeedback[j].type === fb.type &&\n lCodec.rtcpFeedback[j].parameter === fb.parameter) {\n return true;\n }\n }\n return false;\n });\n // FIXME: also need to determine .parameters\n // see https://github.com/openpeer/ortc/issues/569\n break;\n }\n }\n });\n\n localCapabilities.headerExtensions.forEach(function(lHeaderExtension) {\n for (var i = 0; i < remoteCapabilities.headerExtensions.length;\n i++) {\n var rHeaderExtension = remoteCapabilities.headerExtensions[i];\n if (lHeaderExtension.uri === rHeaderExtension.uri) {\n commonCapabilities.headerExtensions.push(rHeaderExtension);\n break;\n }\n }\n });\n\n // FIXME: fecMechanisms\n return commonCapabilities;\n}\n\n// is action=setLocalDescription with type allowed in signalingState\nfunction isActionAllowedInSignalingState(action, type, signalingState) {\n return {\n offer: {\n setLocalDescription: ['stable', 'have-local-offer'],\n setRemoteDescription: ['stable', 'have-remote-offer']\n },\n answer: {\n setLocalDescription: ['have-remote-offer', 'have-local-pranswer'],\n setRemoteDescription: ['have-local-offer', 'have-remote-pranswer']\n }\n }[type][action].indexOf(signalingState) !== -1;\n}\n\nfunction maybeAddCandidate(iceTransport, candidate) {\n // Edge's internal representation adds some fields therefore\n // not all fieldѕ are taken into account.\n var alreadyAdded = iceTransport.getRemoteCandidates()\n .find(function(remoteCandidate) {\n return candidate.foundation === remoteCandidate.foundation &&\n candidate.ip === remoteCandidate.ip &&\n candidate.port === remoteCandidate.port &&\n candidate.priority === remoteCandidate.priority &&\n candidate.protocol === remoteCandidate.protocol &&\n candidate.type === remoteCandidate.type;\n });\n if (!alreadyAdded) {\n iceTransport.addRemoteCandidate(candidate);\n }\n return !alreadyAdded;\n}\n\n\nfunction makeError(name, description) {\n var e = new Error(description);\n e.name = name;\n // legacy error codes from https://heycam.github.io/webidl/#idl-DOMException-error-names\n e.code = {\n NotSupportedError: 9,\n InvalidStateError: 11,\n InvalidAccessError: 15,\n TypeError: undefined,\n OperationError: undefined\n }[name];\n return e;\n}\n\nmodule.exports = function(window, edgeVersion) {\n // https://w3c.github.io/mediacapture-main/#mediastream\n // Helper function to add the track to the stream and\n // dispatch the event ourselves.\n function addTrackToStreamAndFireEvent(track, stream) {\n stream.addTrack(track);\n stream.dispatchEvent(new window.MediaStreamTrackEvent('addtrack',\n {track: track}));\n }\n\n function removeTrackFromStreamAndFireEvent(track, stream) {\n stream.removeTrack(track);\n stream.dispatchEvent(new window.MediaStreamTrackEvent('removetrack',\n {track: track}));\n }\n\n function fireAddTrack(pc, track, receiver, streams) {\n var trackEvent = new Event('track');\n trackEvent.track = track;\n trackEvent.receiver = receiver;\n trackEvent.transceiver = {receiver: receiver};\n trackEvent.streams = streams;\n window.setTimeout(function() {\n pc._dispatchEvent('track', trackEvent);\n });\n }\n\n var RTCPeerConnection = function(config) {\n var pc = this;\n\n var _eventTarget = document.createDocumentFragment();\n ['addEventListener', 'removeEventListener', 'dispatchEvent']\n .forEach(function(method) {\n pc[method] = _eventTarget[method].bind(_eventTarget);\n });\n\n this.canTrickleIceCandidates = null;\n\n this.needNegotiation = false;\n\n this.localStreams = [];\n this.remoteStreams = [];\n\n this.localDescription = null;\n this.remoteDescription = null;\n\n this.signalingState = 'stable';\n this.iceConnectionState = 'new';\n this.connectionState = 'new';\n this.iceGatheringState = 'new';\n\n config = JSON.parse(JSON.stringify(config || {}));\n\n this.usingBundle = config.bundlePolicy === 'max-bundle';\n if (config.rtcpMuxPolicy === 'negotiate') {\n throw(makeError('NotSupportedError',\n 'rtcpMuxPolicy \\'negotiate\\' is not supported'));\n } else if (!config.rtcpMuxPolicy) {\n config.rtcpMuxPolicy = 'require';\n }\n\n switch (config.iceTransportPolicy) {\n case 'all':\n case 'relay':\n break;\n default:\n config.iceTransportPolicy = 'all';\n break;\n }\n\n switch (config.bundlePolicy) {\n case 'balanced':\n case 'max-compat':\n case 'max-bundle':\n break;\n default:\n config.bundlePolicy = 'balanced';\n break;\n }\n\n config.iceServers = filterIceServers(config.iceServers || [], edgeVersion);\n\n this._iceGatherers = [];\n if (config.iceCandidatePoolSize) {\n for (var i = config.iceCandidatePoolSize; i > 0; i--) {\n this._iceGatherers.push(new window.RTCIceGatherer({\n iceServers: config.iceServers,\n gatherPolicy: config.iceTransportPolicy\n }));\n }\n } else {\n config.iceCandidatePoolSize = 0;\n }\n\n this._config = config;\n\n // per-track iceGathers, iceTransports, dtlsTransports, rtpSenders, ...\n // everything that is needed to describe a SDP m-line.\n this.transceivers = [];\n\n this._sdpSessionId = SDPUtils.generateSessionId();\n this._sdpSessionVersion = 0;\n\n this._dtlsRole = undefined; // role for a=setup to use in answers.\n\n this._isClosed = false;\n };\n\n // set up event handlers on prototype\n RTCPeerConnection.prototype.onicecandidate = null;\n RTCPeerConnection.prototype.onaddstream = null;\n RTCPeerConnection.prototype.ontrack = null;\n RTCPeerConnection.prototype.onremovestream = null;\n RTCPeerConnection.prototype.onsignalingstatechange = null;\n RTCPeerConnection.prototype.oniceconnectionstatechange = null;\n RTCPeerConnection.prototype.onconnectionstatechange = null;\n RTCPeerConnection.prototype.onicegatheringstatechange = null;\n RTCPeerConnection.prototype.onnegotiationneeded = null;\n RTCPeerConnection.prototype.ondatachannel = null;\n\n RTCPeerConnection.prototype._dispatchEvent = function(name, event) {\n if (this._isClosed) {\n return;\n }\n this.dispatchEvent(event);\n if (typeof this['on' + name] === 'function') {\n this['on' + name](event);\n }\n };\n\n RTCPeerConnection.prototype._emitGatheringStateChange = function() {\n var event = new Event('icegatheringstatechange');\n this._dispatchEvent('icegatheringstatechange', event);\n };\n\n RTCPeerConnection.prototype.getConfiguration = function() {\n return this._config;\n };\n\n RTCPeerConnection.prototype.getLocalStreams = function() {\n return this.localStreams;\n };\n\n RTCPeerConnection.prototype.getRemoteStreams = function() {\n return this.remoteStreams;\n };\n\n // internal helper to create a transceiver object.\n // (which is not yet the same as the WebRTC 1.0 transceiver)\n RTCPeerConnection.prototype._createTransceiver = function(kind, doNotAdd) {\n var hasBundleTransport = this.transceivers.length > 0;\n var transceiver = {\n track: null,\n iceGatherer: null,\n iceTransport: null,\n dtlsTransport: null,\n localCapabilities: null,\n remoteCapabilities: null,\n rtpSender: null,\n rtpReceiver: null,\n kind: kind,\n mid: null,\n sendEncodingParameters: null,\n recvEncodingParameters: null,\n stream: null,\n associatedRemoteMediaStreams: [],\n wantReceive: true\n };\n if (this.usingBundle && hasBundleTransport) {\n transceiver.iceTransport = this.transceivers[0].iceTransport;\n transceiver.dtlsTransport = this.transceivers[0].dtlsTransport;\n } else {\n var transports = this._createIceAndDtlsTransports();\n transceiver.iceTransport = transports.iceTransport;\n transceiver.dtlsTransport = transports.dtlsTransport;\n }\n if (!doNotAdd) {\n this.transceivers.push(transceiver);\n }\n return transceiver;\n };\n\n RTCPeerConnection.prototype.addTrack = function(track, stream) {\n if (this._isClosed) {\n throw makeError('InvalidStateError',\n 'Attempted to call addTrack on a closed peerconnection.');\n }\n\n var alreadyExists = this.transceivers.find(function(s) {\n return s.track === track;\n });\n\n if (alreadyExists) {\n throw makeError('InvalidAccessError', 'Track already exists.');\n }\n\n var transceiver;\n for (var i = 0; i < this.transceivers.length; i++) {\n if (!this.transceivers[i].track &&\n this.transceivers[i].kind === track.kind) {\n transceiver = this.transceivers[i];\n }\n }\n if (!transceiver) {\n transceiver = this._createTransceiver(track.kind);\n }\n\n this._maybeFireNegotiationNeeded();\n\n if (this.localStreams.indexOf(stream) === -1) {\n this.localStreams.push(stream);\n }\n\n transceiver.track = track;\n transceiver.stream = stream;\n transceiver.rtpSender = new window.RTCRtpSender(track,\n transceiver.dtlsTransport);\n return transceiver.rtpSender;\n };\n\n RTCPeerConnection.prototype.addStream = function(stream) {\n var pc = this;\n if (edgeVersion >= 15025) {\n stream.getTracks().forEach(function(track) {\n pc.addTrack(track, stream);\n });\n } else {\n // Clone is necessary for local demos mostly, attaching directly\n // to two different senders does not work (build 10547).\n // Fixed in 15025 (or earlier)\n var clonedStream = stream.clone();\n stream.getTracks().forEach(function(track, idx) {\n var clonedTrack = clonedStream.getTracks()[idx];\n track.addEventListener('enabled', function(event) {\n clonedTrack.enabled = event.enabled;\n });\n });\n clonedStream.getTracks().forEach(function(track) {\n pc.addTrack(track, clonedStream);\n });\n }\n };\n\n RTCPeerConnection.prototype.removeTrack = function(sender) {\n if (this._isClosed) {\n throw makeError('InvalidStateError',\n 'Attempted to call removeTrack on a closed peerconnection.');\n }\n\n if (!(sender instanceof window.RTCRtpSender)) {\n throw new TypeError('Argument 1 of RTCPeerConnection.removeTrack ' +\n 'does not implement interface RTCRtpSender.');\n }\n\n var transceiver = this.transceivers.find(function(t) {\n return t.rtpSender === sender;\n });\n\n if (!transceiver) {\n throw makeError('InvalidAccessError',\n 'Sender was not created by this connection.');\n }\n var stream = transceiver.stream;\n\n transceiver.rtpSender.stop();\n transceiver.rtpSender = null;\n transceiver.track = null;\n transceiver.stream = null;\n\n // remove the stream from the set of local streams\n var localStreams = this.transceivers.map(function(t) {\n return t.stream;\n });\n if (localStreams.indexOf(stream) === -1 &&\n this.localStreams.indexOf(stream) > -1) {\n this.localStreams.splice(this.localStreams.indexOf(stream), 1);\n }\n\n this._maybeFireNegotiationNeeded();\n };\n\n RTCPeerConnection.prototype.removeStream = function(stream) {\n var pc = this;\n stream.getTracks().forEach(function(track) {\n var sender = pc.getSenders().find(function(s) {\n return s.track === track;\n });\n if (sender) {\n pc.removeTrack(sender);\n }\n });\n };\n\n RTCPeerConnection.prototype.getSenders = function() {\n return this.transceivers.filter(function(transceiver) {\n return !!transceiver.rtpSender;\n })\n .map(function(transceiver) {\n return transceiver.rtpSender;\n });\n };\n\n RTCPeerConnection.prototype.getReceivers = function() {\n return this.transceivers.filter(function(transceiver) {\n return !!transceiver.rtpReceiver;\n })\n .map(function(transceiver) {\n return transceiver.rtpReceiver;\n });\n };\n\n\n RTCPeerConnection.prototype._createIceGatherer = function(sdpMLineIndex,\n usingBundle) {\n var pc = this;\n if (usingBundle && sdpMLineIndex > 0) {\n return this.transceivers[0].iceGatherer;\n } else if (this._iceGatherers.length) {\n return this._iceGatherers.shift();\n }\n var iceGatherer = new window.RTCIceGatherer({\n iceServers: this._config.iceServers,\n gatherPolicy: this._config.iceTransportPolicy\n });\n Object.defineProperty(iceGatherer, 'state',\n {value: 'new', writable: true}\n );\n\n this.transceivers[sdpMLineIndex].bufferedCandidateEvents = [];\n this.transceivers[sdpMLineIndex].bufferCandidates = function(event) {\n var end = !event.candidate || Object.keys(event.candidate).length === 0;\n // polyfill since RTCIceGatherer.state is not implemented in\n // Edge 10547 yet.\n iceGatherer.state = end ? 'completed' : 'gathering';\n if (pc.transceivers[sdpMLineIndex].bufferedCandidateEvents !== null) {\n pc.transceivers[sdpMLineIndex].bufferedCandidateEvents.push(event);\n }\n };\n iceGatherer.addEventListener('localcandidate',\n this.transceivers[sdpMLineIndex].bufferCandidates);\n return iceGatherer;\n };\n\n // start gathering from an RTCIceGatherer.\n RTCPeerConnection.prototype._gather = function(mid, sdpMLineIndex) {\n var pc = this;\n var iceGatherer = this.transceivers[sdpMLineIndex].iceGatherer;\n if (iceGatherer.onlocalcandidate) {\n return;\n }\n var bufferedCandidateEvents =\n this.transceivers[sdpMLineIndex].bufferedCandidateEvents;\n this.transceivers[sdpMLineIndex].bufferedCandidateEvents = null;\n iceGatherer.removeEventListener('localcandidate',\n this.transceivers[sdpMLineIndex].bufferCandidates);\n iceGatherer.onlocalcandidate = function(evt) {\n if (pc.usingBundle && sdpMLineIndex > 0) {\n // if we know that we use bundle we can drop candidates with\n // ѕdpMLineIndex > 0. If we don't do this then our state gets\n // confused since we dispose the extra ice gatherer.\n return;\n }\n var event = new Event('icecandidate');\n event.candidate = {sdpMid: mid, sdpMLineIndex: sdpMLineIndex};\n\n var cand = evt.candidate;\n // Edge emits an empty object for RTCIceCandidateComplete‥\n var end = !cand || Object.keys(cand).length === 0;\n if (end) {\n // polyfill since RTCIceGatherer.state is not implemented in\n // Edge 10547 yet.\n if (iceGatherer.state === 'new' || iceGatherer.state === 'gathering') {\n iceGatherer.state = 'completed';\n }\n } else {\n if (iceGatherer.state === 'new') {\n iceGatherer.state = 'gathering';\n }\n // RTCIceCandidate doesn't have a component, needs to be added\n cand.component = 1;\n var serializedCandidate = SDPUtils.writeCandidate(cand);\n event.candidate = Object.assign(event.candidate,\n SDPUtils.parseCandidate(serializedCandidate));\n event.candidate.candidate = serializedCandidate;\n }\n\n // update local description.\n var sections = SDPUtils.getMediaSections(pc.localDescription.sdp);\n if (!end) {\n sections[event.candidate.sdpMLineIndex] +=\n 'a=' + event.candidate.candidate + '\\r\\n';\n } else {\n sections[event.candidate.sdpMLineIndex] +=\n 'a=end-of-candidates\\r\\n';\n }\n pc.localDescription.sdp =\n SDPUtils.getDescription(pc.localDescription.sdp) +\n sections.join('');\n var complete = pc.transceivers.every(function(transceiver) {\n return transceiver.iceGatherer &&\n transceiver.iceGatherer.state === 'completed';\n });\n\n if (pc.iceGatheringState !== 'gathering') {\n pc.iceGatheringState = 'gathering';\n pc._emitGatheringStateChange();\n }\n\n // Emit candidate. Also emit null candidate when all gatherers are\n // complete.\n if (!end) {\n pc._dispatchEvent('icecandidate', event);\n }\n if (complete) {\n pc._dispatchEvent('icecandidate', new Event('icecandidate'));\n pc.iceGatheringState = 'complete';\n pc._emitGatheringStateChange();\n }\n };\n\n // emit already gathered candidates.\n window.setTimeout(function() {\n bufferedCandidateEvents.forEach(function(e) {\n iceGatherer.onlocalcandidate(e);\n });\n }, 0);\n };\n\n // Create ICE transport and DTLS transport.\n RTCPeerConnection.prototype._createIceAndDtlsTransports = function() {\n var pc = this;\n var iceTransport = new window.RTCIceTransport(null);\n iceTransport.onicestatechange = function() {\n pc._updateIceConnectionState();\n pc._updateConnectionState();\n };\n\n var dtlsTransport = new window.RTCDtlsTransport(iceTransport);\n dtlsTransport.ondtlsstatechange = function() {\n pc._updateConnectionState();\n };\n dtlsTransport.onerror = function() {\n // onerror does not set state to failed by itself.\n Object.defineProperty(dtlsTransport, 'state',\n {value: 'failed', writable: true});\n pc._updateConnectionState();\n };\n\n return {\n iceTransport: iceTransport,\n dtlsTransport: dtlsTransport\n };\n };\n\n // Destroy ICE gatherer, ICE transport and DTLS transport.\n // Without triggering the callbacks.\n RTCPeerConnection.prototype._disposeIceAndDtlsTransports = function(\n sdpMLineIndex) {\n var iceGatherer = this.transceivers[sdpMLineIndex].iceGatherer;\n if (iceGatherer) {\n delete iceGatherer.onlocalcandidate;\n delete this.transceivers[sdpMLineIndex].iceGatherer;\n }\n var iceTransport = this.transceivers[sdpMLineIndex].iceTransport;\n if (iceTransport) {\n delete iceTransport.onicestatechange;\n delete this.transceivers[sdpMLineIndex].iceTransport;\n }\n var dtlsTransport = this.transceivers[sdpMLineIndex].dtlsTransport;\n if (dtlsTransport) {\n delete dtlsTransport.ondtlsstatechange;\n delete dtlsTransport.onerror;\n delete this.transceivers[sdpMLineIndex].dtlsTransport;\n }\n };\n\n // Start the RTP Sender and Receiver for a transceiver.\n RTCPeerConnection.prototype._transceive = function(transceiver,\n send, recv) {\n var params = getCommonCapabilities(transceiver.localCapabilities,\n transceiver.remoteCapabilities);\n if (send && transceiver.rtpSender) {\n params.encodings = transceiver.sendEncodingParameters;\n params.rtcp = {\n cname: SDPUtils.localCName,\n compound: transceiver.rtcpParameters.compound\n };\n if (transceiver.recvEncodingParameters.length) {\n params.rtcp.ssrc = transceiver.recvEncodingParameters[0].ssrc;\n }\n transceiver.rtpSender.send(params);\n }\n if (recv && transceiver.rtpReceiver && params.codecs.length > 0) {\n // remove RTX field in Edge 14942\n if (transceiver.kind === 'video'\n && transceiver.recvEncodingParameters\n && edgeVersion < 15019) {\n transceiver.recvEncodingParameters.forEach(function(p) {\n delete p.rtx;\n });\n }\n if (transceiver.recvEncodingParameters.length) {\n params.encodings = transceiver.recvEncodingParameters;\n } else {\n params.encodings = [{}];\n }\n params.rtcp = {\n compound: transceiver.rtcpParameters.compound\n };\n if (transceiver.rtcpParameters.cname) {\n params.rtcp.cname = transceiver.rtcpParameters.cname;\n }\n if (transceiver.sendEncodingParameters.length) {\n params.rtcp.ssrc = transceiver.sendEncodingParameters[0].ssrc;\n }\n transceiver.rtpReceiver.receive(params);\n }\n };\n\n RTCPeerConnection.prototype.setLocalDescription = function(description) {\n var pc = this;\n\n // Note: pranswer is not supported.\n if (['offer', 'answer'].indexOf(description.type) === -1) {\n return Promise.reject(makeError('TypeError',\n 'Unsupported type \"' + description.type + '\"'));\n }\n\n if (!isActionAllowedInSignalingState('setLocalDescription',\n description.type, pc.signalingState) || pc._isClosed) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not set local ' + description.type +\n ' in state ' + pc.signalingState));\n }\n\n var sections;\n var sessionpart;\n if (description.type === 'offer') {\n // VERY limited support for SDP munging. Limited to:\n // * changing the order of codecs\n sections = SDPUtils.splitSections(description.sdp);\n sessionpart = sections.shift();\n sections.forEach(function(mediaSection, sdpMLineIndex) {\n var caps = SDPUtils.parseRtpParameters(mediaSection);\n pc.transceivers[sdpMLineIndex].localCapabilities = caps;\n });\n\n pc.transceivers.forEach(function(transceiver, sdpMLineIndex) {\n pc._gather(transceiver.mid, sdpMLineIndex);\n });\n } else if (description.type === 'answer') {\n sections = SDPUtils.splitSections(pc.remoteDescription.sdp);\n sessionpart = sections.shift();\n var isIceLite = SDPUtils.matchPrefix(sessionpart,\n 'a=ice-lite').length > 0;\n sections.forEach(function(mediaSection, sdpMLineIndex) {\n var transceiver = pc.transceivers[sdpMLineIndex];\n var iceGatherer = transceiver.iceGatherer;\n var iceTransport = transceiver.iceTransport;\n var dtlsTransport = transceiver.dtlsTransport;\n var localCapabilities = transceiver.localCapabilities;\n var remoteCapabilities = transceiver.remoteCapabilities;\n\n // treat bundle-only as not-rejected.\n var rejected = SDPUtils.isRejected(mediaSection) &&\n SDPUtils.matchPrefix(mediaSection, 'a=bundle-only').length === 0;\n\n if (!rejected && !transceiver.rejected) {\n var remoteIceParameters = SDPUtils.getIceParameters(\n mediaSection, sessionpart);\n var remoteDtlsParameters = SDPUtils.getDtlsParameters(\n mediaSection, sessionpart);\n if (isIceLite) {\n remoteDtlsParameters.role = 'server';\n }\n\n if (!pc.usingBundle || sdpMLineIndex === 0) {\n pc._gather(transceiver.mid, sdpMLineIndex);\n if (iceTransport.state === 'new') {\n iceTransport.start(iceGatherer, remoteIceParameters,\n isIceLite ? 'controlling' : 'controlled');\n }\n if (dtlsTransport.state === 'new') {\n dtlsTransport.start(remoteDtlsParameters);\n }\n }\n\n // Calculate intersection of capabilities.\n var params = getCommonCapabilities(localCapabilities,\n remoteCapabilities);\n\n // Start the RTCRtpSender. The RTCRtpReceiver for this\n // transceiver has already been started in setRemoteDescription.\n pc._transceive(transceiver,\n params.codecs.length > 0,\n false);\n }\n });\n }\n\n pc.localDescription = {\n type: description.type,\n sdp: description.sdp\n };\n if (description.type === 'offer') {\n pc._updateSignalingState('have-local-offer');\n } else {\n pc._updateSignalingState('stable');\n }\n\n return Promise.resolve();\n };\n\n RTCPeerConnection.prototype.setRemoteDescription = function(description) {\n var pc = this;\n\n // Note: pranswer is not supported.\n if (['offer', 'answer'].indexOf(description.type) === -1) {\n return Promise.reject(makeError('TypeError',\n 'Unsupported type \"' + description.type + '\"'));\n }\n\n if (!isActionAllowedInSignalingState('setRemoteDescription',\n description.type, pc.signalingState) || pc._isClosed) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not set remote ' + description.type +\n ' in state ' + pc.signalingState));\n }\n\n var streams = {};\n pc.remoteStreams.forEach(function(stream) {\n streams[stream.id] = stream;\n });\n var receiverList = [];\n var sections = SDPUtils.splitSections(description.sdp);\n var sessionpart = sections.shift();\n var isIceLite = SDPUtils.matchPrefix(sessionpart,\n 'a=ice-lite').length > 0;\n var usingBundle = SDPUtils.matchPrefix(sessionpart,\n 'a=group:BUNDLE ').length > 0;\n pc.usingBundle = usingBundle;\n var iceOptions = SDPUtils.matchPrefix(sessionpart,\n 'a=ice-options:')[0];\n if (iceOptions) {\n pc.canTrickleIceCandidates = iceOptions.substr(14).split(' ')\n .indexOf('trickle') >= 0;\n } else {\n pc.canTrickleIceCandidates = false;\n }\n\n sections.forEach(function(mediaSection, sdpMLineIndex) {\n var lines = SDPUtils.splitLines(mediaSection);\n var kind = SDPUtils.getKind(mediaSection);\n // treat bundle-only as not-rejected.\n var rejected = SDPUtils.isRejected(mediaSection) &&\n SDPUtils.matchPrefix(mediaSection, 'a=bundle-only').length === 0;\n var protocol = lines[0].substr(2).split(' ')[2];\n\n var direction = SDPUtils.getDirection(mediaSection, sessionpart);\n var remoteMsid = SDPUtils.parseMsid(mediaSection);\n\n var mid = SDPUtils.getMid(mediaSection) || SDPUtils.generateIdentifier();\n\n // Reject datachannels which are not implemented yet.\n if ((kind === 'application' && protocol === 'DTLS/SCTP') || rejected) {\n // TODO: this is dangerous in the case where a non-rejected m-line\n // becomes rejected.\n pc.transceivers[sdpMLineIndex] = {\n mid: mid,\n kind: kind,\n rejected: true\n };\n return;\n }\n\n if (!rejected && pc.transceivers[sdpMLineIndex] &&\n pc.transceivers[sdpMLineIndex].rejected) {\n // recycle a rejected transceiver.\n pc.transceivers[sdpMLineIndex] = pc._createTransceiver(kind, true);\n }\n\n var transceiver;\n var iceGatherer;\n var iceTransport;\n var dtlsTransport;\n var rtpReceiver;\n var sendEncodingParameters;\n var recvEncodingParameters;\n var localCapabilities;\n\n var track;\n // FIXME: ensure the mediaSection has rtcp-mux set.\n var remoteCapabilities = SDPUtils.parseRtpParameters(mediaSection);\n var remoteIceParameters;\n var remoteDtlsParameters;\n if (!rejected) {\n remoteIceParameters = SDPUtils.getIceParameters(mediaSection,\n sessionpart);\n remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection,\n sessionpart);\n remoteDtlsParameters.role = 'client';\n }\n recvEncodingParameters =\n SDPUtils.parseRtpEncodingParameters(mediaSection);\n\n var rtcpParameters = SDPUtils.parseRtcpParameters(mediaSection);\n\n var isComplete = SDPUtils.matchPrefix(mediaSection,\n 'a=end-of-candidates', sessionpart).length > 0;\n var cands = SDPUtils.matchPrefix(mediaSection, 'a=candidate:')\n .map(function(cand) {\n return SDPUtils.parseCandidate(cand);\n })\n .filter(function(cand) {\n return cand.component === 1;\n });\n\n // Check if we can use BUNDLE and dispose transports.\n if ((description.type === 'offer' || description.type === 'answer') &&\n !rejected && usingBundle && sdpMLineIndex > 0 &&\n pc.transceivers[sdpMLineIndex]) {\n pc._disposeIceAndDtlsTransports(sdpMLineIndex);\n pc.transceivers[sdpMLineIndex].iceGatherer =\n pc.transceivers[0].iceGatherer;\n pc.transceivers[sdpMLineIndex].iceTransport =\n pc.transceivers[0].iceTransport;\n pc.transceivers[sdpMLineIndex].dtlsTransport =\n pc.transceivers[0].dtlsTransport;\n if (pc.transceivers[sdpMLineIndex].rtpSender) {\n pc.transceivers[sdpMLineIndex].rtpSender.setTransport(\n pc.transceivers[0].dtlsTransport);\n }\n if (pc.transceivers[sdpMLineIndex].rtpReceiver) {\n pc.transceivers[sdpMLineIndex].rtpReceiver.setTransport(\n pc.transceivers[0].dtlsTransport);\n }\n }\n if (description.type === 'offer' && !rejected) {\n transceiver = pc.transceivers[sdpMLineIndex] ||\n pc._createTransceiver(kind);\n transceiver.mid = mid;\n\n if (!transceiver.iceGatherer) {\n transceiver.iceGatherer = pc._createIceGatherer(sdpMLineIndex,\n usingBundle);\n }\n\n if (cands.length && transceiver.iceTransport.state === 'new') {\n if (isComplete && (!usingBundle || sdpMLineIndex === 0)) {\n transceiver.iceTransport.setRemoteCandidates(cands);\n } else {\n cands.forEach(function(candidate) {\n maybeAddCandidate(transceiver.iceTransport, candidate);\n });\n }\n }\n\n localCapabilities = window.RTCRtpReceiver.getCapabilities(kind);\n\n // filter RTX until additional stuff needed for RTX is implemented\n // in adapter.js\n if (edgeVersion < 15019) {\n localCapabilities.codecs = localCapabilities.codecs.filter(\n function(codec) {\n return codec.name !== 'rtx';\n });\n }\n\n sendEncodingParameters = transceiver.sendEncodingParameters || [{\n ssrc: (2 * sdpMLineIndex + 2) * 1001\n }];\n\n // TODO: rewrite to use http://w3c.github.io/webrtc-pc/#set-associated-remote-streams\n var isNewTrack = false;\n if (direction === 'sendrecv' || direction === 'sendonly') {\n isNewTrack = !transceiver.rtpReceiver;\n rtpReceiver = transceiver.rtpReceiver ||\n new window.RTCRtpReceiver(transceiver.dtlsTransport, kind);\n\n if (isNewTrack) {\n var stream;\n track = rtpReceiver.track;\n // FIXME: does not work with Plan B.\n if (remoteMsid && remoteMsid.stream === '-') {\n // no-op. a stream id of '-' means: no associated stream.\n } else if (remoteMsid) {\n if (!streams[remoteMsid.stream]) {\n streams[remoteMsid.stream] = new window.MediaStream();\n Object.defineProperty(streams[remoteMsid.stream], 'id', {\n get: function() {\n return remoteMsid.stream;\n }\n });\n }\n Object.defineProperty(track, 'id', {\n get: function() {\n return remoteMsid.track;\n }\n });\n stream = streams[remoteMsid.stream];\n } else {\n if (!streams.default) {\n streams.default = new window.MediaStream();\n }\n stream = streams.default;\n }\n if (stream) {\n addTrackToStreamAndFireEvent(track, stream);\n transceiver.associatedRemoteMediaStreams.push(stream);\n }\n receiverList.push([track, rtpReceiver, stream]);\n }\n } else if (transceiver.rtpReceiver && transceiver.rtpReceiver.track) {\n transceiver.associatedRemoteMediaStreams.forEach(function(s) {\n var nativeTrack = s.getTracks().find(function(t) {\n return t.id === transceiver.rtpReceiver.track.id;\n });\n if (nativeTrack) {\n removeTrackFromStreamAndFireEvent(nativeTrack, s);\n }\n });\n transceiver.associatedRemoteMediaStreams = [];\n }\n\n transceiver.localCapabilities = localCapabilities;\n transceiver.remoteCapabilities = remoteCapabilities;\n transceiver.rtpReceiver = rtpReceiver;\n transceiver.rtcpParameters = rtcpParameters;\n transceiver.sendEncodingParameters = sendEncodingParameters;\n transceiver.recvEncodingParameters = recvEncodingParameters;\n\n // Start the RTCRtpReceiver now. The RTPSender is started in\n // setLocalDescription.\n pc._transceive(pc.transceivers[sdpMLineIndex],\n false,\n isNewTrack);\n } else if (description.type === 'answer' && !rejected) {\n transceiver = pc.transceivers[sdpMLineIndex];\n iceGatherer = transceiver.iceGatherer;\n iceTransport = transceiver.iceTransport;\n dtlsTransport = transceiver.dtlsTransport;\n rtpReceiver = transceiver.rtpReceiver;\n sendEncodingParameters = transceiver.sendEncodingParameters;\n localCapabilities = transceiver.localCapabilities;\n\n pc.transceivers[sdpMLineIndex].recvEncodingParameters =\n recvEncodingParameters;\n pc.transceivers[sdpMLineIndex].remoteCapabilities =\n remoteCapabilities;\n pc.transceivers[sdpMLineIndex].rtcpParameters = rtcpParameters;\n\n if (cands.length && iceTransport.state === 'new') {\n if ((isIceLite || isComplete) &&\n (!usingBundle || sdpMLineIndex === 0)) {\n iceTransport.setRemoteCandidates(cands);\n } else {\n cands.forEach(function(candidate) {\n maybeAddCandidate(transceiver.iceTransport, candidate);\n });\n }\n }\n\n if (!usingBundle || sdpMLineIndex === 0) {\n if (iceTransport.state === 'new') {\n iceTransport.start(iceGatherer, remoteIceParameters,\n 'controlling');\n }\n if (dtlsTransport.state === 'new') {\n dtlsTransport.start(remoteDtlsParameters);\n }\n }\n\n pc._transceive(transceiver,\n direction === 'sendrecv' || direction === 'recvonly',\n direction === 'sendrecv' || direction === 'sendonly');\n\n // TODO: rewrite to use http://w3c.github.io/webrtc-pc/#set-associated-remote-streams\n if (rtpReceiver &&\n (direction === 'sendrecv' || direction === 'sendonly')) {\n track = rtpReceiver.track;\n if (remoteMsid) {\n if (!streams[remoteMsid.stream]) {\n streams[remoteMsid.stream] = new window.MediaStream();\n }\n addTrackToStreamAndFireEvent(track, streams[remoteMsid.stream]);\n receiverList.push([track, rtpReceiver, streams[remoteMsid.stream]]);\n } else {\n if (!streams.default) {\n streams.default = new window.MediaStream();\n }\n addTrackToStreamAndFireEvent(track, streams.default);\n receiverList.push([track, rtpReceiver, streams.default]);\n }\n } else {\n // FIXME: actually the receiver should be created later.\n delete transceiver.rtpReceiver;\n }\n }\n });\n\n if (pc._dtlsRole === undefined) {\n pc._dtlsRole = description.type === 'offer' ? 'active' : 'passive';\n }\n\n pc.remoteDescription = {\n type: description.type,\n sdp: description.sdp\n };\n if (description.type === 'offer') {\n pc._updateSignalingState('have-remote-offer');\n } else {\n pc._updateSignalingState('stable');\n }\n Object.keys(streams).forEach(function(sid) {\n var stream = streams[sid];\n if (stream.getTracks().length) {\n if (pc.remoteStreams.indexOf(stream) === -1) {\n pc.remoteStreams.push(stream);\n var event = new Event('addstream');\n event.stream = stream;\n window.setTimeout(function() {\n pc._dispatchEvent('addstream', event);\n });\n }\n\n receiverList.forEach(function(item) {\n var track = item[0];\n var receiver = item[1];\n if (stream.id !== item[2].id) {\n return;\n }\n fireAddTrack(pc, track, receiver, [stream]);\n });\n }\n });\n receiverList.forEach(function(item) {\n if (item[2]) {\n return;\n }\n fireAddTrack(pc, item[0], item[1], []);\n });\n\n // check whether addIceCandidate({}) was called within four seconds after\n // setRemoteDescription.\n window.setTimeout(function() {\n if (!(pc && pc.transceivers)) {\n return;\n }\n pc.transceivers.forEach(function(transceiver) {\n if (transceiver.iceTransport &&\n transceiver.iceTransport.state === 'new' &&\n transceiver.iceTransport.getRemoteCandidates().length > 0) {\n console.warn('Timeout for addRemoteCandidate. Consider sending ' +\n 'an end-of-candidates notification');\n transceiver.iceTransport.addRemoteCandidate({});\n }\n });\n }, 4000);\n\n return Promise.resolve();\n };\n\n RTCPeerConnection.prototype.close = function() {\n this.transceivers.forEach(function(transceiver) {\n /* not yet\n if (transceiver.iceGatherer) {\n transceiver.iceGatherer.close();\n }\n */\n if (transceiver.iceTransport) {\n transceiver.iceTransport.stop();\n }\n if (transceiver.dtlsTransport) {\n transceiver.dtlsTransport.stop();\n }\n if (transceiver.rtpSender) {\n transceiver.rtpSender.stop();\n }\n if (transceiver.rtpReceiver) {\n transceiver.rtpReceiver.stop();\n }\n });\n // FIXME: clean up tracks, local streams, remote streams, etc\n this._isClosed = true;\n this._updateSignalingState('closed');\n };\n\n // Update the signaling state.\n RTCPeerConnection.prototype._updateSignalingState = function(newState) {\n this.signalingState = newState;\n var event = new Event('signalingstatechange');\n this._dispatchEvent('signalingstatechange', event);\n };\n\n // Determine whether to fire the negotiationneeded event.\n RTCPeerConnection.prototype._maybeFireNegotiationNeeded = function() {\n var pc = this;\n if (this.signalingState !== 'stable' || this.needNegotiation === true) {\n return;\n }\n this.needNegotiation = true;\n window.setTimeout(function() {\n if (pc.needNegotiation) {\n pc.needNegotiation = false;\n var event = new Event('negotiationneeded');\n pc._dispatchEvent('negotiationneeded', event);\n }\n }, 0);\n };\n\n // Update the ice connection state.\n RTCPeerConnection.prototype._updateIceConnectionState = function() {\n var newState;\n var states = {\n 'new': 0,\n closed: 0,\n checking: 0,\n connected: 0,\n completed: 0,\n disconnected: 0,\n failed: 0\n };\n this.transceivers.forEach(function(transceiver) {\n states[transceiver.iceTransport.state]++;\n });\n\n newState = 'new';\n if (states.failed > 0) {\n newState = 'failed';\n } else if (states.checking > 0) {\n newState = 'checking';\n } else if (states.disconnected > 0) {\n newState = 'disconnected';\n } else if (states.new > 0) {\n newState = 'new';\n } else if (states.connected > 0) {\n newState = 'connected';\n } else if (states.completed > 0) {\n newState = 'completed';\n }\n\n if (newState !== this.iceConnectionState) {\n this.iceConnectionState = newState;\n var event = new Event('iceconnectionstatechange');\n this._dispatchEvent('iceconnectionstatechange', event);\n }\n };\n\n // Update the connection state.\n RTCPeerConnection.prototype._updateConnectionState = function() {\n var newState;\n var states = {\n 'new': 0,\n closed: 0,\n connecting: 0,\n connected: 0,\n completed: 0,\n disconnected: 0,\n failed: 0\n };\n this.transceivers.forEach(function(transceiver) {\n states[transceiver.iceTransport.state]++;\n states[transceiver.dtlsTransport.state]++;\n });\n // ICETransport.completed and connected are the same for this purpose.\n states.connected += states.completed;\n\n newState = 'new';\n if (states.failed > 0) {\n newState = 'failed';\n } else if (states.connecting > 0) {\n newState = 'connecting';\n } else if (states.disconnected > 0) {\n newState = 'disconnected';\n } else if (states.new > 0) {\n newState = 'new';\n } else if (states.connected > 0) {\n newState = 'connected';\n }\n\n if (newState !== this.connectionState) {\n this.connectionState = newState;\n var event = new Event('connectionstatechange');\n this._dispatchEvent('connectionstatechange', event);\n }\n };\n\n RTCPeerConnection.prototype.createOffer = function() {\n var pc = this;\n\n if (pc._isClosed) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not call createOffer after close'));\n }\n\n var numAudioTracks = pc.transceivers.filter(function(t) {\n return t.kind === 'audio';\n }).length;\n var numVideoTracks = pc.transceivers.filter(function(t) {\n return t.kind === 'video';\n }).length;\n\n // Determine number of audio and video tracks we need to send/recv.\n var offerOptions = arguments[0];\n if (offerOptions) {\n // Reject Chrome legacy constraints.\n if (offerOptions.mandatory || offerOptions.optional) {\n throw new TypeError(\n 'Legacy mandatory/optional constraints not supported.');\n }\n if (offerOptions.offerToReceiveAudio !== undefined) {\n if (offerOptions.offerToReceiveAudio === true) {\n numAudioTracks = 1;\n } else if (offerOptions.offerToReceiveAudio === false) {\n numAudioTracks = 0;\n } else {\n numAudioTracks = offerOptions.offerToReceiveAudio;\n }\n }\n if (offerOptions.offerToReceiveVideo !== undefined) {\n if (offerOptions.offerToReceiveVideo === true) {\n numVideoTracks = 1;\n } else if (offerOptions.offerToReceiveVideo === false) {\n numVideoTracks = 0;\n } else {\n numVideoTracks = offerOptions.offerToReceiveVideo;\n }\n }\n }\n\n pc.transceivers.forEach(function(transceiver) {\n if (transceiver.kind === 'audio') {\n numAudioTracks--;\n if (numAudioTracks < 0) {\n transceiver.wantReceive = false;\n }\n } else if (transceiver.kind === 'video') {\n numVideoTracks--;\n if (numVideoTracks < 0) {\n transceiver.wantReceive = false;\n }\n }\n });\n\n // Create M-lines for recvonly streams.\n while (numAudioTracks > 0 || numVideoTracks > 0) {\n if (numAudioTracks > 0) {\n pc._createTransceiver('audio');\n numAudioTracks--;\n }\n if (numVideoTracks > 0) {\n pc._createTransceiver('video');\n numVideoTracks--;\n }\n }\n\n var sdp = SDPUtils.writeSessionBoilerplate(pc._sdpSessionId,\n pc._sdpSessionVersion++);\n pc.transceivers.forEach(function(transceiver, sdpMLineIndex) {\n // For each track, create an ice gatherer, ice transport,\n // dtls transport, potentially rtpsender and rtpreceiver.\n var track = transceiver.track;\n var kind = transceiver.kind;\n var mid = transceiver.mid || SDPUtils.generateIdentifier();\n transceiver.mid = mid;\n\n if (!transceiver.iceGatherer) {\n transceiver.iceGatherer = pc._createIceGatherer(sdpMLineIndex,\n pc.usingBundle);\n }\n\n var localCapabilities = window.RTCRtpSender.getCapabilities(kind);\n // filter RTX until additional stuff needed for RTX is implemented\n // in adapter.js\n if (edgeVersion < 15019) {\n localCapabilities.codecs = localCapabilities.codecs.filter(\n function(codec) {\n return codec.name !== 'rtx';\n });\n }\n localCapabilities.codecs.forEach(function(codec) {\n // work around https://bugs.chromium.org/p/webrtc/issues/detail?id=6552\n // by adding level-asymmetry-allowed=1\n if (codec.name === 'H264' &&\n codec.parameters['level-asymmetry-allowed'] === undefined) {\n codec.parameters['level-asymmetry-allowed'] = '1';\n }\n\n // for subsequent offers, we might have to re-use the payload\n // type of the last offer.\n if (transceiver.remoteCapabilities &&\n transceiver.remoteCapabilities.codecs) {\n transceiver.remoteCapabilities.codecs.forEach(function(remoteCodec) {\n if (codec.name.toLowerCase() === remoteCodec.name.toLowerCase() &&\n codec.clockRate === remoteCodec.clockRate) {\n codec.preferredPayloadType = remoteCodec.payloadType;\n }\n });\n }\n });\n localCapabilities.headerExtensions.forEach(function(hdrExt) {\n var remoteExtensions = transceiver.remoteCapabilities &&\n transceiver.remoteCapabilities.headerExtensions || [];\n remoteExtensions.forEach(function(rHdrExt) {\n if (hdrExt.uri === rHdrExt.uri) {\n hdrExt.id = rHdrExt.id;\n }\n });\n });\n\n // generate an ssrc now, to be used later in rtpSender.send\n var sendEncodingParameters = transceiver.sendEncodingParameters || [{\n ssrc: (2 * sdpMLineIndex + 1) * 1001\n }];\n if (track) {\n // add RTX\n if (edgeVersion >= 15019 && kind === 'video' &&\n !sendEncodingParameters[0].rtx) {\n sendEncodingParameters[0].rtx = {\n ssrc: sendEncodingParameters[0].ssrc + 1\n };\n }\n }\n\n if (transceiver.wantReceive) {\n transceiver.rtpReceiver = new window.RTCRtpReceiver(\n transceiver.dtlsTransport, kind);\n }\n\n transceiver.localCapabilities = localCapabilities;\n transceiver.sendEncodingParameters = sendEncodingParameters;\n });\n\n // always offer BUNDLE and dispose on return if not supported.\n if (pc._config.bundlePolicy !== 'max-compat') {\n sdp += 'a=group:BUNDLE ' + pc.transceivers.map(function(t) {\n return t.mid;\n }).join(' ') + '\\r\\n';\n }\n sdp += 'a=ice-options:trickle\\r\\n';\n\n pc.transceivers.forEach(function(transceiver, sdpMLineIndex) {\n sdp += writeMediaSection(transceiver, transceiver.localCapabilities,\n 'offer', transceiver.stream, pc._dtlsRole);\n sdp += 'a=rtcp-rsize\\r\\n';\n\n if (transceiver.iceGatherer && pc.iceGatheringState !== 'new' &&\n (sdpMLineIndex === 0 || !pc.usingBundle)) {\n transceiver.iceGatherer.getLocalCandidates().forEach(function(cand) {\n cand.component = 1;\n sdp += 'a=' + SDPUtils.writeCandidate(cand) + '\\r\\n';\n });\n\n if (transceiver.iceGatherer.state === 'completed') {\n sdp += 'a=end-of-candidates\\r\\n';\n }\n }\n });\n\n var desc = new window.RTCSessionDescription({\n type: 'offer',\n sdp: sdp\n });\n return Promise.resolve(desc);\n };\n\n RTCPeerConnection.prototype.createAnswer = function() {\n var pc = this;\n\n if (pc._isClosed) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not call createAnswer after close'));\n }\n\n if (!(pc.signalingState === 'have-remote-offer' ||\n pc.signalingState === 'have-local-pranswer')) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not call createAnswer in signalingState ' + pc.signalingState));\n }\n\n var sdp = SDPUtils.writeSessionBoilerplate(pc._sdpSessionId,\n pc._sdpSessionVersion++);\n if (pc.usingBundle) {\n sdp += 'a=group:BUNDLE ' + pc.transceivers.map(function(t) {\n return t.mid;\n }).join(' ') + '\\r\\n';\n }\n var mediaSectionsInOffer = SDPUtils.getMediaSections(\n pc.remoteDescription.sdp).length;\n pc.transceivers.forEach(function(transceiver, sdpMLineIndex) {\n if (sdpMLineIndex + 1 > mediaSectionsInOffer) {\n return;\n }\n if (transceiver.rejected) {\n if (transceiver.kind === 'application') {\n sdp += 'm=application 0 DTLS/SCTP 5000\\r\\n';\n } else if (transceiver.kind === 'audio') {\n sdp += 'm=audio 0 UDP/TLS/RTP/SAVPF 0\\r\\n' +\n 'a=rtpmap:0 PCMU/8000\\r\\n';\n } else if (transceiver.kind === 'video') {\n sdp += 'm=video 0 UDP/TLS/RTP/SAVPF 120\\r\\n' +\n 'a=rtpmap:120 VP8/90000\\r\\n';\n }\n sdp += 'c=IN IP4 0.0.0.0\\r\\n' +\n 'a=inactive\\r\\n' +\n 'a=mid:' + transceiver.mid + '\\r\\n';\n return;\n }\n\n // FIXME: look at direction.\n if (transceiver.stream) {\n var localTrack;\n if (transceiver.kind === 'audio') {\n localTrack = transceiver.stream.getAudioTracks()[0];\n } else if (transceiver.kind === 'video') {\n localTrack = transceiver.stream.getVideoTracks()[0];\n }\n if (localTrack) {\n // add RTX\n if (edgeVersion >= 15019 && transceiver.kind === 'video' &&\n !transceiver.sendEncodingParameters[0].rtx) {\n transceiver.sendEncodingParameters[0].rtx = {\n ssrc: transceiver.sendEncodingParameters[0].ssrc + 1\n };\n }\n }\n }\n\n // Calculate intersection of capabilities.\n var commonCapabilities = getCommonCapabilities(\n transceiver.localCapabilities,\n transceiver.remoteCapabilities);\n\n var hasRtx = commonCapabilities.codecs.filter(function(c) {\n return c.name.toLowerCase() === 'rtx';\n }).length;\n if (!hasRtx && transceiver.sendEncodingParameters[0].rtx) {\n delete transceiver.sendEncodingParameters[0].rtx;\n }\n\n sdp += writeMediaSection(transceiver, commonCapabilities,\n 'answer', transceiver.stream, pc._dtlsRole);\n if (transceiver.rtcpParameters &&\n transceiver.rtcpParameters.reducedSize) {\n sdp += 'a=rtcp-rsize\\r\\n';\n }\n });\n\n var desc = new window.RTCSessionDescription({\n type: 'answer',\n sdp: sdp\n });\n return Promise.resolve(desc);\n };\n\n RTCPeerConnection.prototype.addIceCandidate = function(candidate) {\n var pc = this;\n var sections;\n if (candidate && !(candidate.sdpMLineIndex !== undefined ||\n candidate.sdpMid)) {\n return Promise.reject(new TypeError('sdpMLineIndex or sdpMid required'));\n }\n\n // TODO: needs to go into ops queue.\n return new Promise(function(resolve, reject) {\n if (!pc.remoteDescription) {\n return reject(makeError('InvalidStateError',\n 'Can not add ICE candidate without a remote description'));\n } else if (!candidate || candidate.candidate === '') {\n for (var j = 0; j < pc.transceivers.length; j++) {\n if (pc.transceivers[j].rejected) {\n continue;\n }\n pc.transceivers[j].iceTransport.addRemoteCandidate({});\n sections = SDPUtils.getMediaSections(pc.remoteDescription.sdp);\n sections[j] += 'a=end-of-candidates\\r\\n';\n pc.remoteDescription.sdp =\n SDPUtils.getDescription(pc.remoteDescription.sdp) +\n sections.join('');\n if (pc.usingBundle) {\n break;\n }\n }\n } else {\n var sdpMLineIndex = candidate.sdpMLineIndex;\n if (candidate.sdpMid) {\n for (var i = 0; i < pc.transceivers.length; i++) {\n if (pc.transceivers[i].mid === candidate.sdpMid) {\n sdpMLineIndex = i;\n break;\n }\n }\n }\n var transceiver = pc.transceivers[sdpMLineIndex];\n if (transceiver) {\n if (transceiver.rejected) {\n return resolve();\n }\n var cand = Object.keys(candidate.candidate).length > 0 ?\n SDPUtils.parseCandidate(candidate.candidate) : {};\n // Ignore Chrome's invalid candidates since Edge does not like them.\n if (cand.protocol === 'tcp' && (cand.port === 0 || cand.port === 9)) {\n return resolve();\n }\n // Ignore RTCP candidates, we assume RTCP-MUX.\n if (cand.component && cand.component !== 1) {\n return resolve();\n }\n // when using bundle, avoid adding candidates to the wrong\n // ice transport. And avoid adding candidates added in the SDP.\n if (sdpMLineIndex === 0 || (sdpMLineIndex > 0 &&\n transceiver.iceTransport !== pc.transceivers[0].iceTransport)) {\n if (!maybeAddCandidate(transceiver.iceTransport, cand)) {\n return reject(makeError('OperationError',\n 'Can not add ICE candidate'));\n }\n }\n\n // update the remoteDescription.\n var candidateString = candidate.candidate.trim();\n if (candidateString.indexOf('a=') === 0) {\n candidateString = candidateString.substr(2);\n }\n sections = SDPUtils.getMediaSections(pc.remoteDescription.sdp);\n sections[sdpMLineIndex] += 'a=' +\n (cand.type ? candidateString : 'end-of-candidates')\n + '\\r\\n';\n pc.remoteDescription.sdp = sections.join('');\n } else {\n return reject(makeError('OperationError',\n 'Can not add ICE candidate'));\n }\n }\n resolve();\n });\n };\n\n RTCPeerConnection.prototype.getStats = function() {\n var promises = [];\n this.transceivers.forEach(function(transceiver) {\n ['rtpSender', 'rtpReceiver', 'iceGatherer', 'iceTransport',\n 'dtlsTransport'].forEach(function(method) {\n if (transceiver[method]) {\n promises.push(transceiver[method].getStats());\n }\n });\n });\n var fixStatsType = function(stat) {\n return {\n inboundrtp: 'inbound-rtp',\n outboundrtp: 'outbound-rtp',\n candidatepair: 'candidate-pair',\n localcandidate: 'local-candidate',\n remotecandidate: 'remote-candidate'\n }[stat.type] || stat.type;\n };\n return new Promise(function(resolve) {\n // shim getStats with maplike support\n var results = new Map();\n Promise.all(promises).then(function(res) {\n res.forEach(function(result) {\n Object.keys(result).forEach(function(id) {\n result[id].type = fixStatsType(result[id]);\n results.set(id, result[id]);\n });\n });\n resolve(results);\n });\n });\n };\n\n // legacy callback shims. Should be moved to adapter.js some days.\n var methods = ['createOffer', 'createAnswer'];\n methods.forEach(function(method) {\n var nativeMethod = RTCPeerConnection.prototype[method];\n RTCPeerConnection.prototype[method] = function() {\n var args = arguments;\n if (typeof args[0] === 'function' ||\n typeof args[1] === 'function') { // legacy\n return nativeMethod.apply(this, [arguments[2]])\n .then(function(description) {\n if (typeof args[0] === 'function') {\n args[0].apply(null, [description]);\n }\n }, function(error) {\n if (typeof args[1] === 'function') {\n args[1].apply(null, [error]);\n }\n });\n }\n return nativeMethod.apply(this, arguments);\n };\n });\n\n methods = ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'];\n methods.forEach(function(method) {\n var nativeMethod = RTCPeerConnection.prototype[method];\n RTCPeerConnection.prototype[method] = function() {\n var args = arguments;\n if (typeof args[1] === 'function' ||\n typeof args[2] === 'function') { // legacy\n return nativeMethod.apply(this, arguments)\n .then(function() {\n if (typeof args[1] === 'function') {\n args[1].apply(null);\n }\n }, function(error) {\n if (typeof args[2] === 'function') {\n args[2].apply(null, [error]);\n }\n });\n }\n return nativeMethod.apply(this, arguments);\n };\n });\n\n // getStats is special. It doesn't have a spec legacy method yet we support\n // getStats(something, cb) without error callbacks.\n ['getStats'].forEach(function(method) {\n var nativeMethod = RTCPeerConnection.prototype[method];\n RTCPeerConnection.prototype[method] = function() {\n var args = arguments;\n if (typeof args[1] === 'function') {\n return nativeMethod.apply(this, arguments)\n .then(function() {\n if (typeof args[1] === 'function') {\n args[1].apply(null);\n }\n });\n }\n return nativeMethod.apply(this, arguments);\n };\n });\n\n return RTCPeerConnection;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/rtcpeerconnection-shim/rtcpeerconnection.js\n// module id = ../../../../openvidu-browser/node_modules/rtcpeerconnection-shim/rtcpeerconnection.js\n// module chunks = main","var grammar = module.exports = {\n v: [{\n name: 'version',\n reg: /^(\\d*)$/\n }],\n o: [{ //o=- 20518 0 IN IP4 203.0.113.1\n // NB: sessionId will be a String in most cases because it is huge\n name: 'origin',\n reg: /^(\\S*) (\\d*) (\\d*) (\\S*) IP(\\d) (\\S*)/,\n names: ['username', 'sessionId', 'sessionVersion', 'netType', 'ipVer', 'address'],\n format: \"%s %s %d %s IP%d %s\"\n }],\n // default parsing of these only (though some of these feel outdated)\n s: [{ name: 'name' }],\n i: [{ name: 'description' }],\n u: [{ name: 'uri' }],\n e: [{ name: 'email' }],\n p: [{ name: 'phone' }],\n z: [{ name: 'timezones' }], // TODO: this one can actually be parsed properly..\n r: [{ name: 'repeats' }], // TODO: this one can also be parsed properly\n //k: [{}], // outdated thing ignored\n t: [{ //t=0 0\n name: 'timing',\n reg: /^(\\d*) (\\d*)/,\n names: ['start', 'stop'],\n format: \"%d %d\"\n }],\n c: [{ //c=IN IP4 10.47.197.26\n name: 'connection',\n reg: /^IN IP(\\d) (\\S*)/,\n names: ['version', 'ip'],\n format: \"IN IP%d %s\"\n }],\n b: [{ //b=AS:4000\n push: 'bandwidth',\n reg: /^(TIAS|AS|CT|RR|RS):(\\d*)/,\n names: ['type', 'limit'],\n format: \"%s:%s\"\n }],\n m: [{ //m=video 51744 RTP/AVP 126 97 98 34 31\n // NB: special - pushes to session\n // TODO: rtp/fmtp should be filtered by the payloads found here?\n reg: /^(\\w*) (\\d*) ([\\w\\/]*)(?: (.*))?/,\n names: ['type', 'port', 'protocol', 'payloads'],\n format: \"%s %d %s %s\"\n }],\n a: [\n { //a=rtpmap:110 opus/48000/2\n push: 'rtp',\n reg: /^rtpmap:(\\d*) ([\\w\\-]*)(?:\\s*\\/(\\d*)(?:\\s*\\/(\\S*))?)?/,\n names: ['payload', 'codec', 'rate', 'encoding'],\n format: function (o) {\n return (o.encoding) ?\n \"rtpmap:%d %s/%s/%s\":\n o.rate ?\n \"rtpmap:%d %s/%s\":\n \"rtpmap:%d %s\";\n }\n },\n {\n //a=fmtp:108 profile-level-id=24;object=23;bitrate=64000\n //a=fmtp:111 minptime=10; useinbandfec=1\n push: 'fmtp',\n reg: /^fmtp:(\\d*) ([\\S| ]*)/,\n names: ['payload', 'config'],\n format: \"fmtp:%d %s\"\n },\n { //a=control:streamid=0\n name: 'control',\n reg: /^control:(.*)/,\n format: \"control:%s\"\n },\n { //a=rtcp:65179 IN IP4 193.84.77.194\n name: 'rtcp',\n reg: /^rtcp:(\\d*)(?: (\\S*) IP(\\d) (\\S*))?/,\n names: ['port', 'netType', 'ipVer', 'address'],\n format: function (o) {\n return (o.address != null) ?\n \"rtcp:%d %s IP%d %s\":\n \"rtcp:%d\";\n }\n },\n { //a=rtcp-fb:98 trr-int 100\n push: 'rtcpFbTrrInt',\n reg: /^rtcp-fb:(\\*|\\d*) trr-int (\\d*)/,\n names: ['payload', 'value'],\n format: \"rtcp-fb:%d trr-int %d\"\n },\n { //a=rtcp-fb:98 nack rpsi\n push: 'rtcpFb',\n reg: /^rtcp-fb:(\\*|\\d*) ([\\w-_]*)(?: ([\\w-_]*))?/,\n names: ['payload', 'type', 'subtype'],\n format: function (o) {\n return (o.subtype != null) ?\n \"rtcp-fb:%s %s %s\":\n \"rtcp-fb:%s %s\";\n }\n },\n { //a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\n //a=extmap:1/recvonly URI-gps-string\n push: 'ext',\n reg: /^extmap:([\\w_\\/]*) (\\S*)(?: (\\S*))?/,\n names: ['value', 'uri', 'config'], // value may include \"/direction\" suffix\n format: function (o) {\n return (o.config != null) ?\n \"extmap:%s %s %s\":\n \"extmap:%s %s\";\n }\n },\n {\n //a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32\n push: 'crypto',\n reg: /^crypto:(\\d*) ([\\w_]*) (\\S*)(?: (\\S*))?/,\n names: ['id', 'suite', 'config', 'sessionConfig'],\n format: function (o) {\n return (o.sessionConfig != null) ?\n \"crypto:%d %s %s %s\":\n \"crypto:%d %s %s\";\n }\n },\n { //a=setup:actpass\n name: 'setup',\n reg: /^setup:(\\w*)/,\n format: \"setup:%s\"\n },\n { //a=mid:1\n name: 'mid',\n reg: /^mid:([^\\s]*)/,\n format: \"mid:%s\"\n },\n { //a=msid:0c8b064d-d807-43b4-b434-f92a889d8587 98178685-d409-46e0-8e16-7ef0db0db64a\n name: 'msid',\n reg: /^msid:(.*)/,\n format: \"msid:%s\"\n },\n { //a=ptime:20\n name: 'ptime',\n reg: /^ptime:(\\d*)/,\n format: \"ptime:%d\"\n },\n { //a=maxptime:60\n name: 'maxptime',\n reg: /^maxptime:(\\d*)/,\n format: \"maxptime:%d\"\n },\n { //a=sendrecv\n name: 'direction',\n reg: /^(sendrecv|recvonly|sendonly|inactive)/\n },\n { //a=ice-lite\n name: 'icelite',\n reg: /^(ice-lite)/\n },\n { //a=ice-ufrag:F7gI\n name: 'iceUfrag',\n reg: /^ice-ufrag:(\\S*)/,\n format: \"ice-ufrag:%s\"\n },\n { //a=ice-pwd:x9cml/YzichV2+XlhiMu8g\n name: 'icePwd',\n reg: /^ice-pwd:(\\S*)/,\n format: \"ice-pwd:%s\"\n },\n { //a=fingerprint:SHA-1 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33\n name: 'fingerprint',\n reg: /^fingerprint:(\\S*) (\\S*)/,\n names: ['type', 'hash'],\n format: \"fingerprint:%s %s\"\n },\n {\n //a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host\n //a=candidate:1162875081 1 udp 2113937151 192.168.34.75 60017 typ host generation 0\n //a=candidate:3289912957 2 udp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 generation 0\n //a=candidate:229815620 1 tcp 1518280447 192.168.150.19 60017 typ host tcptype active generation 0\n //a=candidate:3289912957 2 tcp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 tcptype passive generation 0\n push:'candidates',\n reg: /^candidate:(\\S*) (\\d*) (\\S*) (\\d*) (\\S*) (\\d*) typ (\\S*)(?: raddr (\\S*) rport (\\d*))?(?: tcptype (\\S*))?(?: generation (\\d*))?/,\n names: ['foundation', 'component', 'transport', 'priority', 'ip', 'port', 'type', 'raddr', 'rport', 'tcptype', 'generation'],\n format: function (o) {\n var str = \"candidate:%s %d %s %d %s %d typ %s\";\n\n str += (o.raddr != null) ? \" raddr %s rport %d\" : \"%v%v\";\n\n // NB: candidate has three optional chunks, so %void middles one if it's missing\n str += (o.tcptype != null) ? \" tcptype %s\" : \"%v\";\n\n if (o.generation != null) {\n str += \" generation %d\";\n }\n return str;\n }\n },\n { //a=end-of-candidates (keep after the candidates line for readability)\n name: 'endOfCandidates',\n reg: /^(end-of-candidates)/\n },\n { //a=remote-candidates:1 203.0.113.1 54400 2 203.0.113.1 54401 ...\n name: 'remoteCandidates',\n reg: /^remote-candidates:(.*)/,\n format: \"remote-candidates:%s\"\n },\n { //a=ice-options:google-ice\n name: 'iceOptions',\n reg: /^ice-options:(\\S*)/,\n format: \"ice-options:%s\"\n },\n { //a=ssrc:2566107569 cname:t9YU8M1UxTF8Y1A1\n push: \"ssrcs\",\n reg: /^ssrc:(\\d*) ([\\w_]*):(.*)/,\n names: ['id', 'attribute', 'value'],\n format: \"ssrc:%d %s:%s\"\n },\n { //a=ssrc-group:FEC 1 2\n push: \"ssrcGroups\",\n reg: /^ssrc-group:(\\w*) (.*)/,\n names: ['semantics', 'ssrcs'],\n format: \"ssrc-group:%s %s\"\n },\n { //a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV\n name: \"msidSemantic\",\n reg: /^msid-semantic:\\s?(\\w*) (\\S*)/,\n names: ['semantic', 'token'],\n format: \"msid-semantic: %s %s\" // space after \":\" is not accidental\n },\n { //a=group:BUNDLE audio video\n push: 'groups',\n reg: /^group:(\\w*) (.*)/,\n names: ['type', 'mids'],\n format: \"group:%s %s\"\n },\n { //a=rtcp-mux\n name: 'rtcpMux',\n reg: /^(rtcp-mux)/\n },\n { //a=rtcp-rsize\n name: 'rtcpRsize',\n reg: /^(rtcp-rsize)/\n },\n { // any a= that we don't understand is kepts verbatim on media.invalid\n push: 'invalid',\n names: [\"value\"]\n }\n ]\n};\n\n// set sensible defaults to avoid polluting the grammar with boring details\nObject.keys(grammar).forEach(function (key) {\n var objs = grammar[key];\n objs.forEach(function (obj) {\n if (!obj.reg) {\n obj.reg = /(.*)/;\n }\n if (!obj.format) {\n obj.format = \"%s\";\n }\n });\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module chunks = main","var parser = require('./parser');\nvar writer = require('./writer');\n\nexports.write = writer;\nexports.parse = parser.parse;\nexports.parseFmtpConfig = parser.parseFmtpConfig;\nexports.parsePayloads = parser.parsePayloads;\nexports.parseRemoteCandidates = parser.parseRemoteCandidates;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module chunks = main","var toIntIfInt = function (v) {\n return String(Number(v)) === v ? Number(v) : v;\n};\n\nvar attachProperties = function (match, location, names, rawName) {\n if (rawName && !names) {\n location[rawName] = toIntIfInt(match[1]);\n }\n else {\n for (var i = 0; i < names.length; i += 1) {\n if (match[i+1] != null) {\n location[names[i]] = toIntIfInt(match[i+1]);\n }\n }\n }\n};\n\nvar parseReg = function (obj, location, content) {\n var needsBlank = obj.name && obj.names;\n if (obj.push && !location[obj.push]) {\n location[obj.push] = [];\n }\n else if (needsBlank && !location[obj.name]) {\n location[obj.name] = {};\n }\n var keyLocation = obj.push ?\n {} : // blank object that will be pushed\n needsBlank ? location[obj.name] : location; // otherwise, named location or root\n\n attachProperties(content.match(obj.reg), keyLocation, obj.names, obj.name);\n\n if (obj.push) {\n location[obj.push].push(keyLocation);\n }\n};\n\nvar grammar = require('./grammar');\nvar validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/);\n\nexports.parse = function (sdp) {\n var session = {}\n , media = []\n , location = session; // points at where properties go under (one of the above)\n\n // parse lines we understand\n sdp.split(/(\\r\\n|\\r|\\n)/).filter(validLine).forEach(function (l) {\n var type = l[0];\n var content = l.slice(2);\n if (type === 'm') {\n media.push({rtp: [], fmtp: []});\n location = media[media.length-1]; // point at latest media line\n }\n\n for (var j = 0; j < (grammar[type] || []).length; j += 1) {\n var obj = grammar[type][j];\n if (obj.reg.test(content)) {\n return parseReg(obj, location, content);\n }\n }\n });\n\n session.media = media; // link it up\n return session;\n};\n\nvar fmtpReducer = function (acc, expr) {\n var s = expr.split('=');\n if (s.length === 2) {\n acc[s[0]] = toIntIfInt(s[1]);\n }\n return acc;\n};\n\nexports.parseFmtpConfig = function (str) {\n return str.split(/\\;\\s?/).reduce(fmtpReducer, {});\n};\n\nexports.parsePayloads = function (str) {\n return str.split(' ').map(Number);\n};\n\nexports.parseRemoteCandidates = function (str) {\n var candidates = [];\n var parts = str.split(' ').map(toIntIfInt);\n for (var i = 0; i < parts.length; i += 3) {\n candidates.push({\n component: parts[i],\n ip: parts[i + 1],\n port: parts[i + 2]\n });\n }\n return candidates;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module chunks = main","var grammar = require('./grammar');\n\n// customized util.format - discards excess arguments and can void middle ones\nvar formatRegExp = /%[sdv%]/g;\nvar format = function (formatStr) {\n var i = 1;\n var args = arguments;\n var len = args.length;\n return formatStr.replace(formatRegExp, function (x) {\n if (i >= len) {\n return x; // missing argument\n }\n var arg = args[i];\n i += 1;\n switch (x) {\n case '%%':\n return '%';\n case '%s':\n return String(arg);\n case '%d':\n return Number(arg);\n case '%v':\n return '';\n }\n });\n // NB: we discard excess arguments - they are typically undefined from makeLine\n};\n\nvar makeLine = function (type, obj, location) {\n var str = obj.format instanceof Function ?\n (obj.format(obj.push ? location : location[obj.name])) :\n obj.format;\n\n var args = [type + '=' + str];\n if (obj.names) {\n for (var i = 0; i < obj.names.length; i += 1) {\n var n = obj.names[i];\n if (obj.name) {\n args.push(location[obj.name][n]);\n }\n else { // for mLine and push attributes\n args.push(location[obj.names[i]]);\n }\n }\n }\n else {\n args.push(location[obj.name]);\n }\n return format.apply(null, args);\n};\n\n// RFC specified order\n// TODO: extend this with all the rest\nvar defaultOuterOrder = [\n 'v', 'o', 's', 'i',\n 'u', 'e', 'p', 'c',\n 'b', 't', 'r', 'z', 'a'\n];\nvar defaultInnerOrder = ['i', 'c', 'b', 'a'];\n\n\nmodule.exports = function (session, opts) {\n opts = opts || {};\n // ensure certain properties exist\n if (session.version == null) {\n session.version = 0; // \"v=0\" must be there (only defined version atm)\n }\n if (session.name == null) {\n session.name = \" \"; // \"s= \" must be there if no meaningful name set\n }\n session.media.forEach(function (mLine) {\n if (mLine.payloads == null) {\n mLine.payloads = \"\";\n }\n });\n\n var outerOrder = opts.outerOrder || defaultOuterOrder;\n var innerOrder = opts.innerOrder || defaultInnerOrder;\n var sdp = [];\n\n // loop through outerOrder for matching properties on session\n outerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in session && session[obj.name] != null) {\n sdp.push(makeLine(type, obj, session));\n }\n else if (obj.push in session && session[obj.push] != null) {\n session[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n\n // then for each media line, follow the innerOrder\n session.media.forEach(function (mLine) {\n sdp.push(makeLine('m', grammar.m[0], mLine));\n\n innerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in mLine && mLine[obj.name] != null) {\n sdp.push(makeLine(type, obj, mLine));\n }\n else if (obj.push in mLine && mLine[obj.push] != null) {\n mLine[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n });\n\n return sdp.join('\\r\\n') + '\\r\\n';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = function arrayEquals(array) {\n // if the other array is a falsy value, return\n if (!array)\n return false;\n\n // compare lengths - can save a lot of time\n if (this.length != array.length)\n return false;\n\n for (var i = 0, l = this.length; i < l; i++) {\n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array) {\n // recurse into the nested arrays\n if (!arrayEquals.apply(this[i], [array[i]]))\n return false;\n } else if (this[i] != array[i]) {\n // Warning - two different object instances will never be equal:\n // {x:20} != {x:20}\n return false;\n }\n }\n return true;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexports.Interop = require('./interop');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* global RTCSessionDescription */\n/* global RTCIceCandidate */\n/* jshint -W097 */\n\"use strict\";\n\nvar transform = require('./transform');\nvar arrayEquals = require('./array-equals');\n\nfunction Interop() {\n\n /**\n * This map holds the most recent Unified Plan offer/answer SDP that was\n * converted to Plan B, with the SDP type ('offer' or 'answer') as keys and\n * the SDP string as values.\n *\n * @type {{}}\n */\n this.cache = {\n mlB2UMap : {},\n mlU2BMap : {}\n };\n}\n\nmodule.exports = Interop;\n\n/**\n * Changes the candidate args to match with the related Unified Plan\n */\nInterop.prototype.candidateToUnifiedPlan = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n cand.sdpMLineIndex = this.cache.mlB2UMap[cand.sdpMLineIndex];\n /* TODO: change sdpMid to (audio|video)-SSRC */\n\n return cand;\n};\n\n/**\n * Changes the candidate args to match with the related Plan B\n */\nInterop.prototype.candidateToPlanB = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n if (cand.sdpMid.indexOf('audio') === 0) {\n cand.sdpMid = 'audio';\n } else if (cand.sdpMid.indexOf('video') === 0) {\n cand.sdpMid = 'video';\n } else {\n throw new Error('candidate with ' + cand.sdpMid + ' not allowed');\n }\n\n cand.sdpMLineIndex = this.cache.mlU2BMap[cand.sdpMLineIndex];\n\n return cand;\n};\n\n/**\n * Returns the index of the first m-line with the given media type and with a\n * direction which allows sending, in the last Unified Plan description with\n * type \"answer\" converted to Plan B. Returns {null} if there is no saved\n * answer, or if none of its m-lines with the given type allow sending.\n * @param type the media type (\"audio\" or \"video\").\n * @returns {*}\n */\nInterop.prototype.getFirstSendingIndexFromAnswer = function(type) {\n if (!this.cache.answer) {\n return null;\n }\n\n var session = transform.parse(this.cache.answer);\n if (session && session.media && Array.isArray(session.media)){\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type == type &&\n (!session.media[i].direction /* default to sendrecv */ ||\n session.media[i].direction === 'sendrecv' ||\n session.media[i].direction === 'sendonly')){\n return i;\n }\n }\n }\n\n return null;\n};\n\n/**\n * This method transforms a Unified Plan SDP to an equivalent Plan B SDP. A\n * PeerConnection wrapper transforms the SDP to Plan B before passing it to the\n * application.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toPlanB = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n // Objectify the SDP for easier manipulation.\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Unified Plan SDP. Plan B\n // SDP has a video, an audio and a data \"channel\" at most.\n if (session.media.length <= 3 && session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Unified Plan.');\n return desc;\n }\n\n //#endregion\n\n // HACK https://bugzilla.mozilla.org/show_bug.cgi?id=1113443\n var sdp = desc.sdp;\n var rewrite = false;\n for (var i = 0; i < session.media.length; i++) {\n var uLine = session.media[i];\n uLine.rtp.forEach(function(rtp) {\n if (rtp.codec === 'NULL')\n {\n rewrite = true;\n var offer = transform.parse(self.cache.offer);\n rtp.codec = offer.media[i].rtp[0].codec;\n }\n });\n }\n if (rewrite) {\n sdp = transform.write(session);\n }\n\n // Unified Plan SDP is our \"precious\". Cache it for later use in the Plan B\n // -> Unified Plan transformation.\n this.cache[desc.type] = sdp;\n\n //#region Convert from Unified Plan to Plan B.\n\n // We rebuild the session.media array.\n var media = session.media;\n session.media = [];\n\n // Associative array that maps channel types to channel objects for fast\n // access to channel objects by their type, e.g. type2bl['audio']->channel\n // obj.\n var type2bl = {};\n\n // Used to build the group:BUNDLE value after the channels construction\n // loop.\n var types = [];\n\n media.forEach(function(uLine) {\n // rtcp-mux is required in the Plan B SDP.\n if ((typeof uLine.rtcpMux !== 'string' ||\n uLine.rtcpMux !== 'rtcp-mux') &&\n uLine.direction !== 'inactive') {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'without the rtcp-mux attribute were found.');\n }\n\n // If we don't have a channel for this uLine.type OR the selected is\n // inactive, then select this uLine as the channel basis.\n if (typeof type2bl[uLine.type] === 'undefined' ||\n type2bl[uLine.type].direction === 'inactive') {\n type2bl[uLine.type] = uLine;\n }\n\n if (uLine.protocol != type2bl[uLine.type].protocol) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different protocols and this library does not have ' +\n 'support for that');\n }\n\n if (uLine.payloads != type2bl[uLine.type].payloads) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different payloads and this library does not have ' +\n 'support for that');\n }\n\n });\n\n // Implode the Unified Plan m-lines/tracks into Plan B channels.\n media.forEach(function(uLine) {\n if (uLine.type === 'application') {\n session.media.push(uLine);\n types.push(uLine.mid);\n return;\n }\n\n // Add sources to the channel and handle a=msid.\n if (typeof uLine.sources === 'object') {\n Object.keys(uLine.sources).forEach(function(ssrc) {\n if (typeof type2bl[uLine.type].sources !== 'object')\n type2bl[uLine.type].sources = {};\n\n // Assign the sources to the channel.\n type2bl[uLine.type].sources[ssrc] =\n uLine.sources[ssrc];\n\n if (typeof uLine.msid !== 'undefined') {\n // In Plan B the msid is an SSRC attribute. Also, we don't\n // care about the obsolete label and mslabel attributes.\n //\n // Note that it is not guaranteed that the uLine will\n // have an msid. recvonly channels in particular don't have\n // one.\n type2bl[uLine.type].sources[ssrc].msid =\n uLine.msid;\n }\n // NOTE ssrcs in ssrc groups will share msids, as\n // draft-uberti-rtcweb-plan-00 mandates.\n });\n }\n\n // Add ssrc groups to the channel.\n if (typeof uLine.ssrcGroups !== 'undefined' &&\n Array.isArray(uLine.ssrcGroups)) {\n\n // Create the ssrcGroups array, if it's not defined.\n if (typeof type2bl[uLine.type].ssrcGroups === 'undefined' ||\n !Array.isArray(type2bl[uLine.type].ssrcGroups)) {\n type2bl[uLine.type].ssrcGroups = [];\n }\n\n type2bl[uLine.type].ssrcGroups =\n type2bl[uLine.type].ssrcGroups.concat(\n uLine.ssrcGroups);\n }\n\n if (type2bl[uLine.type] === uLine) {\n // Plan B mids are in ['audio', 'video', 'data']\n uLine.mid = uLine.type;\n\n // Plan B doesn't support/need the bundle-only attribute.\n delete uLine.bundleOnly;\n\n // In Plan B the msid is an SSRC attribute.\n delete uLine.msid;\n\n\t if (uLine.type == media[0].type) {\n\t types.unshift(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.unshift(uLine);\n\t } else {\n\t types.push(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.push(uLine);\n\t }\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group with the new mids.\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = types.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n/* follow rules defined in RFC4145 */\nfunction addSetupAttr(uLine) {\n if (typeof uLine.setup === 'undefined') {\n return;\n }\n\n if (uLine.setup === \"active\") {\n uLine.setup = \"passive\";\n } else if (uLine.setup === \"passive\") {\n uLine.setup = \"active\";\n }\n}\n\n/**\n * This method transforms a Plan B SDP to an equivalent Unified Plan SDP. A\n * PeerConnection wrapper transforms the SDP to Unified Plan before passing it\n * to FF.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toUnifiedPlan = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Plan B SDP. Plan B SDP has\n // a video, an audio and a data \"channel\" at most.\n if (session.media.length > 3 || !session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Plan B.');\n return desc;\n }\n\n // Make sure this Plan B SDP can be converted to a Unified Plan SDP.\n var mids = [];\n session.media.forEach(function(m) {\n mids.push(m.mid);\n });\n\n var hasBundle = false;\n if (typeof session.groups !== 'undefined' &&\n Array.isArray(session.groups)) {\n hasBundle = session.groups.every(function(g) {\n return g.type !== 'BUNDLE' ||\n arrayEquals.apply(g.mids.sort(), [mids.sort()]);\n });\n }\n\n if (!hasBundle) {\n var mustBeBundle = false;\n\n session.media.forEach(function(m) {\n if (m.direction !== 'inactive') {\n mustBeBundle = true;\n }\n });\n\n if (mustBeBundle) {\n throw new Error(\"Cannot convert to Unified Plan because m-lines that\" +\n \" are not bundled were found.\");\n }\n }\n\n //#endregion\n\n\n //#region Convert from Plan B to Unified Plan.\n\n // Unfortunately, a Plan B offer/answer doesn't have enough information to\n // rebuild an equivalent Unified Plan offer/answer.\n //\n // For example, if this is a local answer (in Unified Plan style) that we\n // convert to Plan B prior to handing it over to the application (the\n // PeerConnection wrapper called us, for instance, after a successful\n // createAnswer), we want to remember the m-line at which we've seen the\n // (local) SSRC. That's because when the application wants to do call the\n // SLD method, forcing us to do the inverse transformation (from Plan B to\n // Unified Plan), we need to know to which m-line to assign the (local)\n // SSRC. We also need to know all the other m-lines that the original\n // answer had and include them in the transformed answer as well.\n //\n // Another example is if this is a remote offer that we convert to Plan B\n // prior to giving it to the application, we want to remember the mid at\n // which we've seen the (remote) SSRC.\n //\n // In the iteration that follows, we use the cached Unified Plan (if it\n // exists) to assign mids to ssrcs.\n\n var type;\n if (desc.type === 'answer') {\n type = 'offer';\n } else if (desc.type === 'offer') {\n type = 'answer';\n } else {\n throw new Error(\"Type '\" + desc.type + \"' not supported.\");\n }\n\n var cached;\n if (typeof this.cache[type] !== 'undefined') {\n cached = transform.parse(this.cache[type]);\n }\n\n var recvonlySsrcs = {\n audio: {},\n video: {}\n };\n\n // A helper map that sends mids to m-line objects. We use it later to\n // rebuild the Unified Plan style session.media array.\n var mid2ul = {};\n var bIdx = 0;\n var uIdx = 0;\n\n var sources2ul = {};\n\n var candidates;\n var iceUfrag;\n var icePwd;\n var fingerprint;\n var payloads = {};\n var rtcpFb = {};\n var rtp = {};\n\n session.media.forEach(function(bLine) {\n if ((typeof bLine.rtcpMux !== 'string' ||\n bLine.rtcpMux !== 'rtcp-mux') &&\n bLine.direction !== 'inactive') {\n throw new Error(\"Cannot convert to Unified Plan because m-lines \" +\n \"without the rtcp-mux attribute were found.\");\n }\n\n if (bLine.type === 'application') {\n mid2ul[bLine.mid] = bLine;\n return;\n }\n\n // With rtcp-mux and bundle all the channels should have the same ICE\n // stuff.\n var sources = bLine.sources;\n var ssrcGroups = bLine.ssrcGroups;\n var port = bLine.port;\n\n /* Chrome adds different candidates even using bundle, so we concat the candidates list */\n if (typeof bLine.candidates != 'undefined') {\n if (typeof candidates != 'undefined') {\n candidates = candidates.concat(bLine.candidates);\n } else {\n candidates = bLine.candidates;\n }\n }\n\n if ((typeof iceUfrag != 'undefined') && (typeof bLine.iceUfrag != 'undefined') && (iceUfrag != bLine.iceUfrag)) {\n throw new Error(\"Only BUNDLE supported, iceUfrag must be the same for all m-lines.\\n\" +\n \"\\tLast iceUfrag: \" + iceUfrag + \"\\n\" +\n \"\\tNew iceUfrag: \" + bLine.iceUfrag\n );\n }\n\n if (typeof bLine.iceUfrag != 'undefined') {\n iceUfrag = bLine.iceUfrag;\n }\n\n if ((typeof icePwd != 'undefined') && (typeof bLine.icePwd != 'undefined') && (icePwd != bLine.icePwd)) {\n throw new Error(\"Only BUNDLE supported, icePwd must be the same for all m-lines.\\n\" +\n \"\\tLast icePwd: \" + icePwd + \"\\n\" +\n \"\\tNew icePwd: \" + bLine.icePwd\n );\n }\n\n if (typeof bLine.icePwd != 'undefined') {\n icePwd = bLine.icePwd;\n }\n\n if ((typeof fingerprint != 'undefined') && (typeof bLine.fingerprint != 'undefined') &&\n (fingerprint.type != bLine.fingerprint.type || fingerprint.hash != bLine.fingerprint.hash)) {\n throw new Error(\"Only BUNDLE supported, fingerprint must be the same for all m-lines.\\n\" +\n \"\\tLast fingerprint: \" + JSON.stringify(fingerprint) + \"\\n\" +\n \"\\tNew fingerprint: \" + JSON.stringify(bLine.fingerprint)\n );\n }\n\n if (typeof bLine.fingerprint != 'undefined') {\n fingerprint = bLine.fingerprint;\n }\n\n payloads[bLine.type] = bLine.payloads;\n rtcpFb[bLine.type] = bLine.rtcpFb;\n rtp[bLine.type] = bLine.rtp;\n\n // inverted ssrc group map\n var ssrc2group = {};\n if (typeof ssrcGroups !== 'undefined' && Array.isArray(ssrcGroups)) {\n ssrcGroups.forEach(function (ssrcGroup) {\n // XXX This might brake if an SSRC is in more than one group\n // for some reason.\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs.forEach(function (ssrc) {\n if (typeof ssrc2group[ssrc] === 'undefined') {\n ssrc2group[ssrc] = [];\n }\n\n ssrc2group[ssrc].push(ssrcGroup);\n });\n }\n });\n }\n\n // ssrc to m-line index.\n var ssrc2ml = {};\n\n if (typeof sources === 'object') {\n\n // We'll use the \"bLine\" object as a prototype for each new \"mLine\"\n // that we create, but first we need to clean it up a bit.\n delete bLine.sources;\n delete bLine.ssrcGroups;\n delete bLine.candidates;\n delete bLine.iceUfrag;\n delete bLine.icePwd;\n delete bLine.fingerprint;\n delete bLine.port;\n delete bLine.mid;\n\n // Explode the Plan B channel sources with one m-line per source.\n Object.keys(sources).forEach(function(ssrc) {\n\n // The (unified) m-line for this SSRC. We either create it from\n // scratch or, if it's a grouped SSRC, we re-use a related\n // mline. In other words, if the source is grouped with another\n // source, put the two together in the same m-line.\n var uLine;\n\n // We assume here that we are the answerer in the O/A, so any\n // offers which we translate come from the remote side, while\n // answers are local. So the check below is to make that we\n // handle receive-only SSRCs in a special way only if they come\n // from the remote side.\n if (desc.type==='offer') {\n // We want to detect SSRCs which are used by a remote peer\n // in an m-line with direction=recvonly (i.e. they are\n // being used for RTCP only).\n // This information would have gotten lost if the remote\n // peer used Unified Plan and their local description was\n // translated to Plan B. So we use the lack of an MSID\n // attribute to deduce a \"receive only\" SSRC.\n if (!sources[ssrc].msid) {\n recvonlySsrcs[bLine.type][ssrc] = sources[ssrc];\n // Receive-only SSRCs must not create new m-lines. We\n // will assign them to an existing m-line later.\n return;\n }\n }\n\n if (typeof ssrc2group[ssrc] !== 'undefined' &&\n Array.isArray(ssrc2group[ssrc])) {\n ssrc2group[ssrc].some(function (ssrcGroup) {\n // ssrcGroup.ssrcs *is* an Array, no need to check\n // again here.\n return ssrcGroup.ssrcs.some(function (related) {\n if (typeof ssrc2ml[related] === 'object') {\n uLine = ssrc2ml[related];\n return true;\n }\n });\n });\n }\n\n if (typeof uLine === 'object') {\n // the m-line already exists. Just add the source.\n uLine.sources[ssrc] = sources[ssrc];\n delete sources[ssrc].msid;\n } else {\n // Use the \"bLine\" as a prototype for the \"uLine\".\n uLine = Object.create(bLine);\n ssrc2ml[ssrc] = uLine;\n\n if (typeof sources[ssrc].msid !== 'undefined') {\n // Assign the msid of the source to the m-line. Note\n // that it is not guaranteed that the source will have\n // msid. In particular \"recvonly\" sources don't have an\n // msid. Note that \"recvonly\" is a term only defined\n // for m-lines.\n uLine.msid = sources[ssrc].msid;\n delete sources[ssrc].msid;\n }\n\n // We assign one SSRC per media line.\n uLine.sources = {};\n uLine.sources[ssrc] = sources[ssrc];\n uLine.ssrcGroups = ssrc2group[ssrc];\n\n // Use the cached Unified Plan SDP (if it exists) to assign\n // SSRCs to mids.\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n\n cached.media.forEach(function (m) {\n if (typeof m.sources === 'object') {\n Object.keys(m.sources).forEach(function (s) {\n if (s === ssrc) {\n uLine.mid = m.mid;\n }\n });\n }\n });\n }\n\n if (typeof uLine.mid === 'undefined') {\n\n // If this is an SSRC that we see for the first time\n // assign it a new mid. This is typically the case when\n // this method is called to transform a remote\n // description for the first time or when there is a\n // new SSRC in the remote description because a new\n // peer has joined the conference. Local SSRCs should\n // have already been added to the map in the toPlanB\n // method.\n //\n // Because FF generates answers in Unified Plan style,\n // we MUST already have a cached answer with all the\n // local SSRCs mapped to some m-line/mid.\n\n uLine.mid = [bLine.type, '-', ssrc].join('');\n }\n\n // Include the candidates in the 1st media line.\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n sources2ul[uIdx] = uLine.sources;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n uIdx++;\n }\n });\n } else {\n var uLine = bLine;\n\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n }\n\n bIdx++;\n });\n\n // Rebuild the media array in the right order and add the missing mLines\n // (missing from the Plan B SDP).\n session.media = [];\n mids = []; // reuse\n\n if (desc.type === 'answer') {\n\n // The media lines in the answer must match the media lines in the\n // offer. The order is important too. Here we assume that Firefox is\n // the answerer, so we merely have to use the reconstructed (unified)\n // answer to update the cached (unified) answer accordingly.\n //\n // In the general case, one would have to use the cached (unified)\n // offer to find the m-lines that are missing from the reconstructed\n // answer, potentially grabbing them from the cached (unified) answer.\n // One has to be careful with this approach because inactive m-lines do\n // not always have an mid, making it tricky (impossible?) to find where\n // exactly and which m-lines are missing from the reconstructed answer.\n\n for (var i = 0; i < cached.media.length; i++) {\n var uLine = cached.media[i];\n\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (typeof sources2ul[i] === 'undefined') {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'recvonly';\n else if (uLine.direction === 'sendonly')\n uLine.direction = 'inactive';\n } else {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'sendrecv';\n else if (uLine.direction === 'recvonly')\n uLine.direction = 'sendonly';\n }\n\n uLine.sources = sources2ul[i];\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n\n uLine.rtp = rtp[uLine.type];\n uLine.payloads = payloads[uLine.type];\n uLine.rtcpFb = rtcpFb[uLine.type];\n\n session.media.push(uLine);\n\n if (typeof uLine.mid === 'string') {\n // inactive lines don't/may not have an mid.\n mids.push(uLine.mid);\n }\n }\n } else {\n\n // SDP offer/answer (and the JSEP spec) forbids removing an m-section\n // under any circumstances. If we are no longer interested in sending a\n // track, we just remove the msid and ssrc attributes and set it to\n // either a=recvonly (as the reofferer, we must use recvonly if the\n // other side was previously sending on the m-section, but we can also\n // leave the possibility open if it wasn't previously in use), or\n // a=inactive.\n\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n cached.media.forEach(function(uLine) {\n mids.push(uLine.mid);\n if (typeof mid2ul[uLine.mid] !== 'undefined') {\n session.media.push(mid2ul[uLine.mid]);\n } else {\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (!uLine.direction\n || uLine.direction === 'sendrecv') {\n uLine.direction = 'sendonly';\n }\n if (!uLine.direction\n || uLine.direction === 'recvonly') {\n uLine.direction = 'inactive';\n }\n\n addSetupAttr (uLine);\n session.media.push(uLine);\n }\n });\n }\n\n // Add all the remaining (new) m-lines of the transformed SDP.\n Object.keys(mid2ul).forEach(function(mid) {\n if (mids.indexOf(mid) === -1) {\n mids.push(mid);\n if (mid2ul[mid].direction === 'recvonly') {\n // This is a remote recvonly channel. Add its SSRC to the\n // appropriate sendrecv or sendonly channel.\n // TODO(gp) what if we don't have sendrecv/sendonly\n // channel?\n\n var done = false;\n\n session.media.some(function (uLine) {\n if ((uLine.direction === 'sendrecv' ||\n uLine.direction === 'sendonly') &&\n uLine.type === mid2ul[mid].type) {\n // mid2ul[mid] shouldn't have any ssrc-groups\n Object.keys(mid2ul[mid].sources).forEach(\n function (ssrc) {\n uLine.sources[ssrc] =\n mid2ul[mid].sources[ssrc];\n });\n\n done = true;\n return true;\n }\n });\n\n if (!done) {\n session.media.push(mid2ul[mid]);\n }\n } else {\n session.media.push(mid2ul[mid]);\n }\n }\n });\n }\n\n // After we have constructed the Plan Unified m-lines we can figure out\n // where (in which m-line) to place the 'recvonly SSRCs'.\n // Note: we assume here that we are the answerer in the O/A, so any offers\n // which we translate come from the remote side, while answers are local\n // (and so our last local description is cached as an 'answer').\n [\"audio\", \"video\"].forEach(function (type) {\n if (!session || !session.media || !Array.isArray(session.media))\n return;\n\n var idx = null;\n if (Object.keys(recvonlySsrcs[type]).length > 0) {\n idx = self.getFirstSendingIndexFromAnswer(type);\n if (idx === null){\n // If this is the first offer we receive, we don't have a\n // cached answer. Assume that we will be sending media using\n // the first m-line for each media type.\n\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type === type) {\n idx = i;\n break;\n }\n }\n }\n }\n\n if (idx && session.media.length > idx) {\n var mLine = session.media[idx];\n Object.keys(recvonlySsrcs[type]).forEach(function(ssrc) {\n if (mLine.sources && mLine.sources[ssrc]) {\n console.warn(\"Replacing an existing SSRC.\");\n }\n if (!mLine.sources) {\n mLine.sources = {};\n }\n\n mLine.sources[ssrc] = recvonlySsrcs[type][ssrc];\n });\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group (since we regenerated the mids)\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = mids.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n // Cache the transformed SDP (Unified Plan) for later re-use in this\n // function.\n this.cache[desc.type] = resStr;\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar transform = require('sdp-transform');\n\nexports.write = function(session, opts) {\n\n if (typeof session !== 'undefined' &&\n typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // expand sources to ssrcs\n if (typeof mLine.sources !== 'undefined' &&\n Object.keys(mLine.sources).length !== 0) {\n mLine.ssrcs = [];\n Object.keys(mLine.sources).forEach(function (ssrc) {\n var source = mLine.sources[ssrc];\n Object.keys(source).forEach(function (attribute) {\n mLine.ssrcs.push({\n id: ssrc,\n attribute: attribute,\n value: source[attribute]\n });\n });\n });\n delete mLine.sources;\n }\n\n // join ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.join(' ');\n }\n });\n }\n });\n }\n\n // join group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids !== 'undefined' && Array.isArray(g.mids)) {\n g.mids = g.mids.join(' ');\n }\n });\n }\n\n return transform.write(session, opts);\n};\n\nexports.parse = function(sdp) {\n var session = transform.parse(sdp);\n\n if (typeof session !== 'undefined' && typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // group sources attributes by ssrc\n if (typeof mLine.ssrcs !== 'undefined' && Array.isArray(mLine.ssrcs)) {\n mLine.sources = {};\n mLine.ssrcs.forEach(function (ssrc) {\n if (!mLine.sources[ssrc.id])\n mLine.sources[ssrc.id] = {};\n mLine.sources[ssrc.id][ssrc.attribute] = ssrc.value;\n });\n\n delete mLine.ssrcs;\n }\n\n // split ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs === 'string') {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.split(' ');\n }\n });\n }\n });\n }\n // split group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids === 'string') {\n g.mids = g.mids.split(' ');\n }\n });\n }\n\n return session;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module chunks = main"," /* eslint-env node */\n'use strict';\n\n// SDP helpers.\nvar SDPUtils = {};\n\n// Generate an alphanumeric identifier for cname or mids.\n// TODO: use UUIDs instead? https://gist.github.com/jed/982883\nSDPUtils.generateIdentifier = function() {\n return Math.random().toString(36).substr(2, 10);\n};\n\n// The RTCP CNAME used by all peerconnections from the same JS.\nSDPUtils.localCName = SDPUtils.generateIdentifier();\n\n// Splits SDP into lines, dealing with both CRLF and LF.\nSDPUtils.splitLines = function(blob) {\n return blob.trim().split('\\n').map(function(line) {\n return line.trim();\n });\n};\n// Splits SDP into sessionpart and mediasections. Ensures CRLF.\nSDPUtils.splitSections = function(blob) {\n var parts = blob.split('\\nm=');\n return parts.map(function(part, index) {\n return (index > 0 ? 'm=' + part : part).trim() + '\\r\\n';\n });\n};\n\n// returns the session description.\nSDPUtils.getDescription = function(blob) {\n var sections = SDPUtils.splitSections(blob);\n return sections && sections[0];\n};\n\n// returns the individual media sections.\nSDPUtils.getMediaSections = function(blob) {\n var sections = SDPUtils.splitSections(blob);\n sections.shift();\n return sections;\n};\n\n// Returns lines that start with a certain prefix.\nSDPUtils.matchPrefix = function(blob, prefix) {\n return SDPUtils.splitLines(blob).filter(function(line) {\n return line.indexOf(prefix) === 0;\n });\n};\n\n// Parses an ICE candidate line. Sample input:\n// candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8\n// rport 55996\"\nSDPUtils.parseCandidate = function(line) {\n var parts;\n // Parse both variants.\n if (line.indexOf('a=candidate:') === 0) {\n parts = line.substring(12).split(' ');\n } else {\n parts = line.substring(10).split(' ');\n }\n\n var candidate = {\n foundation: parts[0],\n component: parseInt(parts[1], 10),\n protocol: parts[2].toLowerCase(),\n priority: parseInt(parts[3], 10),\n ip: parts[4],\n port: parseInt(parts[5], 10),\n // skip parts[6] == 'typ'\n type: parts[7]\n };\n\n for (var i = 8; i < parts.length; i += 2) {\n switch (parts[i]) {\n case 'raddr':\n candidate.relatedAddress = parts[i + 1];\n break;\n case 'rport':\n candidate.relatedPort = parseInt(parts[i + 1], 10);\n break;\n case 'tcptype':\n candidate.tcpType = parts[i + 1];\n break;\n case 'ufrag':\n candidate.ufrag = parts[i + 1]; // for backward compability.\n candidate.usernameFragment = parts[i + 1];\n break;\n default: // extension handling, in particular ufrag\n candidate[parts[i]] = parts[i + 1];\n break;\n }\n }\n return candidate;\n};\n\n// Translates a candidate object into SDP candidate attribute.\nSDPUtils.writeCandidate = function(candidate) {\n var sdp = [];\n sdp.push(candidate.foundation);\n sdp.push(candidate.component);\n sdp.push(candidate.protocol.toUpperCase());\n sdp.push(candidate.priority);\n sdp.push(candidate.ip);\n sdp.push(candidate.port);\n\n var type = candidate.type;\n sdp.push('typ');\n sdp.push(type);\n if (type !== 'host' && candidate.relatedAddress &&\n candidate.relatedPort) {\n sdp.push('raddr');\n sdp.push(candidate.relatedAddress); // was: relAddr\n sdp.push('rport');\n sdp.push(candidate.relatedPort); // was: relPort\n }\n if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {\n sdp.push('tcptype');\n sdp.push(candidate.tcpType);\n }\n if (candidate.usernameFragment || candidate.ufrag) {\n sdp.push('ufrag');\n sdp.push(candidate.usernameFragment || candidate.ufrag);\n }\n return 'candidate:' + sdp.join(' ');\n};\n\n// Parses an ice-options line, returns an array of option tags.\n// a=ice-options:foo bar\nSDPUtils.parseIceOptions = function(line) {\n return line.substr(14).split(' ');\n}\n\n// Parses an rtpmap line, returns RTCRtpCoddecParameters. Sample input:\n// a=rtpmap:111 opus/48000/2\nSDPUtils.parseRtpMap = function(line) {\n var parts = line.substr(9).split(' ');\n var parsed = {\n payloadType: parseInt(parts.shift(), 10) // was: id\n };\n\n parts = parts[0].split('/');\n\n parsed.name = parts[0];\n parsed.clockRate = parseInt(parts[1], 10); // was: clockrate\n // was: channels\n parsed.numChannels = parts.length === 3 ? parseInt(parts[2], 10) : 1;\n return parsed;\n};\n\n// Generate an a=rtpmap line from RTCRtpCodecCapability or\n// RTCRtpCodecParameters.\nSDPUtils.writeRtpMap = function(codec) {\n var pt = codec.payloadType;\n if (codec.preferredPayloadType !== undefined) {\n pt = codec.preferredPayloadType;\n }\n return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate +\n (codec.numChannels !== 1 ? '/' + codec.numChannels : '') + '\\r\\n';\n};\n\n// Parses an a=extmap line (headerextension from RFC 5285). Sample input:\n// a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\n// a=extmap:2/sendonly urn:ietf:params:rtp-hdrext:toffset\nSDPUtils.parseExtmap = function(line) {\n var parts = line.substr(9).split(' ');\n return {\n id: parseInt(parts[0], 10),\n direction: parts[0].indexOf('/') > 0 ? parts[0].split('/')[1] : 'sendrecv',\n uri: parts[1]\n };\n};\n\n// Generates a=extmap line from RTCRtpHeaderExtensionParameters or\n// RTCRtpHeaderExtension.\nSDPUtils.writeExtmap = function(headerExtension) {\n return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) +\n (headerExtension.direction && headerExtension.direction !== 'sendrecv'\n ? '/' + headerExtension.direction\n : '') +\n ' ' + headerExtension.uri + '\\r\\n';\n};\n\n// Parses an ftmp line, returns dictionary. Sample input:\n// a=fmtp:96 vbr=on;cng=on\n// Also deals with vbr=on; cng=on\nSDPUtils.parseFmtp = function(line) {\n var parsed = {};\n var kv;\n var parts = line.substr(line.indexOf(' ') + 1).split(';');\n for (var j = 0; j < parts.length; j++) {\n kv = parts[j].trim().split('=');\n parsed[kv[0].trim()] = kv[1];\n }\n return parsed;\n};\n\n// Generates an a=ftmp line from RTCRtpCodecCapability or RTCRtpCodecParameters.\nSDPUtils.writeFmtp = function(codec) {\n var line = '';\n var pt = codec.payloadType;\n if (codec.preferredPayloadType !== undefined) {\n pt = codec.preferredPayloadType;\n }\n if (codec.parameters && Object.keys(codec.parameters).length) {\n var params = [];\n Object.keys(codec.parameters).forEach(function(param) {\n params.push(param + '=' + codec.parameters[param]);\n });\n line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\\r\\n';\n }\n return line;\n};\n\n// Parses an rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:\n// a=rtcp-fb:98 nack rpsi\nSDPUtils.parseRtcpFb = function(line) {\n var parts = line.substr(line.indexOf(' ') + 1).split(' ');\n return {\n type: parts.shift(),\n parameter: parts.join(' ')\n };\n};\n// Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.\nSDPUtils.writeRtcpFb = function(codec) {\n var lines = '';\n var pt = codec.payloadType;\n if (codec.preferredPayloadType !== undefined) {\n pt = codec.preferredPayloadType;\n }\n if (codec.rtcpFeedback && codec.rtcpFeedback.length) {\n // FIXME: special handling for trr-int?\n codec.rtcpFeedback.forEach(function(fb) {\n lines += 'a=rtcp-fb:' + pt + ' ' + fb.type +\n (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') +\n '\\r\\n';\n });\n }\n return lines;\n};\n\n// Parses an RFC 5576 ssrc media attribute. Sample input:\n// a=ssrc:3735928559 cname:something\nSDPUtils.parseSsrcMedia = function(line) {\n var sp = line.indexOf(' ');\n var parts = {\n ssrc: parseInt(line.substr(7, sp - 7), 10)\n };\n var colon = line.indexOf(':', sp);\n if (colon > -1) {\n parts.attribute = line.substr(sp + 1, colon - sp - 1);\n parts.value = line.substr(colon + 1);\n } else {\n parts.attribute = line.substr(sp + 1);\n }\n return parts;\n};\n\n// Extracts the MID (RFC 5888) from a media section.\n// returns the MID or undefined if no mid line was found.\nSDPUtils.getMid = function(mediaSection) {\n var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0];\n if (mid) {\n return mid.substr(6);\n }\n}\n\nSDPUtils.parseFingerprint = function(line) {\n var parts = line.substr(14).split(' ');\n return {\n algorithm: parts[0].toLowerCase(), // algorithm is case-sensitive in Edge.\n value: parts[1]\n };\n};\n\n// Extracts DTLS parameters from SDP media section or sessionpart.\n// FIXME: for consistency with other functions this should only\n// get the fingerprint line as input. See also getIceParameters.\nSDPUtils.getDtlsParameters = function(mediaSection, sessionpart) {\n var lines = SDPUtils.matchPrefix(mediaSection + sessionpart,\n 'a=fingerprint:');\n // Note: a=setup line is ignored since we use the 'auto' role.\n // Note2: 'algorithm' is not case sensitive except in Edge.\n return {\n role: 'auto',\n fingerprints: lines.map(SDPUtils.parseFingerprint)\n };\n};\n\n// Serializes DTLS parameters to SDP.\nSDPUtils.writeDtlsParameters = function(params, setupType) {\n var sdp = 'a=setup:' + setupType + '\\r\\n';\n params.fingerprints.forEach(function(fp) {\n sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\\r\\n';\n });\n return sdp;\n};\n// Parses ICE information from SDP media section or sessionpart.\n// FIXME: for consistency with other functions this should only\n// get the ice-ufrag and ice-pwd lines as input.\nSDPUtils.getIceParameters = function(mediaSection, sessionpart) {\n var lines = SDPUtils.splitLines(mediaSection);\n // Search in session part, too.\n lines = lines.concat(SDPUtils.splitLines(sessionpart));\n var iceParameters = {\n usernameFragment: lines.filter(function(line) {\n return line.indexOf('a=ice-ufrag:') === 0;\n })[0].substr(12),\n password: lines.filter(function(line) {\n return line.indexOf('a=ice-pwd:') === 0;\n })[0].substr(10)\n };\n return iceParameters;\n};\n\n// Serializes ICE parameters to SDP.\nSDPUtils.writeIceParameters = function(params) {\n return 'a=ice-ufrag:' + params.usernameFragment + '\\r\\n' +\n 'a=ice-pwd:' + params.password + '\\r\\n';\n};\n\n// Parses the SDP media section and returns RTCRtpParameters.\nSDPUtils.parseRtpParameters = function(mediaSection) {\n var description = {\n codecs: [],\n headerExtensions: [],\n fecMechanisms: [],\n rtcp: []\n };\n var lines = SDPUtils.splitLines(mediaSection);\n var mline = lines[0].split(' ');\n for (var i = 3; i < mline.length; i++) { // find all codecs from mline[3..]\n var pt = mline[i];\n var rtpmapline = SDPUtils.matchPrefix(\n mediaSection, 'a=rtpmap:' + pt + ' ')[0];\n if (rtpmapline) {\n var codec = SDPUtils.parseRtpMap(rtpmapline);\n var fmtps = SDPUtils.matchPrefix(\n mediaSection, 'a=fmtp:' + pt + ' ');\n // Only the first a=fmtp: is considered.\n codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};\n codec.rtcpFeedback = SDPUtils.matchPrefix(\n mediaSection, 'a=rtcp-fb:' + pt + ' ')\n .map(SDPUtils.parseRtcpFb);\n description.codecs.push(codec);\n // parse FEC mechanisms from rtpmap lines.\n switch (codec.name.toUpperCase()) {\n case 'RED':\n case 'ULPFEC':\n description.fecMechanisms.push(codec.name.toUpperCase());\n break;\n default: // only RED and ULPFEC are recognized as FEC mechanisms.\n break;\n }\n }\n }\n SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(function(line) {\n description.headerExtensions.push(SDPUtils.parseExtmap(line));\n });\n // FIXME: parse rtcp.\n return description;\n};\n\n// Generates parts of the SDP media section describing the capabilities /\n// parameters.\nSDPUtils.writeRtpDescription = function(kind, caps) {\n var sdp = '';\n\n // Build the mline.\n sdp += 'm=' + kind + ' ';\n sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.\n sdp += ' UDP/TLS/RTP/SAVPF ';\n sdp += caps.codecs.map(function(codec) {\n if (codec.preferredPayloadType !== undefined) {\n return codec.preferredPayloadType;\n }\n return codec.payloadType;\n }).join(' ') + '\\r\\n';\n\n sdp += 'c=IN IP4 0.0.0.0\\r\\n';\n sdp += 'a=rtcp:9 IN IP4 0.0.0.0\\r\\n';\n\n // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.\n caps.codecs.forEach(function(codec) {\n sdp += SDPUtils.writeRtpMap(codec);\n sdp += SDPUtils.writeFmtp(codec);\n sdp += SDPUtils.writeRtcpFb(codec);\n });\n var maxptime = 0;\n caps.codecs.forEach(function(codec) {\n if (codec.maxptime > maxptime) {\n maxptime = codec.maxptime;\n }\n });\n if (maxptime > 0) {\n sdp += 'a=maxptime:' + maxptime + '\\r\\n';\n }\n sdp += 'a=rtcp-mux\\r\\n';\n\n caps.headerExtensions.forEach(function(extension) {\n sdp += SDPUtils.writeExtmap(extension);\n });\n // FIXME: write fecMechanisms.\n return sdp;\n};\n\n// Parses the SDP media section and returns an array of\n// RTCRtpEncodingParameters.\nSDPUtils.parseRtpEncodingParameters = function(mediaSection) {\n var encodingParameters = [];\n var description = SDPUtils.parseRtpParameters(mediaSection);\n var hasRed = description.fecMechanisms.indexOf('RED') !== -1;\n var hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1;\n\n // filter a=ssrc:... cname:, ignore PlanB-msid\n var ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')\n .map(function(line) {\n return SDPUtils.parseSsrcMedia(line);\n })\n .filter(function(parts) {\n return parts.attribute === 'cname';\n });\n var primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc;\n var secondarySsrc;\n\n var flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID')\n .map(function(line) {\n var parts = line.split(' ');\n parts.shift();\n return parts.map(function(part) {\n return parseInt(part, 10);\n });\n });\n if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) {\n secondarySsrc = flows[0][1];\n }\n\n description.codecs.forEach(function(codec) {\n if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) {\n var encParam = {\n ssrc: primarySsrc,\n codecPayloadType: parseInt(codec.parameters.apt, 10),\n rtx: {\n ssrc: secondarySsrc\n }\n };\n encodingParameters.push(encParam);\n if (hasRed) {\n encParam = JSON.parse(JSON.stringify(encParam));\n encParam.fec = {\n ssrc: secondarySsrc,\n mechanism: hasUlpfec ? 'red+ulpfec' : 'red'\n };\n encodingParameters.push(encParam);\n }\n }\n });\n if (encodingParameters.length === 0 && primarySsrc) {\n encodingParameters.push({\n ssrc: primarySsrc\n });\n }\n\n // we support both b=AS and b=TIAS but interpret AS as TIAS.\n var bandwidth = SDPUtils.matchPrefix(mediaSection, 'b=');\n if (bandwidth.length) {\n if (bandwidth[0].indexOf('b=TIAS:') === 0) {\n bandwidth = parseInt(bandwidth[0].substr(7), 10);\n } else if (bandwidth[0].indexOf('b=AS:') === 0) {\n // use formula from JSEP to convert b=AS to TIAS value.\n bandwidth = parseInt(bandwidth[0].substr(5), 10) * 1000 * 0.95\n - (50 * 40 * 8);\n } else {\n bandwidth = undefined;\n }\n encodingParameters.forEach(function(params) {\n params.maxBitrate = bandwidth;\n });\n }\n return encodingParameters;\n};\n\n// parses http://draft.ortc.org/#rtcrtcpparameters*\nSDPUtils.parseRtcpParameters = function(mediaSection) {\n var rtcpParameters = {};\n\n var cname;\n // Gets the first SSRC. Note that with RTX there might be multiple\n // SSRCs.\n var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')\n .map(function(line) {\n return SDPUtils.parseSsrcMedia(line);\n })\n .filter(function(obj) {\n return obj.attribute === 'cname';\n })[0];\n if (remoteSsrc) {\n rtcpParameters.cname = remoteSsrc.value;\n rtcpParameters.ssrc = remoteSsrc.ssrc;\n }\n\n // Edge uses the compound attribute instead of reducedSize\n // compound is !reducedSize\n var rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize');\n rtcpParameters.reducedSize = rsize.length > 0;\n rtcpParameters.compound = rsize.length === 0;\n\n // parses the rtcp-mux attrіbute.\n // Note that Edge does not support unmuxed RTCP.\n var mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux');\n rtcpParameters.mux = mux.length > 0;\n\n return rtcpParameters;\n};\n\n// parses either a=msid: or a=ssrc:... msid lines and returns\n// the id of the MediaStream and MediaStreamTrack.\nSDPUtils.parseMsid = function(mediaSection) {\n var parts;\n var spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:');\n if (spec.length === 1) {\n parts = spec[0].substr(7).split(' ');\n return {stream: parts[0], track: parts[1]};\n }\n var planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')\n .map(function(line) {\n return SDPUtils.parseSsrcMedia(line);\n })\n .filter(function(parts) {\n return parts.attribute === 'msid';\n });\n if (planB.length > 0) {\n parts = planB[0].value.split(' ');\n return {stream: parts[0], track: parts[1]};\n }\n};\n\n// Generate a session ID for SDP.\n// https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.2.1\n// recommends using a cryptographically random +ve 64-bit value\n// but right now this should be acceptable and within the right range\nSDPUtils.generateSessionId = function() {\n return Math.random().toString().substr(2, 21);\n};\n\n// Write boilder plate for start of SDP\n// sessId argument is optional - if not supplied it will\n// be generated randomly\n// sessVersion is optional and defaults to 2\nSDPUtils.writeSessionBoilerplate = function(sessId, sessVer) {\n var sessionId;\n var version = sessVer !== undefined ? sessVer : 2;\n if (sessId) {\n sessionId = sessId;\n } else {\n sessionId = SDPUtils.generateSessionId();\n }\n // FIXME: sess-id should be an NTP timestamp.\n return 'v=0\\r\\n' +\n 'o=thisisadapterortc ' + sessionId + ' ' + version + ' IN IP4 127.0.0.1\\r\\n' +\n 's=-\\r\\n' +\n 't=0 0\\r\\n';\n};\n\nSDPUtils.writeMediaSection = function(transceiver, caps, type, stream) {\n var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);\n\n // Map ICE parameters (ufrag, pwd) to SDP.\n sdp += SDPUtils.writeIceParameters(\n transceiver.iceGatherer.getLocalParameters());\n\n // Map DTLS parameters to SDP.\n sdp += SDPUtils.writeDtlsParameters(\n transceiver.dtlsTransport.getLocalParameters(),\n type === 'offer' ? 'actpass' : 'active');\n\n sdp += 'a=mid:' + transceiver.mid + '\\r\\n';\n\n if (transceiver.direction) {\n sdp += 'a=' + transceiver.direction + '\\r\\n';\n } else if (transceiver.rtpSender && transceiver.rtpReceiver) {\n sdp += 'a=sendrecv\\r\\n';\n } else if (transceiver.rtpSender) {\n sdp += 'a=sendonly\\r\\n';\n } else if (transceiver.rtpReceiver) {\n sdp += 'a=recvonly\\r\\n';\n } else {\n sdp += 'a=inactive\\r\\n';\n }\n\n if (transceiver.rtpSender) {\n // spec.\n var msid = 'msid:' + stream.id + ' ' +\n transceiver.rtpSender.track.id + '\\r\\n';\n sdp += 'a=' + msid;\n\n // for Chrome.\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc +\n ' ' + msid;\n if (transceiver.sendEncodingParameters[0].rtx) {\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +\n ' ' + msid;\n sdp += 'a=ssrc-group:FID ' +\n transceiver.sendEncodingParameters[0].ssrc + ' ' +\n transceiver.sendEncodingParameters[0].rtx.ssrc +\n '\\r\\n';\n }\n }\n // FIXME: this should be written by writeRtpDescription.\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc +\n ' cname:' + SDPUtils.localCName + '\\r\\n';\n if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) {\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +\n ' cname:' + SDPUtils.localCName + '\\r\\n';\n }\n return sdp;\n};\n\n// Gets the direction from the mediaSection or the sessionpart.\nSDPUtils.getDirection = function(mediaSection, sessionpart) {\n // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.\n var lines = SDPUtils.splitLines(mediaSection);\n for (var i = 0; i < lines.length; i++) {\n switch (lines[i]) {\n case 'a=sendrecv':\n case 'a=sendonly':\n case 'a=recvonly':\n case 'a=inactive':\n return lines[i].substr(2);\n default:\n // FIXME: What should happen here?\n }\n }\n if (sessionpart) {\n return SDPUtils.getDirection(sessionpart);\n }\n return 'sendrecv';\n};\n\nSDPUtils.getKind = function(mediaSection) {\n var lines = SDPUtils.splitLines(mediaSection);\n var mline = lines[0].split(' ');\n return mline[0].substr(2);\n};\n\nSDPUtils.isRejected = function(mediaSection) {\n return mediaSection.split(' ', 2)[1] === '0';\n};\n\nSDPUtils.parseMLine = function(mediaSection) {\n var lines = SDPUtils.splitLines(mediaSection);\n var parts = lines[0].substr(2).split(' ');\n return {\n kind: parts[0],\n port: parseInt(parts[1], 10),\n protocol: parts[2],\n fmt: parts.slice(3).join(' ')\n };\n};\n\nSDPUtils.parseOLine = function(mediaSection) {\n var line = SDPUtils.matchPrefix(mediaSection, 'o=')[0];\n var parts = line.substr(2).split(' ');\n return {\n username: parts[0],\n sessionId: parts[1],\n sessionVersion: parseInt(parts[2], 10),\n netType: parts[3],\n addressType: parts[4],\n address: parts[5],\n };\n}\n\n// Expose public methods.\nif (typeof module === 'object') {\n module.exports = SDPUtils;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp/sdp.js\n// module id = ../../../../openvidu-browser/node_modules/sdp/sdp.js\n// module chunks = main","/**\n * UAParser.js v0.7.17\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2016 Faisal Salman \n * Dual licensed under GPLv2 & MIT\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.17',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var margedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n margedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n margedRegexes[i] = regexes[i];\n }\n }\n return margedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n //var result = {},\n var i = 0, j, k, p, q, matches, match;//, args = arguments;\n\n /*// construct object barebones\n for (p = 0; p < args[1].length; p++) {\n q = args[1][p];\n result[typeof q === OBJ_TYPE ? q[0] : q] = undefined;\n }*/\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n // console.log(this);\n //return this;\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]+)*/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n\n // Trident based\n /(avant\\s|iemobile|slim|baidu)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser/Baidu\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]+)*/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser\n ], [NAME, VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [NAME, VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i\n // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(konqueror)\\/([\\w\\.]+)/i, // Konqueror\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\\/([\\w\\.-]+)/i,\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]+)*/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n\n /* /////////////////////\n // Media players BEGIN\n ////////////////////////\n\n , [\n\n /(apple(?:coremedia|))\\/((\\d+)[\\w\\._]+)/i, // Generic Apple CoreMedia\n /(coremedia) v((\\d+)[\\w\\._]+)/i\n ], [NAME, VERSION], [\n\n /(aqualung|lyssna|bsplayer)\\/((\\d+)?[\\w\\.-]+)/i // Aqualung/Lyssna/BSPlayer\n ], [NAME, VERSION], [\n\n /(ares|ossproxy)\\s((\\d+)[\\w\\.-]+)/i // Ares/OSSProxy\n ], [NAME, VERSION], [\n\n /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\\/((\\d+)[\\w\\.-]+)/i,\n // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC\n // NSPlayer/PSP-InternetRadioPlayer/Videos\n /(clementine|music player daemon)\\s((\\d+)[\\w\\.-]+)/i, // Clementine/MPD\n /(lg player|nexplayer)\\s((\\d+)[\\d\\.]+)/i,\n /player\\/(nexplayer|lg player)\\s((\\d+)[\\w\\.-]+)/i // NexPlayer/LG Player\n ], [NAME, VERSION], [\n /(nexplayer)\\s((\\d+)[\\w\\.-]+)/i // Nexplayer\n ], [NAME, VERSION], [\n\n /(flrp)\\/((\\d+)[\\w\\.-]+)/i // Flip Player\n ], [[NAME, 'Flip Player'], VERSION], [\n\n /(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i\n // FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit\n ], [NAME], [\n\n /(gstreamer) souphttpsrc (?:\\([^\\)]+\\)){0,1} libsoup\\/((\\d+)[\\w\\.-]+)/i\n // Gstreamer\n ], [NAME, VERSION], [\n\n /(htc streaming player)\\s[\\w_]+\\s\\/\\s((\\d+)[\\d\\.]+)/i, // HTC Streaming Player\n /(java|python-urllib|python-requests|wget|libcurl)\\/((\\d+)[\\w\\.-_]+)/i,\n // Java/urllib/requests/wget/cURL\n /(lavf)((\\d+)[\\d\\.]+)/i // Lavf (FFMPEG)\n ], [NAME, VERSION], [\n\n /(htc_one_s)\\/((\\d+)[\\d\\.]+)/i // HTC One S\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(mplayer)(?:\\s|\\/)(?:(?:sherpya-){0,1}svn)(?:-|\\s)(r\\d+(?:-\\d+[\\w\\.-]+){0,1})/i\n // MPlayer SVN\n ], [NAME, VERSION], [\n\n /(mplayer)(?:\\s|\\/|[unkow-]+)((\\d+)[\\w\\.-]+)/i // MPlayer\n ], [NAME, VERSION], [\n\n /(mplayer)/i, // MPlayer (no other info)\n /(yourmuze)/i, // YourMuze\n /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime\n ], [NAME], [\n\n /(nero (?:home|scout))\\/((\\d+)[\\w\\.-]+)/i // Nero Home/Nero Scout\n ], [NAME, VERSION], [\n\n /(nokia\\d+)\\/((\\d+)[\\w\\.-]+)/i // Nokia\n ], [NAME, VERSION], [\n\n /\\s(songbird)\\/((\\d+)[\\w\\.-]+)/i // Songbird/Philips-Songbird\n ], [NAME, VERSION], [\n\n /(winamp)3 version ((\\d+)[\\w\\.-]+)/i, // Winamp\n /(winamp)\\s((\\d+)[\\w\\.-]+)/i,\n /(winamp)mpeg\\/((\\d+)[\\w\\.-]+)/i\n ], [NAME, VERSION], [\n\n /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)\n // inlight radio\n ], [NAME], [\n\n /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\\/((\\d+)[\\w\\.-]+)/i\n // QuickTime/RealMedia/RadioApp/RadioClientApplication/\n // SoundTap/Totem/Stagefright/Streamium\n ], [NAME, VERSION], [\n\n /(smp)((\\d+)[\\d\\.]+)/i // SMP\n ], [NAME, VERSION], [\n\n /(vlc) media player - version ((\\d+)[\\w\\.]+)/i, // VLC Videolan\n /(vlc)\\/((\\d+)[\\w\\.-]+)/i,\n /(xbmc|gvfs|xine|xmms|irapp)\\/((\\d+)[\\w\\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp\n /(foobar2000)\\/((\\d+)[\\d\\.]+)/i, // Foobar2000\n /(itunes)\\/((\\d+)[\\d\\.]+)/i // iTunes\n ], [NAME, VERSION], [\n\n /(wmplayer)\\/((\\d+)[\\w\\.-]+)/i, // Windows Media Player\n /(windows-media-player)\\/((\\d+)[\\w\\.-]+)/i\n ], [[NAME, /-/g, ' '], VERSION], [\n\n /windows\\/((\\d+)[\\w\\.-]+) upnp\\/[\\d\\.]+ dlnadoc\\/[\\d\\.]+ (home media server)/i\n // Windows Media Server\n ], [VERSION, [NAME, 'Windows']], [\n\n /(com\\.riseupradioalarm)\\/((\\d+)[\\d\\.]*)/i // RiseUP Radio Alarm\n ], [NAME, VERSION], [\n\n /(rad.io)\\s((\\d+)[\\d\\.]+)/i, // Rad.io\n /(radio.(?:de|at|fr))\\s((\\d+)[\\d\\.]+)/i\n ], [[NAME, 'rad.io'], VERSION]\n\n //////////////////////\n // Media players END\n ////////////////////*/\n\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+;))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\);-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/[\\w\\.]+.*silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/[\\w\\.]+.*silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]+)*/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(S(?:5000|6000)+(?:[-][\\w+]))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\))|\\w+)*/i, // HTC\n /(zte)-(\\w+)*/i, // ZTE\n /(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]+)*/i\n // Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?(:?\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w+)*/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)*/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w+)*/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]+)*/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android\\s3\\.[\\s\\w;-]{10}(a\\d{3})/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w+)*/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)\\s/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel xl|pixel)\\s/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+)?)\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)?(?:[\\s_]*[\\w\\s]+)?)\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu Tablet\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [\n\n /android.+a000(1)\\s+build/i // OnePlus\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Venue[\\d\\s]*)\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(zte)?.+(k\\d{2})\\s+build/i // ZTE K Series Tablet\n ], [[VENDOR, 'ZTE'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2}x?.*)\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(.+)\\s+build/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?.+)\\s+build/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?.+)\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-?)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(.*\\b)\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q.+)\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /(android.+)[;\\/].+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n\n\n /*//////////////////////////\n // TODO: move to string map\n ////////////////////////////\n\n /(C6603)/i // Sony Xperia Z C6603\n ], [[MODEL, 'Xperia Z C6603'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n /(C6903)/i // Sony Xperia Z 1\n ], [[MODEL, 'Xperia Z 1'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /(SM-G900[F|H])/i // Samsung Galaxy S5\n ], [[MODEL, 'Galaxy S5'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G7102)/i // Samsung Galaxy Grand 2\n ], [[MODEL, 'Galaxy Grand 2'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G530H)/i // Samsung Galaxy Grand Prime\n ], [[MODEL, 'Galaxy Grand Prime'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G313HZ)/i // Samsung Galaxy V\n ], [[MODEL, 'Galaxy V'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T805)/i // Samsung Galaxy Tab S 10.5\n ], [[MODEL, 'Galaxy Tab S 10.5'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n /(SM-G800F)/i // Samsung Galaxy S5 Mini\n ], [[MODEL, 'Galaxy S5 Mini'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T311)/i // Samsung Galaxy Tab 3 8.0\n ], [[MODEL, 'Galaxy Tab 3 8.0'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n\n /(T3C)/i // Advan Vandroid T3C\n ], [MODEL, [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN T1J\\+)/i // Advan Vandroid T1J+\n ], [[MODEL, 'Vandroid T1J+'], [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN S4A)/i // Advan Vandroid S4A\n ], [[MODEL, 'Vandroid S4A'], [VENDOR, 'Advan'], [TYPE, MOBILE]], [\n\n /(V972M)/i // ZTE V972M\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n\n /(i-mobile)\\s(IQ\\s[\\d\\.]+)/i // i-mobile IQ\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(IQ6.3)/i // i-mobile IQ IQ 6.3\n ], [[MODEL, 'IQ 6.3'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n /(i-mobile)\\s(i-style\\s[\\d\\.]+)/i // i-mobile i-STYLE\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1\n ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n\n /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512\n ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [\n\n /////////////\n // END TODO\n ///////////*/\n\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]+).*(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s]+\\w)*/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]+)*/i, // Blackberry\n /(tizen)[\\/\\s]([\\w\\.]+)/i, // Tizen\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|contiki)[\\/\\s-]?([\\w\\.]+)*/i,\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki\n /linux;.+(sailfish);/i // Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]+)*/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w+)*/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]+)*/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]+)*/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]+)*/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.]+\\d)*/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]+(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]+\\w)*/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]+)*/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.]*)*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS\n /(unix)\\s?([\\w\\.]+)*/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n /*\n var Browser = function (name, version) {\n this[NAME] = name;\n this[VERSION] = version;\n };\n var CPU = function (arch) {\n this[ARCHITECTURE] = arch;\n };\n var Device = function (vendor, model, type) {\n this[VENDOR] = vendor;\n this[MODEL] = model;\n this[TYPE] = type;\n };\n var Engine = Browser;\n var OS = Browser;\n */\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n //var browser = new Browser();\n //var cpu = new CPU();\n //var device = new Device();\n //var engine = new Engine();\n //var os = new OS();\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n //browser = new Browser();\n //cpu = new CPU();\n //device = new Device();\n //engine = new Engine();\n //os = new OS();\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n //UAParser.Utils = util;\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n // TODO: test!!!!!!!!\n /*\n if (require && require.main === module && process) {\n // cli\n var jsonize = function (arr) {\n var res = [];\n for (var i in arr) {\n res.push(new UAParser(arr[i]).getResult());\n }\n process.stdout.write(JSON.stringify(res, null, 2) + '\\n');\n };\n if (process.stdin.isTTY) {\n // via args\n jsonize(process.argv.slice(2));\n } else {\n // via pipe\n var str = '';\n process.stdin.on('readable', function() {\n var read = process.stdin.read();\n if (read !== null) {\n str += read;\n }\n });\n process.stdin.on('end', function () {\n jsonize(str.replace(/\\n$/, '').split('\\n'));\n });\n }\n }\n */\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (window) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if (typeof $ !== UNDEF_TYPE) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module id = ../../../../openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module chunks = main","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/index.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/index.js\n// module chunks = main","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module chunks = main","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\nvar rng;\n\nvar crypto = global.crypto || global.msCrypto; // for IE 11\nif (crypto && crypto.getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n rng = function whatwgRNG() {\n crypto.getRandomValues(rnds8);\n return rnds8;\n };\n}\n\nif (!rng) {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n rng = function() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n\nmodule.exports = rng;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\n// random #'s we need to init node and clockseq\nvar _seedBytes = rng();\n\n// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\nvar _nodeId = [\n _seedBytes[0] | 0x01,\n _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]\n];\n\n// Per 4.2.2, randomize (14 bit) clockseq\nvar _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;\n\n// Previous uuid creation time\nvar _lastMSecs = 0, _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n var node = options.node || _nodeId;\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v1.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v1.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options == 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v4.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v4.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n\n'use strict';\n\nvar adapterFactory = require('./adapter_factory.js');\nmodule.exports = adapterFactory({window: global.window});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_core.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_core.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n\n'use strict';\n\nvar utils = require('./utils');\n// Shimming starts here.\nmodule.exports = function(dependencies, opts) {\n var window = dependencies && dependencies.window;\n\n var options = {\n shimChrome: true,\n shimFirefox: true,\n shimEdge: true,\n shimSafari: true,\n };\n\n for (var key in opts) {\n if (hasOwnProperty.call(opts, key)) {\n options[key] = opts[key];\n }\n }\n\n // Utils.\n var logging = utils.log;\n var browserDetails = utils.detectBrowser(window);\n\n // Uncomment the line below if you want logging to occur, including logging\n // for the switch statement below. Can also be turned on in the browser via\n // adapter.disableLog(false), but then logging from the switch statement below\n // will not appear.\n // require('./utils').disableLog(false);\n\n // Browser shims.\n var chromeShim = require('./chrome/chrome_shim') || null;\n var edgeShim = require('./edge/edge_shim') || null;\n var firefoxShim = require('./firefox/firefox_shim') || null;\n var safariShim = require('./safari/safari_shim') || null;\n var commonShim = require('./common_shim') || null;\n\n // Export to the adapter global object visible in the browser.\n var adapter = {\n browserDetails: browserDetails,\n commonShim: commonShim,\n extractVersion: utils.extractVersion,\n disableLog: utils.disableLog,\n disableWarnings: utils.disableWarnings\n };\n\n // Shim browser if found.\n switch (browserDetails.browser) {\n case 'chrome':\n if (!chromeShim || !chromeShim.shimPeerConnection ||\n !options.shimChrome) {\n logging('Chrome shim is not included in this adapter release.');\n return adapter;\n }\n logging('adapter.js shimming chrome.');\n // Export to the adapter global object visible in the browser.\n adapter.browserShim = chromeShim;\n commonShim.shimCreateObjectURL(window);\n\n chromeShim.shimGetUserMedia(window);\n chromeShim.shimMediaStream(window);\n chromeShim.shimSourceObject(window);\n chromeShim.shimPeerConnection(window);\n chromeShim.shimOnTrack(window);\n chromeShim.shimAddTrackRemoveTrack(window);\n chromeShim.shimGetSendersWithDtmf(window);\n\n commonShim.shimRTCIceCandidate(window);\n commonShim.shimMaxMessageSize(window);\n commonShim.shimSendThrowTypeError(window);\n break;\n case 'firefox':\n if (!firefoxShim || !firefoxShim.shimPeerConnection ||\n !options.shimFirefox) {\n logging('Firefox shim is not included in this adapter release.');\n return adapter;\n }\n logging('adapter.js shimming firefox.');\n // Export to the adapter global object visible in the browser.\n adapter.browserShim = firefoxShim;\n commonShim.shimCreateObjectURL(window);\n\n firefoxShim.shimGetUserMedia(window);\n firefoxShim.shimSourceObject(window);\n firefoxShim.shimPeerConnection(window);\n firefoxShim.shimOnTrack(window);\n firefoxShim.shimRemoveStream(window);\n\n commonShim.shimRTCIceCandidate(window);\n commonShim.shimMaxMessageSize(window);\n commonShim.shimSendThrowTypeError(window);\n break;\n case 'edge':\n if (!edgeShim || !edgeShim.shimPeerConnection || !options.shimEdge) {\n logging('MS edge shim is not included in this adapter release.');\n return adapter;\n }\n logging('adapter.js shimming edge.');\n // Export to the adapter global object visible in the browser.\n adapter.browserShim = edgeShim;\n commonShim.shimCreateObjectURL(window);\n\n edgeShim.shimGetUserMedia(window);\n edgeShim.shimPeerConnection(window);\n edgeShim.shimReplaceTrack(window);\n\n // the edge shim implements the full RTCIceCandidate object.\n\n commonShim.shimMaxMessageSize(window);\n commonShim.shimSendThrowTypeError(window);\n break;\n case 'safari':\n if (!safariShim || !options.shimSafari) {\n logging('Safari shim is not included in this adapter release.');\n return adapter;\n }\n logging('adapter.js shimming safari.');\n // Export to the adapter global object visible in the browser.\n adapter.browserShim = safariShim;\n commonShim.shimCreateObjectURL(window);\n\n safariShim.shimRTCIceServerUrls(window);\n safariShim.shimCallbacksAPI(window);\n safariShim.shimLocalStreamsAPI(window);\n safariShim.shimRemoteStreamsAPI(window);\n safariShim.shimTrackEventTransceiver(window);\n safariShim.shimGetUserMedia(window);\n safariShim.shimCreateOfferLegacy(window);\n\n commonShim.shimRTCIceCandidate(window);\n commonShim.shimMaxMessageSize(window);\n commonShim.shimSendThrowTypeError(window);\n break;\n default:\n logging('Unsupported browser!');\n break;\n }\n\n return adapter;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_factory.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_factory.js\n// module chunks = main","\n/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\nvar utils = require('../utils.js');\nvar logging = utils.log;\n\nmodule.exports = {\n shimGetUserMedia: require('./getusermedia'),\n shimMediaStream: function(window) {\n window.MediaStream = window.MediaStream || window.webkitMediaStream;\n },\n\n shimOnTrack: function(window) {\n if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in\n window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {\n get: function() {\n return this._ontrack;\n },\n set: function(f) {\n if (this._ontrack) {\n this.removeEventListener('track', this._ontrack);\n }\n this.addEventListener('track', this._ontrack = f);\n }\n });\n var origSetRemoteDescription =\n window.RTCPeerConnection.prototype.setRemoteDescription;\n window.RTCPeerConnection.prototype.setRemoteDescription = function() {\n var pc = this;\n if (!pc._ontrackpoly) {\n pc._ontrackpoly = function(e) {\n // onaddstream does not fire when a track is added to an existing\n // stream. But stream.onaddtrack is implemented so we use that.\n e.stream.addEventListener('addtrack', function(te) {\n var receiver;\n if (window.RTCPeerConnection.prototype.getReceivers) {\n receiver = pc.getReceivers().find(function(r) {\n return r.track && r.track.id === te.track.id;\n });\n } else {\n receiver = {track: te.track};\n }\n\n var event = new Event('track');\n event.track = te.track;\n event.receiver = receiver;\n event.transceiver = {receiver: receiver};\n event.streams = [e.stream];\n pc.dispatchEvent(event);\n });\n e.stream.getTracks().forEach(function(track) {\n var receiver;\n if (window.RTCPeerConnection.prototype.getReceivers) {\n receiver = pc.getReceivers().find(function(r) {\n return r.track && r.track.id === track.id;\n });\n } else {\n receiver = {track: track};\n }\n var event = new Event('track');\n event.track = track;\n event.receiver = receiver;\n event.transceiver = {receiver: receiver};\n event.streams = [e.stream];\n pc.dispatchEvent(event);\n });\n };\n pc.addEventListener('addstream', pc._ontrackpoly);\n }\n return origSetRemoteDescription.apply(pc, arguments);\n };\n } else if (!('RTCRtpTransceiver' in window)) {\n utils.wrapPeerConnectionEvent(window, 'track', function(e) {\n if (!e.transceiver) {\n e.transceiver = {receiver: e.receiver};\n }\n return e;\n });\n }\n },\n\n shimGetSendersWithDtmf: function(window) {\n // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.\n if (typeof window === 'object' && window.RTCPeerConnection &&\n !('getSenders' in window.RTCPeerConnection.prototype) &&\n 'createDTMFSender' in window.RTCPeerConnection.prototype) {\n var shimSenderWithDtmf = function(pc, track) {\n return {\n track: track,\n get dtmf() {\n if (this._dtmf === undefined) {\n if (track.kind === 'audio') {\n this._dtmf = pc.createDTMFSender(track);\n } else {\n this._dtmf = null;\n }\n }\n return this._dtmf;\n },\n _pc: pc\n };\n };\n\n // augment addTrack when getSenders is not available.\n if (!window.RTCPeerConnection.prototype.getSenders) {\n window.RTCPeerConnection.prototype.getSenders = function() {\n this._senders = this._senders || [];\n return this._senders.slice(); // return a copy of the internal state.\n };\n var origAddTrack = window.RTCPeerConnection.prototype.addTrack;\n window.RTCPeerConnection.prototype.addTrack = function(track, stream) {\n var pc = this;\n var sender = origAddTrack.apply(pc, arguments);\n if (!sender) {\n sender = shimSenderWithDtmf(pc, track);\n pc._senders.push(sender);\n }\n return sender;\n };\n\n var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;\n window.RTCPeerConnection.prototype.removeTrack = function(sender) {\n var pc = this;\n origRemoveTrack.apply(pc, arguments);\n var idx = pc._senders.indexOf(sender);\n if (idx !== -1) {\n pc._senders.splice(idx, 1);\n }\n };\n }\n var origAddStream = window.RTCPeerConnection.prototype.addStream;\n window.RTCPeerConnection.prototype.addStream = function(stream) {\n var pc = this;\n pc._senders = pc._senders || [];\n origAddStream.apply(pc, [stream]);\n stream.getTracks().forEach(function(track) {\n pc._senders.push(shimSenderWithDtmf(pc, track));\n });\n };\n\n var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n var pc = this;\n pc._senders = pc._senders || [];\n origRemoveStream.apply(pc, [stream]);\n\n stream.getTracks().forEach(function(track) {\n var sender = pc._senders.find(function(s) {\n return s.track === track;\n });\n if (sender) {\n pc._senders.splice(pc._senders.indexOf(sender), 1); // remove sender\n }\n });\n };\n } else if (typeof window === 'object' && window.RTCPeerConnection &&\n 'getSenders' in window.RTCPeerConnection.prototype &&\n 'createDTMFSender' in window.RTCPeerConnection.prototype &&\n window.RTCRtpSender &&\n !('dtmf' in window.RTCRtpSender.prototype)) {\n var origGetSenders = window.RTCPeerConnection.prototype.getSenders;\n window.RTCPeerConnection.prototype.getSenders = function() {\n var pc = this;\n var senders = origGetSenders.apply(pc, []);\n senders.forEach(function(sender) {\n sender._pc = pc;\n });\n return senders;\n };\n\n Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {\n get: function() {\n if (this._dtmf === undefined) {\n if (this.track.kind === 'audio') {\n this._dtmf = this._pc.createDTMFSender(this.track);\n } else {\n this._dtmf = null;\n }\n }\n return this._dtmf;\n }\n });\n }\n },\n\n shimSourceObject: function(window) {\n var URL = window && window.URL;\n\n if (typeof window === 'object') {\n if (window.HTMLMediaElement &&\n !('srcObject' in window.HTMLMediaElement.prototype)) {\n // Shim the srcObject property, once, when HTMLMediaElement is found.\n Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', {\n get: function() {\n return this._srcObject;\n },\n set: function(stream) {\n var self = this;\n // Use _srcObject as a private property for this shim\n this._srcObject = stream;\n if (this.src) {\n URL.revokeObjectURL(this.src);\n }\n\n if (!stream) {\n this.src = '';\n return undefined;\n }\n this.src = URL.createObjectURL(stream);\n // We need to recreate the blob url when a track is added or\n // removed. Doing it manually since we want to avoid a recursion.\n stream.addEventListener('addtrack', function() {\n if (self.src) {\n URL.revokeObjectURL(self.src);\n }\n self.src = URL.createObjectURL(stream);\n });\n stream.addEventListener('removetrack', function() {\n if (self.src) {\n URL.revokeObjectURL(self.src);\n }\n self.src = URL.createObjectURL(stream);\n });\n }\n });\n }\n }\n },\n\n shimAddTrackRemoveTrackWithNative: function(window) {\n // shim addTrack/removeTrack with native variants in order to make\n // the interactions with legacy getLocalStreams behave as in other browsers.\n // Keeps a mapping stream.id => [stream, rtpsenders...]\n window.RTCPeerConnection.prototype.getLocalStreams = function() {\n var pc = this;\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n return Object.keys(this._shimmedLocalStreams).map(function(streamId) {\n return pc._shimmedLocalStreams[streamId][0];\n });\n };\n\n var origAddTrack = window.RTCPeerConnection.prototype.addTrack;\n window.RTCPeerConnection.prototype.addTrack = function(track, stream) {\n if (!stream) {\n return origAddTrack.apply(this, arguments);\n }\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n\n var sender = origAddTrack.apply(this, arguments);\n if (!this._shimmedLocalStreams[stream.id]) {\n this._shimmedLocalStreams[stream.id] = [stream, sender];\n } else if (this._shimmedLocalStreams[stream.id].indexOf(sender) === -1) {\n this._shimmedLocalStreams[stream.id].push(sender);\n }\n return sender;\n };\n\n var origAddStream = window.RTCPeerConnection.prototype.addStream;\n window.RTCPeerConnection.prototype.addStream = function(stream) {\n var pc = this;\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n\n stream.getTracks().forEach(function(track) {\n var alreadyExists = pc.getSenders().find(function(s) {\n return s.track === track;\n });\n if (alreadyExists) {\n throw new DOMException('Track already exists.',\n 'InvalidAccessError');\n }\n });\n var existingSenders = pc.getSenders();\n origAddStream.apply(this, arguments);\n var newSenders = pc.getSenders().filter(function(newSender) {\n return existingSenders.indexOf(newSender) === -1;\n });\n this._shimmedLocalStreams[stream.id] = [stream].concat(newSenders);\n };\n\n var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n delete this._shimmedLocalStreams[stream.id];\n return origRemoveStream.apply(this, arguments);\n };\n\n var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;\n window.RTCPeerConnection.prototype.removeTrack = function(sender) {\n var pc = this;\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n if (sender) {\n Object.keys(this._shimmedLocalStreams).forEach(function(streamId) {\n var idx = pc._shimmedLocalStreams[streamId].indexOf(sender);\n if (idx !== -1) {\n pc._shimmedLocalStreams[streamId].splice(idx, 1);\n }\n if (pc._shimmedLocalStreams[streamId].length === 1) {\n delete pc._shimmedLocalStreams[streamId];\n }\n });\n }\n return origRemoveTrack.apply(this, arguments);\n };\n },\n\n shimAddTrackRemoveTrack: function(window) {\n var browserDetails = utils.detectBrowser(window);\n // shim addTrack and removeTrack.\n if (window.RTCPeerConnection.prototype.addTrack &&\n browserDetails.version >= 65) {\n return this.shimAddTrackRemoveTrackWithNative(window);\n }\n\n // also shim pc.getLocalStreams when addTrack is shimmed\n // to return the original streams.\n var origGetLocalStreams = window.RTCPeerConnection.prototype\n .getLocalStreams;\n window.RTCPeerConnection.prototype.getLocalStreams = function() {\n var pc = this;\n var nativeStreams = origGetLocalStreams.apply(this);\n pc._reverseStreams = pc._reverseStreams || {};\n return nativeStreams.map(function(stream) {\n return pc._reverseStreams[stream.id];\n });\n };\n\n var origAddStream = window.RTCPeerConnection.prototype.addStream;\n window.RTCPeerConnection.prototype.addStream = function(stream) {\n var pc = this;\n pc._streams = pc._streams || {};\n pc._reverseStreams = pc._reverseStreams || {};\n\n stream.getTracks().forEach(function(track) {\n var alreadyExists = pc.getSenders().find(function(s) {\n return s.track === track;\n });\n if (alreadyExists) {\n throw new DOMException('Track already exists.',\n 'InvalidAccessError');\n }\n });\n // Add identity mapping for consistency with addTrack.\n // Unless this is being used with a stream from addTrack.\n if (!pc._reverseStreams[stream.id]) {\n var newStream = new window.MediaStream(stream.getTracks());\n pc._streams[stream.id] = newStream;\n pc._reverseStreams[newStream.id] = stream;\n stream = newStream;\n }\n origAddStream.apply(pc, [stream]);\n };\n\n var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n var pc = this;\n pc._streams = pc._streams || {};\n pc._reverseStreams = pc._reverseStreams || {};\n\n origRemoveStream.apply(pc, [(pc._streams[stream.id] || stream)]);\n delete pc._reverseStreams[(pc._streams[stream.id] ?\n pc._streams[stream.id].id : stream.id)];\n delete pc._streams[stream.id];\n };\n\n window.RTCPeerConnection.prototype.addTrack = function(track, stream) {\n var pc = this;\n if (pc.signalingState === 'closed') {\n throw new DOMException(\n 'The RTCPeerConnection\\'s signalingState is \\'closed\\'.',\n 'InvalidStateError');\n }\n var streams = [].slice.call(arguments, 1);\n if (streams.length !== 1 ||\n !streams[0].getTracks().find(function(t) {\n return t === track;\n })) {\n // this is not fully correct but all we can manage without\n // [[associated MediaStreams]] internal slot.\n throw new DOMException(\n 'The adapter.js addTrack polyfill only supports a single ' +\n ' stream which is associated with the specified track.',\n 'NotSupportedError');\n }\n\n var alreadyExists = pc.getSenders().find(function(s) {\n return s.track === track;\n });\n if (alreadyExists) {\n throw new DOMException('Track already exists.',\n 'InvalidAccessError');\n }\n\n pc._streams = pc._streams || {};\n pc._reverseStreams = pc._reverseStreams || {};\n var oldStream = pc._streams[stream.id];\n if (oldStream) {\n // this is using odd Chrome behaviour, use with caution:\n // https://bugs.chromium.org/p/webrtc/issues/detail?id=7815\n // Note: we rely on the high-level addTrack/dtmf shim to\n // create the sender with a dtmf sender.\n oldStream.addTrack(track);\n\n // Trigger ONN async.\n Promise.resolve().then(function() {\n pc.dispatchEvent(new Event('negotiationneeded'));\n });\n } else {\n var newStream = new window.MediaStream([track]);\n pc._streams[stream.id] = newStream;\n pc._reverseStreams[newStream.id] = stream;\n pc.addStream(newStream);\n }\n return pc.getSenders().find(function(s) {\n return s.track === track;\n });\n };\n\n // replace the internal stream id with the external one and\n // vice versa.\n function replaceInternalStreamId(pc, description) {\n var sdp = description.sdp;\n Object.keys(pc._reverseStreams || []).forEach(function(internalId) {\n var externalStream = pc._reverseStreams[internalId];\n var internalStream = pc._streams[externalStream.id];\n sdp = sdp.replace(new RegExp(internalStream.id, 'g'),\n externalStream.id);\n });\n return new RTCSessionDescription({\n type: description.type,\n sdp: sdp\n });\n }\n function replaceExternalStreamId(pc, description) {\n var sdp = description.sdp;\n Object.keys(pc._reverseStreams || []).forEach(function(internalId) {\n var externalStream = pc._reverseStreams[internalId];\n var internalStream = pc._streams[externalStream.id];\n sdp = sdp.replace(new RegExp(externalStream.id, 'g'),\n internalStream.id);\n });\n return new RTCSessionDescription({\n type: description.type,\n sdp: sdp\n });\n }\n ['createOffer', 'createAnswer'].forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n var pc = this;\n var args = arguments;\n var isLegacyCall = arguments.length &&\n typeof arguments[0] === 'function';\n if (isLegacyCall) {\n return nativeMethod.apply(pc, [\n function(description) {\n var desc = replaceInternalStreamId(pc, description);\n args[0].apply(null, [desc]);\n },\n function(err) {\n if (args[1]) {\n args[1].apply(null, err);\n }\n }, arguments[2]\n ]);\n }\n return nativeMethod.apply(pc, arguments)\n .then(function(description) {\n return replaceInternalStreamId(pc, description);\n });\n };\n });\n\n var origSetLocalDescription =\n window.RTCPeerConnection.prototype.setLocalDescription;\n window.RTCPeerConnection.prototype.setLocalDescription = function() {\n var pc = this;\n if (!arguments.length || !arguments[0].type) {\n return origSetLocalDescription.apply(pc, arguments);\n }\n arguments[0] = replaceExternalStreamId(pc, arguments[0]);\n return origSetLocalDescription.apply(pc, arguments);\n };\n\n // TODO: mangle getStats: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamstats-streamidentifier\n\n var origLocalDescription = Object.getOwnPropertyDescriptor(\n window.RTCPeerConnection.prototype, 'localDescription');\n Object.defineProperty(window.RTCPeerConnection.prototype,\n 'localDescription', {\n get: function() {\n var pc = this;\n var description = origLocalDescription.get.apply(this);\n if (description.type === '') {\n return description;\n }\n return replaceInternalStreamId(pc, description);\n }\n });\n\n window.RTCPeerConnection.prototype.removeTrack = function(sender) {\n var pc = this;\n if (pc.signalingState === 'closed') {\n throw new DOMException(\n 'The RTCPeerConnection\\'s signalingState is \\'closed\\'.',\n 'InvalidStateError');\n }\n // We can not yet check for sender instanceof RTCRtpSender\n // since we shim RTPSender. So we check if sender._pc is set.\n if (!sender._pc) {\n throw new DOMException('Argument 1 of RTCPeerConnection.removeTrack ' +\n 'does not implement interface RTCRtpSender.', 'TypeError');\n }\n var isLocal = sender._pc === pc;\n if (!isLocal) {\n throw new DOMException('Sender was not created by this connection.',\n 'InvalidAccessError');\n }\n\n // Search for the native stream the senders track belongs to.\n pc._streams = pc._streams || {};\n var stream;\n Object.keys(pc._streams).forEach(function(streamid) {\n var hasTrack = pc._streams[streamid].getTracks().find(function(track) {\n return sender.track === track;\n });\n if (hasTrack) {\n stream = pc._streams[streamid];\n }\n });\n\n if (stream) {\n if (stream.getTracks().length === 1) {\n // if this is the last track of the stream, remove the stream. This\n // takes care of any shimmed _senders.\n pc.removeStream(pc._reverseStreams[stream.id]);\n } else {\n // relying on the same odd chrome behaviour as above.\n stream.removeTrack(sender.track);\n }\n pc.dispatchEvent(new Event('negotiationneeded'));\n }\n };\n },\n\n shimPeerConnection: function(window) {\n var browserDetails = utils.detectBrowser(window);\n\n // The RTCPeerConnection object.\n if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) {\n window.RTCPeerConnection = function(pcConfig, pcConstraints) {\n // Translate iceTransportPolicy to iceTransports,\n // see https://code.google.com/p/webrtc/issues/detail?id=4869\n // this was fixed in M56 along with unprefixing RTCPeerConnection.\n logging('PeerConnection');\n if (pcConfig && pcConfig.iceTransportPolicy) {\n pcConfig.iceTransports = pcConfig.iceTransportPolicy;\n }\n\n return new window.webkitRTCPeerConnection(pcConfig, pcConstraints);\n };\n window.RTCPeerConnection.prototype =\n window.webkitRTCPeerConnection.prototype;\n // wrap static methods. Currently just generateCertificate.\n if (window.webkitRTCPeerConnection.generateCertificate) {\n Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {\n get: function() {\n return window.webkitRTCPeerConnection.generateCertificate;\n }\n });\n }\n } else {\n // migrate from non-spec RTCIceServer.url to RTCIceServer.urls\n var OrigPeerConnection = window.RTCPeerConnection;\n window.RTCPeerConnection = function(pcConfig, pcConstraints) {\n if (pcConfig && pcConfig.iceServers) {\n var newIceServers = [];\n for (var i = 0; i < pcConfig.iceServers.length; i++) {\n var server = pcConfig.iceServers[i];\n if (!server.hasOwnProperty('urls') &&\n server.hasOwnProperty('url')) {\n utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');\n server = JSON.parse(JSON.stringify(server));\n server.urls = server.url;\n newIceServers.push(server);\n } else {\n newIceServers.push(pcConfig.iceServers[i]);\n }\n }\n pcConfig.iceServers = newIceServers;\n }\n return new OrigPeerConnection(pcConfig, pcConstraints);\n };\n window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;\n // wrap static methods. Currently just generateCertificate.\n Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {\n get: function() {\n return OrigPeerConnection.generateCertificate;\n }\n });\n }\n\n var origGetStats = window.RTCPeerConnection.prototype.getStats;\n window.RTCPeerConnection.prototype.getStats = function(selector,\n successCallback, errorCallback) {\n var pc = this;\n var args = arguments;\n\n // If selector is a function then we are in the old style stats so just\n // pass back the original getStats format to avoid breaking old users.\n if (arguments.length > 0 && typeof selector === 'function') {\n return origGetStats.apply(this, arguments);\n }\n\n // When spec-style getStats is supported, return those when called with\n // either no arguments or the selector argument is null.\n if (origGetStats.length === 0 && (arguments.length === 0 ||\n typeof arguments[0] !== 'function')) {\n return origGetStats.apply(this, []);\n }\n\n var fixChromeStats_ = function(response) {\n var standardReport = {};\n var reports = response.result();\n reports.forEach(function(report) {\n var standardStats = {\n id: report.id,\n timestamp: report.timestamp,\n type: {\n localcandidate: 'local-candidate',\n remotecandidate: 'remote-candidate'\n }[report.type] || report.type\n };\n report.names().forEach(function(name) {\n standardStats[name] = report.stat(name);\n });\n standardReport[standardStats.id] = standardStats;\n });\n\n return standardReport;\n };\n\n // shim getStats with maplike support\n var makeMapStats = function(stats) {\n return new Map(Object.keys(stats).map(function(key) {\n return [key, stats[key]];\n }));\n };\n\n if (arguments.length >= 2) {\n var successCallbackWrapper_ = function(response) {\n args[1](makeMapStats(fixChromeStats_(response)));\n };\n\n return origGetStats.apply(this, [successCallbackWrapper_,\n arguments[0]]);\n }\n\n // promise-support\n return new Promise(function(resolve, reject) {\n origGetStats.apply(pc, [\n function(response) {\n resolve(makeMapStats(fixChromeStats_(response)));\n }, reject]);\n }).then(successCallback, errorCallback);\n };\n\n // add promise support -- natively available in Chrome 51\n if (browserDetails.version < 51) {\n ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']\n .forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n var args = arguments;\n var pc = this;\n var promise = new Promise(function(resolve, reject) {\n nativeMethod.apply(pc, [args[0], resolve, reject]);\n });\n if (args.length < 2) {\n return promise;\n }\n return promise.then(function() {\n args[1].apply(null, []);\n },\n function(err) {\n if (args.length >= 3) {\n args[2].apply(null, [err]);\n }\n });\n };\n });\n }\n\n // promise support for createOffer and createAnswer. Available (without\n // bugs) since M52: crbug/619289\n if (browserDetails.version < 52) {\n ['createOffer', 'createAnswer'].forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n var pc = this;\n if (arguments.length < 1 || (arguments.length === 1 &&\n typeof arguments[0] === 'object')) {\n var opts = arguments.length === 1 ? arguments[0] : undefined;\n return new Promise(function(resolve, reject) {\n nativeMethod.apply(pc, [resolve, reject, opts]);\n });\n }\n return nativeMethod.apply(this, arguments);\n };\n });\n }\n\n // shim implicit creation of RTCSessionDescription/RTCIceCandidate\n ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']\n .forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n arguments[0] = new ((method === 'addIceCandidate') ?\n window.RTCIceCandidate :\n window.RTCSessionDescription)(arguments[0]);\n return nativeMethod.apply(this, arguments);\n };\n });\n\n // support for addIceCandidate(null or undefined)\n var nativeAddIceCandidate =\n window.RTCPeerConnection.prototype.addIceCandidate;\n window.RTCPeerConnection.prototype.addIceCandidate = function() {\n if (!arguments[0]) {\n if (arguments[1]) {\n arguments[1].apply(null);\n }\n return Promise.resolve();\n }\n return nativeAddIceCandidate.apply(this, arguments);\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\nvar utils = require('../utils.js');\nvar logging = utils.log;\n\n// Expose public methods.\nmodule.exports = function(window) {\n var browserDetails = utils.detectBrowser(window);\n var navigator = window && window.navigator;\n\n var constraintsToChrome_ = function(c) {\n if (typeof c !== 'object' || c.mandatory || c.optional) {\n return c;\n }\n var cc = {};\n Object.keys(c).forEach(function(key) {\n if (key === 'require' || key === 'advanced' || key === 'mediaSource') {\n return;\n }\n var r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]};\n if (r.exact !== undefined && typeof r.exact === 'number') {\n r.min = r.max = r.exact;\n }\n var oldname_ = function(prefix, name) {\n if (prefix) {\n return prefix + name.charAt(0).toUpperCase() + name.slice(1);\n }\n return (name === 'deviceId') ? 'sourceId' : name;\n };\n if (r.ideal !== undefined) {\n cc.optional = cc.optional || [];\n var oc = {};\n if (typeof r.ideal === 'number') {\n oc[oldname_('min', key)] = r.ideal;\n cc.optional.push(oc);\n oc = {};\n oc[oldname_('max', key)] = r.ideal;\n cc.optional.push(oc);\n } else {\n oc[oldname_('', key)] = r.ideal;\n cc.optional.push(oc);\n }\n }\n if (r.exact !== undefined && typeof r.exact !== 'number') {\n cc.mandatory = cc.mandatory || {};\n cc.mandatory[oldname_('', key)] = r.exact;\n } else {\n ['min', 'max'].forEach(function(mix) {\n if (r[mix] !== undefined) {\n cc.mandatory = cc.mandatory || {};\n cc.mandatory[oldname_(mix, key)] = r[mix];\n }\n });\n }\n });\n if (c.advanced) {\n cc.optional = (cc.optional || []).concat(c.advanced);\n }\n return cc;\n };\n\n var shimConstraints_ = function(constraints, func) {\n if (browserDetails.version >= 61) {\n return func(constraints);\n }\n constraints = JSON.parse(JSON.stringify(constraints));\n if (constraints && typeof constraints.audio === 'object') {\n var remap = function(obj, a, b) {\n if (a in obj && !(b in obj)) {\n obj[b] = obj[a];\n delete obj[a];\n }\n };\n constraints = JSON.parse(JSON.stringify(constraints));\n remap(constraints.audio, 'autoGainControl', 'googAutoGainControl');\n remap(constraints.audio, 'noiseSuppression', 'googNoiseSuppression');\n constraints.audio = constraintsToChrome_(constraints.audio);\n }\n if (constraints && typeof constraints.video === 'object') {\n // Shim facingMode for mobile & surface pro.\n var face = constraints.video.facingMode;\n face = face && ((typeof face === 'object') ? face : {ideal: face});\n var getSupportedFacingModeLies = browserDetails.version < 66;\n\n if ((face && (face.exact === 'user' || face.exact === 'environment' ||\n face.ideal === 'user' || face.ideal === 'environment')) &&\n !(navigator.mediaDevices.getSupportedConstraints &&\n navigator.mediaDevices.getSupportedConstraints().facingMode &&\n !getSupportedFacingModeLies)) {\n delete constraints.video.facingMode;\n var matches;\n if (face.exact === 'environment' || face.ideal === 'environment') {\n matches = ['back', 'rear'];\n } else if (face.exact === 'user' || face.ideal === 'user') {\n matches = ['front'];\n }\n if (matches) {\n // Look for matches in label, or use last cam for back (typical).\n return navigator.mediaDevices.enumerateDevices()\n .then(function(devices) {\n devices = devices.filter(function(d) {\n return d.kind === 'videoinput';\n });\n var dev = devices.find(function(d) {\n return matches.some(function(match) {\n return d.label.toLowerCase().indexOf(match) !== -1;\n });\n });\n if (!dev && devices.length && matches.indexOf('back') !== -1) {\n dev = devices[devices.length - 1]; // more likely the back cam\n }\n if (dev) {\n constraints.video.deviceId = face.exact ? {exact: dev.deviceId} :\n {ideal: dev.deviceId};\n }\n constraints.video = constraintsToChrome_(constraints.video);\n logging('chrome: ' + JSON.stringify(constraints));\n return func(constraints);\n });\n }\n }\n constraints.video = constraintsToChrome_(constraints.video);\n }\n logging('chrome: ' + JSON.stringify(constraints));\n return func(constraints);\n };\n\n var shimError_ = function(e) {\n return {\n name: {\n PermissionDeniedError: 'NotAllowedError',\n PermissionDismissedError: 'NotAllowedError',\n InvalidStateError: 'NotAllowedError',\n DevicesNotFoundError: 'NotFoundError',\n ConstraintNotSatisfiedError: 'OverconstrainedError',\n TrackStartError: 'NotReadableError',\n MediaDeviceFailedDueToShutdown: 'NotAllowedError',\n MediaDeviceKillSwitchOn: 'NotAllowedError',\n TabCaptureError: 'AbortError',\n ScreenCaptureError: 'AbortError',\n DeviceCaptureError: 'AbortError'\n }[e.name] || e.name,\n message: e.message,\n constraint: e.constraintName,\n toString: function() {\n return this.name + (this.message && ': ') + this.message;\n }\n };\n };\n\n var getUserMedia_ = function(constraints, onSuccess, onError) {\n shimConstraints_(constraints, function(c) {\n navigator.webkitGetUserMedia(c, onSuccess, function(e) {\n if (onError) {\n onError(shimError_(e));\n }\n });\n });\n };\n\n navigator.getUserMedia = getUserMedia_;\n\n // Returns the result of getUserMedia as a Promise.\n var getUserMediaPromise_ = function(constraints) {\n return new Promise(function(resolve, reject) {\n navigator.getUserMedia(constraints, resolve, reject);\n });\n };\n\n if (!navigator.mediaDevices) {\n navigator.mediaDevices = {\n getUserMedia: getUserMediaPromise_,\n enumerateDevices: function() {\n return new Promise(function(resolve) {\n var kinds = {audio: 'audioinput', video: 'videoinput'};\n return window.MediaStreamTrack.getSources(function(devices) {\n resolve(devices.map(function(device) {\n return {label: device.label,\n kind: kinds[device.kind],\n deviceId: device.id,\n groupId: ''};\n }));\n });\n });\n },\n getSupportedConstraints: function() {\n return {\n deviceId: true, echoCancellation: true, facingMode: true,\n frameRate: true, height: true, width: true\n };\n }\n };\n }\n\n // A shim for getUserMedia method on the mediaDevices object.\n // TODO(KaptenJansson) remove once implemented in Chrome stable.\n if (!navigator.mediaDevices.getUserMedia) {\n navigator.mediaDevices.getUserMedia = function(constraints) {\n return getUserMediaPromise_(constraints);\n };\n } else {\n // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia\n // function which returns a Promise, it does not accept spec-style\n // constraints.\n var origGetUserMedia = navigator.mediaDevices.getUserMedia.\n bind(navigator.mediaDevices);\n navigator.mediaDevices.getUserMedia = function(cs) {\n return shimConstraints_(cs, function(c) {\n return origGetUserMedia(c).then(function(stream) {\n if (c.audio && !stream.getAudioTracks().length ||\n c.video && !stream.getVideoTracks().length) {\n stream.getTracks().forEach(function(track) {\n track.stop();\n });\n throw new DOMException('', 'NotFoundError');\n }\n return stream;\n }, function(e) {\n return Promise.reject(shimError_(e));\n });\n });\n };\n }\n\n // Dummy devicechange event methods.\n // TODO(KaptenJansson) remove once implemented in Chrome stable.\n if (typeof navigator.mediaDevices.addEventListener === 'undefined') {\n navigator.mediaDevices.addEventListener = function() {\n logging('Dummy mediaDevices.addEventListener called.');\n };\n }\n if (typeof navigator.mediaDevices.removeEventListener === 'undefined') {\n navigator.mediaDevices.removeEventListener = function() {\n logging('Dummy mediaDevices.removeEventListener called.');\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js\n// module chunks = main","/*\n * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar SDPUtils = require('sdp');\nvar utils = require('./utils');\n\nmodule.exports = {\n shimRTCIceCandidate: function(window) {\n // foundation is arbitrarily chosen as an indicator for full support for\n // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface\n if (!window.RTCIceCandidate || (window.RTCIceCandidate && 'foundation' in\n window.RTCIceCandidate.prototype)) {\n return;\n }\n\n var NativeRTCIceCandidate = window.RTCIceCandidate;\n window.RTCIceCandidate = function(args) {\n // Remove the a= which shouldn't be part of the candidate string.\n if (typeof args === 'object' && args.candidate &&\n args.candidate.indexOf('a=') === 0) {\n args = JSON.parse(JSON.stringify(args));\n args.candidate = args.candidate.substr(2);\n }\n\n if (args.candidate && args.candidate.length) {\n // Augment the native candidate with the parsed fields.\n var nativeCandidate = new NativeRTCIceCandidate(args);\n var parsedCandidate = SDPUtils.parseCandidate(args.candidate);\n var augmentedCandidate = Object.assign(nativeCandidate,\n parsedCandidate);\n\n // Add a serializer that does not serialize the extra attributes.\n augmentedCandidate.toJSON = function() {\n return {\n candidate: augmentedCandidate.candidate,\n sdpMid: augmentedCandidate.sdpMid,\n sdpMLineIndex: augmentedCandidate.sdpMLineIndex,\n usernameFragment: augmentedCandidate.usernameFragment,\n };\n };\n return augmentedCandidate;\n }\n return new NativeRTCIceCandidate(args);\n };\n window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;\n\n // Hook up the augmented candidate in onicecandidate and\n // addEventListener('icecandidate', ...)\n utils.wrapPeerConnectionEvent(window, 'icecandidate', function(e) {\n if (e.candidate) {\n Object.defineProperty(e, 'candidate', {\n value: new window.RTCIceCandidate(e.candidate),\n writable: 'false'\n });\n }\n return e;\n });\n },\n\n // shimCreateObjectURL must be called before shimSourceObject to avoid loop.\n\n shimCreateObjectURL: function(window) {\n var URL = window && window.URL;\n\n if (!(typeof window === 'object' && window.HTMLMediaElement &&\n 'srcObject' in window.HTMLMediaElement.prototype &&\n URL.createObjectURL && URL.revokeObjectURL)) {\n // Only shim CreateObjectURL using srcObject if srcObject exists.\n return undefined;\n }\n\n var nativeCreateObjectURL = URL.createObjectURL.bind(URL);\n var nativeRevokeObjectURL = URL.revokeObjectURL.bind(URL);\n var streams = new Map(), newId = 0;\n\n URL.createObjectURL = function(stream) {\n if ('getTracks' in stream) {\n var url = 'polyblob:' + (++newId);\n streams.set(url, stream);\n utils.deprecated('URL.createObjectURL(stream)',\n 'elem.srcObject = stream');\n return url;\n }\n return nativeCreateObjectURL(stream);\n };\n URL.revokeObjectURL = function(url) {\n nativeRevokeObjectURL(url);\n streams.delete(url);\n };\n\n var dsc = Object.getOwnPropertyDescriptor(window.HTMLMediaElement.prototype,\n 'src');\n Object.defineProperty(window.HTMLMediaElement.prototype, 'src', {\n get: function() {\n return dsc.get.apply(this);\n },\n set: function(url) {\n this.srcObject = streams.get(url) || null;\n return dsc.set.apply(this, [url]);\n }\n });\n\n var nativeSetAttribute = window.HTMLMediaElement.prototype.setAttribute;\n window.HTMLMediaElement.prototype.setAttribute = function() {\n if (arguments.length === 2 &&\n ('' + arguments[0]).toLowerCase() === 'src') {\n this.srcObject = streams.get(arguments[1]) || null;\n }\n return nativeSetAttribute.apply(this, arguments);\n };\n },\n\n shimMaxMessageSize: function(window) {\n if (window.RTCSctpTransport || !window.RTCPeerConnection) {\n return;\n }\n var browserDetails = utils.detectBrowser(window);\n\n if (!('sctp' in window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {\n get: function() {\n return typeof this._sctp === 'undefined' ? null : this._sctp;\n }\n });\n }\n\n var sctpInDescription = function(description) {\n var sections = SDPUtils.splitSections(description.sdp);\n sections.shift();\n return sections.some(function(mediaSection) {\n var mLine = SDPUtils.parseMLine(mediaSection);\n return mLine && mLine.kind === 'application'\n && mLine.protocol.indexOf('SCTP') !== -1;\n });\n };\n\n var getRemoteFirefoxVersion = function(description) {\n // TODO: Is there a better solution for detecting Firefox?\n var match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\\d+)/);\n if (match === null || match.length < 2) {\n return -1;\n }\n var version = parseInt(match[1], 10);\n // Test for NaN (yes, this is ugly)\n return version !== version ? -1 : version;\n };\n\n var getCanSendMaxMessageSize = function(remoteIsFirefox) {\n // Every implementation we know can send at least 64 KiB.\n // Note: Although Chrome is technically able to send up to 256 KiB, the\n // data does not reach the other peer reliably.\n // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419\n var canSendMaxMessageSize = 65536;\n if (browserDetails.browser === 'firefox') {\n if (browserDetails.version < 57) {\n if (remoteIsFirefox === -1) {\n // FF < 57 will send in 16 KiB chunks using the deprecated PPID\n // fragmentation.\n canSendMaxMessageSize = 16384;\n } else {\n // However, other FF (and RAWRTC) can reassemble PPID-fragmented\n // messages. Thus, supporting ~2 GiB when sending.\n canSendMaxMessageSize = 2147483637;\n }\n } else {\n // Currently, all FF >= 57 will reset the remote maximum message size\n // to the default value when a data channel is created at a later\n // stage. :(\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831\n canSendMaxMessageSize =\n browserDetails.version === 57 ? 65535 : 65536;\n }\n }\n return canSendMaxMessageSize;\n };\n\n var getMaxMessageSize = function(description, remoteIsFirefox) {\n // Note: 65536 bytes is the default value from the SDP spec. Also,\n // every implementation we know supports receiving 65536 bytes.\n var maxMessageSize = 65536;\n\n // FF 57 has a slightly incorrect default remote max message size, so\n // we need to adjust it here to avoid a failure when sending.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697\n if (browserDetails.browser === 'firefox'\n && browserDetails.version === 57) {\n maxMessageSize = 65535;\n }\n\n var match = SDPUtils.matchPrefix(description.sdp, 'a=max-message-size:');\n if (match.length > 0) {\n maxMessageSize = parseInt(match[0].substr(19), 10);\n } else if (browserDetails.browser === 'firefox' &&\n remoteIsFirefox !== -1) {\n // If the maximum message size is not present in the remote SDP and\n // both local and remote are Firefox, the remote peer can receive\n // ~2 GiB.\n maxMessageSize = 2147483637;\n }\n return maxMessageSize;\n };\n\n var origSetRemoteDescription =\n window.RTCPeerConnection.prototype.setRemoteDescription;\n window.RTCPeerConnection.prototype.setRemoteDescription = function() {\n var pc = this;\n pc._sctp = null;\n\n if (sctpInDescription(arguments[0])) {\n // Check if the remote is FF.\n var isFirefox = getRemoteFirefoxVersion(arguments[0]);\n\n // Get the maximum message size the local peer is capable of sending\n var canSendMMS = getCanSendMaxMessageSize(isFirefox);\n\n // Get the maximum message size of the remote peer.\n var remoteMMS = getMaxMessageSize(arguments[0], isFirefox);\n\n // Determine final maximum message size\n var maxMessageSize;\n if (canSendMMS === 0 && remoteMMS === 0) {\n maxMessageSize = Number.POSITIVE_INFINITY;\n } else if (canSendMMS === 0 || remoteMMS === 0) {\n maxMessageSize = Math.max(canSendMMS, remoteMMS);\n } else {\n maxMessageSize = Math.min(canSendMMS, remoteMMS);\n }\n\n // Create a dummy RTCSctpTransport object and the 'maxMessageSize'\n // attribute.\n var sctp = {};\n Object.defineProperty(sctp, 'maxMessageSize', {\n get: function() {\n return maxMessageSize;\n }\n });\n pc._sctp = sctp;\n }\n\n return origSetRemoteDescription.apply(pc, arguments);\n };\n },\n\n shimSendThrowTypeError: function(window) {\n if (!window.RTCPeerConnection) {\n return;\n }\n\n // Note: Although Firefox >= 57 has a native implementation, the maximum\n // message size can be reset for all data channels at a later stage.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831\n\n var origCreateDataChannel =\n window.RTCPeerConnection.prototype.createDataChannel;\n window.RTCPeerConnection.prototype.createDataChannel = function() {\n var pc = this;\n var dataChannel = origCreateDataChannel.apply(pc, arguments);\n var origDataChannelSend = dataChannel.send;\n\n // Patch 'send' method\n dataChannel.send = function() {\n var dc = this;\n var data = arguments[0];\n var length = data.length || data.size || data.byteLength;\n if (length > pc.sctp.maxMessageSize) {\n throw new DOMException('Message too large (can send a maximum of ' +\n pc.sctp.maxMessageSize + ' bytes)', 'TypeError');\n }\n return origDataChannelSend.apply(dc, arguments);\n };\n\n return dataChannel;\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/common_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/common_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar utils = require('../utils');\nvar shimRTCPeerConnection = require('rtcpeerconnection-shim');\n\nmodule.exports = {\n shimGetUserMedia: require('./getusermedia'),\n shimPeerConnection: function(window) {\n var browserDetails = utils.detectBrowser(window);\n\n if (window.RTCIceGatherer) {\n if (!window.RTCIceCandidate) {\n window.RTCIceCandidate = function(args) {\n return args;\n };\n }\n if (!window.RTCSessionDescription) {\n window.RTCSessionDescription = function(args) {\n return args;\n };\n }\n // this adds an additional event listener to MediaStrackTrack that signals\n // when a tracks enabled property was changed. Workaround for a bug in\n // addStream, see below. No longer required in 15025+\n if (browserDetails.version < 15025) {\n var origMSTEnabled = Object.getOwnPropertyDescriptor(\n window.MediaStreamTrack.prototype, 'enabled');\n Object.defineProperty(window.MediaStreamTrack.prototype, 'enabled', {\n set: function(value) {\n origMSTEnabled.set.call(this, value);\n var ev = new Event('enabled');\n ev.enabled = value;\n this.dispatchEvent(ev);\n }\n });\n }\n }\n\n // ORTC defines the DTMF sender a bit different.\n // https://github.com/w3c/ortc/issues/714\n if (window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {\n Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {\n get: function() {\n if (this._dtmf === undefined) {\n if (this.track.kind === 'audio') {\n this._dtmf = new window.RTCDtmfSender(this);\n } else if (this.track.kind === 'video') {\n this._dtmf = null;\n }\n }\n return this._dtmf;\n }\n });\n }\n // Edge currently only implements the RTCDtmfSender, not the\n // RTCDTMFSender alias. See http://draft.ortc.org/#rtcdtmfsender2*\n if (window.RTCDtmfSender && !window.RTCDTMFSender) {\n window.RTCDTMFSender = window.RTCDtmfSender;\n }\n\n window.RTCPeerConnection =\n shimRTCPeerConnection(window, browserDetails.version);\n },\n shimReplaceTrack: function(window) {\n // ORTC has replaceTrack -- https://github.com/w3c/ortc/issues/614\n if (window.RTCRtpSender &&\n !('replaceTrack' in window.RTCRtpSender.prototype)) {\n window.RTCRtpSender.prototype.replaceTrack =\n window.RTCRtpSender.prototype.setTrack;\n }\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/edge/edge_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/edge/edge_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\n// Expose public methods.\nmodule.exports = function(window) {\n var navigator = window && window.navigator;\n\n var shimError_ = function(e) {\n return {\n name: {PermissionDeniedError: 'NotAllowedError'}[e.name] || e.name,\n message: e.message,\n constraint: e.constraint,\n toString: function() {\n return this.name;\n }\n };\n };\n\n // getUserMedia error shim.\n var origGetUserMedia = navigator.mediaDevices.getUserMedia.\n bind(navigator.mediaDevices);\n navigator.mediaDevices.getUserMedia = function(c) {\n return origGetUserMedia(c).catch(function(e) {\n return Promise.reject(shimError_(e));\n });\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/edge/getusermedia.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/edge/getusermedia.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = {\n shimGetUserMedia: require('./getusermedia'),\n shimOnTrack: function(window) {\n if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in\n window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {\n get: function() {\n return this._ontrack;\n },\n set: function(f) {\n if (this._ontrack) {\n this.removeEventListener('track', this._ontrack);\n this.removeEventListener('addstream', this._ontrackpoly);\n }\n this.addEventListener('track', this._ontrack = f);\n this.addEventListener('addstream', this._ontrackpoly = function(e) {\n e.stream.getTracks().forEach(function(track) {\n var event = new Event('track');\n event.track = track;\n event.receiver = {track: track};\n event.transceiver = {receiver: event.receiver};\n event.streams = [e.stream];\n this.dispatchEvent(event);\n }.bind(this));\n }.bind(this));\n }\n });\n }\n if (typeof window === 'object' && window.RTCTrackEvent &&\n ('receiver' in window.RTCTrackEvent.prototype) &&\n !('transceiver' in window.RTCTrackEvent.prototype)) {\n Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {\n get: function() {\n return {receiver: this.receiver};\n }\n });\n }\n },\n\n shimSourceObject: function(window) {\n // Firefox has supported mozSrcObject since FF22, unprefixed in 42.\n if (typeof window === 'object') {\n if (window.HTMLMediaElement &&\n !('srcObject' in window.HTMLMediaElement.prototype)) {\n // Shim the srcObject property, once, when HTMLMediaElement is found.\n Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', {\n get: function() {\n return this.mozSrcObject;\n },\n set: function(stream) {\n this.mozSrcObject = stream;\n }\n });\n }\n }\n },\n\n shimPeerConnection: function(window) {\n var browserDetails = utils.detectBrowser(window);\n\n if (typeof window !== 'object' || !(window.RTCPeerConnection ||\n window.mozRTCPeerConnection)) {\n return; // probably media.peerconnection.enabled=false in about:config\n }\n // The RTCPeerConnection object.\n if (!window.RTCPeerConnection) {\n window.RTCPeerConnection = function(pcConfig, pcConstraints) {\n if (browserDetails.version < 38) {\n // .urls is not supported in FF < 38.\n // create RTCIceServers with a single url.\n if (pcConfig && pcConfig.iceServers) {\n var newIceServers = [];\n for (var i = 0; i < pcConfig.iceServers.length; i++) {\n var server = pcConfig.iceServers[i];\n if (server.hasOwnProperty('urls')) {\n for (var j = 0; j < server.urls.length; j++) {\n var newServer = {\n url: server.urls[j]\n };\n if (server.urls[j].indexOf('turn') === 0) {\n newServer.username = server.username;\n newServer.credential = server.credential;\n }\n newIceServers.push(newServer);\n }\n } else {\n newIceServers.push(pcConfig.iceServers[i]);\n }\n }\n pcConfig.iceServers = newIceServers;\n }\n }\n return new window.mozRTCPeerConnection(pcConfig, pcConstraints);\n };\n window.RTCPeerConnection.prototype =\n window.mozRTCPeerConnection.prototype;\n\n // wrap static methods. Currently just generateCertificate.\n if (window.mozRTCPeerConnection.generateCertificate) {\n Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {\n get: function() {\n return window.mozRTCPeerConnection.generateCertificate;\n }\n });\n }\n\n window.RTCSessionDescription = window.mozRTCSessionDescription;\n window.RTCIceCandidate = window.mozRTCIceCandidate;\n }\n\n // shim away need for obsolete RTCIceCandidate/RTCSessionDescription.\n ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']\n .forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n arguments[0] = new ((method === 'addIceCandidate') ?\n window.RTCIceCandidate :\n window.RTCSessionDescription)(arguments[0]);\n return nativeMethod.apply(this, arguments);\n };\n });\n\n // support for addIceCandidate(null or undefined)\n var nativeAddIceCandidate =\n window.RTCPeerConnection.prototype.addIceCandidate;\n window.RTCPeerConnection.prototype.addIceCandidate = function() {\n if (!arguments[0]) {\n if (arguments[1]) {\n arguments[1].apply(null);\n }\n return Promise.resolve();\n }\n return nativeAddIceCandidate.apply(this, arguments);\n };\n\n // shim getStats with maplike support\n var makeMapStats = function(stats) {\n var map = new Map();\n Object.keys(stats).forEach(function(key) {\n map.set(key, stats[key]);\n map[key] = stats[key];\n });\n return map;\n };\n\n var modernStatsTypes = {\n inboundrtp: 'inbound-rtp',\n outboundrtp: 'outbound-rtp',\n candidatepair: 'candidate-pair',\n localcandidate: 'local-candidate',\n remotecandidate: 'remote-candidate'\n };\n\n var nativeGetStats = window.RTCPeerConnection.prototype.getStats;\n window.RTCPeerConnection.prototype.getStats = function(\n selector,\n onSucc,\n onErr\n ) {\n return nativeGetStats.apply(this, [selector || null])\n .then(function(stats) {\n if (browserDetails.version < 48) {\n stats = makeMapStats(stats);\n }\n if (browserDetails.version < 53 && !onSucc) {\n // Shim only promise getStats with spec-hyphens in type names\n // Leave callback version alone; misc old uses of forEach before Map\n try {\n stats.forEach(function(stat) {\n stat.type = modernStatsTypes[stat.type] || stat.type;\n });\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n // Avoid TypeError: \"type\" is read-only, in old versions. 34-43ish\n stats.forEach(function(stat, i) {\n stats.set(i, Object.assign({}, stat, {\n type: modernStatsTypes[stat.type] || stat.type\n }));\n });\n }\n }\n return stats;\n })\n .then(onSucc, onErr);\n };\n },\n\n shimRemoveStream: function(window) {\n if (!window.RTCPeerConnection ||\n 'removeStream' in window.RTCPeerConnection.prototype) {\n return;\n }\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n var pc = this;\n utils.deprecated('removeStream', 'removeTrack');\n this.getSenders().forEach(function(sender) {\n if (sender.track && stream.getTracks().indexOf(sender.track) !== -1) {\n pc.removeTrack(sender);\n }\n });\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar utils = require('../utils');\nvar logging = utils.log;\n\n// Expose public methods.\nmodule.exports = function(window) {\n var browserDetails = utils.detectBrowser(window);\n var navigator = window && window.navigator;\n var MediaStreamTrack = window && window.MediaStreamTrack;\n\n var shimError_ = function(e) {\n return {\n name: {\n InternalError: 'NotReadableError',\n NotSupportedError: 'TypeError',\n PermissionDeniedError: 'NotAllowedError',\n SecurityError: 'NotAllowedError'\n }[e.name] || e.name,\n message: {\n 'The operation is insecure.': 'The request is not allowed by the ' +\n 'user agent or the platform in the current context.'\n }[e.message] || e.message,\n constraint: e.constraint,\n toString: function() {\n return this.name + (this.message && ': ') + this.message;\n }\n };\n };\n\n // getUserMedia constraints shim.\n var getUserMedia_ = function(constraints, onSuccess, onError) {\n var constraintsToFF37_ = function(c) {\n if (typeof c !== 'object' || c.require) {\n return c;\n }\n var require = [];\n Object.keys(c).forEach(function(key) {\n if (key === 'require' || key === 'advanced' || key === 'mediaSource') {\n return;\n }\n var r = c[key] = (typeof c[key] === 'object') ?\n c[key] : {ideal: c[key]};\n if (r.min !== undefined ||\n r.max !== undefined || r.exact !== undefined) {\n require.push(key);\n }\n if (r.exact !== undefined) {\n if (typeof r.exact === 'number') {\n r. min = r.max = r.exact;\n } else {\n c[key] = r.exact;\n }\n delete r.exact;\n }\n if (r.ideal !== undefined) {\n c.advanced = c.advanced || [];\n var oc = {};\n if (typeof r.ideal === 'number') {\n oc[key] = {min: r.ideal, max: r.ideal};\n } else {\n oc[key] = r.ideal;\n }\n c.advanced.push(oc);\n delete r.ideal;\n if (!Object.keys(r).length) {\n delete c[key];\n }\n }\n });\n if (require.length) {\n c.require = require;\n }\n return c;\n };\n constraints = JSON.parse(JSON.stringify(constraints));\n if (browserDetails.version < 38) {\n logging('spec: ' + JSON.stringify(constraints));\n if (constraints.audio) {\n constraints.audio = constraintsToFF37_(constraints.audio);\n }\n if (constraints.video) {\n constraints.video = constraintsToFF37_(constraints.video);\n }\n logging('ff37: ' + JSON.stringify(constraints));\n }\n return navigator.mozGetUserMedia(constraints, onSuccess, function(e) {\n onError(shimError_(e));\n });\n };\n\n // Returns the result of getUserMedia as a Promise.\n var getUserMediaPromise_ = function(constraints) {\n return new Promise(function(resolve, reject) {\n getUserMedia_(constraints, resolve, reject);\n });\n };\n\n // Shim for mediaDevices on older versions.\n if (!navigator.mediaDevices) {\n navigator.mediaDevices = {getUserMedia: getUserMediaPromise_,\n addEventListener: function() { },\n removeEventListener: function() { }\n };\n }\n navigator.mediaDevices.enumerateDevices =\n navigator.mediaDevices.enumerateDevices || function() {\n return new Promise(function(resolve) {\n var infos = [\n {kind: 'audioinput', deviceId: 'default', label: '', groupId: ''},\n {kind: 'videoinput', deviceId: 'default', label: '', groupId: ''}\n ];\n resolve(infos);\n });\n };\n\n if (browserDetails.version < 41) {\n // Work around http://bugzil.la/1169665\n var orgEnumerateDevices =\n navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);\n navigator.mediaDevices.enumerateDevices = function() {\n return orgEnumerateDevices().then(undefined, function(e) {\n if (e.name === 'NotFoundError') {\n return [];\n }\n throw e;\n });\n };\n }\n if (browserDetails.version < 49) {\n var origGetUserMedia = navigator.mediaDevices.getUserMedia.\n bind(navigator.mediaDevices);\n navigator.mediaDevices.getUserMedia = function(c) {\n return origGetUserMedia(c).then(function(stream) {\n // Work around https://bugzil.la/802326\n if (c.audio && !stream.getAudioTracks().length ||\n c.video && !stream.getVideoTracks().length) {\n stream.getTracks().forEach(function(track) {\n track.stop();\n });\n throw new DOMException('The object can not be found here.',\n 'NotFoundError');\n }\n return stream;\n }, function(e) {\n return Promise.reject(shimError_(e));\n });\n };\n }\n if (!(browserDetails.version > 55 &&\n 'autoGainControl' in navigator.mediaDevices.getSupportedConstraints())) {\n var remap = function(obj, a, b) {\n if (a in obj && !(b in obj)) {\n obj[b] = obj[a];\n delete obj[a];\n }\n };\n\n var nativeGetUserMedia = navigator.mediaDevices.getUserMedia.\n bind(navigator.mediaDevices);\n navigator.mediaDevices.getUserMedia = function(c) {\n if (typeof c === 'object' && typeof c.audio === 'object') {\n c = JSON.parse(JSON.stringify(c));\n remap(c.audio, 'autoGainControl', 'mozAutoGainControl');\n remap(c.audio, 'noiseSuppression', 'mozNoiseSuppression');\n }\n return nativeGetUserMedia(c);\n };\n\n if (MediaStreamTrack && MediaStreamTrack.prototype.getSettings) {\n var nativeGetSettings = MediaStreamTrack.prototype.getSettings;\n MediaStreamTrack.prototype.getSettings = function() {\n var obj = nativeGetSettings.apply(this, arguments);\n remap(obj, 'mozAutoGainControl', 'autoGainControl');\n remap(obj, 'mozNoiseSuppression', 'noiseSuppression');\n return obj;\n };\n }\n\n if (MediaStreamTrack && MediaStreamTrack.prototype.applyConstraints) {\n var nativeApplyConstraints = MediaStreamTrack.prototype.applyConstraints;\n MediaStreamTrack.prototype.applyConstraints = function(c) {\n if (this.kind === 'audio' && typeof c === 'object') {\n c = JSON.parse(JSON.stringify(c));\n remap(c, 'autoGainControl', 'mozAutoGainControl');\n remap(c, 'noiseSuppression', 'mozNoiseSuppression');\n }\n return nativeApplyConstraints.apply(this, [c]);\n };\n }\n }\n navigator.getUserMedia = function(constraints, onSuccess, onError) {\n if (browserDetails.version < 44) {\n return getUserMedia_(constraints, onSuccess, onError);\n }\n // Replace Firefox 44+'s deprecation warning with unprefixed version.\n utils.deprecated('navigator.getUserMedia',\n 'navigator.mediaDevices.getUserMedia');\n navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n'use strict';\nvar utils = require('../utils');\n\nmodule.exports = {\n shimLocalStreamsAPI: function(window) {\n if (typeof window !== 'object' || !window.RTCPeerConnection) {\n return;\n }\n if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {\n window.RTCPeerConnection.prototype.getLocalStreams = function() {\n if (!this._localStreams) {\n this._localStreams = [];\n }\n return this._localStreams;\n };\n }\n if (!('getStreamById' in window.RTCPeerConnection.prototype)) {\n window.RTCPeerConnection.prototype.getStreamById = function(id) {\n var result = null;\n if (this._localStreams) {\n this._localStreams.forEach(function(stream) {\n if (stream.id === id) {\n result = stream;\n }\n });\n }\n if (this._remoteStreams) {\n this._remoteStreams.forEach(function(stream) {\n if (stream.id === id) {\n result = stream;\n }\n });\n }\n return result;\n };\n }\n if (!('addStream' in window.RTCPeerConnection.prototype)) {\n var _addTrack = window.RTCPeerConnection.prototype.addTrack;\n window.RTCPeerConnection.prototype.addStream = function(stream) {\n if (!this._localStreams) {\n this._localStreams = [];\n }\n if (this._localStreams.indexOf(stream) === -1) {\n this._localStreams.push(stream);\n }\n var pc = this;\n stream.getTracks().forEach(function(track) {\n _addTrack.call(pc, track, stream);\n });\n };\n\n window.RTCPeerConnection.prototype.addTrack = function(track, stream) {\n if (stream) {\n if (!this._localStreams) {\n this._localStreams = [stream];\n } else if (this._localStreams.indexOf(stream) === -1) {\n this._localStreams.push(stream);\n }\n }\n return _addTrack.call(this, track, stream);\n };\n }\n if (!('removeStream' in window.RTCPeerConnection.prototype)) {\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n if (!this._localStreams) {\n this._localStreams = [];\n }\n var index = this._localStreams.indexOf(stream);\n if (index === -1) {\n return;\n }\n this._localStreams.splice(index, 1);\n var pc = this;\n var tracks = stream.getTracks();\n this.getSenders().forEach(function(sender) {\n if (tracks.indexOf(sender.track) !== -1) {\n pc.removeTrack(sender);\n }\n });\n };\n }\n },\n shimRemoteStreamsAPI: function(window) {\n if (typeof window !== 'object' || !window.RTCPeerConnection) {\n return;\n }\n if (!('getRemoteStreams' in window.RTCPeerConnection.prototype)) {\n window.RTCPeerConnection.prototype.getRemoteStreams = function() {\n return this._remoteStreams ? this._remoteStreams : [];\n };\n }\n if (!('onaddstream' in window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'onaddstream', {\n get: function() {\n return this._onaddstream;\n },\n set: function(f) {\n var pc = this;\n if (this._onaddstream) {\n this.removeEventListener('addstream', this._onaddstream);\n this.removeEventListener('track', this._onaddstreampoly);\n }\n this.addEventListener('addstream', this._onaddstream = f);\n this.addEventListener('track', this._onaddstreampoly = function(e) {\n e.streams.forEach(function(stream) {\n if (!pc._remoteStreams) {\n pc._remoteStreams = [];\n }\n if (pc._remoteStreams.indexOf(stream) >= 0) {\n return;\n }\n pc._remoteStreams.push(stream);\n var event = new Event('addstream');\n event.stream = stream;\n pc.dispatchEvent(event);\n });\n });\n }\n });\n }\n },\n shimCallbacksAPI: function(window) {\n if (typeof window !== 'object' || !window.RTCPeerConnection) {\n return;\n }\n var prototype = window.RTCPeerConnection.prototype;\n var createOffer = prototype.createOffer;\n var createAnswer = prototype.createAnswer;\n var setLocalDescription = prototype.setLocalDescription;\n var setRemoteDescription = prototype.setRemoteDescription;\n var addIceCandidate = prototype.addIceCandidate;\n\n prototype.createOffer = function(successCallback, failureCallback) {\n var options = (arguments.length >= 2) ? arguments[2] : arguments[0];\n var promise = createOffer.apply(this, [options]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n\n prototype.createAnswer = function(successCallback, failureCallback) {\n var options = (arguments.length >= 2) ? arguments[2] : arguments[0];\n var promise = createAnswer.apply(this, [options]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n\n var withCallback = function(description, successCallback, failureCallback) {\n var promise = setLocalDescription.apply(this, [description]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n prototype.setLocalDescription = withCallback;\n\n withCallback = function(description, successCallback, failureCallback) {\n var promise = setRemoteDescription.apply(this, [description]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n prototype.setRemoteDescription = withCallback;\n\n withCallback = function(candidate, successCallback, failureCallback) {\n var promise = addIceCandidate.apply(this, [candidate]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n prototype.addIceCandidate = withCallback;\n },\n shimGetUserMedia: function(window) {\n var navigator = window && window.navigator;\n\n if (!navigator.getUserMedia) {\n if (navigator.webkitGetUserMedia) {\n navigator.getUserMedia = navigator.webkitGetUserMedia.bind(navigator);\n } else if (navigator.mediaDevices &&\n navigator.mediaDevices.getUserMedia) {\n navigator.getUserMedia = function(constraints, cb, errcb) {\n navigator.mediaDevices.getUserMedia(constraints)\n .then(cb, errcb);\n }.bind(navigator);\n }\n }\n },\n shimRTCIceServerUrls: function(window) {\n // migrate from non-spec RTCIceServer.url to RTCIceServer.urls\n var OrigPeerConnection = window.RTCPeerConnection;\n window.RTCPeerConnection = function(pcConfig, pcConstraints) {\n if (pcConfig && pcConfig.iceServers) {\n var newIceServers = [];\n for (var i = 0; i < pcConfig.iceServers.length; i++) {\n var server = pcConfig.iceServers[i];\n if (!server.hasOwnProperty('urls') &&\n server.hasOwnProperty('url')) {\n utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');\n server = JSON.parse(JSON.stringify(server));\n server.urls = server.url;\n delete server.url;\n newIceServers.push(server);\n } else {\n newIceServers.push(pcConfig.iceServers[i]);\n }\n }\n pcConfig.iceServers = newIceServers;\n }\n return new OrigPeerConnection(pcConfig, pcConstraints);\n };\n window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;\n // wrap static methods. Currently just generateCertificate.\n if ('generateCertificate' in window.RTCPeerConnection) {\n Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {\n get: function() {\n return OrigPeerConnection.generateCertificate;\n }\n });\n }\n },\n shimTrackEventTransceiver: function(window) {\n // Add event.transceiver member over deprecated event.receiver\n if (typeof window === 'object' && window.RTCPeerConnection &&\n ('receiver' in window.RTCTrackEvent.prototype) &&\n // can't check 'transceiver' in window.RTCTrackEvent.prototype, as it is\n // defined for some reason even when window.RTCTransceiver is not.\n !window.RTCTransceiver) {\n Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {\n get: function() {\n return {receiver: this.receiver};\n }\n });\n }\n },\n\n shimCreateOfferLegacy: function(window) {\n var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;\n window.RTCPeerConnection.prototype.createOffer = function(offerOptions) {\n var pc = this;\n if (offerOptions) {\n var audioTransceiver = pc.getTransceivers().find(function(transceiver) {\n return transceiver.sender.track &&\n transceiver.sender.track.kind === 'audio';\n });\n if (offerOptions.offerToReceiveAudio === false && audioTransceiver) {\n if (audioTransceiver.direction === 'sendrecv') {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection('sendonly');\n } else {\n audioTransceiver.direction = 'sendonly';\n }\n } else if (audioTransceiver.direction === 'recvonly') {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection('inactive');\n } else {\n audioTransceiver.direction = 'inactive';\n }\n }\n } else if (offerOptions.offerToReceiveAudio === true &&\n !audioTransceiver) {\n pc.addTransceiver('audio');\n }\n\n var videoTransceiver = pc.getTransceivers().find(function(transceiver) {\n return transceiver.sender.track &&\n transceiver.sender.track.kind === 'video';\n });\n if (offerOptions.offerToReceiveVideo === false && videoTransceiver) {\n if (videoTransceiver.direction === 'sendrecv') {\n videoTransceiver.setDirection('sendonly');\n } else if (videoTransceiver.direction === 'recvonly') {\n videoTransceiver.setDirection('inactive');\n }\n } else if (offerOptions.offerToReceiveVideo === true &&\n !videoTransceiver) {\n pc.addTransceiver('video');\n }\n }\n return origCreateOffer.apply(pc, arguments);\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/safari/safari_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/safari/safari_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar logDisabled_ = true;\nvar deprecationWarnings_ = true;\n\n/**\n * Extract browser version out of the provided user agent string.\n *\n * @param {!string} uastring userAgent string.\n * @param {!string} expr Regular expression used as match criteria.\n * @param {!number} pos position in the version string to be returned.\n * @return {!number} browser version.\n */\nfunction extractVersion(uastring, expr, pos) {\n var match = uastring.match(expr);\n return match && match.length >= pos && parseInt(match[pos], 10);\n}\n\n// Wraps the peerconnection event eventNameToWrap in a function\n// which returns the modified event object.\nfunction wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {\n if (!window.RTCPeerConnection) {\n return;\n }\n var proto = window.RTCPeerConnection.prototype;\n var nativeAddEventListener = proto.addEventListener;\n proto.addEventListener = function(nativeEventName, cb) {\n if (nativeEventName !== eventNameToWrap) {\n return nativeAddEventListener.apply(this, arguments);\n }\n var wrappedCallback = function(e) {\n cb(wrapper(e));\n };\n this._eventMap = this._eventMap || {};\n this._eventMap[cb] = wrappedCallback;\n return nativeAddEventListener.apply(this, [nativeEventName,\n wrappedCallback]);\n };\n\n var nativeRemoveEventListener = proto.removeEventListener;\n proto.removeEventListener = function(nativeEventName, cb) {\n if (nativeEventName !== eventNameToWrap || !this._eventMap\n || !this._eventMap[cb]) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n var unwrappedCb = this._eventMap[cb];\n delete this._eventMap[cb];\n return nativeRemoveEventListener.apply(this, [nativeEventName,\n unwrappedCb]);\n };\n\n Object.defineProperty(proto, 'on' + eventNameToWrap, {\n get: function() {\n return this['_on' + eventNameToWrap];\n },\n set: function(cb) {\n if (this['_on' + eventNameToWrap]) {\n this.removeEventListener(eventNameToWrap,\n this['_on' + eventNameToWrap]);\n delete this['_on' + eventNameToWrap];\n }\n if (cb) {\n this.addEventListener(eventNameToWrap,\n this['_on' + eventNameToWrap] = cb);\n }\n }\n });\n}\n\n// Utility methods.\nmodule.exports = {\n extractVersion: extractVersion,\n wrapPeerConnectionEvent: wrapPeerConnectionEvent,\n disableLog: function(bool) {\n if (typeof bool !== 'boolean') {\n return new Error('Argument type: ' + typeof bool +\n '. Please use a boolean.');\n }\n logDisabled_ = bool;\n return (bool) ? 'adapter.js logging disabled' :\n 'adapter.js logging enabled';\n },\n\n /**\n * Disable or enable deprecation warnings\n * @param {!boolean} bool set to true to disable warnings.\n */\n disableWarnings: function(bool) {\n if (typeof bool !== 'boolean') {\n return new Error('Argument type: ' + typeof bool +\n '. Please use a boolean.');\n }\n deprecationWarnings_ = !bool;\n return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');\n },\n\n log: function() {\n if (typeof window === 'object') {\n if (logDisabled_) {\n return;\n }\n if (typeof console !== 'undefined' && typeof console.log === 'function') {\n console.log.apply(console, arguments);\n }\n }\n },\n\n /**\n * Shows a deprecation warning suggesting the modern and spec-compatible API.\n */\n deprecated: function(oldMethod, newMethod) {\n if (!deprecationWarnings_) {\n return;\n }\n console.warn(oldMethod + ' is deprecated, please use ' + newMethod +\n ' instead.');\n },\n\n /**\n * Browser detector.\n *\n * @return {object} result containing browser and version\n * properties.\n */\n detectBrowser: function(window) {\n var navigator = window && window.navigator;\n\n // Returned result object.\n var result = {};\n result.browser = null;\n result.version = null;\n\n // Fail early if it's not a browser\n if (typeof window === 'undefined' || !window.navigator) {\n result.browser = 'Not a browser.';\n return result;\n }\n\n if (navigator.mozGetUserMedia) { // Firefox.\n result.browser = 'firefox';\n result.version = extractVersion(navigator.userAgent,\n /Firefox\\/(\\d+)\\./, 1);\n } else if (navigator.webkitGetUserMedia) {\n // Chrome, Chromium, Webview, Opera.\n // Version matches Chrome/WebRTC version.\n result.browser = 'chrome';\n result.version = extractVersion(navigator.userAgent,\n /Chrom(e|ium)\\/(\\d+)\\./, 2);\n } else if (navigator.mediaDevices &&\n navigator.userAgent.match(/Edge\\/(\\d+).(\\d+)$/)) { // Edge.\n result.browser = 'edge';\n result.version = extractVersion(navigator.userAgent,\n /Edge\\/(\\d+).(\\d+)$/, 2);\n } else if (window.RTCPeerConnection &&\n navigator.userAgent.match(/AppleWebKit\\/(\\d+)\\./)) { // Safari.\n result.browser = 'safari';\n result.version = extractVersion(navigator.userAgent,\n /AppleWebKit\\/(\\d+)\\./, 1);\n } else { // Default fallthrough: not supported.\n result.browser = 'Not a supported browser.';\n return result;\n }\n\n return result;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/utils.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/utils.js\n// module chunks = main","/*\r\nWildEmitter.js is a slim little event emitter by @henrikjoreteg largely based\r\non @visionmedia's Emitter from UI Kit.\r\n\r\nWhy? I wanted it standalone.\r\n\r\nI also wanted support for wildcard emitters like this:\r\n\r\nemitter.on('*', function (eventName, other, event, payloads) {\r\n\r\n});\r\n\r\nemitter.on('somenamespace*', function (eventName, payloads) {\r\n\r\n});\r\n\r\nPlease note that callbacks triggered by wildcard registered events also get\r\nthe event name as the first argument.\r\n*/\r\n\r\nmodule.exports = WildEmitter;\r\n\r\nfunction WildEmitter() { }\r\n\r\nWildEmitter.mixin = function (constructor) {\r\n var prototype = constructor.prototype || constructor;\r\n\r\n prototype.isWildEmitter= true;\r\n\r\n // Listen on the given `event` with `fn`. Store a group name if present.\r\n prototype.on = function (event, groupName, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n func._groupName = group;\r\n (this.callbacks[event] = this.callbacks[event] || []).push(func);\r\n return this;\r\n };\r\n\r\n // Adds an `event` listener that will be invoked a single\r\n // time then automatically removed.\r\n prototype.once = function (event, groupName, fn) {\r\n var self = this,\r\n hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n function on() {\r\n self.off(event, on);\r\n func.apply(this, arguments);\r\n }\r\n this.on(event, group, on);\r\n return this;\r\n };\r\n\r\n // Unbinds an entire group\r\n prototype.releaseGroup = function (groupName) {\r\n this.callbacks = this.callbacks || {};\r\n var item, i, len, handlers;\r\n for (item in this.callbacks) {\r\n handlers = this.callbacks[item];\r\n for (i = 0, len = handlers.length; i < len; i++) {\r\n if (handlers[i]._groupName === groupName) {\r\n //console.log('removing');\r\n // remove it and shorten the array we're looping through\r\n handlers.splice(i, 1);\r\n i--;\r\n len--;\r\n }\r\n }\r\n }\r\n return this;\r\n };\r\n\r\n // Remove the given callback for `event` or all\r\n // registered callbacks.\r\n prototype.off = function (event, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var callbacks = this.callbacks[event],\r\n i;\r\n\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (arguments.length === 1) {\r\n delete this.callbacks[event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n i = callbacks.indexOf(fn);\r\n callbacks.splice(i, 1);\r\n if (callbacks.length === 0) {\r\n delete this.callbacks[event];\r\n }\r\n return this;\r\n };\r\n\r\n /// Emit `event` with the given args.\r\n // also calls any `*` handlers\r\n prototype.emit = function (event) {\r\n this.callbacks = this.callbacks || {};\r\n var args = [].slice.call(arguments, 1),\r\n callbacks = this.callbacks[event],\r\n specialCallbacks = this.getWildcardCallbacks(event),\r\n i,\r\n len,\r\n item,\r\n listeners;\r\n\r\n if (callbacks) {\r\n listeners = callbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, args);\r\n }\r\n }\r\n\r\n if (specialCallbacks) {\r\n len = specialCallbacks.length;\r\n listeners = specialCallbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, [event].concat(args));\r\n }\r\n }\r\n\r\n return this;\r\n };\r\n\r\n // Helper for for finding special wildcard event handlers that match the event\r\n prototype.getWildcardCallbacks = function (eventName) {\r\n this.callbacks = this.callbacks || {};\r\n var item,\r\n split,\r\n result = [];\r\n\r\n for (item in this.callbacks) {\r\n split = item.split('*');\r\n if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) {\r\n result = result.concat(this.callbacks[item]);\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n};\r\n\r\nWildEmitter.mixin(WildEmitter);\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module id = ../../../../openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module chunks = main","/*!\n * EventEmitter v5.2.4 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(this || {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module id = ../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module chunks = main","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./src/$$_lazy_route_resource lazy recursive\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/$$_lazy_route_resource lazy\n// module id = ./src/$$_lazy_route_resource lazy recursive\n// module chunks = main","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.css\n// module id = ./src/app/app.component.css\n// module chunks = main","module.exports = \"
\\n \\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.html\n// module id = ./src/app/app.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { InfoService } from 'app/services/info.service';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.component.ts","import { NgModule } from '@angular/core';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n} from '@angular/material';\n\n@NgModule({\n imports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n exports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n})\nexport class AppMaterialModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.material.module.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { HttpModule } from '@angular/http';\nimport { RouterModule } from '@angular/router';\nimport 'hammerjs';\n\nimport { routing } from './app.routing';\nimport { AppMaterialModule } from 'app/app.material.module';\n\nimport { InfoService } from './services/info.service';\nimport { RestService } from './services/rest.service';\n\nimport { AppComponent } from './app.component';\nimport { DashboardComponent } from './components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from './components/session-details/session-details.component';\nimport { CredentialsDialogComponent } from './components/dashboard/credentials-dialog.component';\nimport { LayoutBestFitComponent } from './components/layouts/layout-best-fit/layout-best-fit.component';\n\n\n@NgModule({\n declarations: [\n AppComponent,\n DashboardComponent,\n SessionDetailsComponent,\n CredentialsDialogComponent,\n LayoutBestFitComponent,\n ],\n imports: [\n BrowserModule,\n FormsModule,\n HttpModule,\n routing,\n AppMaterialModule,\n FlexLayoutModule\n ],\n entryComponents: [\n CredentialsDialogComponent,\n ],\n providers: [InfoService, RestService],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.module.ts","import { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { DashboardComponent } from 'app/components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from 'app/components/session-details/session-details.component';\nimport { LayoutBestFitComponent } from 'app/components/layouts/layout-best-fit/layout-best-fit.component';\n\nconst appRoutes: Routes = [\n {\n path: '',\n component: DashboardComponent,\n pathMatch: 'full'\n },\n {\n path: 'session/:sessionId',\n component: SessionDetailsComponent,\n pathMatch: 'full'\n },\n {\n path: 'layout-best-fit/:sessionId/:secret',\n component: LayoutBestFitComponent,\n pathMatch: 'full'\n }\n];\n\nexport const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true });\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.routing.ts","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material';\n\n@Component({\n selector: 'app-credentials-dialog',\n template: `\n
\n

\n Insert your secret\n

\n
\n \n \n \n \n \n \n \n \n \n
\n
\n `,\n styles: [`\n #quality-div {\n margin-top: 20px;\n }\n #join-div {\n margin-top: 25px;\n margin-bottom: 20px;\n }\n #quality-tag {\n display: block;\n }\n h5 {\n margin-bottom: 10px;\n text-align: left;\n }\n #joinWithVideo {\n margin-right: 50px;\n }\n mat-dialog-actions {\n display: block;\n }\n #join-btn {\n float: right;\n }\n `],\n})\nexport class CredentialsDialogComponent {\n\n public myReference: MatDialogRef;\n secret: string;\n\n constructor() { }\n\n testVideo() {\n this.myReference.close(this.secret);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/credentials-dialog.component.ts","module.exports = \"#dashboard-div {\\n padding: 20px;\\n}\\n\\n#log {\\n height: 90%;\\n}\\n\\n#log-content {\\n height: 90%;\\n font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;\\n overflow-y: auto;\\n overflow-x: hidden\\n}\\n\\nul {\\n margin: 0;\\n}\\n\\n#test-btn {\\n text-transform: uppercase;\\n float: right;\\n}\\n\\nmat-card-title button.blue {\\n color: #ffffff;\\n background-color: #0088aa;\\n}\\n\\nmat-card-title button.yellow {\\n color: rgba(0, 0, 0, 0.87);\\n background-color: #ffcc00;\\n}\\n\\nmat-spinner {\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tick-div {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tooltip-tick {\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n z-index: 2;\\n}\\n\\n.circ {\\n opacity: 0;\\n stroke-dasharray: 130;\\n stroke-dashoffset: 130;\\n -webkit-transition: all 1s;\\n transition: all 1s;\\n}\\n\\n.tick {\\n stroke-dasharray: 50;\\n stroke-dashoffset: 50;\\n -webkit-transition: stroke-dashoffset 1s 0.5s ease-out;\\n transition: stroke-dashoffset 1s 0.5s ease-out;\\n}\\n\\n.drawn+svg .path {\\n opacity: 1;\\n stroke-dashoffset: 0;\\n}\\n\\n#mirrored-video {\\n position: relative;\\n}\\n\\n/* Pure CSS loader */\\n\\n#loader {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#loader * {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::after {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::before {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n.loader-1 {\\n height: 100px;\\n width: 100px;\\n -webkit-animation: loader-1-1 4.8s linear infinite;\\n animation: loader-1-1 4.8s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.loader-1 span {\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n -webkit-animation: loader-1-2 1.2s linear infinite;\\n animation: loader-1-2 1.2s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n }\\n}\\n\\n@keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n transform: rotate(220deg);\\n }\\n}\\n\\n.loader-1 span::after {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n border: 8px solid #4d4d4d;\\n border-radius: 50%;\\n -webkit-animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n}\\n\\n@-webkit-keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n }\\n}\\n\\n@keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n transform: rotate(140deg);\\n }\\n}\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.css\n// module id = ./src/app/components/dashboard/dashboard.component.css\n// module chunks = main","module.exports = \"
\\n\\n
\\n \\n Server events\\n \\n lock_outline\\n \\n \\n \\n \\n
    \\n
  • \\n

    {{i}}

    \\n
  • \\n
\\n
\\n
\\n
\\n\\n
\\n \\n Test the connection\\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n \\n \\n \\n
\\n
\\n

{{msg}}

\\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.html\n// module id = ./src/app/components/dashboard/dashboard.component.html\n// module chunks = main","import { Component, OnInit, ViewChild, ElementRef, HostListener, OnDestroy } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material';\nimport { Subscription } from 'rxjs/Subscription';\n\nimport { InfoService } from '../../services/info.service';\nimport { RestService } from '../../services/rest.service';\n\nimport { OpenVidu, Session } from 'openvidu-browser';\nimport { CredentialsDialogComponent } from './credentials-dialog.component';\n\ndeclare const $;\n\n@Component({\n selector: 'app-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css'],\n})\nexport class DashboardComponent implements OnInit, OnDestroy {\n\n websocket: WebSocket;\n\n @ViewChild('scrollMe') private myScrollContainer: ElementRef;\n lockScroll = false;\n\n infoSubscription: Subscription;\n info = [];\n\n session: Session;\n\n testStatus = 'DISCONNECTED';\n testButton = 'Test';\n tickClass = 'trigger';\n showSpinner = false;\n msgChain = [];\n\n openviduPublicUrl: string;\n\n constructor(private infoService: InfoService, private restService: RestService, public dialog: MatDialog) {\n // Subscription to info updated event raised by InfoService\n this.infoSubscription = this.infoService.newInfo$.subscribe(\n info => {\n this.info.push(info);\n this.scrollToBottom();\n });\n }\n\n ngOnInit() {\n\n const protocol = location.protocol.includes('https') ? 'wss://' : 'ws://';\n const port = (location.port) ? (':' + location.port) : '';\n\n this.websocket = new WebSocket(protocol + location.hostname + port + '/info');\n\n this.websocket.onopen = (event) => {\n console.log('Info websocket connected');\n };\n this.websocket.onclose = (event) => {\n console.log('Info websocket closed');\n };\n this.websocket.onerror = (event) => {\n console.log('Info websocket error');\n };\n this.websocket.onmessage = (event) => {\n console.log('Info websocket message');\n console.log(event.data);\n this.infoService.updateInfo(event.data);\n };\n\n this.restService.getOpenViduPublicUrl()\n .then(url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n })\n .catch(error => {\n console.error(error);\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n // On window closed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n ngOnDestroy() {\n // On component destroyed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n toggleTestVideo() {\n if (!this.session) {\n this.testVideo();\n } else {\n this.endTestVideo();\n }\n }\n\n testVideo() {\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n if (!this.openviduPublicUrl) {\n this.restService.getOpenViduPublicUrl()\n .then((url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n this.connectToSession(this.openviduPublicUrl + 'testSession?secret=' + secret);\n }))\n .catch(error => {\n console.error(error);\n });\n } else {\n this.connectToSession(this.openviduPublicUrl + 'testSession?secret=' + secret);\n }\n }\n });\n }\n\n connectToSession(mySessionId: string) {\n this.msgChain = [];\n\n const OV = new OpenVidu();\n this.session = OV.initSession(mySessionId);\n\n this.testStatus = 'CONNECTING';\n this.testButton = 'Testing...';\n\n this.session.connect('token', (error) => {\n if (!error) {\n\n this.testStatus = 'CONNECTED';\n\n const publisherRemote = OV.initPublisher('mirrored-video', {\n audio: true,\n video: true,\n audioActive: true,\n videoActive: true,\n quality: 'MEDIUM'\n },\n e => {\n if (!!e) {\n console.error(e);\n }\n }\n );\n\n publisherRemote.on('accessAllowed', () => {\n this.msgChain.push('Camera access allowed');\n });\n\n publisherRemote.on('accessDenied', () => {\n this.endTestVideo();\n this.msgChain.push('Camera access denied');\n });\n\n publisherRemote.on('videoElementCreated', (video) => {\n this.showSpinner = true;\n this.msgChain.push('Video element created');\n });\n\n publisherRemote.on('remoteVideoPlaying', (video) => {\n this.msgChain.push('Remote video playing');\n this.testButton = 'End test';\n this.testStatus = 'PLAYING';\n this.showSpinner = false;\n });\n\n publisherRemote.subscribeToRemote();\n this.session.publish(publisherRemote);\n } else {\n if (error.code === 401) { // User unauthorized error. OpenVidu security is active\n this.endTestVideo();\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n this.connectToSession('wss://' + location.hostname + ':8443/testSession?secret=' + secret);\n }\n });\n } else {\n console.error(error);\n }\n }\n });\n }\n\n endTestVideo() {\n this.session.disconnect();\n this.session = null;\n this.testStatus = 'DISCONNECTED';\n this.testButton = 'Test';\n this.showSpinner = false;\n this.info = [];\n this.msgChain = [];\n }\n\n scrollToBottom(): void {\n try {\n if (!this.lockScroll) {\n this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;\n }\n } catch (err) {\n console.error('[Error]:' + err.toString());\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/dashboard.component.ts","module.exports = \".bounds {\\n background-color: black;\\n overflow: hidden;\\n cursor: none !important;\\n position: absolute;\\n left: 0;\\n right: 0;\\n top: 0;\\n bottom: 0;\\n}\\n\\nvideo {\\n -o-object-fit: cover;\\n object-fit: cover;\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n}\\n\\n/*!\\n * Copyright (c) 2017 TokBox, Inc.\\n * Released under the MIT license\\n * http://opensource.org/licenses/MIT\\n */\\n\\n.custom-class {\\n min-height: 0px !important;\\n}\\n\\n/**\\n * OT Base styles\\n */\\n\\n/* Root OT object, this is where our CSS reset happens */\\n\\n.OT_root,\\n.OT_root * {\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n vertical-align: baseline;\\n}\\n\\n.OT_dialog-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_dialog-centering-child {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_dialog {\\n position: relative;\\n\\n -webkit-box-sizing: border-box;\\n\\n box-sizing: border-box;\\n max-width: 576px;\\n margin-right: auto;\\n margin-left: auto;\\n padding: 36px;\\n text-align: center; /* centers all the inline content */\\n\\n background-color: #363636;\\n color: #fff;\\n -webkit-box-shadow: 2px 4px 6px #999;\\n box-shadow: 2px 4px 6px #999;\\n font-family: 'Didact Gothic', sans-serif;\\n font-size: 13px;\\n line-height: 1.4;\\n}\\n\\n.OT_dialog * {\\n font-family: inherit;\\n -webkit-box-sizing: inherit;\\n box-sizing: inherit;\\n}\\n\\n.OT_closeButton {\\n color: #999999;\\n cursor: pointer;\\n font-size: 32px;\\n line-height: 36px;\\n position: absolute;\\n right: 18px;\\n top: 0;\\n}\\n\\n.OT_dialog-messages {\\n text-align: center;\\n}\\n\\n.OT_dialog-messages-main {\\n margin-bottom: 36px;\\n line-height: 36px;\\n\\n font-weight: 300;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-messages-minor {\\n margin-bottom: 18px;\\n\\n font-size: 13px;\\n line-height: 18px;\\n color: #A4A4A4;\\n}\\n\\n.OT_dialog-messages-minor strong {\\n color: #ffffff;\\n}\\n\\n.OT_dialog-actions-card {\\n display: inline-block;\\n}\\n\\n.OT_dialog-button-title {\\n margin-bottom: 18px;\\n line-height: 18px;\\n\\n font-weight: 300;\\n text-align: center;\\n font-size: 14px;\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title label {\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title a,\\n.OT_dialog-button-title a:link,\\n.OT_dialog-button-title a:active {\\n color: #02A1DE;\\n}\\n\\n.OT_dialog-button-title strong {\\n color: #ffffff;\\n font-weight: 100;\\n display: block;\\n}\\n\\n.OT_dialog-button {\\n display: inline-block;\\n\\n margin-bottom: 18px;\\n padding: 0 1em;\\n\\n background-color: #1CA3DC;\\n text-align: center;\\n cursor: pointer;\\n}\\n\\n.OT_dialog-button:disabled {\\n cursor: not-allowed;\\n opacity: 0.5;\\n}\\n\\n.OT_dialog-button-large {\\n line-height: 36px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n\\n font-weight: 100;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-button-small {\\n line-height: 18px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n\\n background-color: #444444;\\n color: #999999;\\n font-size: 16px;\\n}\\n\\n.OT_dialog-progress-bar {\\n display: inline-block; /* prevents margin collapse */\\n width: 100%;\\n margin-top: 5px;\\n margin-bottom: 41px;\\n\\n border: 1px solid #4E4E4E;\\n height: 8px;\\n}\\n\\n.OT_dialog-progress-bar-fill {\\n height: 100%;\\n\\n background-color: #29A4DA;\\n}\\n\\n.OT_dialog-plugin-upgrading .OT_dialog-plugin-upgrade-percentage {\\n line-height: 54px;\\n\\n font-size: 48px;\\n font-weight: 100;\\n}\\n\\n/* Helpers */\\n\\n.OT_centered {\\n position: fixed;\\n left: 50%;\\n top: 50%;\\n margin: 0;\\n}\\n\\n.OT_dialog-hidden {\\n display: none;\\n}\\n\\n.OT_dialog-button-block {\\n display: block;\\n}\\n\\n.OT_dialog-no-natural-margin {\\n margin-bottom: 0;\\n}\\n\\n/* Publisher and Subscriber styles */\\n\\n.OT_publisher, .OT_subscriber {\\n position: relative;\\n min-width: 48px;\\n min-height: 48px;\\n}\\n\\n.OT_publisher .OT_video-element,\\n.OT_subscriber .OT_video-element {\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n\\n -webkit-transform-origin: 0 0;\\n\\n transform-origin: 0 0;\\n}\\n\\n/* Styles that are applied when the video element should be mirrored */\\n\\n.OT_publisher.OT_mirrored .OT_video-element {\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n -webkit-transform-origin: 50% 50%;\\n transform-origin: 50% 50%;\\n}\\n\\n.OT_subscriber_error {\\n background-color: #000;\\n color: #fff;\\n text-align: center;\\n}\\n\\n.OT_subscriber_error > p {\\n padding: 20px;\\n}\\n\\n/* The publisher/subscriber name/mute background */\\n\\n.OT_publisher .OT_bar,\\n.OT_subscriber .OT_bar,\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name,\\n.OT_publisher .OT_archiving,\\n.OT_subscriber .OT_archiving,\\n.OT_publisher .OT_archiving-status,\\n.OT_subscriber .OT_archiving-status,\\n.OT_publisher .OT_archiving-light-box,\\n.OT_subscriber .OT_archiving-light-box {\\n -webkit-box-sizing: border-box;\\n -ms-box-sizing: border-box;\\n box-sizing: border-box;\\n top: 0;\\n left: 0;\\n right: 0;\\n display: block;\\n height: 34px;\\n position: absolute;\\n}\\n\\n.OT_publisher .OT_bar,\\n.OT_subscriber .OT_bar {\\n background: rgba(0, 0, 0, 0.4);\\n}\\n\\n.OT_publisher .OT_edge-bar-item,\\n.OT_subscriber .OT_edge-bar-item {\\n z-index: 1; /* required to get audio level meter underneath */\\n}\\n\\n/* The publisher/subscriber name panel/archiving status bar */\\n\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name {\\n background-color: transparent;\\n color: #ffffff;\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n padding: 0 4px 0 36px;\\n}\\n\\n.OT_publisher .OT_archiving-status,\\n.OT_subscriber .OT_archiving-status {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n left: 34px;\\n padding: 0 4px;\\n color: rgba(255, 255, 255, 0.8);\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n}\\n\\n.OT_micro .OT_archiving-status,\\n.OT_micro:hover .OT_archiving-status,\\n.OT_mini .OT_archiving-status,\\n.OT_mini:hover .OT_archiving-status {\\n display: none;\\n}\\n\\n.OT_publisher .OT_archiving-light-box,\\n.OT_subscriber .OT_archiving-light-box {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n right: auto;\\n width: 34px;\\n height: 34px;\\n}\\n\\n.OT_archiving-light {\\n width: 7px;\\n height: 7px;\\n border-radius: 30px;\\n position: absolute;\\n top: 14px;\\n left: 14px;\\n background-color: #575757;\\n -webkit-box-shadow: 0 0 5px 1px #575757;\\n box-shadow: 0 0 5px 1px #575757;\\n}\\n\\n.OT_archiving-light.OT_active {\\n background-color: #970d13;\\n animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n -moz-animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n -moz-animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n.OT_mini .OT_bar,\\n.OT_bar.OT_mode-mini,\\n.OT_bar.OT_mode-mini-auto {\\n bottom: 0;\\n height: auto;\\n}\\n\\n.OT_mini .OT_name.OT_mode-off,\\n.OT_mini .OT_name.OT_mode-on,\\n.OT_mini .OT_name.OT_mode-auto,\\n.OT_mini:hover .OT_name.OT_mode-auto {\\n display: none;\\n}\\n\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name {\\n left: 10px;\\n right: 37px;\\n height: 34px;\\n padding-left: 0;\\n}\\n\\n.OT_publisher .OT_mute,\\n.OT_subscriber .OT_mute {\\n border: none;\\n cursor: pointer;\\n display: block;\\n position: absolute;\\n text-align: center;\\n text-indent: -9999em;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n}\\n\\n.OT_publisher .OT_mute,\\n.OT_subscriber .OT_mute {\\n right: 0;\\n top: 0;\\n border-left: 1px solid rgba(255, 255, 255, 0.2);\\n height: 36px;\\n width: 37px;\\n}\\n\\n.OT_mini .OT_mute,\\n.OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold,\\n.OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold {\\n top: 50%;\\n left: 50%;\\n right: auto;\\n margin-top: -18px;\\n margin-left: -18.5px;\\n border-left: none;\\n}\\n\\n.OT_publisher .OT_mute {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMA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BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg==);\\n background-position: 9px 4px;\\n}\\n\\n.OT_subscriber .OT_mute {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII=);\\n background-position: 8px 7px;\\n}\\n\\n.OT_subscriber .OT_mute.OT_active {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg==);\\n background-position: 7px 7px;\\n}\\n\\n/**\\n * Styles for display modes\\n *\\n * Note: It's important that these completely control the display and opacity\\n * attributes, no other selectors should atempt to change them.\\n */\\n\\n/* Default display mode transitions for various chrome elements */\\n\\n.OT_publisher .OT_edge-bar-item,\\n.OT_subscriber .OT_edge-bar-item {\\n -webkit-transition-property: top, bottom, opacity;\\n transition-property: top, bottom, opacity;\\n -webkit-transition-duration: 0.5s;\\n transition-duration: 0.5s;\\n -webkit-transition-timing-function: ease-in;\\n transition-timing-function: ease-in;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-off,\\n.OT_publisher .OT_edge-bar-item.OT_mode-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto,\\n.OT_publisher .OT_edge-bar-item.OT_mode-mini-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\\n top: -25px;\\n opacity: 0;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-auto,\\n.OT_publisher .OT_mute.OT_mode-mini-auto,\\n.OT_subscriber .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\\n top: auto;\\n bottom: -25px;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-on,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-on,\\n.OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto,\\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\\n top: 0;\\n opacity: 1;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-on,\\n.OT_mini:hover .OT_mute.OT_mode-auto,\\n.OT_mute.OT_mode-mini,\\n.OT_root:hover .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\\n.OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\\n top: auto;\\n bottom: 0;\\n opacity: 1;\\n}\\n\\n/* Contains the video element, used to fix video letter-boxing */\\n\\n.OT_widget-container {\\n width: 100%;\\n height: 100%;\\n position: absolute;\\n background-color: #000000;\\n overflow: hidden;\\n}\\n\\n/* Load animation */\\n\\n.OT_root .OT_video-loading {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n\\n background-color: rgba(0, 0, 0, .75);\\n}\\n\\n.OT_root .OT_video-loading .OT_video-loading-spinner {\\n background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0i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nNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2IpIiBkPSJNODYuNiA1MEExMDAgMTAwIDAgMCAxIDAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNjKSIgZD0iTTAgMTAwYTEwMCAxMDAgMCAwIDEtODYuNi01MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48cGF0aCBzdHJva2U9InVybCgjZCkiIGQ9Ik0tODYuNiA1MGExMDAgMTAwIDAgMCAxIDAtMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNlKSIgZD0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAgMSA4Ni42IDUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjwvZz48L21hc2s+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9Ii0yMCIgeT0iLTIwIiBtYXNrPSJ1cmwoI2cpIiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;\\n position: absolute;\\n width: 32px;\\n height: 32px;\\n left: 50%;\\n top: 50%;\\n margin-left: -16px;\\n margin-top: -16px;\\n -webkit-animation: OT_spin 2s linear infinite;\\n animation: OT_spin 2s linear infinite;\\n}\\n\\n@-webkit-keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.OT_publisher.OT_loading .OT_video-loading,\\n.OT_subscriber.OT_loading .OT_video-loading {\\n display: block;\\n}\\n\\n.OT_video-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_video-container {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_video-poster {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n\\n opacity: .25;\\n\\n background-repeat: no-repeat;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSI2Ni42NiUiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTc5IDMwOGMxNC4yNS02LjUgNTQuMjUtMTkuNzUgNzEtMjkgOS0zLjI1IDI1LTIxIDI1LTIxczMuNzUtMTMgMy0yMmMtMS43NS02Ljc1LTE1LTQzLTE1LTQzLTIuNSAzLTQuNzQxIDMuMjU5LTcgMS0zLjI1LTcuNS0yMC41LTQ0LjUtMTYtNTcgMS4yNS03LjUgMTAtNiAxMC02LTExLjI1LTMzLjc1LTgtNjctOC02N3MuMDczLTcuMzQ2IDYtMTVjLTMuNDguNjM3LTkgNC05IDQgMi41NjMtMTEuNzI3IDE1LTIxIDE1LTIxIC4xNDgtLjMxMi0xLjMyMS0xLjQ1NC0xMCAxIDEuNS0yLjc4IDE2LjY3NS04LjY1NCAzMC0xMSAzLjc4Ny05LjM2MSAxMi43ODItMTcuMzk4IDIyLTIyLTIuMzY1IDMuMTMzLTMgNi0zIDZzMTUuNjQ3LTguMDg4IDQxLTZjLTE5Ljc1IDItMjQgNi0yNCA2czc0LjUtMTAuNzUgMTA0IDM3YzcuNSA5LjUgMjQuNzUgNTUuNzUgMTAgODkgMy43NS0xLjUgNC41LTQuNSA5IDEgLjI1IDE0Ljc1LTExLjUgNjMtMTkgNjItMi43NSAxLTQtMy00LTMtMTAuNzUgMjkuNS0xNCAzOC0xNCAzOC0yIDQuMjUtMy43NSAxOC41LTEgMjIgMS4yNSA0LjUgMjMgMjMgMjMgMjNsMTI3IDUzYzM3IDM1IDIzIDEzNSAyMyAxMzVMMCA0NjRzLTMtOTYuNzUgMTQtMTIwYzUuMjUtNi4yNSAyMS43NS0xOS43NSA2NS0zNnoiLz48L3N2Zz4=);\\n background-size: auto 76%;\\n}\\n\\n.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: cover;\\n object-fit: cover;\\n}\\n\\n/* Workaround for iOS freezing issue when cropping videos */\\n\\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\\n\\n@media only screen\\n and (orientation: portrait) {\\n .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: contain !important;\\n object-fit: contain !important;\\n }\\n}\\n\\n.OT_fit-mode-contain .OT_video-element {\\n -o-object-fit: contain;\\n object-fit: contain;\\n}\\n\\n.OT_fit-mode-cover .OT_video-poster {\\n background-position: center bottom;\\n}\\n\\n.OT_fit-mode-contain .OT_video-poster {\\n background-position: center;\\n}\\n\\n.OT_audio-level-meter {\\n position: absolute;\\n width: 25%;\\n max-width: 224px;\\n min-width: 21px;\\n top: 0;\\n right: 0;\\n overflow: hidden;\\n}\\n\\n.OT_audio-level-meter:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__bar {\\n position: absolute;\\n width: 192%; /* meter value can overflow of 8% */\\n height: 192%;\\n top: -96% /* half of the size */;\\n right: -96%;\\n border-radius: 50%;\\n\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_audio-level-meter__audio-only-img {\\n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U4OS03LjA2MS0uOTEyeiIvPjxwYXRoIGQ9Ik01LjA4NCA1MS4zODVjLS44MDQtMy43ODIuNTY5LTcuMzM1IDMuMTM0LTcuOTIxIDIuNjM2LS42MDMgNS40ODUgMi4xNSA2LjI4OSA2LjEzMi43OTcgMy45NDgtLjc1MiA3LjQ1Ny0zLjM4OCA3Ljg1OS0yLjU2Ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+) no-repeat center;\\n}\\n\\n.OT_audio-level-meter__audio-only-img:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__value {\\n position: absolute;\\n border-radius: 50%;\\n background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\\n}\\n\\n.OT_audio-level-meter.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_audio-level-meter.OT_mode-on,\\n.OT_audio-only .OT_audio-level-meter.OT_mode-auto {\\n display: block;\\n}\\n\\n.OT_audio-only.OT_publisher .OT_video-element,\\n.OT_audio-only.OT_subscriber .OT_video-element {\\n display: none;\\n}\\n\\n.OT_video-disabled-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: bottom right;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 3px;\\n right: 3px;\\n}\\n\\n.OT_video-disabled {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3BxeEtim/UbNpnbQiqF4MmT7kqrbr4lkMcTo46TTSpJB5g+8NHuVWnWuaampvhmO/7duHmrGluoO4C6OsJZGRrkDIld43ZqUOTnlkDSmXmabAoBU0vqBf+6KgFSxQ9++uzZ8rZApM81TJ8xM5me0Z/UF7PuBmdVdkGEb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0/veCs4naw0cgybezid7X9jV3rX2RSs0wfLkll4pBGcgifg+NYxe1kJ2ycTaRq66uG/wBOl0vjcw70xwAAAABJRU5ErkJggg==);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-warning {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAuDaNitJonTGIqHgQGQjDsJglMrUH5iDSEQbRa6y2yrNvv/PuWVmV/PTzLz8steTit1B9FtGJeZrJksmWdBzBMcami4xUkaY1A1Qe94WIaPGBApJhaERrLrXkElf8+NPPz6YMLs1DDjn0Wn9PnI/UiQadM4jNEkhzVsEGE8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5M84kav5C5z2ZfyAivi9i9VGd45RH7UWJbjwGG/7NYsRECt7jiOToHedKAui8SW4CsxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_audio-blocked-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n}\\n\\n.OT_audio-blocked {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwIDEgNDMgNDRhOC45ODggOC45ODggMCAwIDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAgMSAxMC4zNzQtLjQyQzUxLjcwMiAxOS4xMTQgNTQgMjkuMjA4IDU0IDQ1LjIwOGMwIDE0LjUyNy0yLjM0MyAyMy44OC03LjAzIDI4LjA1OGE3LjI4IDcuMjggMCAwIDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwIDEtNS01di0xM2E1IDUgMCAwIDEgNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 90px auto;\\n}\\n\\n.OT_container-audio-blocked {\\n cursor: pointer;\\n}\\n\\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\\n display: none;\\n}\\n\\n.OT_container-audio-blocked .OT_mute {\\n display: none;\\n}\\n\\n.OT_audio-blocked-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_video-unsupported {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 58px auto;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin-top: -30px;\\n}\\n\\n.OT_video-unsupported-bar {\\n display: none;\\n position: absolute;\\n width: 192%; /* copy the size of the audio meter bar for symmetry */\\n height: 192%;\\n top: -96% /* half of the size */;\\n left: -96%;\\n border-radius: 50%;\\n\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_video-unsupported-img {\\n display: none;\\n position: absolute;\\n top: 11%;\\n left: 15%;\\n width: 70%;\\n opacity: .7;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-repeat: no-repeat;\\n background-position: center;\\n background-size: 100% auto;\\n}\\n\\n.OT_video-unsupported-img:before {\\n /* makes the height of the container 93% of its width (90/97 px) */\\n content: '';\\n display: block;\\n padding-top: 93%;\\n}\\n\\n.OT_video-unsupported-text {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n text-align: center;\\n height: 100%;\\n margin-top: 40px;\\n}\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module chunks = main","module.exports = \"
\\n
\\n
\\n \\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener, ViewEncapsulation, ApplicationRef } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { OpenVidu, Session, Stream, Subscriber } from 'openvidu-browser';\n\nimport { OpenViduLayout } from '../openvidu-layout';\n\n@Component({\n selector: 'app-layout-best-fit',\n templateUrl: './layout-best-fit.component.html',\n styleUrls: ['./layout-best-fit.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LayoutBestFitComponent implements OnInit, OnDestroy {\n\n openviduLayout: OpenViduLayout;\n sessionId: string;\n secret: string;\n\n session: Session;\n streams = [];\n\n layout: any;\n resizeTimeout;\n\n constructor(private route: ActivatedRoute, private appRef: ApplicationRef) {\n this.route.params.subscribe(params => {\n this.sessionId = params.sessionId;\n this.secret = params.secret;\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n this.leaveSession();\n }\n\n @HostListener('window:resize', ['$event'])\n sizeChange(event) {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.openviduLayout.updateLayout();\n }, 20);\n }\n\n ngOnDestroy() {\n this.leaveSession();\n }\n\n ngOnInit() {\n const OV = new OpenVidu();\n const fullSessionId = 'wss://' + location.hostname + ':8443/' + this.sessionId + '?secret=' + this.secret + '&recorder=true';\n\n this.session = OV.initSession(fullSessionId);\n\n this.session.on('streamCreated', (event) => {\n const subscriber: Subscriber = this.session.subscribe(event.stream, '');\n this.addRemoteStream(event.stream);\n });\n\n this.session.on('streamDestroyed', (event) => {\n event.preventDefault();\n this.deleteRemoteStream(event.stream);\n this.openviduLayout.updateLayout();\n });\n\n this.session.connect(null, (error) => {\n if (error) {\n console.error(error);\n }\n });\n\n this.openviduLayout = new OpenViduLayout();\n this.openviduLayout.initLayoutContainer(document.getElementById('layout'), {\n maxRatio: 3 / 2, // The narrowest ratio that will be used (default 2x3)\n minRatio: 9 / 16, // The widest ratio that will be used (default 16x9)\n fixedRatio: false, /* If this is true then the aspect ratio of the video is maintained\n and minRatio and maxRatio are ignored (default false) */\n bigClass: 'OV_big', // The class to add to elements that should be sized bigger\n bigPercentage: 0.8, // The maximum percentage of space the big ones should take up\n bigFixedRatio: false, // fixedRatio for the big ones\n bigMaxRatio: 3 / 2, // The narrowest ratio to use for the big elements (default 2x3)\n bigMinRatio: 9 / 16, // The widest ratio to use for the big elements (default 16x9)\n bigFirst: true, // Whether to place the big one in the top left (true) or bottom right\n animate: true // Whether you want to animate the transitions\n });\n }\n\n private addRemoteStream(stream: Stream): void {\n this.streams.push(stream);\n this.appRef.tick();\n }\n\n private deleteRemoteStream(stream: Stream): void {\n const index = this.streams.indexOf(stream, 0);\n if (index > -1) {\n this.streams.splice(index, 1);\n }\n this.appRef.tick();\n }\n\n leaveSession() {\n if (this.session) { this.session.disconnect(); };\n this.streams = [];\n this.session = null;\n }\n\n onVideoPlaying(event) {\n const video: HTMLVideoElement = event.target;\n video.parentElement.parentElement.classList.remove('custom-class');\n this.openviduLayout.updateLayout();\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","declare var $: any;\n\nexport interface OpenViduLayoutOptions {\n maxRatio: number;\n minRatio: number;\n fixedRatio: boolean;\n animate: any;\n bigClass: string;\n bigPercentage: any;\n bigFixedRatio: any;\n bigMaxRatio: any;\n bigMinRatio: any;\n bigFirst: any;\n}\n\nexport class OpenViduLayout {\n\n private layoutContainer: HTMLElement;\n private opts: OpenViduLayoutOptions;\n\n private fixAspectRatio(elem: HTMLVideoElement, width: number) {\n const sub: HTMLVideoElement = elem.querySelector('.OT_root');\n if (sub) {\n // If this is the parent of a subscriber or publisher then we need\n // to force the mutation observer on the publisher or subscriber to\n // trigger to get it to fix it's layout\n const oldWidth = sub.style.width;\n sub.style.width = width + 'px';\n // sub.style.height = height + 'px';\n sub.style.width = oldWidth || '';\n }\n }\n\n private positionElement(elem: HTMLVideoElement, x: number, y: number, width: number, height: number, animate: any) {\n const targetPosition = {\n left: x + 'px',\n top: y + 'px',\n width: width + 'px',\n height: height + 'px'\n };\n\n this.fixAspectRatio(elem, width);\n\n if (animate && $) {\n $(elem).stop();\n $(elem).animate(targetPosition, animate.duration || 200, animate.easing || 'swing',\n () => {\n this.fixAspectRatio(elem, width);\n if (animate.complete) { animate.complete.call(this); }\n });\n } else {\n $(elem).css(targetPosition);\n }\n this.fixAspectRatio(elem, width);\n }\n\n private getVideoRatio(elem: HTMLVideoElement) {\n if (!elem) {\n return 3 / 4;\n }\n const video: HTMLVideoElement = elem.querySelector('video');\n if (video && video.videoHeight && video.videoWidth) {\n return video.videoHeight / video.videoWidth;\n } else if (elem.videoHeight && elem.videoWidth) {\n return elem.videoHeight / elem.videoWidth;\n }\n return 3 / 4;\n }\n\n private getCSSNumber(elem: HTMLElement, prop: string) {\n const cssStr = $(elem).css(prop);\n return cssStr ? parseInt(cssStr, 10) : 0;\n }\n\n // Really cheap UUID function\n private cheapUUID() {\n return (Math.random() * 100000000).toFixed(0);\n }\n\n private getHeight(elem: HTMLElement) {\n const heightStr = $(elem).css('height');\n return heightStr ? parseInt(heightStr, 10) : 0;\n }\n\n private getWidth(elem: HTMLElement) {\n const widthStr = $(elem).css('width');\n return widthStr ? parseInt(widthStr, 10) : 0;\n }\n\n private getBestDimensions(minR: number, maxR: number, count: number, WIDTH: number, HEIGHT: number, targetHeight: number) {\n let maxArea,\n targetCols,\n targetRows,\n targetWidth,\n tWidth,\n tHeight,\n tRatio;\n\n // Iterate through every possible combination of rows and columns\n // and see which one has the least amount of whitespace\n for (let i = 1; i <= count; i++) {\n const colsAux = i;\n const rowsAux = Math.ceil(count / colsAux);\n\n // Try taking up the whole height and width\n tHeight = Math.floor(HEIGHT / rowsAux);\n tWidth = Math.floor(WIDTH / colsAux);\n\n tRatio = tHeight / tWidth;\n if (tRatio > maxR) {\n // We went over decrease the height\n tRatio = maxR;\n tHeight = tWidth * tRatio;\n } else if (tRatio < minR) {\n // We went under decrease the width\n tRatio = minR;\n tWidth = tHeight / tRatio;\n }\n\n const area = (tWidth * tHeight) * count;\n\n // If this width and height takes up the most space then we're going with that\n if (maxArea === undefined || (area > maxArea)) {\n maxArea = area;\n targetHeight = tHeight;\n targetWidth = tWidth;\n targetCols = colsAux;\n targetRows = rowsAux;\n }\n }\n return {\n maxArea: maxArea,\n targetCols: targetCols,\n targetRows: targetRows,\n targetHeight: targetHeight,\n targetWidth: targetWidth,\n ratio: targetHeight / targetWidth\n };\n };\n\n private arrange(children: HTMLVideoElement[], WIDTH: number, HEIGHT: number, offsetLeft: number, offsetTop: number, fixedRatio: boolean,\n minRatio: number, maxRatio: number, animate: any) {\n\n let targetHeight;\n\n const count = children.length;\n let dimensions;\n\n if (!fixedRatio) {\n dimensions = this.getBestDimensions(minRatio, maxRatio, count, WIDTH, HEIGHT, targetHeight);\n } else {\n // Use the ratio of the first video element we find to approximate\n const ratio = this.getVideoRatio(children.length > 0 ? children[0] : null);\n dimensions = this.getBestDimensions(ratio, ratio, count, WIDTH, HEIGHT, targetHeight);\n }\n\n // Loop through each stream in the container and place it inside\n let x = 0,\n y = 0;\n const rows = [];\n let row;\n // Iterate through the children and create an array with a new item for each row\n // and calculate the width of each row so that we know if we go over the size and need\n // to adjust\n for (let i = 0; i < children.length; i++) {\n if (i % dimensions.targetCols === 0) {\n // This is a new row\n row = {\n children: [],\n width: 0,\n height: 0\n };\n rows.push(row);\n }\n const elem: HTMLVideoElement = children[i];\n row.children.push(elem);\n let targetWidth = dimensions.targetWidth;\n targetHeight = dimensions.targetHeight;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = targetHeight / this.getVideoRatio(elem);\n }\n row.width += targetWidth;\n row.height = targetHeight;\n }\n // Calculate total row height adjusting if we go too wide\n let totalRowHeight = 0;\n let remainingShortRows = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width > WIDTH) {\n // Went over on the width, need to adjust the height proportionally\n row.height = Math.floor(row.height * (WIDTH / row.width));\n row.width = WIDTH;\n } else if (row.width < WIDTH) {\n remainingShortRows += 1;\n }\n totalRowHeight += row.height;\n }\n if (totalRowHeight < HEIGHT && remainingShortRows > 0) {\n // We can grow some of the rows, we're not taking up the whole height\n let remainingHeightDiff = HEIGHT - totalRowHeight;\n totalRowHeight = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width < WIDTH) {\n // Evenly distribute the extra height between the short rows\n let extraHeight = remainingHeightDiff / remainingShortRows;\n if ((extraHeight / row.height) > ((WIDTH - row.width) / row.width)) {\n // We can't go that big or we'll go too wide\n extraHeight = Math.floor(((WIDTH - row.width) / row.width) * row.height);\n }\n row.width += Math.floor((extraHeight / row.height) * row.width);\n row.height += extraHeight;\n remainingHeightDiff -= extraHeight;\n remainingShortRows -= 1;\n }\n totalRowHeight += row.height;\n }\n }\n // vertical centering\n y = ((HEIGHT - (totalRowHeight)) / 2);\n // Iterate through each row and place each child\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n // center the row\n const rowMarginLeft = ((WIDTH - row.width) / 2);\n x = rowMarginLeft;\n for (let j = 0; j < row.children.length; j++) {\n const elem: HTMLVideoElement = row.children[j];\n\n let targetWidth = dimensions.targetWidth;\n targetHeight = row.height;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = Math.floor(targetHeight / this.getVideoRatio(elem));\n }\n elem.style.position = 'absolute';\n // $(elem).css('position', 'absolute');\n const actualWidth = targetWidth - this.getCSSNumber(elem, 'paddingLeft') -\n this.getCSSNumber(elem, 'paddingRight') -\n this.getCSSNumber(elem, 'marginLeft') -\n this.getCSSNumber(elem, 'marginRight') -\n this.getCSSNumber(elem, 'borderLeft') -\n this.getCSSNumber(elem, 'borderRight');\n\n const actualHeight = targetHeight - this.getCSSNumber(elem, 'paddingTop') -\n this.getCSSNumber(elem, 'paddingBottom') -\n this.getCSSNumber(elem, 'marginTop') -\n this.getCSSNumber(elem, 'marginBottom') -\n this.getCSSNumber(elem, 'borderTop') -\n this.getCSSNumber(elem, 'borderBottom');\n\n this.positionElement(elem, x + offsetLeft, y + offsetTop, actualWidth, actualHeight, animate);\n x += targetWidth;\n }\n y += targetHeight;\n }\n }\n\n private filterDisplayNone(element: HTMLElement) {\n return element.style.display !== 'none';\n }\n\n updateLayout() {\n if (this.layoutContainer.style.display === 'none') {\n return;\n }\n let id = this.layoutContainer.id;\n if (!id) {\n id = 'OT_' + this.cheapUUID();\n this.layoutContainer.id = id;\n }\n\n const HEIGHT = this.getHeight(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderTop') -\n this.getCSSNumber(this.layoutContainer, 'borderBottom');\n const WIDTH = this.getWidth(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderLeft') -\n this.getCSSNumber(this.layoutContainer, 'borderRight');\n\n const availableRatio = HEIGHT / WIDTH;\n\n let offsetLeft = 0;\n let offsetTop = 0;\n let bigOffsetTop = 0;\n let bigOffsetLeft = 0;\n\n const bigOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>.' + this.opts.bigClass),\n this.filterDisplayNone);\n const smallOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>*:not(.' + this.opts.bigClass + ')'),\n this.filterDisplayNone);\n\n if (bigOnes.length > 0 && smallOnes.length > 0) {\n let bigWidth, bigHeight;\n\n if (availableRatio > this.getVideoRatio(bigOnes[0])) {\n // We are tall, going to take up the whole width and arrange small\n // guys at the bottom\n bigWidth = WIDTH;\n bigHeight = Math.floor(HEIGHT * this.opts.bigPercentage);\n offsetTop = bigHeight;\n bigOffsetTop = HEIGHT - offsetTop;\n } else {\n // We are wide, going to take up the whole height and arrange the small\n // guys on the right\n bigHeight = HEIGHT;\n bigWidth = Math.floor(WIDTH * this.opts.bigPercentage);\n offsetLeft = bigWidth;\n bigOffsetLeft = WIDTH - offsetLeft;\n }\n if (this.opts.bigFirst) {\n this.arrange(bigOnes, bigWidth, bigHeight, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, 0, 0, this.opts.fixedRatio,\n this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n this.arrange(bigOnes, bigWidth, bigHeight, bigOffsetLeft, bigOffsetTop,\n this.opts.bigFixedRatio, this.opts.bigMinRatio, this.opts.bigMaxRatio, this.opts.animate);\n }\n } else if (bigOnes.length > 0 && smallOnes.length === 0) {\n this.\n // We only have one bigOne just center it\n arrange(bigOnes, WIDTH, HEIGHT, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n }\n }\n\n initLayoutContainer(container, opts) {\n this.opts = {\n maxRatio: (opts.maxRatio != null) ? opts.maxRatio : 3 / 2,\n minRatio: (opts.minRatio != null) ? opts.minRatio : 9 / 16,\n fixedRatio: (opts.fixedRatio != null) ? opts.fixedRatio : false,\n animate: (opts.animate != null) ? opts.animate : false,\n bigClass: (opts.bigClass != null) ? opts.bigClass : 'OT_big',\n bigPercentage: (opts.bigPercentage != null) ? opts.bigPercentage : 0.8,\n bigFixedRatio: (opts.bigFixedRatio != null) ? opts.bigFixedRatio : false,\n bigMaxRatio: (opts.bigMaxRatio != null) ? opts.bigMaxRatio : 3 / 2,\n bigMinRatio: (opts.bigMinRatio != null) ? opts.bigMinRatio : 9 / 16,\n bigFirst: (opts.bigFirst != null) ? opts.bigFirst : true\n };\n this.layoutContainer = typeof (container) === 'string' ? $(container) : container;\n }\n\n setLayoutOptions(options: OpenViduLayoutOptions) {\n this.opts = options;\n }\n\n}\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/openvidu-layout.ts","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.css\n// module id = ./src/app/components/session-details/session-details.component.css\n// module chunks = main","module.exports = \"

\\n session-details works!\\n

\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.html\n// module id = ./src/app/components/session-details/session-details.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-session-details',\n templateUrl: './session-details.component.html',\n styleUrls: ['./session-details.component.css']\n})\nexport class SessionDetailsComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/session-details/session-details.component.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class InfoService {\n\n info: string;\n newInfo$: Subject;\n\n constructor() {\n this.newInfo$ = new Subject();\n }\n\n getInfo() {\n return this.info;\n }\n\n updateInfo(info: string) {\n this.info = info;\n this.newInfo$.next(info);\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/info.service.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class RestService {\n\n private openviduPublicUrl: string;\n\n getOpenViduPublicUrl(): Promise {\n return new Promise((resolve, reject) => {\n if (!!this.openviduPublicUrl) {\n resolve(this.openviduPublicUrl);\n } else {\n const url = location.protocol + '//' + location.hostname + ':' + (!!location.port ? location.port : '8443') +\n '/config/openvidu-publicurl';\n const http = new XMLHttpRequest();\n\n http.onreadystatechange = () => {\n if (http.readyState === 4) {\n if (http.status === 200) {\n this.openviduPublicUrl = http.responseText;\n resolve(http.responseText);\n } else {\n reject('Error getting OpenVidu publicurl');\n }\n };\n }\n http.open('GET', url, true);\n http.send();\n }\n });\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/rest.service.ts","// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\n\nexport const environment = {\n production: false\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/environments/environment.ts","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.ts"],"sourceRoot":"webpack:///"} \ No newline at end of file +{"version":3,"sources":["/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/DetectRTC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/Mapper.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-utils-js/WebRtcPeer.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-utils-js/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/OpenVidu.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Publisher.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Session.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Subscriber.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Connection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/LocalRecorder.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/OpenViduError.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/OpenViduInternal.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/SessionInternal.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Stream.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/WebRtcStats.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/ScreenSharing/Screen-Capturing-Auto.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/stun.json","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/turn.json","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/hark/hark.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/inherits/inherits_browser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/merge/merge.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/normalice/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/rtcpeerconnection-shim/rtcpeerconnection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/grammar.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/parser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/writer.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/interop.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/transform.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp/sdp.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/rng-browser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v1.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v4.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_core.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_factory.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/common_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/edge/edge_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/edge/getusermedia.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/safari/safari_shim.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/utils.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wildemitter/wildemitter.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js","./src/$_lazy_route_resource lazy","./src/app/app.component.css","./src/app/app.component.html","./src/app/app.component.ts","./src/app/app.material.module.ts","./src/app/app.module.ts","./src/app/app.routing.ts","./src/app/components/dashboard/credentials-dialog.component.ts","./src/app/components/dashboard/dashboard.component.css","./src/app/components/dashboard/dashboard.component.html","./src/app/components/dashboard/dashboard.component.ts","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","./src/app/components/layouts/openvidu-layout.ts","./src/app/components/session-details/session-details.component.css","./src/app/components/session-details/session-details.component.html","./src/app/components/session-details/session-details.component.ts","./src/app/services/info.service.ts","./src/app/services/rest.service.ts","./src/environments/environment.ts","./src/main.ts"],"names":[],"mappings":";;;;;;uHAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,IAAI,SAAS,IAAI,EAAE,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,8EAA8E,EAAE;AAChF,aAAa,eAAe,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AAAA;AACT;AACA,CAAC;AACD,qC;;;;;;;;ACt6BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yC;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY;AACjB,CAAC;AACD;AACA,uBAAuB;AACvB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qD;;;;;;;;AC5MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kCAAkC;AACjF,+CAA+C,kCAAkC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,mBAAmB,EAAE;AACrB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,iBAAiB,qCAAqC;AACtD;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACxmBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;ACVA;AACA;AACA;AACA;AACA,iC;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sC;;;;;;;ACrpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS,cAAc;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,mCAAmC;AACnC,qCAAqC;AACrC,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oC;;;;;;;;ACpPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,qDAAqD,sBAAsB;AAC3E;AACA;AACA;AACA,0DAA0D,uBAAuB;AACjF,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,2DAA2D;AACxG,aAAa;AACb,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D,2BAA2B,uBAAuB;AAClD;AACA,+DAA+D;AAC/D,2BAA2B,uBAAuB;AAClD;AACA,+DAA+D;AAC/D,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,EAAE,wBAAwB,YAAY,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,2CAA2C,qBAAqB;AAChE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS,cAAc;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,4BAA4B;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,6CAA6C;AAC5G;AACA;AACA;AACA,yCAAyC,gEAAgE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C,gDAAgD;AAChD,qDAAqD;AACrD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,4C;;;;;;;;AC7VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,qCAAqC;AAC9G;AACA,kEAAkE,qCAAqC;AACvG;AACA,qEAAqE,gBAAgB;AACrF;AACA,sEAAsE,mBAAmB;AACzF;AACA;AACA,gEAAgE,gBAAgB;AAChF;AACA,kEAAkE,iBAAiB;AACnF;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS,8BAA8B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kDAAkD;AACvG,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qDAAqD,kDAAkD;AACvG,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,aAAa;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iDAAiD,kDAAkD;AACnG,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,uBAAuB,oCAAoC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,2C;;;;;;;;AC/hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF;AAChF;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,yCAAyC;AACtI;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;;ACpkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,yDAAyD,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,oBAAoB,EAAE;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;ACvRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iD;;;;;;;;ACxIA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB;;AAEA,6BAA6B;AAC7B,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;ACxGA,6V;;;;;;;ACAA,mB;;;;;;;ACAA;;AAEA;AACA;AACA;;AAEA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,uDAAuD,mCAAmC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,mCAAmC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;;AAGA;AACA;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,gBAAgB,WAAW;;AAE3B;;AAEA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,IAAI;;AAEJ;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;;AAE9B;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,KAAK;;AAEL;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,YAAY;;AAEZ;;AAEA;;AAEA;;AAEA,EAAE;;AAEF;;AAEA;;AAEA,CAAC,gG;;;;;;;;AC9KD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;;AAEA;AACA;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,sCAAsC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,gCAAgC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa;AACtB;;AAEA;AACA;AACA;AACA,SAAS,aAAa;AACtB;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B;;AAE/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,mBAAmB,8BAA8B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gCAAgC;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,aAAa;AACb;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;ACvuDA;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAC7B,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,UAAU;AACV,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uCAAuC,UAAU;AACjD,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;AChQD;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+CAA+C;;AAE/C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,uCAAuC;AACvC;;AAEA,mBAAmB,kCAAkC;AACrD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,4BAA4B;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;AC5FA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gBAAgB,KAAK,KAAK;AAC1B;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,KAAK;AACpD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,cAAc;;AAEd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,yBAAyB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;;;;;;;ACl3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;AC9GA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB,0BAA0B;AAC1B;AACA;AACA;AACA,yDAAyD;AACzD,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;ACnqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA,6BAA6B;AAC7B,kDAAkD;;AAElD;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA,0CAA0C;AAC1C;;AAEA;AACA;;AAEA;;AAEA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,8CAA8C,EAAE;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;A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AEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA,yCAAyC;AACzC;AACA,0BAA0B;AAC1B;AACA,+BAA+B;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,IAAI;AAChC;;AAEA;AACA;;AAEA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,wDAAwD;AACxD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AAAA;AACb,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;AC/iCD;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;AChCA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,iCAAiC,sBAAsB;;;;;;;;;;ACZvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,+DAA+D;AAC/D;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yBAAyB,gCAAgC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxuBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,YAAY;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA,gDAAgD;AAChD;AACA;AACA,yDAAyD,oBAAoB;AAC7E,yDAAyD;AACzD;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA,+BAA+B,wBAAwB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;;;;;;;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,8BAA8B;AAC9B,oCAAoC,EAAE;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gEAAgE;AAC7E,aAAa;AACb;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gCAAgC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0DAA0D;AAC1D;AACA;AACA;AACA,KAAK;AACL,4DAA4D;AAC5D;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC7KA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC;;AAED;;AAEA,CAAC;;AAED;AACA;AACA;;AAEA;;AAEA,wBAAwB;;AAExB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;ACxJA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,MAAM;AACrB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,KAAK;AACpB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,2BAA2B,mBAAmB;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AAAA;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,WAAW;;;;;;;;ACreZ;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,4CAA4C,WAAW;AACvD;AACA;AACA,4E;;;;;;;ACVA,mB;;;;;;;ACAA,qE;;;;;;;;;;;;;;;;ACA2E;AAU3E;IA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;;;;;;;;;;;;ACP6C;AAC4B;AAE9B;AACY;AAEzD,EAAE,CAAC,CAAC,8EAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3B,+EAAc,EAAE,CAAC;AACnB,CAAC;AAED,yGAAsB,EAAE,CAAC,eAAe,CAAC,kEAAS,CAAC,CAAC","file":"main.bundle.js","sourcesContent":["'use strict';\n// Last Updated On: 2017-12-09 2:29:22 PM UTC\n// ________________\n// DetectRTC v1.3.6\n// Open-Sourced: https://github.com/muaz-khan/DetectRTC\n// --------------------------------------------------\n// Muaz Khan - www.MuazKhan.com\n// MIT License - www.WebRTC-Experiment.com/licence\n// --------------------------------------------------\n(function () {\n var browserFakeUserAgent = 'Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45';\n var isNodejs = typeof process === 'object' && typeof process.versions === 'object' && process.versions.node && /*node-process*/ !process.browser;\n if (isNodejs) {\n var version = process.versions.node.toString().replace('v', '');\n browserFakeUserAgent = 'Nodejs/' + version + ' (NodeOS) AppleWebKit/' + version + ' (KHTML, like Gecko) Nodejs/' + version + ' Nodejs/' + version;\n }\n (function (that) {\n if (typeof window !== 'undefined') {\n return;\n }\n if (typeof window === 'undefined' && typeof global !== 'undefined') {\n global.navigator = {\n userAgent: browserFakeUserAgent,\n getUserMedia: function () { }\n };\n /*global window:true */\n that.window = global;\n }\n else if (typeof window === 'undefined') {\n // window = this;\n }\n if (typeof location === 'undefined') {\n /*global location:true */\n that.location = {\n protocol: 'file:',\n href: '',\n hash: ''\n };\n }\n if (typeof screen === 'undefined') {\n /*global screen:true */\n that.screen = {\n width: 0,\n height: 0\n };\n }\n })(typeof global !== 'undefined' ? global : window);\n /*global navigator:true */\n var navigator = window.navigator;\n if (typeof navigator !== 'undefined') {\n if (typeof navigator.webkitGetUserMedia !== 'undefined') {\n navigator.getUserMedia = navigator.webkitGetUserMedia;\n }\n if (typeof navigator.mozGetUserMedia !== 'undefined') {\n navigator.getUserMedia = navigator.mozGetUserMedia;\n }\n }\n else {\n navigator = {\n getUserMedia: function () { },\n userAgent: browserFakeUserAgent\n };\n }\n var isMobileDevice = !!(/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(navigator.userAgent || ''));\n var isEdge = navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveOrOpenBlob || !!navigator.msSaveBlob);\n var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;\n var isFirefox = typeof window.InstallTrigger !== 'undefined';\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n var isChrome = !!window.chrome && !isOpera;\n var isIE = typeof document !== 'undefined' && !!document.documentMode && !isEdge;\n // this one can also be used:\n // https://www.websocket.org/js/stuff.js (DetectBrowser.js)\n function getBrowserInfo() {\n var nVer = navigator.appVersion;\n var nAgt = navigator.userAgent;\n var browserName = navigator.appName;\n var fullVersion = '' + parseFloat(navigator.appVersion);\n var majorVersion = parseInt(navigator.appVersion, 10);\n var nameOffset, verOffset, ix;\n // In Opera, the true version is after 'Opera' or after 'Version'\n if (isOpera) {\n browserName = 'Opera';\n try {\n fullVersion = navigator.userAgent.split('OPR/')[1].split(' ')[0];\n majorVersion = fullVersion.split('.')[0];\n }\n catch (e) {\n fullVersion = '0.0.0.0';\n majorVersion = 0;\n }\n }\n else if (isIE) {\n verOffset = nAgt.indexOf('rv:');\n if (verOffset > 0) {\n fullVersion = nAgt.substring(verOffset + 3);\n }\n else {\n verOffset = nAgt.indexOf('MSIE');\n fullVersion = nAgt.substring(verOffset + 5);\n }\n browserName = 'IE';\n }\n else if (isChrome) {\n verOffset = nAgt.indexOf('Chrome');\n browserName = 'Chrome';\n fullVersion = nAgt.substring(verOffset + 7);\n }\n else if (isSafari) {\n verOffset = nAgt.indexOf('Safari');\n browserName = 'Safari';\n fullVersion = nAgt.substring(verOffset + 7);\n if ((verOffset = nAgt.indexOf('Version')) !== -1) {\n fullVersion = nAgt.substring(verOffset + 8);\n }\n if (navigator.userAgent.indexOf('Version/') !== -1) {\n fullVersion = navigator.userAgent.split('Version/')[1].split(' ')[0];\n }\n }\n else if (isFirefox) {\n verOffset = nAgt.indexOf('Firefox');\n browserName = 'Firefox';\n fullVersion = nAgt.substring(verOffset + 8);\n }\n else if ((nameOffset = nAgt.lastIndexOf(' ') + 1) < (verOffset = nAgt.lastIndexOf('/'))) {\n browserName = nAgt.substring(nameOffset, verOffset);\n fullVersion = nAgt.substring(verOffset + 1);\n if (browserName.toLowerCase() === browserName.toUpperCase()) {\n browserName = navigator.appName;\n }\n }\n if (isEdge) {\n browserName = 'Edge';\n fullVersion = navigator.userAgent.split('Edge/')[1];\n // fullVersion = parseInt(navigator.userAgent.match(/Edge\\/(\\d+).(\\d+)$/)[2], 10).toString();\n }\n // trim the fullVersion string at semicolon/space/bracket if present\n if ((ix = fullVersion.search(/[; \\)]/)) !== -1) {\n fullVersion = fullVersion.substring(0, ix);\n }\n majorVersion = parseInt('' + fullVersion, 10);\n if (isNaN(majorVersion)) {\n fullVersion = '' + parseFloat(navigator.appVersion);\n majorVersion = parseInt(navigator.appVersion, 10);\n }\n return {\n fullVersion: fullVersion,\n version: majorVersion,\n name: browserName,\n isPrivateBrowsing: false\n };\n }\n // via: https://gist.github.com/cou929/7973956\n function retry(isDone, next) {\n var currentTrial = 0, maxRetry = 50, interval = 10, isTimeout = false;\n var id = window.setInterval(function () {\n if (isDone()) {\n window.clearInterval(id);\n next(isTimeout);\n }\n if (currentTrial++ > maxRetry) {\n window.clearInterval(id);\n isTimeout = true;\n next(isTimeout);\n }\n }, 10);\n }\n function isIE10OrLater(userAgent) {\n var ua = userAgent.toLowerCase();\n if (ua.indexOf('msie') === 0 && ua.indexOf('trident') === 0) {\n return false;\n }\n var match = /(?:msie|rv:)\\s?([\\d\\.]+)/.exec(ua);\n if (match && parseInt(match[1], 10) >= 10) {\n return true;\n }\n return false;\n }\n function detectPrivateMode(callback) {\n var isPrivate;\n try {\n if (window.webkitRequestFileSystem) {\n window.webkitRequestFileSystem(window.TEMPORARY, 1, function () {\n isPrivate = false;\n }, function (e) {\n isPrivate = true;\n });\n }\n else if (window.indexedDB && /Firefox/.test(window.navigator.userAgent)) {\n var db;\n try {\n db = window.indexedDB.open('test');\n db.onerror = function () {\n return true;\n };\n }\n catch (e) {\n isPrivate = true;\n }\n if (typeof isPrivate === 'undefined') {\n retry(function isDone() {\n return db.readyState === 'done' ? true : false;\n }, function next(isTimeout) {\n if (!isTimeout) {\n isPrivate = db.result ? false : true;\n }\n });\n }\n }\n else if (isIE10OrLater(window.navigator.userAgent)) {\n isPrivate = false;\n try {\n if (!window.indexedDB) {\n isPrivate = true;\n }\n }\n catch (e) {\n isPrivate = true;\n }\n }\n else if (window.localStorage && /Safari/.test(window.navigator.userAgent)) {\n try {\n window.localStorage.setItem('test', 1);\n }\n catch (e) {\n isPrivate = true;\n }\n if (typeof isPrivate === 'undefined') {\n isPrivate = false;\n window.localStorage.removeItem('test');\n }\n }\n }\n catch (e) {\n isPrivate = false;\n }\n retry(function isDone() {\n return typeof isPrivate !== 'undefined' ? true : false;\n }, function next(isTimeout) {\n callback(isPrivate);\n });\n }\n var isMobile = {\n Android: function () {\n return navigator.userAgent.match(/Android/i);\n },\n BlackBerry: function () {\n return navigator.userAgent.match(/BlackBerry|BB10/i);\n },\n iOS: function () {\n return navigator.userAgent.match(/iPhone|iPad|iPod/i);\n },\n Opera: function () {\n return navigator.userAgent.match(/Opera Mini/i);\n },\n Windows: function () {\n return navigator.userAgent.match(/IEMobile/i);\n },\n any: function () {\n return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());\n },\n getOsName: function () {\n var osName = 'Unknown OS';\n if (isMobile.Android()) {\n osName = 'Android';\n }\n if (isMobile.BlackBerry()) {\n osName = 'BlackBerry';\n }\n if (isMobile.iOS()) {\n osName = 'iOS';\n }\n if (isMobile.Opera()) {\n osName = 'Opera Mini';\n }\n if (isMobile.Windows()) {\n osName = 'Windows';\n }\n return osName;\n }\n };\n // via: http://jsfiddle.net/ChristianL/AVyND/\n function detectDesktopOS() {\n var unknown = '-';\n var nVer = navigator.appVersion;\n var nAgt = navigator.userAgent;\n var os = unknown;\n var clientStrings = [{\n s: 'Windows 10',\n r: /(Windows 10.0|Windows NT 10.0)/\n }, {\n s: 'Windows 8.1',\n r: /(Windows 8.1|Windows NT 6.3)/\n }, {\n s: 'Windows 8',\n r: /(Windows 8|Windows NT 6.2)/\n }, {\n s: 'Windows 7',\n r: /(Windows 7|Windows NT 6.1)/\n }, {\n s: 'Windows Vista',\n r: /Windows NT 6.0/\n }, {\n s: 'Windows Server 2003',\n r: /Windows NT 5.2/\n }, {\n s: 'Windows XP',\n r: /(Windows NT 5.1|Windows XP)/\n }, {\n s: 'Windows 2000',\n r: /(Windows NT 5.0|Windows 2000)/\n }, {\n s: 'Windows ME',\n r: /(Win 9x 4.90|Windows ME)/\n }, {\n s: 'Windows 98',\n r: /(Windows 98|Win98)/\n }, {\n s: 'Windows 95',\n r: /(Windows 95|Win95|Windows_95)/\n }, {\n s: 'Windows NT 4.0',\n r: /(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/\n }, {\n s: 'Windows CE',\n r: /Windows CE/\n }, {\n s: 'Windows 3.11',\n r: /Win16/\n }, {\n s: 'Android',\n r: /Android/\n }, {\n s: 'Open BSD',\n r: /OpenBSD/\n }, {\n s: 'Sun OS',\n r: /SunOS/\n }, {\n s: 'Linux',\n r: /(Linux|X11)/\n }, {\n s: 'iOS',\n r: /(iPhone|iPad|iPod)/\n }, {\n s: 'Mac OS X',\n r: /Mac OS X/\n }, {\n s: 'Mac OS',\n r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/\n }, {\n s: 'QNX',\n r: /QNX/\n }, {\n s: 'UNIX',\n r: /UNIX/\n }, {\n s: 'BeOS',\n r: /BeOS/\n }, {\n s: 'OS/2',\n r: /OS\\/2/\n }, {\n s: 'Search Bot',\n r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\\/Teoma|ia_archiver)/\n }];\n for (var i = 0, cs; cs = clientStrings[i]; i++) {\n if (cs.r.test(nAgt)) {\n os = cs.s;\n break;\n }\n }\n var osVersion = unknown;\n if (/Windows/.test(os)) {\n if (/Windows (.*)/.test(os)) {\n osVersion = /Windows (.*)/.exec(os)[1];\n }\n os = 'Windows';\n }\n switch (os) {\n case 'Mac OS X':\n if (/Mac OS X (10[\\.\\_\\d]+)/.test(nAgt)) {\n osVersion = /Mac OS X (10[\\.\\_\\d]+)/.exec(nAgt)[1];\n }\n break;\n case 'Android':\n if (/Android ([\\.\\_\\d]+)/.test(nAgt)) {\n osVersion = /Android ([\\.\\_\\d]+)/.exec(nAgt)[1];\n }\n break;\n case 'iOS':\n if (/OS (\\d+)_(\\d+)_?(\\d+)?/.test(nAgt)) {\n osVersion = /OS (\\d+)_(\\d+)_?(\\d+)?/.exec(nVer);\n osVersion = osVersion[1] + '.' + osVersion[2] + '.' + (osVersion[3] | 0);\n }\n break;\n }\n return {\n osName: os,\n osVersion: osVersion\n };\n }\n var osName = 'Unknown OS';\n var osVersion = 'Unknown OS Version';\n function getAndroidVersion(ua) {\n ua = (ua || navigator.userAgent).toLowerCase();\n var match = ua.match(/android\\s([0-9\\.]*)/);\n return match ? match[1] : false;\n }\n var osInfo = detectDesktopOS();\n if (osInfo && osInfo.osName && osInfo.osName != '-') {\n osName = osInfo.osName;\n osVersion = osInfo.osVersion;\n }\n else if (isMobile.any()) {\n osName = isMobile.getOsName();\n if (osName == 'Android') {\n osVersion = getAndroidVersion();\n }\n }\n var isNodejs = typeof process === 'object' && typeof process.versions === 'object' && process.versions.node;\n if (osName === 'Unknown OS' && isNodejs) {\n osName = 'Nodejs';\n osVersion = process.versions.node.toString().replace('v', '');\n }\n var isCanvasSupportsStreamCapturing = false;\n var isVideoSupportsStreamCapturing = false;\n ['captureStream', 'mozCaptureStream', 'webkitCaptureStream'].forEach(function (item) {\n if (typeof document === 'undefined' || typeof document.createElement !== 'function') {\n return;\n }\n if (!isCanvasSupportsStreamCapturing && item in document.createElement('canvas')) {\n isCanvasSupportsStreamCapturing = true;\n }\n if (!isVideoSupportsStreamCapturing && item in document.createElement('video')) {\n isVideoSupportsStreamCapturing = true;\n }\n });\n // via: https://github.com/diafygi/webrtc-ips\n function DetectLocalIPAddress(callback, stream) {\n if (!DetectRTC.isWebRTCSupported) {\n return;\n }\n getIPs(function (ip) {\n if (ip.match(/^(192\\.168\\.|169\\.254\\.|10\\.|172\\.(1[6-9]|2\\d|3[01]))/)) {\n callback('Local: ' + ip);\n }\n else {\n callback('Public: ' + ip);\n }\n }, stream);\n }\n function getIPs(callback, stream) {\n if (typeof document === 'undefined' || typeof document.getElementById !== 'function') {\n return;\n }\n var ipDuplicates = {};\n var RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;\n if (!RTCPeerConnection) {\n var iframe = document.getElementById('iframe');\n if (!iframe) {\n return;\n }\n var win = iframe.contentWindow;\n RTCPeerConnection = win.RTCPeerConnection || win.mozRTCPeerConnection || win.webkitRTCPeerConnection;\n }\n if (!RTCPeerConnection) {\n return;\n }\n var peerConfig = null;\n if (DetectRTC.browser === 'Chrome' && DetectRTC.browser.version < 58) {\n // todo: add support for older Opera\n peerConfig = {\n optional: [{\n RtpDataChannels: true\n }]\n };\n }\n var servers = {\n iceServers: [{\n urls: 'stun:stun.l.google.com:19302'\n }]\n };\n var pc = new RTCPeerConnection(servers, peerConfig);\n if (stream) {\n if (pc.addStream) {\n pc.addStream(stream);\n }\n else if (pc.addTrack && stream.getTracks()[0]) {\n pc.addTrack(stream.getTracks()[0], stream);\n }\n }\n function handleCandidate(candidate) {\n var ipRegex = /([0-9]{1,3}(\\.[0-9]{1,3}){3})/;\n var match = ipRegex.exec(candidate);\n if (!match) {\n return;\n }\n var ipAddress = match[1];\n if (ipDuplicates[ipAddress] === undefined) {\n callback(ipAddress);\n }\n ipDuplicates[ipAddress] = true;\n }\n // listen for candidate events\n pc.onicecandidate = function (ice) {\n if (ice.candidate) {\n handleCandidate(ice.candidate.candidate);\n }\n };\n // create data channel\n if (!stream) {\n try {\n pc.createDataChannel('sctp', {});\n }\n catch (e) { }\n }\n // create an offer sdp\n if (DetectRTC.isPromisesSupported) {\n pc.createOffer().then(function (result) {\n pc.setLocalDescription(result).then(afterCreateOffer);\n });\n }\n else {\n pc.createOffer(function (result) {\n pc.setLocalDescription(result, afterCreateOffer, function () { });\n }, function () { });\n }\n function afterCreateOffer() {\n var lines = pc.localDescription.sdp.split('\\n');\n lines.forEach(function (line) {\n if (line.indexOf('a=candidate:') === 0) {\n handleCandidate(line);\n }\n });\n }\n }\n var MediaDevices = [];\n var audioInputDevices = [];\n var audioOutputDevices = [];\n var videoInputDevices = [];\n if (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) {\n // Firefox 38+ seems having support of enumerateDevices\n // Thanks @xdumaine/enumerateDevices\n navigator.enumerateDevices = function (callback) {\n var enumerateDevices = navigator.mediaDevices.enumerateDevices();\n if (enumerateDevices && enumerateDevices.then) {\n navigator.mediaDevices.enumerateDevices().then(callback).catch(function () {\n callback([]);\n });\n }\n else {\n callback([]);\n }\n };\n }\n // Media Devices detection\n var canEnumerate = false;\n /*global MediaStreamTrack:true */\n if (typeof MediaStreamTrack !== 'undefined' && 'getSources' in MediaStreamTrack) {\n canEnumerate = true;\n }\n else if (navigator.mediaDevices && !!navigator.mediaDevices.enumerateDevices) {\n canEnumerate = true;\n }\n var hasMicrophone = false;\n var hasSpeakers = false;\n var hasWebcam = false;\n var isWebsiteHasMicrophonePermissions = false;\n var isWebsiteHasWebcamPermissions = false;\n // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediadevices\n function checkDeviceSupport(callback) {\n if (!canEnumerate) {\n if (callback) {\n callback();\n }\n return;\n }\n if (!navigator.enumerateDevices && window.MediaStreamTrack && window.MediaStreamTrack.getSources) {\n navigator.enumerateDevices = window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack);\n }\n if (!navigator.enumerateDevices && navigator.enumerateDevices) {\n navigator.enumerateDevices = navigator.enumerateDevices.bind(navigator);\n }\n if (!navigator.enumerateDevices) {\n if (callback) {\n callback();\n }\n return;\n }\n MediaDevices = [];\n audioInputDevices = [];\n audioOutputDevices = [];\n videoInputDevices = [];\n hasMicrophone = false;\n hasSpeakers = false;\n hasWebcam = false;\n isWebsiteHasMicrophonePermissions = false;\n isWebsiteHasWebcamPermissions = false;\n // to prevent duplication\n var alreadyUsedDevices = {};\n navigator.enumerateDevices(function (devices) {\n devices.forEach(function (_device) {\n var device = {};\n for (var d in _device) {\n try {\n if (typeof _device[d] !== 'function') {\n device[d] = _device[d];\n }\n }\n catch (e) { }\n }\n if (alreadyUsedDevices[device.deviceId + device.label + device.kind]) {\n return;\n }\n // if it is MediaStreamTrack.getSources\n if (device.kind === 'audio') {\n device.kind = 'audioinput';\n }\n if (device.kind === 'video') {\n device.kind = 'videoinput';\n }\n if (!device.deviceId) {\n device.deviceId = device.id;\n }\n if (!device.id) {\n device.id = device.deviceId;\n }\n if (!device.label) {\n device.isCustomLabel = true;\n if (device.kind === 'videoinput') {\n device.label = 'Camera ' + (videoInputDevices.length + 1);\n }\n else if (device.kind === 'audioinput') {\n device.label = 'Microphone ' + (audioInputDevices.length + 1);\n }\n else if (device.kind === 'audiooutput') {\n device.label = 'Speaker ' + (audioOutputDevices.length + 1);\n }\n else {\n device.label = 'Please invoke getUserMedia once.';\n }\n if (typeof DetectRTC !== 'undefined' && DetectRTC.browser.isChrome && DetectRTC.browser.version >= 46 && !/^(https:|chrome-extension:)$/g.test(location.protocol || '')) {\n if (typeof document !== 'undefined' && typeof document.domain === 'string' && document.domain.search && document.domain.search(/localhost|127.0./g) === -1) {\n device.label = 'HTTPs is required to get label of this ' + device.kind + ' device.';\n }\n }\n }\n else {\n // Firefox on Android still returns empty label\n if (device.kind === 'videoinput' && !isWebsiteHasWebcamPermissions) {\n isWebsiteHasWebcamPermissions = true;\n }\n if (device.kind === 'audioinput' && !isWebsiteHasMicrophonePermissions) {\n isWebsiteHasMicrophonePermissions = true;\n }\n }\n if (device.kind === 'audioinput') {\n hasMicrophone = true;\n if (audioInputDevices.indexOf(device) === -1) {\n audioInputDevices.push(device);\n }\n }\n if (device.kind === 'audiooutput') {\n hasSpeakers = true;\n if (audioOutputDevices.indexOf(device) === -1) {\n audioOutputDevices.push(device);\n }\n }\n if (device.kind === 'videoinput') {\n hasWebcam = true;\n if (videoInputDevices.indexOf(device) === -1) {\n videoInputDevices.push(device);\n }\n }\n // there is no 'videoouput' in the spec.\n MediaDevices.push(device);\n alreadyUsedDevices[device.deviceId + device.label + device.kind] = device;\n });\n if (typeof DetectRTC !== 'undefined') {\n // to sync latest outputs\n DetectRTC.MediaDevices = MediaDevices;\n DetectRTC.hasMicrophone = hasMicrophone;\n DetectRTC.hasSpeakers = hasSpeakers;\n DetectRTC.hasWebcam = hasWebcam;\n DetectRTC.isWebsiteHasWebcamPermissions = isWebsiteHasWebcamPermissions;\n DetectRTC.isWebsiteHasMicrophonePermissions = isWebsiteHasMicrophonePermissions;\n DetectRTC.audioInputDevices = audioInputDevices;\n DetectRTC.audioOutputDevices = audioOutputDevices;\n DetectRTC.videoInputDevices = videoInputDevices;\n }\n if (callback) {\n callback();\n }\n });\n }\n var DetectRTC = window.DetectRTC || {};\n // ----------\n // DetectRTC.browser.name || DetectRTC.browser.version || DetectRTC.browser.fullVersion\n DetectRTC.browser = getBrowserInfo();\n detectPrivateMode(function (isPrivateBrowsing) {\n DetectRTC.browser.isPrivateBrowsing = !!isPrivateBrowsing;\n });\n // DetectRTC.isChrome || DetectRTC.isFirefox || DetectRTC.isEdge\n DetectRTC.browser['is' + DetectRTC.browser.name] = true;\n // -----------\n DetectRTC.osName = osName;\n DetectRTC.osVersion = osVersion;\n var isNodeWebkit = typeof process === 'object' && typeof process.versions === 'object' && process.versions['node-webkit'];\n // --------- Detect if system supports WebRTC 1.0 or WebRTC 1.1.\n var isWebRTCSupported = false;\n ['RTCPeerConnection', 'webkitRTCPeerConnection', 'mozRTCPeerConnection', 'RTCIceGatherer'].forEach(function (item) {\n if (isWebRTCSupported) {\n return;\n }\n if (item in window) {\n isWebRTCSupported = true;\n }\n });\n DetectRTC.isWebRTCSupported = isWebRTCSupported;\n //-------\n DetectRTC.isORTCSupported = typeof RTCIceGatherer !== 'undefined';\n // --------- Detect if WebAudio API are supported\n var webAudio = {\n isSupported: false,\n isCreateMediaStreamSourceSupported: false\n };\n ['AudioContext', 'webkitAudioContext', 'mozAudioContext', 'msAudioContext'].forEach(function (item) {\n if (webAudio.isSupported) {\n return;\n }\n if (item in window) {\n webAudio.isSupported = true;\n if (window[item] && 'createMediaStreamSource' in window[item].prototype) {\n webAudio.isCreateMediaStreamSourceSupported = true;\n }\n }\n });\n DetectRTC.isAudioContextSupported = webAudio.isSupported;\n DetectRTC.isCreateMediaStreamSourceSupported = webAudio.isCreateMediaStreamSourceSupported;\n // ---------- Detect if SCTP/RTP channels are supported.\n var isRtpDataChannelsSupported = false;\n if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 31) {\n isRtpDataChannelsSupported = true;\n }\n DetectRTC.isRtpDataChannelsSupported = isRtpDataChannelsSupported;\n var isSCTPSupportd = false;\n if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 28) {\n isSCTPSupportd = true;\n }\n else if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 25) {\n isSCTPSupportd = true;\n }\n else if (DetectRTC.browser.isOpera && DetectRTC.browser.version >= 11) {\n isSCTPSupportd = true;\n }\n DetectRTC.isSctpDataChannelsSupported = isSCTPSupportd;\n // ---------\n DetectRTC.isMobileDevice = isMobileDevice; // \"isMobileDevice\" boolean is defined in \"getBrowserInfo.js\"\n // ------\n var isGetUserMediaSupported = false;\n if (navigator.getUserMedia) {\n isGetUserMediaSupported = true;\n }\n else if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {\n isGetUserMediaSupported = true;\n }\n if (DetectRTC.browser.isChrome && DetectRTC.browser.version >= 46 && !/^(https:|chrome-extension:)$/g.test(location.protocol || '')) {\n if (typeof document !== 'undefined' && typeof document.domain === 'string' && document.domain.search && document.domain.search(/localhost|127.0./g) === -1) {\n isGetUserMediaSupported = 'Requires HTTPs';\n }\n }\n if (DetectRTC.osName === 'Nodejs') {\n isGetUserMediaSupported = false;\n }\n DetectRTC.isGetUserMediaSupported = isGetUserMediaSupported;\n var displayResolution = '';\n if (screen.width) {\n var width = (screen.width) ? screen.width : '';\n var height = (screen.height) ? screen.height : '';\n displayResolution += '' + width + ' x ' + height;\n }\n DetectRTC.displayResolution = displayResolution;\n function getAspectRatio(w, h) {\n function gcd(a, b) {\n return (b == 0) ? a : gcd(b, a % b);\n }\n var r = gcd(w, h);\n return (w / r) / (h / r);\n }\n DetectRTC.displayAspectRatio = getAspectRatio(screen.width, screen.height).toFixed(2);\n // ----------\n DetectRTC.isCanvasSupportsStreamCapturing = isCanvasSupportsStreamCapturing;\n DetectRTC.isVideoSupportsStreamCapturing = isVideoSupportsStreamCapturing;\n if (DetectRTC.browser.name == 'Chrome' && DetectRTC.browser.version >= 53) {\n if (!DetectRTC.isCanvasSupportsStreamCapturing) {\n DetectRTC.isCanvasSupportsStreamCapturing = 'Requires chrome flag: enable-experimental-web-platform-features';\n }\n if (!DetectRTC.isVideoSupportsStreamCapturing) {\n DetectRTC.isVideoSupportsStreamCapturing = 'Requires chrome flag: enable-experimental-web-platform-features';\n }\n }\n // ------\n DetectRTC.DetectLocalIPAddress = DetectLocalIPAddress;\n DetectRTC.isWebSocketsSupported = 'WebSocket' in window && 2 === window.WebSocket.CLOSING;\n DetectRTC.isWebSocketsBlocked = !DetectRTC.isWebSocketsSupported;\n if (DetectRTC.osName === 'Nodejs') {\n DetectRTC.isWebSocketsSupported = true;\n DetectRTC.isWebSocketsBlocked = false;\n }\n DetectRTC.checkWebSocketsSupport = function (callback) {\n callback = callback || function () { };\n try {\n var starttime;\n var websocket = new WebSocket('wss://echo.websocket.org:443/');\n websocket.onopen = function () {\n DetectRTC.isWebSocketsBlocked = false;\n starttime = (new Date).getTime();\n websocket.send('ping');\n };\n websocket.onmessage = function () {\n DetectRTC.WebsocketLatency = (new Date).getTime() - starttime + 'ms';\n callback();\n websocket.close();\n websocket = null;\n };\n websocket.onerror = function () {\n DetectRTC.isWebSocketsBlocked = true;\n callback();\n };\n }\n catch (e) {\n DetectRTC.isWebSocketsBlocked = true;\n callback();\n }\n };\n // -------\n DetectRTC.load = function (callback) {\n callback = callback || function () { };\n checkDeviceSupport(callback);\n };\n // check for microphone/camera support!\n if (typeof checkDeviceSupport === 'function') {\n // checkDeviceSupport();\n }\n if (typeof MediaDevices !== 'undefined') {\n DetectRTC.MediaDevices = MediaDevices;\n }\n else {\n DetectRTC.MediaDevices = [];\n }\n DetectRTC.hasMicrophone = hasMicrophone;\n DetectRTC.hasSpeakers = hasSpeakers;\n DetectRTC.hasWebcam = hasWebcam;\n DetectRTC.isWebsiteHasWebcamPermissions = isWebsiteHasWebcamPermissions;\n DetectRTC.isWebsiteHasMicrophonePermissions = isWebsiteHasMicrophonePermissions;\n DetectRTC.audioInputDevices = audioInputDevices;\n DetectRTC.audioOutputDevices = audioOutputDevices;\n DetectRTC.videoInputDevices = videoInputDevices;\n // ------\n var isSetSinkIdSupported = false;\n if (typeof document !== 'undefined' && typeof document.createElement === 'function' && 'setSinkId' in document.createElement('video')) {\n isSetSinkIdSupported = true;\n }\n DetectRTC.isSetSinkIdSupported = isSetSinkIdSupported;\n // -----\n var isRTPSenderReplaceTracksSupported = false;\n if (DetectRTC.browser.isFirefox && typeof mozRTCPeerConnection !== 'undefined' /*&& DetectRTC.browser.version > 39*/) {\n /*global mozRTCPeerConnection:true */\n if ('getSenders' in mozRTCPeerConnection.prototype) {\n isRTPSenderReplaceTracksSupported = true;\n }\n }\n else if (DetectRTC.browser.isChrome && typeof webkitRTCPeerConnection !== 'undefined') {\n /*global webkitRTCPeerConnection:true */\n if ('getSenders' in webkitRTCPeerConnection.prototype) {\n isRTPSenderReplaceTracksSupported = true;\n }\n }\n DetectRTC.isRTPSenderReplaceTracksSupported = isRTPSenderReplaceTracksSupported;\n //------\n var isRemoteStreamProcessingSupported = false;\n if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 38) {\n isRemoteStreamProcessingSupported = true;\n }\n DetectRTC.isRemoteStreamProcessingSupported = isRemoteStreamProcessingSupported;\n //-------\n var isApplyConstraintsSupported = false;\n /*global MediaStreamTrack:true */\n if (typeof MediaStreamTrack !== 'undefined' && 'applyConstraints' in MediaStreamTrack.prototype) {\n isApplyConstraintsSupported = true;\n }\n DetectRTC.isApplyConstraintsSupported = isApplyConstraintsSupported;\n //-------\n var isMultiMonitorScreenCapturingSupported = false;\n if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 43) {\n // version 43 merely supports platforms for multi-monitors\n // version 44 will support exact multi-monitor selection i.e. you can select any monitor for screen capturing.\n isMultiMonitorScreenCapturingSupported = true;\n }\n DetectRTC.isMultiMonitorScreenCapturingSupported = isMultiMonitorScreenCapturingSupported;\n DetectRTC.isPromisesSupported = !!('Promise' in window);\n if (typeof DetectRTC === 'undefined') {\n window.DetectRTC = {};\n }\n var MediaStream = window.MediaStream;\n if (typeof MediaStream === 'undefined' && typeof webkitMediaStream !== 'undefined') {\n MediaStream = webkitMediaStream;\n }\n if (typeof MediaStream !== 'undefined') {\n DetectRTC.MediaStream = Object.keys(MediaStream.prototype);\n }\n else\n DetectRTC.MediaStream = false;\n if (typeof MediaStreamTrack !== 'undefined') {\n DetectRTC.MediaStreamTrack = Object.keys(MediaStreamTrack.prototype);\n }\n else\n DetectRTC.MediaStreamTrack = false;\n var RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;\n if (typeof RTCPeerConnection !== 'undefined') {\n DetectRTC.RTCPeerConnection = Object.keys(RTCPeerConnection.prototype);\n }\n else\n DetectRTC.RTCPeerConnection = false;\n window.DetectRTC = DetectRTC;\n if (typeof module !== 'undefined' /* && !!module.exports*/) {\n module.exports = DetectRTC;\n }\n if (typeof define === 'function' && define.amd) {\n define('DetectRTC', [], function () {\n return DetectRTC;\n });\n }\n})();\n//# sourceMappingURL=DetectRTC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/DetectRTC.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/DetectRTC.js\n// module chunks = main","function Mapper() {\n var sources = {};\n this.forEach = function (callback) {\n for (var key in sources) {\n var source = sources[key];\n for (var key2 in source)\n callback(source[key2]);\n }\n ;\n };\n this.get = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return undefined;\n return ids[id];\n };\n this.remove = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return;\n delete ids[id];\n // Check it's empty\n for (var i in ids) {\n return false;\n }\n delete sources[source];\n };\n this.set = function (value, id, source) {\n if (value == undefined)\n return this.remove(id, source);\n var ids = sources[source];\n if (ids == undefined)\n sources[source] = ids = {};\n ids[id] = value;\n };\n}\n;\nMapper.prototype.pop = function (id, source) {\n var value = this.get(id, source);\n if (value == undefined)\n return undefined;\n this.remove(id, source);\n return value;\n};\nmodule.exports = Mapper;\n//# sourceMappingURL=Mapper.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar JsonRpcClient = require('./jsonrpcclient');\nexports.JsonRpcClient = JsonRpcClient;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar RpcBuilder = require('../');\nvar WebSocketWithReconnection = require('./transports/webSocketWithReconnection');\nDate.now = Date.now || function () {\n return +new Date;\n};\nvar PING_INTERVAL = 5000;\nvar RECONNECTING = 'RECONNECTING';\nvar CONNECTED = 'CONNECTED';\nvar DISCONNECTED = 'DISCONNECTED';\nvar Logger = console;\n/**\n *\n * heartbeat: interval in ms for each heartbeat message,\n * sendCloseMessage : true / false, before closing the connection, it sends a closeSession message\n *
\n * ws : {\n * \turi : URI to conntect to,\n *  useSockJS : true (use SockJS) / false (use WebSocket) by default,\n * \tonconnected : callback method to invoke when connection is successful,\n * \tondisconnect : callback method to invoke when the connection is lost,\n * \tonreconnecting : callback method to invoke when the client is reconnecting,\n * \tonreconnected : callback method to invoke when the client succesfully reconnects,\n * \tonerror : callback method to invoke when there is an error\n * },\n * rpc : {\n * \trequestTimeout : timeout for a request,\n * \tsessionStatusChanged: callback method for changes in session status,\n * \tmediaRenegotiation: mediaRenegotiation\n * }\n * 
\n */\nfunction JsonRpcClient(configuration) {\n var self = this;\n var wsConfig = configuration.ws;\n var notReconnectIfNumLessThan = -1;\n var pingNextNum = 0;\n var enabledPings = true;\n var pingPongStarted = false;\n var pingInterval;\n var status = DISCONNECTED;\n var onreconnecting = wsConfig.onreconnecting;\n var onreconnected = wsConfig.onreconnected;\n var onconnected = wsConfig.onconnected;\n var onerror = wsConfig.onerror;\n configuration.rpc.pull = function (params, request) {\n request.reply(null, \"push\");\n };\n wsConfig.onreconnecting = function () {\n Logger.debug(\"--------- ONRECONNECTING -----------\");\n if (status === RECONNECTING) {\n Logger.error(\"Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it\");\n return;\n }\n status = RECONNECTING;\n if (onreconnecting) {\n onreconnecting();\n }\n };\n wsConfig.onreconnected = function () {\n Logger.debug(\"--------- ONRECONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n updateNotReconnectIfLessThan();\n usePing();\n if (onreconnected) {\n onreconnected();\n }\n };\n wsConfig.onconnected = function () {\n Logger.debug(\"--------- ONCONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n usePing();\n if (onconnected) {\n onconnected();\n }\n };\n wsConfig.onerror = function (error) {\n Logger.debug(\"--------- ONERROR -----------\");\n status = DISCONNECTED;\n if (onerror) {\n onerror(error);\n }\n };\n var ws = new WebSocketWithReconnection(wsConfig);\n Logger.debug('Connecting websocket to URI: ' + wsConfig.uri);\n var rpcBuilderOptions = {\n request_timeout: configuration.rpc.requestTimeout,\n ping_request_timeout: configuration.rpc.heartbeatRequestTimeout\n };\n var rpc = new RpcBuilder(RpcBuilder.packers.JsonRPC, rpcBuilderOptions, ws, function (request) {\n Logger.debug('Received request: ' + JSON.stringify(request));\n try {\n var func = configuration.rpc[request.method];\n if (func === undefined) {\n Logger.error(\"Method \" + request.method + \" not registered in client\");\n }\n else {\n func(request.params, request);\n }\n }\n catch (err) {\n Logger.error('Exception processing request: ' + JSON.stringify(request));\n Logger.error(err);\n }\n });\n this.send = function (method, params, callback) {\n if (method !== 'ping') {\n Logger.debug('Request: method:' + method + \" params:\" + JSON.stringify(params));\n }\n var requestTime = Date.now();\n rpc.encode(method, params, function (error, result) {\n if (error) {\n try {\n Logger.error(\"ERROR:\" + error.message + \" in Request: method:\" +\n method + \" params:\" + JSON.stringify(params) + \" request:\" +\n error.request);\n if (error.data) {\n Logger.error(\"ERROR DATA:\" + JSON.stringify(error.data));\n }\n }\n catch (e) { }\n error.requestTime = requestTime;\n }\n if (callback) {\n if (result != undefined && result.value !== 'pong') {\n Logger.debug('Response: ' + JSON.stringify(result));\n }\n callback(error, result);\n }\n });\n };\n function updateNotReconnectIfLessThan() {\n Logger.debug(\"notReconnectIfNumLessThan = \" + pingNextNum + ' (old=' +\n notReconnectIfNumLessThan + ')');\n notReconnectIfNumLessThan = pingNextNum;\n }\n function sendPing() {\n if (enabledPings) {\n var params = null;\n if (pingNextNum == 0 || pingNextNum == notReconnectIfNumLessThan) {\n params = {\n interval: configuration.heartbeat || PING_INTERVAL\n };\n }\n pingNextNum++;\n self.send('ping', params, (function (pingNum) {\n return function (error, result) {\n if (error) {\n Logger.debug(\"Error in ping request #\" + pingNum + \" (\" +\n error.message + \")\");\n if (pingNum > notReconnectIfNumLessThan) {\n enabledPings = false;\n updateNotReconnectIfLessThan();\n Logger.debug(\"Server did not respond to ping message #\" +\n pingNum + \". Reconnecting... \");\n ws.reconnectWs();\n }\n }\n };\n })(pingNextNum));\n }\n else {\n Logger.debug(\"Trying to send ping, but ping is not enabled\");\n }\n }\n /*\n * If configuration.hearbeat has any value, the ping-pong will work with the interval\n * of configuration.hearbeat\n */\n function usePing() {\n if (!pingPongStarted) {\n Logger.debug(\"Starting ping (if configured)\");\n pingPongStarted = true;\n if (configuration.heartbeat != undefined) {\n pingInterval = setInterval(sendPing, configuration.heartbeat);\n sendPing();\n }\n }\n }\n this.close = function () {\n Logger.debug(\"Closing jsonRpcClient explicitly by client\");\n if (pingInterval != undefined) {\n Logger.debug(\"Clearing ping interval\");\n clearInterval(pingInterval);\n }\n pingPongStarted = false;\n enabledPings = false;\n if (configuration.sendCloseMessage) {\n Logger.debug(\"Sending close message\");\n this.send('closeSession', null, function (error, result) {\n if (error) {\n Logger.error(\"Error sending close message: \" + JSON.stringify(error));\n }\n ws.close();\n });\n }\n else {\n ws.close();\n }\n };\n // This method is only for testing\n this.forceClose = function (millis) {\n ws.forceClose(millis);\n };\n this.reconnect = function () {\n ws.reconnectWs();\n };\n}\nmodule.exports = JsonRpcClient;\n//# sourceMappingURL=jsonrpcclient.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar WebSocketWithReconnection = require('./webSocketWithReconnection');\nexports.WebSocketWithReconnection = WebSocketWithReconnection;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module chunks = main","/*\n * (C) Copyright 2013-2015 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\"use strict\";\nvar BrowserWebSocket = global.WebSocket || global.MozWebSocket;\nvar Logger = console;\n/**\n * Get either the `WebSocket` or `MozWebSocket` globals\n * in the browser or try to resolve WebSocket-compatible\n * interface exposed by `ws` for Node-like environment.\n */\n/*var WebSocket = BrowserWebSocket;\nif (!WebSocket && typeof window === 'undefined') {\n try {\n WebSocket = require('ws');\n } catch (e) { }\n}*/\n//var SockJS = require('sockjs-client');\nvar MAX_RETRIES = 2000; // Forever...\nvar RETRY_TIME_MS = 3000; // FIXME: Implement exponential wait times...\nvar CONNECTING = 0;\nvar OPEN = 1;\nvar CLOSING = 2;\nvar CLOSED = 3;\n/*\nconfig = {\n uri : wsUri,\n useSockJS : true (use SockJS) / false (use WebSocket) by default,\n onconnected : callback method to invoke when connection is successful,\n ondisconnect : callback method to invoke when the connection is lost,\n onreconnecting : callback method to invoke when the client is reconnecting,\n onreconnected : callback method to invoke when the client succesfully reconnects,\n };\n*/\nfunction WebSocketWithReconnection(config) {\n var closing = false;\n var registerMessageHandler;\n var wsUri = config.uri;\n var useSockJS = config.useSockJS;\n var reconnecting = false;\n var forcingDisconnection = false;\n var ws;\n if (useSockJS) {\n ws = new SockJS(wsUri);\n }\n else {\n ws = new WebSocket(wsUri);\n }\n ws.onopen = function () {\n logConnected(ws, wsUri);\n if (config.onconnected) {\n config.onconnected();\n }\n };\n ws.onerror = function (error) {\n Logger.error(\"Could not connect to \" + wsUri + \" (invoking onerror if defined)\", error);\n if (config.onerror) {\n config.onerror(error);\n }\n };\n function logConnected(ws, wsUri) {\n try {\n Logger.debug(\"WebSocket connected to \" + wsUri);\n }\n catch (e) {\n Logger.error(e);\n }\n }\n var reconnectionOnClose = function () {\n if (ws.readyState === CLOSED) {\n if (closing) {\n Logger.debug(\"Connection closed by user\");\n }\n else {\n Logger.debug(\"Connection closed unexpectecly. Reconnecting...\");\n reconnectToSameUri(MAX_RETRIES, 1);\n }\n }\n else {\n Logger.debug(\"Close callback from previous websocket. Ignoring it\");\n }\n };\n ws.onclose = reconnectionOnClose;\n function reconnectToSameUri(maxRetries, numRetries) {\n Logger.debug(\"reconnectToSameUri (attempt #\" + numRetries + \", max=\" + maxRetries + \")\");\n if (numRetries === 1) {\n if (reconnecting) {\n Logger.warn(\"Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.\");\n return;\n }\n else {\n reconnecting = true;\n }\n if (config.onreconnecting) {\n config.onreconnecting();\n }\n }\n if (forcingDisconnection) {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n else {\n if (config.newWsUriOnReconnection) {\n config.newWsUriOnReconnection(function (error, newWsUri) {\n if (error) {\n Logger.debug(error);\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, newWsUri);\n }\n });\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n }\n }\n // TODO Test retries. How to force not connection?\n function reconnectToNewUri(maxRetries, numRetries, reconnectWsUri) {\n Logger.debug(\"Reconnection attempt #\" + numRetries);\n ws.close();\n wsUri = reconnectWsUri || wsUri;\n var newWs;\n if (useSockJS) {\n newWs = new SockJS(wsUri);\n }\n else {\n newWs = new WebSocket(wsUri);\n }\n newWs.onopen = function () {\n Logger.debug(\"Reconnected after \" + numRetries + \" attempts...\");\n logConnected(newWs, wsUri);\n reconnecting = false;\n registerMessageHandler();\n if (config.onreconnected()) {\n config.onreconnected();\n }\n newWs.onclose = reconnectionOnClose;\n };\n var onErrorOrClose = function (error) {\n Logger.warn(\"Reconnection error: \", error);\n if (numRetries === maxRetries) {\n if (config.ondisconnect) {\n config.ondisconnect();\n }\n }\n else {\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n };\n newWs.onerror = onErrorOrClose;\n ws = newWs;\n }\n this.close = function () {\n closing = true;\n ws.close();\n };\n // This method is only for testing\n this.forceClose = function (millis) {\n Logger.debug(\"Testing: Force WebSocket close\");\n if (millis) {\n Logger.debug(\"Testing: Change wsUri for \" + millis + \" millis to simulate net failure\");\n var goodWsUri = wsUri;\n wsUri = \"wss://21.234.12.34.4:443/\";\n forcingDisconnection = true;\n setTimeout(function () {\n Logger.debug(\"Testing: Recover good wsUri \" + goodWsUri);\n wsUri = goodWsUri;\n forcingDisconnection = false;\n }, millis);\n }\n ws.close();\n };\n this.reconnectWs = function () {\n Logger.debug(\"reconnectWs\");\n reconnectToSameUri(MAX_RETRIES, 1, wsUri);\n };\n this.send = function (message) {\n ws.send(message);\n };\n this.addEventListener = function (type, callback) {\n registerMessageHandler = function () {\n ws.addEventListener(type, callback);\n };\n registerMessageHandler();\n };\n}\nmodule.exports = WebSocketWithReconnection;\n//# sourceMappingURL=webSocketWithReconnection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar defineProperty_IE8 = false;\nif (Object.defineProperty) {\n try {\n Object.defineProperty({}, \"x\", {});\n }\n catch (e) {\n defineProperty_IE8 = true;\n }\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind\nif (!Function.prototype.bind) {\n Function.prototype.bind = function (oThis) {\n if (typeof this !== 'function') {\n // closest thing possible to the ECMAScript 5\n // internal IsCallable function\n throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n }\n var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () { }, fBound = function () {\n return fToBind.apply(this instanceof fNOP && oThis\n ? this\n : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n fNOP.prototype = this.prototype;\n fBound.prototype = new fNOP();\n return fBound;\n };\n}\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('inherits');\nvar packers = require('./packers');\nvar Mapper = require('./Mapper');\nvar BASE_TIMEOUT = 5000;\nfunction unifyResponseMethods(responseMethods) {\n if (!responseMethods)\n return {};\n for (var key in responseMethods) {\n var value = responseMethods[key];\n if (typeof value == 'string')\n responseMethods[key] =\n {\n response: value\n };\n }\n ;\n return responseMethods;\n}\n;\nfunction unifyTransport(transport) {\n if (!transport)\n return;\n // Transport as a function\n if (transport instanceof Function)\n return { send: transport };\n // WebSocket & DataChannel\n if (transport.send instanceof Function)\n return transport;\n // Message API (Inter-window & WebWorker)\n if (transport.postMessage instanceof Function) {\n transport.send = transport.postMessage;\n return transport;\n }\n // Stream API\n if (transport.write instanceof Function) {\n transport.send = transport.write;\n return transport;\n }\n // Transports that only can receive messages, but not send\n if (transport.onmessage !== undefined)\n return;\n if (transport.pause instanceof Function)\n return;\n throw new SyntaxError(\"Transport is not a function nor a valid object\");\n}\n;\n/**\n * Representation of a RPC notification\n *\n * @class\n *\n * @constructor\n *\n * @param {String} method -method of the notification\n * @param params - parameters of the notification\n */\nfunction RpcNotification(method, params) {\n if (defineProperty_IE8) {\n this.method = method;\n this.params = params;\n }\n else {\n Object.defineProperty(this, 'method', { value: method, enumerable: true });\n Object.defineProperty(this, 'params', { value: params, enumerable: true });\n }\n}\n;\n/**\n * @class\n *\n * @constructor\n *\n * @param {object} packer\n *\n * @param {object} [options]\n *\n * @param {object} [transport]\n *\n * @param {Function} [onRequest]\n */\nfunction RpcBuilder(packer, options, transport, onRequest) {\n var self = this;\n if (!packer)\n throw new SyntaxError('Packer is not defined');\n if (!packer.pack || !packer.unpack)\n throw new SyntaxError('Packer is invalid');\n var responseMethods = unifyResponseMethods(packer.responseMethods);\n if (options instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = options;\n transport = undefined;\n options = undefined;\n }\n ;\n if (options && options.send instanceof Function) {\n if (transport && !(transport instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n onRequest = transport;\n transport = options;\n options = undefined;\n }\n ;\n if (transport instanceof Function) {\n if (onRequest != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = transport;\n transport = undefined;\n }\n ;\n if (transport && transport.send instanceof Function)\n if (onRequest && !(onRequest instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n options = options || {};\n EventEmitter.call(this);\n if (onRequest)\n this.on('request', onRequest);\n if (defineProperty_IE8)\n this.peerID = options.peerID;\n else\n Object.defineProperty(this, 'peerID', { value: options.peerID });\n var max_retries = options.max_retries || 0;\n function transportMessage(event) {\n self.decode(event.data || event);\n }\n ;\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n // Remove listener from old transport\n if (transport) {\n // W3C transports\n if (transport.removeEventListener)\n transport.removeEventListener('message', transportMessage);\n else if (transport.removeListener)\n transport.removeListener('data', transportMessage);\n }\n ;\n // Set listener on new transport\n if (value) {\n // W3C transports\n if (value.addEventListener)\n value.addEventListener('message', transportMessage);\n else if (value.addListener)\n value.addListener('data', transportMessage);\n }\n ;\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n this.setTransport(transport);\n var request_timeout = options.request_timeout || BASE_TIMEOUT;\n var ping_request_timeout = options.ping_request_timeout || request_timeout;\n var response_timeout = options.response_timeout || BASE_TIMEOUT;\n var duplicates_timeout = options.duplicates_timeout || BASE_TIMEOUT;\n var requestID = 0;\n var requests = new Mapper();\n var responses = new Mapper();\n var processedResponses = new Mapper();\n var message2Key = {};\n /**\n * Store the response to prevent to process duplicate request later\n */\n function storeResponse(message, id, dest) {\n var response = {\n message: message,\n /** Timeout to auto-clean old responses */\n timeout: setTimeout(function () {\n responses.remove(id, dest);\n }, response_timeout)\n };\n responses.set(response, id, dest);\n }\n ;\n /**\n * Store the response to ignore duplicated messages later\n */\n function storeProcessedResponse(ack, from) {\n var timeout = setTimeout(function () {\n processedResponses.remove(ack, from);\n }, duplicates_timeout);\n processedResponses.set(timeout, ack, from);\n }\n ;\n /**\n * Representation of a RPC request\n *\n * @class\n * @extends RpcNotification\n *\n * @constructor\n *\n * @param {String} method -method of the notification\n * @param params - parameters of the notification\n * @param {Integer} id - identifier of the request\n * @param [from] - source of the notification\n */\n function RpcRequest(method, params, id, from, transport) {\n RpcNotification.call(this, method, params);\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n var response = responses.get(id, from);\n /**\n * @constant {Boolean} duplicated\n */\n if (!(transport || self.getTransport())) {\n if (defineProperty_IE8)\n this.duplicated = Boolean(response);\n else\n Object.defineProperty(this, 'duplicated', {\n value: Boolean(response)\n });\n }\n var responseMethod = responseMethods[method];\n this.pack = packer.pack.bind(packer, this, id);\n /**\n * Generate a response to this request\n *\n * @param {Error} [error]\n * @param {*} [result]\n *\n * @returns {string}\n */\n this.reply = function (error, result, transport) {\n // Fix optional parameters\n if (error instanceof Function || error && error.send instanceof Function) {\n if (result != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = error;\n result = null;\n error = undefined;\n }\n else if (result instanceof Function\n || result && result.send instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = result;\n result = null;\n }\n ;\n transport = unifyTransport(transport);\n // Duplicated request, remove old response timeout\n if (response)\n clearTimeout(response.timeout);\n if (from != undefined) {\n if (error)\n error.dest = from;\n if (result)\n result.dest = from;\n }\n ;\n var message;\n // New request or overriden one, create new response with provided data\n if (error || result != undefined) {\n if (self.peerID != undefined) {\n if (error)\n error.from = self.peerID;\n else\n result.from = self.peerID;\n }\n // Protocol indicates that responses has own request methods\n if (responseMethod) {\n if (responseMethod.error == undefined && error)\n message =\n {\n error: error\n };\n else {\n var method = error\n ? responseMethod.error\n : responseMethod.response;\n message =\n {\n method: method,\n params: error || result\n };\n }\n }\n else\n message =\n {\n error: error,\n result: result\n };\n message = packer.pack(message, id);\n }\n else if (response)\n message = response.message;\n else\n message = packer.pack({ result: null }, id);\n // Store the response to prevent to process a duplicated request later\n storeResponse(message, id, from);\n // Return the stored response so it can be directly send back\n transport = transport || this.getTransport() || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n }\n ;\n inherits(RpcRequest, RpcNotification);\n function cancel(message) {\n var key = message2Key[message];\n if (!key)\n return;\n delete message2Key[message];\n var request = requests.pop(key.id, key.dest);\n if (!request)\n return;\n clearTimeout(request.timeout);\n // Start duplicated responses timeout\n storeProcessedResponse(key.id, key.dest);\n }\n ;\n /**\n * Allow to cancel a request and don't wait for a response\n *\n * If `message` is not given, cancel all the request\n */\n this.cancel = function (message) {\n if (message)\n return cancel(message);\n for (var message in message2Key)\n cancel(message);\n };\n this.close = function () {\n // Prevent to receive new messages\n var transport = this.getTransport();\n if (transport && transport.close)\n transport.close();\n // Request & processed responses\n this.cancel();\n processedResponses.forEach(clearTimeout);\n // Responses\n responses.forEach(function (response) {\n clearTimeout(response.timeout);\n });\n };\n /**\n * Generates and encode a JsonRPC 2.0 message\n *\n * @param {String} method -method of the notification\n * @param params - parameters of the notification\n * @param [dest] - destination of the notification\n * @param {object} [transport] - transport where to send the message\n * @param [callback] - function called when a response to this request is\n * received. If not defined, a notification will be send instead\n *\n * @returns {string} A raw JsonRPC 2.0 request or notification string\n */\n this.encode = function (method, params, dest, transport, callback) {\n // Fix optional parameters\n if (params instanceof Function) {\n if (dest != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = params;\n transport = undefined;\n dest = undefined;\n params = undefined;\n }\n else if (dest instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = dest;\n transport = undefined;\n dest = undefined;\n }\n else if (transport instanceof Function) {\n if (callback != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = transport;\n transport = undefined;\n }\n ;\n if (self.peerID != undefined) {\n params = params || {};\n params.from = self.peerID;\n }\n ;\n if (dest != undefined) {\n params = params || {};\n params.dest = dest;\n }\n ;\n // Encode message\n var message = {\n method: method,\n params: params\n };\n if (callback) {\n var id = requestID++;\n var retried = 0;\n message = packer.pack(message, id);\n function dispatchCallback(error, result) {\n self.cancel(message);\n callback(error, result);\n }\n ;\n var request = {\n message: message,\n callback: dispatchCallback,\n responseMethods: responseMethods[method] || {}\n };\n var encode_transport = unifyTransport(transport);\n function sendRequest(transport) {\n var rt = (method === 'ping' ? ping_request_timeout : request_timeout);\n request.timeout = setTimeout(timeout, rt * Math.pow(2, retried++));\n message2Key[message] = { id: id, dest: dest };\n requests.set(request, id, dest);\n transport = transport || encode_transport || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n }\n ;\n function retry(transport) {\n transport = unifyTransport(transport);\n console.warn(retried + ' retry for request message:', message);\n var timeout = processedResponses.pop(id, dest);\n clearTimeout(timeout);\n return sendRequest(transport);\n }\n ;\n function timeout() {\n if (retried < max_retries)\n return retry(transport);\n var error = new Error('Request has timed out');\n error.request = message;\n error.retry = retry;\n dispatchCallback(error);\n }\n ;\n return sendRequest(transport);\n }\n ;\n // Return the packed message\n message = packer.pack(message);\n transport = transport || this.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n /**\n * Decode and process a JsonRPC 2.0 message\n *\n * @param {string} message - string with the content of the message\n *\n * @returns {RpcNotification|RpcRequest|undefined} - the representation of the\n * notification or the request. If a response was processed, it will return\n * `undefined` to notify that it was processed\n *\n * @throws {TypeError} - Message is not defined\n */\n this.decode = function (message, transport) {\n if (!message)\n throw new TypeError(\"Message is not defined\");\n try {\n message = packer.unpack(message);\n }\n catch (e) {\n // Ignore invalid messages\n return console.debug(e, message);\n }\n ;\n var id = message.id;\n var ack = message.ack;\n var method = message.method;\n var params = message.params || {};\n var from = params.from;\n var dest = params.dest;\n // Ignore messages send by us\n if (self.peerID != undefined && from == self.peerID)\n return;\n // Notification\n if (id == undefined && ack == undefined) {\n var notification = new RpcNotification(method, params);\n if (self.emit('request', notification))\n return;\n return notification;\n }\n ;\n function processRequest() {\n // If we have a transport and it's a duplicated request, reply inmediatly\n transport = unifyTransport(transport) || self.getTransport();\n if (transport) {\n var response = responses.get(id, from);\n if (response)\n return transport.send(response.message);\n }\n ;\n var idAck = (id != undefined) ? id : ack;\n var request = new RpcRequest(method, params, idAck, from, transport);\n if (self.emit('request', request))\n return;\n return request;\n }\n ;\n function processResponse(request, error, result) {\n request.callback(error, result);\n }\n ;\n function duplicatedResponse(timeout) {\n console.warn(\"Response already processed\", message);\n // Update duplicated responses timeout\n clearTimeout(timeout);\n storeProcessedResponse(ack, from);\n }\n ;\n // Request, or response with own method\n if (method) {\n // Check if it's a response with own method\n if (dest == undefined || dest == self.peerID) {\n var request = requests.get(ack, from);\n if (request) {\n var responseMethods = request.responseMethods;\n if (method == responseMethods.error)\n return processResponse(request, params);\n if (method == responseMethods.response)\n return processResponse(request, null, params);\n return processRequest();\n }\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n }\n // Request\n return processRequest();\n }\n ;\n var error = message.error;\n var result = message.result;\n // Ignore responses not send to us\n if (error && error.dest && error.dest != self.peerID)\n return;\n if (result && result.dest && result.dest != self.peerID)\n return;\n // Response\n var request = requests.get(ack, from);\n if (!request) {\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n return console.warn(\"No callback was defined for this message\", message);\n }\n ;\n // Process response\n processResponse(request, error, result);\n };\n}\n;\ninherits(RpcBuilder, EventEmitter);\nRpcBuilder.RpcNotification = RpcNotification;\nmodule.exports = RpcBuilder;\nvar clients = require('./clients');\nvar transports = require('./clients/transports');\nRpcBuilder.clients = clients;\nRpcBuilder.clients.transports = transports;\nRpcBuilder.packers = packers;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/index.js\n// module chunks = main","/**\n * JsonRPC 2.0 packer\n */\n/**\n * Pack a JsonRPC 2.0 message\n *\n * @param {Object} message - object to be packaged. It requires to have all the\n * fields needed by the JsonRPC 2.0 message that it's going to be generated\n *\n * @return {String} - the stringified JsonRPC 2.0 message\n */\nfunction pack(message, id) {\n var result = {\n jsonrpc: \"2.0\"\n };\n // Request\n if (message.method) {\n result.method = message.method;\n if (message.params)\n result.params = message.params;\n // Request is a notification\n if (id != undefined)\n result.id = id;\n }\n else if (id != undefined) {\n if (message.error) {\n if (message.result !== undefined)\n throw new TypeError(\"Both result and error are defined\");\n result.error = message.error;\n }\n else if (message.result !== undefined)\n result.result = message.result;\n else\n throw new TypeError(\"No result or error is defined\");\n result.id = id;\n }\n ;\n return JSON.stringify(result);\n}\n;\n/**\n * Unpack a JsonRPC 2.0 message\n *\n * @param {String} message - string with the content of the JsonRPC 2.0 message\n *\n * @throws {TypeError} - Invalid JsonRPC version\n *\n * @return {Object} - object filled with the JsonRPC 2.0 message content\n */\nfunction unpack(message) {\n var result = message;\n if (typeof message === 'string' || message instanceof String) {\n result = JSON.parse(message);\n }\n // Check if it's a valid message\n var version = result.jsonrpc;\n if (version !== '2.0')\n throw new TypeError(\"Invalid JsonRPC version '\" + version + \"': \" + message);\n // Response\n if (result.method == undefined) {\n if (result.id == undefined)\n throw new TypeError(\"Invalid message: \" + message);\n var result_defined = result.result !== undefined;\n var error_defined = result.error !== undefined;\n // Check only result or error is defined, not both or none\n if (result_defined && error_defined)\n throw new TypeError(\"Both result and error are defined: \" + message);\n if (!result_defined && !error_defined)\n throw new TypeError(\"No result or error is defined: \" + message);\n result.ack = result.id;\n delete result.id;\n }\n // Return unpacked message\n return result;\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=JsonRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module chunks = main","function pack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nfunction unpack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=XmlRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module chunks = main","var JsonRPC = require('./JsonRPC');\nvar XmlRPC = require('./XmlRPC');\nexports.JsonRPC = JsonRPC;\nexports.XmlRPC = XmlRPC;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module chunks = main","/*\n * (C) Copyright 2014-2015 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar freeice = require('freeice');\nvar inherits = require('inherits');\nvar UAParser = require('ua-parser-js');\nvar uuid = require('uuid');\nvar hark = require('hark');\nvar EventEmitter = require('events').EventEmitter;\nvar recursive = require('merge').recursive.bind(undefined, true);\nvar sdpTranslator = require('sdp-translator');\nvar logger = window.Logger || console;\n// var gUM = navigator.mediaDevices.getUserMedia || function (constraints) {\n// return new Promise(navigator.getUserMedia(constraints, function (stream) {\n// videoStream = stream\n// start()\n// }).eror(callback));\n// }\n/*try {\n require('kurento-browser-extensions')\n} catch (error) {\n if (typeof getScreenConstraints === 'undefined') {\n logger.warn('screen sharing is not available')\n\n getScreenConstraints = function getScreenConstraints(sendSource, callback) {\n callback(new Error(\"This library is not enabled for screen sharing\"))\n }\n }\n}*/\nvar MEDIA_CONSTRAINTS = {\n audio: true,\n video: {\n width: 640,\n framerate: 15\n }\n};\n// Somehow, the UAParser constructor gets an empty window object.\n// We need to pass the user agent string in order to get information\nvar ua = (window && window.navigator) ? window.navigator.userAgent : '';\nvar parser = new UAParser(ua);\nvar browser = parser.getBrowser();\nvar usePlanB = false;\nif (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug(browser.name + \": using SDP PlanB\");\n usePlanB = true;\n}\nfunction noop(error) {\n if (error)\n logger.error(error);\n}\nfunction trackStop(track) {\n track.stop && track.stop();\n}\nfunction streamStop(stream) {\n stream.getTracks().forEach(trackStop);\n}\n/**\n * Returns a string representation of a SessionDescription object.\n */\nvar dumpSDP = function (description) {\n if (typeof description === 'undefined' || description === null) {\n return '';\n }\n return 'type: ' + description.type + '\\r\\n' + description.sdp;\n};\nfunction bufferizeCandidates(pc, onerror) {\n var candidatesQueue = [];\n pc.addEventListener('signalingstatechange', function () {\n if (this.signalingState === 'stable') {\n while (candidatesQueue.length) {\n var entry = candidatesQueue.shift();\n pc.addIceCandidate(entry.candidate, entry.callback, entry.callback);\n }\n }\n });\n return function (candidate, callback) {\n callback = callback || onerror;\n switch (pc.signalingState) {\n case 'closed':\n callback(new Error('PeerConnection object is closed'));\n break;\n case 'stable':\n if (pc.remoteDescription) {\n pc.addIceCandidate(candidate, callback, callback);\n }\n break;\n default:\n candidatesQueue.push({\n candidate: candidate,\n callback: callback\n });\n }\n };\n}\n/* Simulcast utilities */\nfunction removeFIDFromOffer(sdp) {\n var n = sdp.indexOf(\"a=ssrc-group:FID\");\n if (n > 0) {\n return sdp.slice(0, n);\n }\n else {\n return sdp;\n }\n}\nfunction getSimulcastInfo(videoStream) {\n var videoTracks = videoStream.getVideoTracks();\n if (!videoTracks.length) {\n logger.warn('No video tracks available in the video stream');\n return '';\n }\n var lines = [\n 'a=x-google-flag:conference',\n 'a=ssrc-group:SIM 1 2 3',\n 'a=ssrc:1 cname:localVideo',\n 'a=ssrc:1 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:1 mslabel:' + videoStream.id,\n 'a=ssrc:1 label:' + videoTracks[0].id,\n 'a=ssrc:2 cname:localVideo',\n 'a=ssrc:2 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:2 mslabel:' + videoStream.id,\n 'a=ssrc:2 label:' + videoTracks[0].id,\n 'a=ssrc:3 cname:localVideo',\n 'a=ssrc:3 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:3 mslabel:' + videoStream.id,\n 'a=ssrc:3 label:' + videoTracks[0].id\n ];\n lines.push('');\n return lines.join('\\n');\n}\n/**\n * Wrapper object of an RTCPeerConnection. This object is aimed to simplify the\n * development of WebRTC-based applications.\n *\n * @constructor module:kurentoUtils.WebRtcPeer\n *\n * @param {String} mode Mode in which the PeerConnection will be configured.\n * Valid values are: 'recv', 'send', and 'sendRecv'\n * @param localVideo Video tag for the local stream\n * @param remoteVideo Video tag for the remote stream\n * @param {MediaStream} videoStream Stream to be used as primary source\n * (typically video and audio, or only video if combined with audioStream) for\n * localVideo and to be added as stream to the RTCPeerConnection\n * @param {MediaStream} audioStream Stream to be used as second source\n * (typically for audio) for localVideo and to be added as stream to the\n * RTCPeerConnection\n */\nfunction WebRtcPeer(mode, options, callback) {\n if (!(this instanceof WebRtcPeer)) {\n return new WebRtcPeer(mode, options, callback);\n }\n WebRtcPeer.super_.call(this);\n if (options instanceof Function) {\n callback = options;\n options = undefined;\n }\n options = options || {};\n callback = (callback || noop).bind(this);\n var self = this;\n var localVideo = options.localVideo;\n var remoteVideo = options.remoteVideo;\n var videoStream = options.videoStream;\n var audioStream = options.audioStream;\n var mediaConstraints = options.mediaConstraints;\n var connectionConstraints = options.connectionConstraints;\n var pc = options.peerConnection;\n var sendSource = options.sendSource || 'webcam';\n var dataChannelConfig = options.dataChannelConfig;\n var useDataChannels = options.dataChannels || false;\n var dataChannel;\n var guid = uuid.v4();\n var configuration = recursive({\n iceServers: freeice()\n }, options.configuration);\n var onicecandidate = options.onicecandidate;\n if (onicecandidate)\n this.on('icecandidate', onicecandidate);\n var oncandidategatheringdone = options.oncandidategatheringdone;\n if (oncandidategatheringdone) {\n this.on('candidategatheringdone', oncandidategatheringdone);\n }\n var simulcast = options.simulcast;\n var multistream = options.multistream;\n var interop = new sdpTranslator.Interop();\n var candidatesQueueOut = [];\n var candidategatheringdone = false;\n Object.defineProperties(this, {\n 'peerConnection': {\n get: function () {\n return pc;\n }\n },\n 'id': {\n value: options.id || guid,\n writable: false\n },\n 'remoteVideo': {\n get: function () {\n return remoteVideo;\n }\n },\n 'localVideo': {\n get: function () {\n return localVideo;\n }\n },\n 'dataChannel': {\n get: function () {\n return dataChannel;\n }\n },\n /**\n * @member {(external:ImageData|undefined)} currentFrame\n */\n 'currentFrame': {\n get: function () {\n // [ToDo] Find solution when we have a remote stream but we didn't set\n // a remoteVideo tag\n if (!remoteVideo)\n return;\n if (remoteVideo.readyState < remoteVideo.HAVE_CURRENT_DATA)\n throw new Error('No video stream data available');\n var canvas = document.createElement('canvas');\n canvas.width = remoteVideo.videoWidth;\n canvas.height = remoteVideo.videoHeight;\n canvas.getContext('2d').drawImage(remoteVideo, 0, 0);\n return canvas;\n }\n }\n });\n // Init PeerConnection\n if (!pc) {\n pc = new RTCPeerConnection(configuration);\n if (useDataChannels && !dataChannel) {\n var dcId = 'WebRtcPeer-' + self.id;\n var dcOptions = undefined;\n if (dataChannelConfig) {\n dcId = dataChannelConfig.id || dcId;\n dcOptions = dataChannelConfig.options;\n }\n dataChannel = pc.createDataChannel(dcId, dcOptions);\n if (dataChannelConfig) {\n dataChannel.onopen = dataChannelConfig.onopen;\n dataChannel.onclose = dataChannelConfig.onclose;\n dataChannel.onmessage = dataChannelConfig.onmessage;\n dataChannel.onbufferedamountlow = dataChannelConfig.onbufferedamountlow;\n dataChannel.onerror = dataChannelConfig.onerror || noop;\n }\n }\n }\n pc.addEventListener('icecandidate', function (event) {\n var candidate = event.candidate;\n if (EventEmitter.listenerCount(self, 'icecandidate') ||\n EventEmitter.listenerCount(self, 'candidategatheringdone')) {\n if (candidate) {\n var cand;\n if (multistream && usePlanB) {\n cand = interop.candidateToUnifiedPlan(candidate);\n }\n else {\n cand = candidate;\n }\n self.emit('icecandidate', cand);\n candidategatheringdone = false;\n }\n else if (!candidategatheringdone) {\n self.emit('candidategatheringdone');\n candidategatheringdone = true;\n }\n }\n else if (!candidategatheringdone) {\n // Not listening to 'icecandidate' or 'candidategatheringdone' events, queue\n // the candidate until one of them is listened\n candidatesQueueOut.push(candidate);\n if (!candidate)\n candidategatheringdone = true;\n }\n });\n pc.onaddstream = options.onaddstream;\n pc.onnegotiationneeded = options.onnegotiationneeded;\n this.on('newListener', function (event, listener) {\n if (event === 'icecandidate' || event === 'candidategatheringdone') {\n while (candidatesQueueOut.length) {\n var candidate = candidatesQueueOut.shift();\n if (!candidate === (event === 'candidategatheringdone')) {\n listener(candidate);\n }\n }\n }\n });\n var addIceCandidate = bufferizeCandidates(pc);\n /**\n * Callback function invoked when an ICE candidate is received. Developers are\n * expected to invoke this function in order to complete the SDP negotiation.\n *\n * @function module:kurentoUtils.WebRtcPeer.prototype.addIceCandidate\n *\n * @param iceCandidate - Literal object with the ICE candidate description\n * @param callback - Called when the ICE candidate has been added.\n */\n this.addIceCandidate = function (iceCandidate, callback) {\n var candidate;\n if (multistream && usePlanB) {\n candidate = interop.candidateToPlanB(iceCandidate);\n }\n else {\n candidate = new RTCIceCandidate(iceCandidate);\n }\n logger.debug('Remote ICE candidate received', iceCandidate);\n callback = (callback || noop).bind(this);\n addIceCandidate(candidate, callback);\n };\n this.generateOffer = function (callback) {\n callback = callback.bind(this);\n var offerAudio = true;\n var offerVideo = true;\n // Constraints must have both blocks\n if (mediaConstraints) {\n offerAudio = (typeof mediaConstraints.audio === 'boolean') ?\n mediaConstraints.audio : true;\n offerVideo = (typeof mediaConstraints.video === 'boolean') ?\n mediaConstraints.video : true;\n }\n var browserDependantConstraints = {\n offerToReceiveAudio: (mode !== 'sendonly' && offerAudio),\n offerToReceiveVideo: (mode !== 'sendonly' && offerVideo)\n };\n //FIXME: clarify possible constraints passed to createOffer()\n /*var constraints = recursive(browserDependantConstraints,\n connectionConstraints)*/\n var constraints = browserDependantConstraints;\n logger.debug('constraints: ' + JSON.stringify(constraints));\n pc.createOffer(constraints).then(function (offer) {\n logger.debug('Created SDP offer');\n offer = mangleSdpToAddSimulcast(offer);\n return pc.setLocalDescription(offer);\n }).then(function () {\n var localDescription = pc.localDescription;\n logger.debug('Local description set', localDescription.sdp);\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('offer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n callback(null, localDescription.sdp, self.processAnswer.bind(self));\n }).catch(callback);\n };\n this.getLocalSessionDescriptor = function () {\n return pc.localDescription;\n };\n this.getRemoteSessionDescriptor = function () {\n return pc.remoteDescription;\n };\n function setRemoteVideo() {\n if (remoteVideo) {\n remoteVideo.pause();\n var stream = pc.getRemoteStreams()[0];\n remoteVideo.srcObject = stream;\n logger.debug('Remote stream:', stream);\n remoteVideo.load();\n }\n }\n this.showLocalVideo = function () {\n localVideo.srcObject = videoStream;\n localVideo.muted = true;\n };\n this.send = function (data) {\n if (dataChannel && dataChannel.readyState === 'open') {\n dataChannel.send(data);\n }\n else {\n logger.warn('Trying to send data over a non-existing or closed data channel');\n }\n };\n /**\n * Callback function invoked when a SDP answer is received. Developers are\n * expected to invoke this function in order to complete the SDP negotiation.\n *\n * @function module:kurentoUtils.WebRtcPeer.prototype.processAnswer\n *\n * @param sdpAnswer - Description of sdpAnswer\n * @param callback -\n * Invoked after the SDP answer is processed, or there is an error.\n */\n this.processAnswer = function (sdpAnswer, callback) {\n callback = (callback || noop).bind(this);\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n if (multistream && usePlanB) {\n var planBAnswer = interop.toPlanB(answer);\n logger.debug('asnwer::planB', dumpSDP(planBAnswer));\n answer = planBAnswer;\n }\n logger.debug('SDP answer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(answer, function () {\n setRemoteVideo();\n callback();\n }, callback);\n };\n /**\n * Callback function invoked when a SDP offer is received. Developers are\n * expected to invoke this function in order to complete the SDP negotiation.\n *\n * @function module:kurentoUtils.WebRtcPeer.prototype.processOffer\n *\n * @param sdpOffer - Description of sdpOffer\n * @param callback - Called when the remote description has been set\n * successfully.\n */\n this.processOffer = function (sdpOffer, callback) {\n callback = callback.bind(this);\n var offer = new RTCSessionDescription({\n type: 'offer',\n sdp: sdpOffer\n });\n if (multistream && usePlanB) {\n var planBOffer = interop.toPlanB(offer);\n logger.debug('offer::planB', dumpSDP(planBOffer));\n offer = planBOffer;\n }\n logger.debug('SDP offer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(offer).then(function () {\n return setRemoteVideo();\n }).then(function () {\n return pc.createAnswer();\n }).then(function (answer) {\n answer = mangleSdpToAddSimulcast(answer);\n logger.debug('Created SDP answer');\n return pc.setLocalDescription(answer);\n }).then(function () {\n var localDescription = pc.localDescription;\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('answer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n logger.debug('Local description set', localDescription.sdp);\n callback(null, localDescription.sdp);\n }).catch(callback);\n };\n function mangleSdpToAddSimulcast(answer) {\n if (simulcast) {\n if (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug('Adding multicast info');\n answer = new RTCSessionDescription({\n 'type': answer.type,\n 'sdp': removeFIDFromOffer(answer.sdp) + getSimulcastInfo(videoStream)\n });\n }\n else {\n logger.warn('Simulcast is only available in Chrome browser.');\n }\n }\n return answer;\n }\n /**\n * This function creates the RTCPeerConnection object taking into account the\n * properties received in the constructor. It starts the SDP negotiation\n * process: generates the SDP offer and invokes the onsdpoffer callback. This\n * callback is expected to send the SDP offer, in order to obtain an SDP\n * answer from another peer.\n */\n function start() {\n if (pc.signalingState === 'closed') {\n callback('The peer connection object is in \"closed\" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue');\n }\n if (videoStream && localVideo) {\n self.showLocalVideo();\n }\n if (videoStream) {\n pc.addStream(videoStream);\n }\n if (audioStream) {\n pc.addStream(audioStream);\n }\n // [Hack] https://code.google.com/p/chromium/issues/detail?id=443558\n var browser = parser.getBrowser();\n if (mode === 'sendonly' &&\n (browser.name === 'Chrome' || browser.name === 'Chromium') &&\n browser.major === 39) {\n mode = 'sendrecv';\n }\n callback();\n }\n if (mode !== 'recvonly' && !videoStream && !audioStream) {\n function getMedia(constraints) {\n if (constraints === undefined) {\n constraints = MEDIA_CONSTRAINTS;\n }\n navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n videoStream = stream;\n start();\n }).catch(callback);\n }\n if (sendSource === 'webcam') {\n getMedia(mediaConstraints);\n }\n else {\n getScreenConstraints(sendSource, function (error, constraints_) {\n if (error)\n return callback(error);\n constraints = [mediaConstraints];\n constraints.unshift(constraints_);\n getMedia(recursive.apply(undefined, constraints));\n }, guid);\n }\n }\n else {\n setTimeout(start, 0);\n }\n this.on('_dispose', function () {\n if (localVideo) {\n localVideo.pause();\n localVideo.srcObject = null;\n localVideo.load();\n //Unmute local video in case the video tag is later used for remote video\n localVideo.muted = false;\n }\n if (remoteVideo) {\n remoteVideo.pause();\n remoteVideo.srcObject = null;\n remoteVideo.load();\n }\n self.removeAllListeners();\n if (window.cancelChooseDesktopMedia !== undefined) {\n window.cancelChooseDesktopMedia(guid);\n }\n });\n}\ninherits(WebRtcPeer, EventEmitter);\nfunction createEnableDescriptor(type) {\n var method = 'get' + type + 'Tracks';\n return {\n enumerable: true,\n get: function () {\n // [ToDo] Should return undefined if not all tracks have the same value?\n if (!this.peerConnection)\n return;\n var streams = this.peerConnection.getLocalStreams();\n if (!streams.length)\n return;\n for (var i = 0, stream; stream = streams[i]; i++) {\n var tracks = stream[method]();\n for (var j = 0, track; track = tracks[j]; j++)\n if (!track.enabled)\n return false;\n }\n return true;\n },\n set: function (value) {\n function trackSetEnable(track) {\n track.enabled = value;\n }\n this.peerConnection.getLocalStreams().forEach(function (stream) {\n stream[method]().forEach(trackSetEnable);\n });\n }\n };\n}\nObject.defineProperties(WebRtcPeer.prototype, {\n 'enabled': {\n enumerable: true,\n get: function () {\n return this.audioEnabled && this.videoEnabled;\n },\n set: function (value) {\n this.audioEnabled = this.videoEnabled = value;\n }\n },\n 'audioEnabled': createEnableDescriptor('Audio'),\n 'videoEnabled': createEnableDescriptor('Video')\n});\nWebRtcPeer.prototype.getLocalStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getLocalStreams()[index || 0];\n }\n};\nWebRtcPeer.prototype.getRemoteStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getRemoteStreams()[index || 0];\n }\n};\n/**\n * @description This method frees the resources used by WebRtcPeer.\n *\n * @function module:kurentoUtils.WebRtcPeer.prototype.dispose\n */\nWebRtcPeer.prototype.dispose = function () {\n logger.debug('Disposing WebRtcPeer');\n var pc = this.peerConnection;\n var dc = this.dataChannel;\n try {\n if (dc) {\n if (dc.signalingState === 'closed')\n return;\n dc.close();\n }\n if (pc) {\n if (pc.signalingState === 'closed')\n return;\n pc.getLocalStreams().forEach(streamStop);\n // FIXME This is not yet implemented in firefox\n // if(videoStream) pc.removeStream(videoStream);\n // if(audioStream) pc.removeStream(audioStream);\n pc.close();\n }\n }\n catch (err) {\n logger.warn('Exception disposing webrtc peer ' + err);\n }\n this.emit('_dispose');\n};\n//\n// Specialized child classes\n//\nfunction WebRtcPeerRecvonly(options, callback) {\n if (!(this instanceof WebRtcPeerRecvonly)) {\n return new WebRtcPeerRecvonly(options, callback);\n }\n WebRtcPeerRecvonly.super_.call(this, 'recvonly', options, callback);\n}\ninherits(WebRtcPeerRecvonly, WebRtcPeer);\nfunction WebRtcPeerSendonly(options, callback) {\n if (!(this instanceof WebRtcPeerSendonly)) {\n return new WebRtcPeerSendonly(options, callback);\n }\n WebRtcPeerSendonly.super_.call(this, 'sendonly', options, callback);\n}\ninherits(WebRtcPeerSendonly, WebRtcPeer);\nfunction WebRtcPeerSendrecv(options, callback) {\n if (!(this instanceof WebRtcPeerSendrecv)) {\n return new WebRtcPeerSendrecv(options, callback);\n }\n WebRtcPeerSendrecv.super_.call(this, 'sendrecv', options, callback);\n}\ninherits(WebRtcPeerSendrecv, WebRtcPeer);\nfunction harkUtils(stream, options) {\n return hark(stream, options);\n}\nexports.bufferizeCandidates = bufferizeCandidates;\nexports.WebRtcPeerRecvonly = WebRtcPeerRecvonly;\nexports.WebRtcPeerSendonly = WebRtcPeerSendonly;\nexports.WebRtcPeerSendrecv = WebRtcPeerSendrecv;\nexports.hark = harkUtils;\n//# sourceMappingURL=WebRtcPeer.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module chunks = main","/*\n * (C) Copyright 2014 Kurento (http://kurento.org/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n/**\n * This module contains a set of reusable components that have been found useful\n * during the development of the WebRTC applications with Kurento.\n *\n * @module kurentoUtils\n *\n * @copyright 2014 Kurento (http://kurento.org/)\n * @license ALv2\n */\nvar WebRtcPeer = require('./WebRtcPeer');\nexports.WebRtcPeer = WebRtcPeer;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/KurentoUtils/kurento-utils-js/index.js\n// module id = ../../../../openvidu-browser/lib/KurentoUtils/kurento-utils-js/index.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\n/*\n * (C) Copyright 2017 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar OpenViduInternal_1 = require(\"../OpenViduInternal/OpenViduInternal\");\nvar Session_1 = require(\"./Session\");\nvar Publisher_1 = require(\"./Publisher\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/OpenViduError\");\nvar LocalRecorder_1 = require(\"../OpenViduInternal/LocalRecorder\");\nvar adapter = require(\"webrtc-adapter\");\nvar screenSharingAuto = require(\"../ScreenSharing/Screen-Capturing-Auto.js\");\nvar DetectRTC = require(\"../KurentoUtils/DetectRTC\");\nif (window) {\n window[\"adapter\"] = adapter;\n}\nvar OpenVidu = /** @class */ (function () {\n function OpenVidu() {\n this.openVidu = new OpenViduInternal_1.OpenViduInternal();\n console.info(\"'OpenVidu' initialized\");\n }\n ;\n OpenVidu.prototype.initSession = function (param1, param2) {\n if (typeof param2 == \"string\") {\n return new Session_1.Session(this.openVidu.initSession(param2), this);\n }\n else {\n return new Session_1.Session(this.openVidu.initSession(param1), this);\n }\n };\n OpenVidu.prototype.initPublisher = function (parentId, cameraOptions, callback) {\n var publisher;\n if (cameraOptions != null) {\n cameraOptions.audio = cameraOptions.audio != null ? cameraOptions.audio : true;\n cameraOptions.video = cameraOptions.video != null ? cameraOptions.video : true;\n if (!cameraOptions.screen) {\n // Webcam and/or microphone is being requested\n var cameraOptionsAux = {\n sendAudio: cameraOptions.audio != null ? cameraOptions.audio : true,\n sendVideo: cameraOptions.video != null ? cameraOptions.video : true,\n activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,\n activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,\n dataChannel: true,\n mediaConstraints: this.openVidu.generateMediaConstraints(cameraOptions)\n };\n cameraOptions = cameraOptionsAux;\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(parentId, cameraOptions, true, callback), parentId, false);\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n else {\n // Screen share is being requested\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherScreen(parentId, true, callback), parentId, true);\n if (DetectRTC.browser.name === 'Firefox' && DetectRTC.browser.version >= 52) {\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n cameraOptions = {\n sendAudio: cameraOptions.audio,\n sendVideo: cameraOptions.video,\n activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,\n activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,\n dataChannel: true,\n mediaConstraints: {\n video: screenConstraints.video,\n audio: false\n }\n };\n publisher.stream.configureScreenOptions(cameraOptions);\n console.info(\"'Publisher' initialized\");\n publisher.stream.ee.emitEvent('can-request-screen');\n });\n return publisher;\n }\n else if (DetectRTC.browser.name === 'Chrome') {\n // Screen is being requested\n /*screenSharing.isChromeExtensionAvailable((availability) => {\n switch (availability) {\n case 'available':\n console.warn('EXTENSION AVAILABLE!!!');\n screenSharing.getScreenConstraints((error, screenConstraints) => {\n if (!error) {\n console.warn(screenConstraints);\n }\n });\n break;\n case 'unavailable':\n console.warn('EXTENSION NOT AVAILABLE!!!');\n break;\n case 'isFirefox':\n console.warn('IT IS FIREFOX!!!');\n screenSharing.getScreenConstraints((error, screenConstraints) => {\n if (!error) {\n console.warn(screenConstraints);\n }\n });\n break;\n }\n });*/\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n if (error === 'not-installed') {\n var error_1 = new OpenViduError_1.OpenViduError(\"SCREEN_EXTENSION_NOT_INSTALLED\" /* SCREEN_EXTENSION_NOT_INSTALLED */, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');\n console.error(error_1);\n if (callback)\n callback(error_1);\n return;\n }\n else if (error === 'permission-denied') {\n var error_2 = new OpenViduError_1.OpenViduError(\"SCREEN_CAPTURE_DENIED\" /* SCREEN_CAPTURE_DENIED */, 'You must allow access to one window of your desktop');\n console.error(error_2);\n if (callback)\n callback(error_2);\n return;\n }\n cameraOptions = {\n sendAudio: cameraOptions.audio != null ? cameraOptions.audio : true,\n sendVideo: cameraOptions.video != null ? cameraOptions.video : true,\n activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,\n activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,\n dataChannel: true,\n mediaConstraints: {\n video: screenConstraints.video,\n audio: false\n }\n };\n publisher.stream.configureScreenOptions(cameraOptions);\n publisher.stream.ee.emitEvent('can-request-screen');\n }, function (error) {\n console.error('getScreenId error', error);\n return;\n });\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n else {\n console.error('Screen sharing not supported on ' + DetectRTC.browser.name);\n if (!!callback)\n callback(new OpenViduError_1.OpenViduError(\"SCREEN_SHARING_NOT_SUPPORTED\" /* SCREEN_SHARING_NOT_SUPPORTED */, 'Screen sharing not supported on ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version));\n }\n }\n }\n else {\n cameraOptions = {\n sendAudio: true,\n sendVideo: true,\n activeAudio: true,\n activeVideo: true,\n dataChannel: true,\n mediaConstraints: {\n audio: true,\n video: { width: { ideal: 1280 } }\n }\n };\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(parentId, cameraOptions, true, callback), parentId, false);\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n };\n OpenVidu.prototype.reinitPublisher = function (publisher) {\n if (publisher.stream.typeOfVideo !== 'SCREEN') {\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(publisher.stream.getParentId(), publisher.stream.outboundOptions, false), publisher.stream.getParentId(), false);\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n else {\n publisher = new Publisher_1.Publisher(this.openVidu.initPublisherScreen(publisher.stream.getParentId(), false), publisher.stream.getParentId(), true);\n if (DetectRTC.browser.name === 'Firefox' && DetectRTC.browser.version >= 52) {\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n publisher.stream.outboundOptions.mediaConstraints.video = screenConstraints.video;\n publisher.stream.configureScreenOptions(publisher.stream.outboundOptions);\n console.info(\"'Publisher' initialized\");\n publisher.stream.ee.emitEvent('can-request-screen');\n });\n return publisher;\n }\n else if (DetectRTC.browser.name === 'Chrome') {\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n if (error === 'not-installed') {\n var error_3 = new OpenViduError_1.OpenViduError(\"SCREEN_EXTENSION_NOT_INSTALLED\" /* SCREEN_EXTENSION_NOT_INSTALLED */, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');\n console.error(error_3);\n return;\n }\n else if (error === 'permission-denied') {\n var error_4 = new OpenViduError_1.OpenViduError(\"SCREEN_CAPTURE_DENIED\" /* SCREEN_CAPTURE_DENIED */, 'You must allow access to one window of your desktop');\n console.error(error_4);\n return;\n }\n publisher.stream.outboundOptions.mediaConstraints.video = screenConstraints.video;\n publisher.stream.configureScreenOptions(publisher.stream.outboundOptions);\n publisher.stream.ee.emitEvent('can-request-screen');\n }, function (error) {\n console.error('getScreenId error', error);\n return;\n });\n console.info(\"'Publisher' initialized\");\n return publisher;\n }\n else {\n console.error('Screen sharing not supported on ' + DetectRTC.browser.name);\n }\n }\n };\n OpenVidu.prototype.checkSystemRequirements = function () {\n var defaultWebRTCSupport = DetectRTC.isWebRTCSupported;\n var browser = DetectRTC.browser.name;\n var version = DetectRTC.browser.version;\n if ((browser !== 'Chrome') && (browser !== 'Firefox') && (browser !== 'Opera') && (browser !== 'Safari')) {\n return 0;\n }\n else {\n return defaultWebRTCSupport ? 1 : 0;\n }\n };\n OpenVidu.prototype.getDevices = function (callback) {\n navigator.mediaDevices.enumerateDevices().then(function (deviceInfos) {\n callback(null, deviceInfos);\n })[\"catch\"](function (error) {\n console.error(\"Error getting devices\", error);\n callback(error, null);\n });\n };\n OpenVidu.prototype.enableProdMode = function () {\n console.log = function () { };\n console.debug = function () { };\n console.info = function () { };\n console.warn = function () { };\n };\n OpenVidu.prototype.initLocalRecorder = function (stream) {\n return new LocalRecorder_1.LocalRecorder(stream);\n };\n return OpenVidu;\n}());\nexports.OpenVidu = OpenVidu;\n//# sourceMappingURL=OpenVidu.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar Publisher = /** @class */ (function () {\n function Publisher(stream, parentId, isScreenRequested) {\n var _this = this;\n this.ee = new EventEmitter();\n this.accessAllowed = false;\n this.isScreenRequested = false;\n this.stream = stream;\n this.isScreenRequested = isScreenRequested;\n // Listens to the deactivation of the default behaviour upon the deletion of a Stream object\n this.ee.addListener('stream-destroyed-default', function (event) {\n var s = event.stream;\n s.addOnceEventListener('video-removed', function () {\n _this.ee.emitEvent('videoElementDestroyed');\n });\n s.removeVideo();\n });\n if (document.getElementById(parentId) != null) {\n this.element = document.getElementById(parentId);\n }\n }\n Publisher.prototype.publishAudio = function (value) {\n this.stream.getWebRtcPeer().audioEnabled = value;\n };\n Publisher.prototype.publishVideo = function (value) {\n this.stream.getWebRtcPeer().videoEnabled = value;\n };\n Publisher.prototype.destroy = function () {\n if (!!this.session)\n this.session.unpublish(this);\n this.stream.dispose();\n this.stream.removeVideo(this.element);\n return this;\n };\n Publisher.prototype.subscribeToRemote = function () {\n this.stream.subscribeToMyRemote();\n };\n Publisher.prototype.on = function (eventName, callback) {\n var _this = this;\n this.ee.addListener(eventName, function (event) {\n if (event) {\n console.info(\"Event '\" + eventName + \"' triggered by 'Publisher'\", event);\n }\n else {\n console.info(\"Event '\" + eventName + \"' triggered by 'Publisher'\");\n }\n callback(event);\n });\n if (eventName == 'streamCreated') {\n if (this.stream.isPublisherPublished) {\n this.ee.emitEvent('streamCreated', [{ stream: this.stream }]);\n }\n else {\n this.stream.addEventListener('stream-created-by-publisher', function () {\n _this.ee.emitEvent('streamCreated', [{ stream: _this.stream }]);\n });\n }\n }\n if (eventName == 'videoElementCreated') {\n if (this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addEventListener('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [{\n element: element.element\n }]);\n });\n }\n }\n if (eventName == 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused == false &&\n video.ended == false &&\n video.readyState == 4) {\n this.ee.emitEvent('videoPlaying', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addEventListener('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [{\n element: element.element\n }]);\n });\n }\n }\n if (eventName == 'remoteVideoPlaying') {\n var video = this.stream.getVideoElement();\n if (this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused == false &&\n video.ended == false &&\n video.readyState == 4) {\n this.ee.emitEvent('remoteVideoPlaying', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addEventListener('remote-video-is-playing', function (element) {\n _this.ee.emitEvent('remoteVideoPlaying', [{\n element: element.element\n }]);\n });\n }\n }\n if (eventName == 'accessAllowed') {\n if (this.stream.accessIsAllowed) {\n this.ee.emitEvent('accessAllowed');\n }\n else {\n this.stream.addEventListener('access-allowed-by-publisher', function () {\n _this.ee.emitEvent('accessAllowed');\n });\n }\n }\n if (eventName == 'accessDenied') {\n if (this.stream.accessIsDenied) {\n this.ee.emitEvent('accessDenied');\n }\n else {\n this.stream.addEventListener('access-denied-by-publisher', function () {\n _this.ee.emitEvent('accessDenied');\n });\n }\n }\n };\n return Publisher;\n}());\nexports.Publisher = Publisher;\n//# sourceMappingURL=Publisher.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Publisher.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Publisher.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenViduError_1 = require(\"../OpenViduInternal/OpenViduError\");\nvar Subscriber_1 = require(\"./Subscriber\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar DetectRTC = require(\"../KurentoUtils/DetectRTC\");\nvar Session = /** @class */ (function () {\n function Session(session, openVidu) {\n var _this = this;\n this.session = session;\n this.openVidu = openVidu;\n this.ee = new EventEmitter();\n this.sessionId = session.getSessionId();\n // Listens to the deactivation of the default behaviour upon the deletion of a Stream object\n this.session.addEventListener('stream-destroyed-default', function (event) {\n event.stream.removeVideo();\n });\n // Listens to the deactivation of the default behaviour upon the disconnection of a Session\n this.session.addEventListener('session-disconnected-default', function () {\n var s;\n for (var streamId in _this.session.getRemoteStreams()) {\n _this.session.getRemoteStreams()[streamId].removeVideo();\n }\n if (_this.connection && (Object.keys(_this.connection.getStreams()).length > 0)) {\n for (var streamId in _this.connection.getStreams()) {\n _this.connection.getStreams()[streamId].removeVideo();\n }\n }\n });\n // Sets or updates the value of 'connection' property. Triggered by SessionInternal when succesful connection\n this.session.addEventListener('update-connection-object', function (event) {\n _this.connection = event.connection;\n });\n }\n Session.prototype.connect = function (param1, param2, param3) {\n // Early configuration to deactivate automatic subscription to streams\n if (param3) {\n if (this.openVidu.checkSystemRequirements()) {\n this.session.configure({\n sessionId: this.session.getSessionId(),\n participantId: param1,\n metadata: this.session.stringClientMetadata(param2),\n subscribeToStreams: false\n });\n this.session.connect(param1, param3);\n }\n else {\n param3(new OpenViduError_1.OpenViduError(\"BROWSER_NOT_SUPPORTED\" /* BROWSER_NOT_SUPPORTED */, 'Browser ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version + ' is not supported in OpenVidu'));\n }\n }\n else {\n if (this.openVidu.checkSystemRequirements()) {\n this.session.configure({\n sessionId: this.session.getSessionId(),\n participantId: param1,\n metadata: '',\n subscribeToStreams: false\n });\n this.session.connect(param1, param2);\n }\n else {\n param2(new OpenViduError_1.OpenViduError(\"BROWSER_NOT_SUPPORTED\" /* BROWSER_NOT_SUPPORTED */, 'Browser ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version + ' is not supported in OpenVidu'));\n }\n }\n };\n Session.prototype.disconnect = function () {\n var _this = this;\n this.openVidu.openVidu.close(false);\n this.session.emitEvent('sessionDisconnected', [{\n preventDefault: function () { _this.session.removeEvent('session-disconnected-default'); }\n }]);\n this.session.emitEvent('session-disconnected-default', [{}]);\n };\n Session.prototype.publish = function (publisher) {\n var _this = this;\n if (!publisher.stream.isPublisherPublished) {\n if (publisher.isScreenRequested) {\n if (!publisher.stream.isScreenRequestedReady) {\n publisher.stream.addOnceEventListener('screen-ready', function () {\n _this.streamPublish(publisher);\n });\n }\n else {\n this.streamPublish(publisher);\n }\n }\n else {\n this.streamPublish(publisher);\n }\n }\n else {\n publisher = this.openVidu.reinitPublisher(publisher);\n if (publisher.isScreenRequested && !publisher.stream.isScreenRequestedReady) {\n publisher.stream.addOnceEventListener('screen-ready', function () {\n _this.streamPublish(publisher);\n });\n }\n else {\n this.streamPublish(publisher);\n }\n }\n };\n Session.prototype.streamPublish = function (publisher) {\n publisher.session = this;\n this.connection.addStream(publisher.stream);\n publisher.stream.publish();\n };\n Session.prototype.unpublish = function (publisher) {\n this.session.unpublish(publisher);\n };\n Session.prototype.on = function (eventName, callback) {\n this.session.addEventListener(eventName, function (event) {\n if (event) {\n console.info(\"Event '\" + eventName + \"' triggered by 'Session'\", event);\n }\n else {\n console.info(\"Event '\" + eventName + \"' triggered by 'Session'\");\n }\n callback(event);\n });\n };\n Session.prototype.once = function (eventName, callback) {\n this.session.addOnceEventListener(eventName, function (event) {\n callback(event);\n });\n };\n Session.prototype.off = function (eventName, eventHandler) {\n this.session.removeListener(eventName, eventHandler);\n };\n Session.prototype.subscribe = function (param1, param2, param3) {\n // Subscription\n this.session.subscribe(param1);\n var subscriber = new Subscriber_1.Subscriber(param1, param2);\n param1.playOnlyVideo(param2, null);\n return subscriber;\n };\n Session.prototype.unsubscribe = function (subscriber) {\n this.session.unsubscribe(subscriber.stream);\n subscriber.stream.removeVideo();\n };\n Session.prototype.signal = function (signal, completionHandler) {\n var signalMessage = {};\n if (signal.to && signal.to.length > 0) {\n var connectionIds = [];\n for (var i = 0; i < signal.to.length; i++) {\n connectionIds.push(signal.to[i].connectionId);\n }\n signalMessage['to'] = connectionIds;\n }\n else {\n signalMessage['to'] = [];\n }\n signalMessage['data'] = signal.data ? signal.data : '';\n signalMessage['type'] = signal.type ? signal.type : '';\n this.openVidu.openVidu.sendMessage(JSON.stringify(signalMessage));\n };\n return Session;\n}());\nexports.Session = Session;\n//# sourceMappingURL=Session.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Session.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Session.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar Subscriber = /** @class */ (function () {\n function Subscriber(stream, parentId) {\n var _this = this;\n this.ee = new EventEmitter();\n this.stream = stream;\n if (document.getElementById(parentId) != null) {\n this.element = document.getElementById(parentId);\n }\n // Listens to deletion of the HTML video element of the Subscriber\n this.stream.addEventListener('video-removed', function () {\n _this.ee.emitEvent('videoElementDestroyed');\n });\n }\n Subscriber.prototype.on = function (eventName, callback) {\n var _this = this;\n this.ee.addListener(eventName, function (event) {\n if (event) {\n console.info(\"Event '\" + eventName + \"' triggered by 'Subscriber'\", event);\n }\n else {\n console.info(\"Event '\" + eventName + \"' triggered by 'Subscriber'\");\n }\n callback(event);\n });\n if (eventName == 'videoElementCreated') {\n if (this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addOnceEventListener('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [{\n element: element\n }]);\n });\n }\n }\n if (eventName == 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused == false &&\n video.ended == false &&\n video.readyState == 4) {\n this.ee.emitEvent('videoPlaying', [{\n element: this.stream.getVideoElement()\n }]);\n }\n else {\n this.stream.addOnceEventListener('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [{\n element: element.element\n }]);\n });\n }\n }\n };\n return Subscriber;\n}());\nexports.Subscriber = Subscriber;\n//# sourceMappingURL=Subscriber.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Subscriber.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Subscriber.js\n// module chunks = main","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nexports.__esModule = true;\n__export(require(\"./OpenVidu\"));\n__export(require(\"./Session\"));\n__export(require(\"./Publisher\"));\n__export(require(\"./Subscriber\"));\n__export(require(\"../OpenViduInternal/Stream\"));\n__export(require(\"../OpenViduInternal/Connection\"));\n__export(require(\"../OpenViduInternal/LocalRecorder\"));\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/index.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/index.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar Stream_1 = require(\"./Stream\");\nvar Connection = /** @class */ (function () {\n function Connection(openVidu, local, room, options) {\n this.openVidu = openVidu;\n this.local = local;\n this.room = room;\n this.options = options;\n this.streams = {};\n console.info(\"'Connection' created (\" + (local ? \"local\" : \"remote\") + \")\" + (local ? \"\" : \", with 'connectionId' [\" + (options ? options.id : '') + \"] \"));\n if (options && !local) {\n this.connectionId = options.id;\n if (options.metadata) {\n this.data = options.metadata;\n }\n if (options.streams) {\n this.initRemoteStreams(options);\n }\n }\n }\n Connection.prototype.addStream = function (stream) {\n stream.connection = this;\n this.streams[stream.streamId] = stream;\n //this.room.getStreams()[stream.streamId] = stream;\n };\n Connection.prototype.removeStream = function (key) {\n delete this.streams[key];\n //delete this.room.getStreams()[key];\n delete this.inboundStreamsOpts;\n };\n Connection.prototype.setOptions = function (options) {\n this.options = options;\n };\n Connection.prototype.getStreams = function () {\n return this.streams;\n };\n Connection.prototype.dispose = function () {\n for (var key in this.streams) {\n this.streams[key].dispose();\n }\n };\n Connection.prototype.sendIceCandidate = function (candidate) {\n console.debug((this.local ? \"Local\" : \"Remote\"), \"candidate for\", this.connectionId, JSON.stringify(candidate));\n this.openVidu.sendRequest(\"onIceCandidate\", {\n endpointName: this.connectionId,\n candidate: candidate.candidate,\n sdpMid: candidate.sdpMid,\n sdpMLineIndex: candidate.sdpMLineIndex\n }, function (error, response) {\n if (error) {\n console.error(\"Error sending ICE candidate: \"\n + JSON.stringify(error));\n }\n });\n };\n Connection.prototype.initRemoteStreams = function (options) {\n var opts;\n for (var _i = 0, _a = options.streams; _i < _a.length; _i++) {\n opts = _a[_i];\n var streamOptions = {\n id: opts.id,\n connection: this,\n recvAudio: (opts.audioActive == null ? true : opts.audioActive),\n recvVideo: (opts.videoActive == null ? true : opts.videoActive),\n typeOfVideo: opts.typeOfVideo\n };\n var stream = new Stream_1.Stream(this.openVidu, false, this.room, streamOptions);\n this.addStream(stream);\n this.inboundStreamsOpts = streamOptions;\n }\n console.info(\"Remote 'Connection' with 'connectionId' [\" + this.connectionId + \"] is now configured for receiving Streams with options: \", this.inboundStreamsOpts);\n };\n return Connection;\n}());\nexports.Connection = Connection;\n//# sourceMappingURL=Connection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Connection.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Connection.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar LocalRecorder = /** @class */ (function () {\n function LocalRecorder(stream) {\n this.chunks = [];\n this.count = 0;\n this.stream = stream;\n this.connectionId = (!!this.stream.connection) ? this.stream.connection.connectionId : 'default-connection';\n this.id = this.stream.streamId + '_' + this.connectionId + '_localrecord';\n this.state = \"READY\" /* READY */;\n }\n LocalRecorder.prototype.record = function () {\n var _this = this;\n if (typeof MediaRecorder === 'undefined') {\n console.error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder');\n throw (Error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder'));\n }\n if (this.state !== \"READY\" /* READY */) {\n throw (Error('\\'LocalRecord.record()\\' needs \\'LocalRecord.state\\' to be \\'READY\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.clean()\\' or init a new LocalRecorder before'));\n }\n console.log(\"Starting local recording of stream '\" + this.stream.streamId + \"' of connection '\" + this.connectionId + \"'\");\n if (typeof MediaRecorder.isTypeSupported == 'function') {\n var options = void 0;\n if (MediaRecorder.isTypeSupported('video/webm;codecs=vp9')) {\n options = { mimeType: 'video/webm;codecs=vp9' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=h264')) {\n options = { mimeType: 'video/webm;codecs=h264' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=vp8')) {\n options = { mimeType: 'video/webm;codecs=vp8' };\n }\n console.log('Using mimeType ' + options.mimeType);\n this.mediaRecorder = new MediaRecorder(this.stream.getMediaStream(), options);\n }\n else {\n console.warn('isTypeSupported is not supported, using default codecs for browser');\n this.mediaRecorder = new MediaRecorder(this.stream.getMediaStream());\n }\n this.mediaRecorder.start(10);\n this.mediaRecorder.ondataavailable = function (e) {\n _this.chunks.push(e.data);\n };\n this.mediaRecorder.onerror = function (e) {\n console.error('MediaRecorder error: ', e);\n };\n this.mediaRecorder.onstart = function () {\n console.log('MediaRecorder started (state=' + _this.mediaRecorder.state + \")\");\n };\n this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n };\n this.mediaRecorder.onpause = function () {\n console.log('MediaRecorder paused (state=' + _this.mediaRecorder.state + \")\");\n };\n this.mediaRecorder.onresume = function () {\n console.log('MediaRecorder resumed (state=' + _this.mediaRecorder.state + \")\");\n };\n this.mediaRecorder.onwarning = function (e) {\n console.log('MediaRecorder warning: ' + e);\n };\n this.state = \"RECORDING\" /* RECORDING */;\n };\n LocalRecorder.prototype.stop = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state === \"READY\" /* READY */ || _this.state === \"FINISHED\" /* FINISHED */) {\n throw (Error('\\'LocalRecord.stop()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' or \\'PAUSED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.start()\\' before'));\n }\n _this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n resolve();\n };\n }\n catch (e) {\n reject(e);\n }\n try {\n _this.mediaRecorder.stop();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n LocalRecorder.prototype.pause = function () {\n if (this.state !== \"RECORDING\" /* RECORDING */) {\n throw (Error('\\'LocalRecord.pause()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.start()\\' or \\'LocalRecorder.resume()\\' before'));\n }\n this.mediaRecorder.pause();\n this.state = \"PAUSED\" /* PAUSED */;\n };\n LocalRecorder.prototype.resume = function () {\n if (this.state !== \"PAUSED\" /* PAUSED */) {\n throw (Error('\\'LocalRecord.resume()\\' needs \\'LocalRecord.state\\' to be \\'PAUSED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.pause()\\' before'));\n }\n this.mediaRecorder.resume();\n this.state = \"RECORDING\" /* RECORDING */;\n };\n LocalRecorder.prototype.preview = function (parentElement) {\n if (this.state !== \"FINISHED\" /* FINISHED */) {\n throw (Error('\\'LocalRecord.preview()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n this.videoPreview = document.createElement('video');\n this.videoPreview.id = this.id;\n this.videoPreview.autoplay = true;\n if (typeof parentElement === \"string\") {\n this.htmlParentElementId = parentElement;\n var parentElementDom = document.getElementById(parentElement);\n if (parentElementDom) {\n this.videoPreview = parentElementDom.appendChild(this.videoPreview);\n }\n }\n else {\n this.htmlParentElementId = parentElement.id;\n this.videoPreview = parentElement.appendChild(this.videoPreview);\n }\n this.videoPreview.src = this.videoPreviewSrc;\n return this.videoPreview;\n };\n LocalRecorder.prototype.clean = function () {\n var _this = this;\n var f = function () {\n delete _this.blob;\n _this.chunks = [];\n _this.count = 0;\n delete _this.mediaRecorder;\n _this.state = \"READY\" /* READY */;\n };\n if (this.state === \"RECORDING\" /* RECORDING */ || this.state === \"PAUSED\" /* PAUSED */) {\n this.stop().then(function () { return f(); })[\"catch\"](function () { return f(); });\n }\n else {\n f();\n }\n };\n LocalRecorder.prototype.download = function () {\n if (this.state !== \"FINISHED\" /* FINISHED */) {\n throw (Error('\\'LocalRecord.download()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var a = document.createElement(\"a\");\n a.style.display = 'none';\n document.body.appendChild(a);\n var url = window.URL.createObjectURL(this.blob);\n a.href = url;\n a.download = this.id + '.webm';\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n }\n };\n LocalRecorder.prototype.getBlob = function () {\n if (this.state !== \"FINISHED\" /* FINISHED */) {\n throw (Error('Call \\'LocalRecord.stop()\\' before getting Blob file'));\n }\n else {\n return this.blob;\n }\n };\n LocalRecorder.prototype.uploadAsBinary = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== \"FINISHED\" /* FINISHED */) {\n reject(Error('\\'LocalRecord.uploadAsBinary()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_1 = new XMLHttpRequest();\n http_1.open(\"POST\", endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_1.setRequestHeader(key, headers[key]);\n }\n }\n http_1.onreadystatechange = function () {\n if (http_1.readyState === 4) {\n if (http_1.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_1.responseText);\n }\n else {\n reject(Error(\"Upload error: \" + http_1.status));\n }\n }\n };\n http_1.send(_this.blob);\n }\n });\n };\n LocalRecorder.prototype.uploadAsMultipartfile = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== \"FINISHED\" /* FINISHED */) {\n reject(Error('\\'LocalRecord.uploadAsMultipartfile()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_2 = new XMLHttpRequest();\n http_2.open(\"POST\", endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_2.setRequestHeader(key, headers[key]);\n }\n }\n var sendable = new FormData();\n sendable.append(\"file\", _this.blob, _this.id + \".webm\");\n http_2.onreadystatechange = function () {\n if (http_2.readyState === 4) {\n if (http_2.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_2.responseText);\n }\n else {\n reject(Error(\"Upload error: \" + http_2.status));\n }\n }\n };\n http_2.send(sendable);\n }\n });\n };\n LocalRecorder.prototype.onStopDefault = function () {\n console.log('MediaRecorder stopped (state=' + this.mediaRecorder.state + \")\");\n this.blob = new Blob(this.chunks, { type: \"video/webm\" });\n this.chunks = [];\n this.videoPreviewSrc = window.URL.createObjectURL(this.blob);\n this.state = \"FINISHED\" /* FINISHED */;\n };\n return LocalRecorder;\n}());\nexports.LocalRecorder = LocalRecorder;\n//# sourceMappingURL=LocalRecorder.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/LocalRecorder.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/LocalRecorder.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenViduError = /** @class */ (function () {\n function OpenViduError(name, message) {\n this.name = name;\n this.message = message;\n }\n return OpenViduError;\n}());\nexports.OpenViduError = OpenViduError;\n//# sourceMappingURL=OpenViduError.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/OpenViduError.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/OpenViduError.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\n/*\n * (C) Copyright 2017 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar SessionInternal_1 = require(\"./SessionInternal\");\nvar OpenViduError_1 = require(\"./OpenViduError\");\nvar Stream_1 = require(\"./Stream\");\nvar RpcBuilder = require(\"../KurentoUtils/kurento-jsonrpc\");\nvar OpenViduInternal = /** @class */ (function () {\n function OpenViduInternal() {\n this.recorder = false;\n }\n /* NEW METHODS */\n OpenViduInternal.prototype.initSession = function (sessionId) {\n console.info(\"'Session' initialized with 'sessionId' [\" + sessionId + \"]\");\n this.session = new SessionInternal_1.SessionInternal(this, sessionId);\n return this.session;\n };\n OpenViduInternal.prototype.initPublisherTagged = function (parentId, cameraOptions, newStream, callback) {\n var _this = this;\n if (newStream) {\n if (cameraOptions == null) {\n cameraOptions = {\n sendAudio: true,\n sendVideo: true,\n activeAudio: true,\n activeVideo: true,\n dataChannel: true,\n mediaConstraints: {\n audio: true,\n video: { width: { ideal: 1280 } }\n }\n };\n }\n this.localStream = new Stream_1.Stream(this, true, this.session, cameraOptions);\n }\n this.localStream.requestCameraAccess(function (error, localStream) {\n if (error) {\n // Neither localStream or microphone device is allowed/able to capture media\n console.error(error);\n if (callback) {\n callback(error);\n }\n _this.localStream.ee.emitEvent('access-denied-by-publisher');\n }\n else {\n _this.localStream.setVideoElement(_this.cameraReady(localStream, parentId));\n if (callback) {\n callback(undefined);\n }\n }\n });\n return this.localStream;\n };\n OpenViduInternal.prototype.initPublisherScreen = function (parentId, newStream, callback) {\n var _this = this;\n if (newStream) {\n this.localStream = new Stream_1.Stream(this, true, this.session, 'screen-options');\n }\n this.localStream.addOnceEventListener('can-request-screen', function () {\n _this.localStream.requestCameraAccess(function (error, localStream) {\n if (error) {\n _this.localStream.ee.emitEvent('access-denied-by-publisher');\n var errorName = \"SCREEN_CAPTURE_DENIED\" /* SCREEN_CAPTURE_DENIED */;\n var errorMessage = 'You must allow access to one window of your desktop';\n var e = new OpenViduError_1.OpenViduError(errorName, errorMessage);\n console.error(e);\n if (callback) {\n callback(e);\n }\n }\n else {\n _this.localStream.setVideoElement(_this.cameraReady(localStream, parentId));\n if (_this.localStream.getSendAudio()) {\n // If the user wants to send audio with the screen capturing\n navigator.mediaDevices.getUserMedia({ audio: true, video: false })\n .then(function (userStream) {\n _this.localStream.getMediaStream().addTrack(userStream.getAudioTracks()[0]);\n // Mute audio if 'activeAudio' property is false\n if (userStream.getAudioTracks()[0] != null) {\n userStream.getAudioTracks()[0].enabled = _this.localStream.outboundOptions.activeAudio;\n }\n _this.localStream.isScreenRequestedReady = true;\n _this.localStream.ee.emitEvent('screen-ready');\n if (callback) {\n callback(undefined);\n }\n })[\"catch\"](function (error) {\n _this.localStream.ee.emitEvent('access-denied-by-publisher');\n console.error(\"Error accessing the microphone\", error);\n if (callback) {\n var errorName = \"MICROPHONE_ACCESS_DENIED\" /* MICROPHONE_ACCESS_DENIED */;\n var errorMessage = error.toString();\n callback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n }\n });\n }\n else {\n _this.localStream.isScreenRequestedReady = true;\n _this.localStream.ee.emitEvent('screen-ready');\n if (callback) {\n callback(undefined);\n }\n }\n }\n });\n });\n return this.localStream;\n };\n OpenViduInternal.prototype.cameraReady = function (localStream, parentId) {\n this.localStream = localStream;\n var videoElement = this.localStream.playOnlyVideo(parentId, null);\n this.localStream.emitStreamReadyEvent();\n return videoElement;\n };\n OpenViduInternal.prototype.getLocalStream = function () {\n return this.localStream;\n };\n /* NEW METHODS */\n OpenViduInternal.prototype.getWsUri = function () {\n return this.wsUri;\n };\n OpenViduInternal.prototype.setWsUri = function (wsUri) {\n this.wsUri = wsUri;\n };\n OpenViduInternal.prototype.getSecret = function () {\n return this.secret;\n };\n OpenViduInternal.prototype.setSecret = function (secret) {\n this.secret = secret;\n };\n OpenViduInternal.prototype.getRecorder = function () {\n return this.recorder;\n };\n OpenViduInternal.prototype.setRecorder = function (recorder) {\n this.recorder = recorder;\n };\n OpenViduInternal.prototype.getOpenViduServerURL = function () {\n return 'https://' + this.wsUri.split(\"wss://\")[1].split(\"/room\")[0];\n };\n OpenViduInternal.prototype.getRoom = function () {\n return this.session;\n };\n OpenViduInternal.prototype.connect = function (callback) {\n this.callback = callback;\n this.initJsonRpcClient(this.wsUri);\n };\n OpenViduInternal.prototype.initJsonRpcClient = function (wsUri) {\n var config = {\n heartbeat: 3000,\n sendCloseMessage: false,\n ws: {\n uri: wsUri,\n useSockJS: false,\n onconnected: this.connectCallback.bind(this),\n ondisconnect: this.disconnectCallback.bind(this),\n onreconnecting: this.reconnectingCallback.bind(this),\n onreconnected: this.reconnectedCallback.bind(this)\n },\n rpc: {\n requestTimeout: 15000,\n //notifications\n participantJoined: this.onParticipantJoined.bind(this),\n participantPublished: this.onParticipantPublished.bind(this),\n participantUnpublished: this.onParticipantUnpublished.bind(this),\n participantLeft: this.onParticipantLeft.bind(this),\n participantEvicted: this.onParticipantEvicted.bind(this),\n sendMessage: this.onNewMessage.bind(this),\n iceCandidate: this.iceCandidateEvent.bind(this),\n mediaError: this.onMediaError.bind(this)\n }\n };\n this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config);\n };\n OpenViduInternal.prototype.connectCallback = function (error) {\n if (error) {\n this.callback(error);\n }\n else {\n this.callback(null);\n }\n };\n OpenViduInternal.prototype.isRoomAvailable = function () {\n if (this.session !== undefined && this.session instanceof SessionInternal_1.SessionInternal) {\n return true;\n }\n else {\n console.warn('Session instance not found');\n return false;\n }\n };\n OpenViduInternal.prototype.disconnectCallback = function () {\n console.warn('Websocket connection lost');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenViduInternal.prototype.reconnectingCallback = function () {\n console.warn('Websocket connection lost (reconnecting)');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenViduInternal.prototype.reconnectedCallback = function () {\n console.warn('Websocket reconnected');\n };\n OpenViduInternal.prototype.onParticipantJoined = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantJoined(params);\n }\n };\n OpenViduInternal.prototype.onParticipantPublished = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantPublished(params);\n }\n };\n OpenViduInternal.prototype.onParticipantUnpublished = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantUnpublished(params);\n }\n };\n OpenViduInternal.prototype.onParticipantLeft = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantLeft(params);\n }\n };\n OpenViduInternal.prototype.onParticipantEvicted = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onParticipantEvicted(params);\n }\n };\n OpenViduInternal.prototype.onNewMessage = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onNewMessage(params);\n }\n };\n OpenViduInternal.prototype.iceCandidateEvent = function (params) {\n if (this.isRoomAvailable()) {\n this.session.recvIceCandidate(params);\n }\n };\n OpenViduInternal.prototype.onRoomClosed = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onRoomClosed(params);\n }\n };\n OpenViduInternal.prototype.onMediaError = function (params) {\n if (this.isRoomAvailable()) {\n this.session.onMediaError(params);\n }\n };\n OpenViduInternal.prototype.setRpcParams = function (params) {\n this.rpcParams = params;\n };\n OpenViduInternal.prototype.sendRequest = function (method, params, callback) {\n if (params && params instanceof Function) {\n callback = params;\n params = undefined;\n }\n params = params || {};\n if (this.rpcParams && this.rpcParams !== null && this.rpcParams !== undefined) {\n for (var index in this.rpcParams) {\n if (this.rpcParams.hasOwnProperty(index)) {\n params[index] = this.rpcParams[index];\n console.debug('RPC param added to request {' + index + ': ' + this.rpcParams[index] + '}');\n }\n }\n }\n console.debug('Sending request: {method:\"' + method + '\", params: ' + JSON.stringify(params) + '}');\n this.jsonRpcClient.send(method, params, callback);\n };\n OpenViduInternal.prototype.close = function (forced) {\n if (this.isRoomAvailable()) {\n this.session.leave(forced, this.jsonRpcClient);\n }\n };\n ;\n OpenViduInternal.prototype.disconnectParticipant = function (stream) {\n if (this.isRoomAvailable()) {\n this.session.disconnect(stream);\n }\n };\n //CHAT\n OpenViduInternal.prototype.sendMessage = function (message) {\n this.sendRequest('sendMessage', {\n message: message\n }, function (error, response) {\n if (error) {\n console.error(error);\n }\n });\n };\n ;\n OpenViduInternal.prototype.generateMediaConstraints = function (cameraOptions) {\n var mediaConstraints = {\n audio: cameraOptions.audio,\n video: {}\n };\n if (!cameraOptions.video) {\n mediaConstraints.video = false;\n }\n else {\n var w = void 0, h = void 0;\n switch (cameraOptions.quality) {\n case 'LOW':\n w = 320;\n h = 240;\n break;\n case 'MEDIUM':\n w = 640;\n h = 480;\n break;\n case 'HIGH':\n w = 1280;\n h = 720;\n break;\n default:\n w = 640;\n h = 480;\n }\n mediaConstraints.video['width'] = { exact: w };\n mediaConstraints.video['height'] = { exact: h };\n //mediaConstraints.video['frameRate'] = { ideal: Number((document.getElementById('frameRate')).value) };\n }\n return mediaConstraints;\n };\n return OpenViduInternal;\n}());\nexports.OpenViduInternal = OpenViduInternal;\n//# sourceMappingURL=OpenViduInternal.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/OpenViduInternal.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/OpenViduInternal.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar Connection_1 = require(\"./Connection\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar SECRET_PARAM = '?secret=';\nvar RECORDER_PARAM = '&recorder=';\nvar SessionInternal = /** @class */ (function () {\n function SessionInternal(openVidu, sessionId) {\n this.openVidu = openVidu;\n this.ee = new EventEmitter();\n this.remoteStreams = {};\n this.participants = {};\n this.publishersSpeaking = [];\n this.connected = false;\n this.sessionId = this.getUrlWithoutSecret(sessionId);\n this.localParticipant = new Connection_1.Connection(this.openVidu, true, this);\n if (!this.openVidu.getWsUri() && !!sessionId) {\n this.processOpenViduUrl(sessionId);\n }\n }\n SessionInternal.prototype.processOpenViduUrl = function (url) {\n var secret = this.getSecretFromUrl(url);\n var recorder = this.getRecorderFromUrl(url);\n if (!(secret == null)) {\n this.openVidu.setSecret(secret);\n }\n if (!(recorder == null)) {\n this.openVidu.setRecorder(recorder);\n }\n this.openVidu.setWsUri(this.getFinalUrl(url));\n };\n SessionInternal.prototype.getSecretFromUrl = function (url) {\n var secret = '';\n if (url.indexOf(SECRET_PARAM) !== -1) {\n var endOfSecret = url.lastIndexOf(RECORDER_PARAM);\n if (endOfSecret !== -1) {\n secret = url.substring(url.lastIndexOf(SECRET_PARAM) + SECRET_PARAM.length, endOfSecret);\n }\n else {\n secret = url.substring(url.lastIndexOf(SECRET_PARAM) + SECRET_PARAM.length, url.length);\n }\n }\n return secret;\n };\n SessionInternal.prototype.getRecorderFromUrl = function (url) {\n var recorder = '';\n if (url.indexOf(RECORDER_PARAM) !== -1) {\n recorder = url.substring(url.lastIndexOf(RECORDER_PARAM) + RECORDER_PARAM.length, url.length);\n }\n return new Boolean(recorder).valueOf();\n ;\n };\n SessionInternal.prototype.getUrlWithoutSecret = function (url) {\n if (!url) {\n console.error('sessionId is not defined');\n }\n if (url.indexOf(SECRET_PARAM) !== -1) {\n url = url.substring(0, url.lastIndexOf(SECRET_PARAM));\n }\n return url;\n };\n SessionInternal.prototype.getFinalUrl = function (url) {\n url = this.getUrlWithoutSecret(url).substring(0, url.lastIndexOf('/')) + '/room';\n if (url.indexOf(\".ngrok.io\") !== -1) {\n // OpenVidu server URL referes to a ngrok IP: secure wss protocol and delete port of URL\n url = url.replace(\"ws://\", \"wss://\");\n var regex = /\\.ngrok\\.io:\\d+/;\n url = url.replace(regex, \".ngrok.io\");\n }\n else if ((url.indexOf(\"localhost\") !== -1) || (url.indexOf(\"127.0.0.1\") != -1)) {\n // OpenVidu server URL referes to localhost IP\n }\n return url;\n };\n /* NEW METHODS */\n SessionInternal.prototype.connect = function (token, callback) {\n var _this = this;\n this.openVidu.connect(function (error) {\n if (error) {\n callback('ERROR CONNECTING TO OPENVIDU');\n }\n else {\n if (!token) {\n token = _this.randomToken();\n }\n var joinParams = {\n token: token,\n session: _this.sessionId,\n metadata: _this.options.metadata,\n secret: _this.openVidu.getSecret(),\n recorder: _this.openVidu.getRecorder(),\n dataChannels: false\n };\n if (_this.localParticipant) {\n if (Object.keys(_this.localParticipant.getStreams()).some(function (streamId) {\n return _this.remoteStreams[streamId].isDataChannelEnabled();\n })) {\n joinParams.dataChannels = true;\n }\n }\n _this.openVidu.sendRequest('joinRoom', joinParams, function (error, response) {\n if (error) {\n callback(error);\n }\n else {\n _this.connected = true;\n var exParticipants = response.value;\n // IMPORTANT: Update connectionId with value send by server\n _this.localParticipant.connectionId = response.id;\n _this.participants[response.id] = _this.localParticipant;\n var roomEvent = {\n participants: new Array(),\n streams: new Array()\n };\n var length_1 = exParticipants.length;\n for (var i = 0; i < length_1; i++) {\n var connection = new Connection_1.Connection(_this.openVidu, false, _this, exParticipants[i]);\n connection.creationTime = new Date().getTime();\n _this.participants[connection.connectionId] = connection;\n roomEvent.participants.push(connection);\n var streams = connection.getStreams();\n for (var key in streams) {\n roomEvent.streams.push(streams[key]);\n if (_this.subscribeToStreams) {\n streams[key].subscribe();\n }\n }\n }\n // Update local Connection object properties with values returned by server\n _this.localParticipant.data = response.metadata;\n _this.localParticipant.creationTime = new Date().getTime();\n // Updates the value of property 'connection' in Session object\n _this.ee.emitEvent('update-connection-object', [{ connection: _this.localParticipant }]);\n // Own connection created event\n _this.ee.emitEvent('connectionCreated', [{ connection: _this.localParticipant }]);\n // One connection created event for each existing connection in the session\n for (var _i = 0, _a = roomEvent.participants; _i < _a.length; _i++) {\n var part = _a[_i];\n _this.ee.emitEvent('connectionCreated', [{ connection: part }]);\n }\n //if (this.subscribeToStreams) {\n for (var _b = 0, _c = roomEvent.streams; _b < _c.length; _b++) {\n var stream = _c[_b];\n _this.ee.emitEvent('streamCreated', [{ stream: stream }]);\n // Store the remote stream\n _this.remoteStreams[stream.streamId] = stream;\n }\n callback(undefined);\n }\n });\n }\n });\n };\n /* NEW METHODS */\n SessionInternal.prototype.configure = function (options) {\n this.options = options;\n this.id = options.sessionId;\n this.subscribeToStreams = options.subscribeToStreams == null ? true : options.subscribeToStreams;\n this.updateSpeakerInterval = options.updateSpeakerInterval || 1500;\n this.thresholdSpeaker = options.thresholdSpeaker || -50;\n this.activateUpdateMainSpeaker();\n if (!this.openVidu.getWsUri()) {\n this.processOpenViduUrl(options.sessionId);\n }\n };\n SessionInternal.prototype.getId = function () {\n return this.id;\n };\n SessionInternal.prototype.getSessionId = function () {\n return this.sessionId;\n };\n SessionInternal.prototype.activateUpdateMainSpeaker = function () {\n /*setInterval(() => {\n if (this.publishersSpeaking.length > 0) {\n this.ee.emitEvent('publisherStartSpeaking', [{\n participantId: this.publishersSpeaking[this.publishersSpeaking.length - 1]\n }]);\n }\n }, this.updateSpeakerInterval);*/\n };\n SessionInternal.prototype.getLocalParticipant = function () {\n return this.localParticipant;\n };\n SessionInternal.prototype.addEventListener = function (eventName, listener) {\n this.ee.on(eventName, listener);\n };\n SessionInternal.prototype.addOnceEventListener = function (eventName, listener) {\n this.ee.once(eventName, listener);\n };\n SessionInternal.prototype.removeListener = function (eventName, listener) {\n this.ee.off(eventName, listener);\n };\n SessionInternal.prototype.removeEvent = function (eventName) {\n this.ee.removeEvent(eventName);\n };\n SessionInternal.prototype.emitEvent = function (eventName, eventsArray) {\n this.ee.emitEvent(eventName, eventsArray);\n };\n SessionInternal.prototype.subscribe = function (stream) {\n stream.subscribe();\n };\n SessionInternal.prototype.unsubscribe = function (stream) {\n console.info(\"Unsubscribing from \" + stream.connection.connectionId);\n this.openVidu.sendRequest('unsubscribeFromVideo', {\n sender: stream.connection.connectionId\n }, function (error, response) {\n if (error) {\n console.error(\"Error unsubscribing from Subscriber\", error);\n }\n else {\n console.info(\"Unsubscribed correctly from \" + stream.connection.connectionId);\n }\n stream.dispose();\n });\n };\n SessionInternal.prototype.onParticipantPublished = function (response) {\n // Get the existing Connection created on 'onParticipantJoined' for\n // existing participants or create a new one for new participants\n var connection = this.participants[response.id];\n if (connection != null) {\n // Update existing Connection\n response.metadata = connection.data;\n connection.setOptions(response);\n connection.initRemoteStreams(response);\n }\n else {\n // Create new Connection\n connection = new Connection_1.Connection(this.openVidu, false, this, response);\n }\n var pid = connection.connectionId;\n if (!(pid in this.participants)) {\n console.debug(\"Remote Connection not found in connections list by its id [\" + pid + \"]\");\n }\n else {\n console.debug(\"Remote Connection found in connections list by its id [\" + pid + \"]\");\n }\n this.participants[pid] = connection;\n var streams = connection.getStreams();\n for (var key in streams) {\n var stream = streams[key];\n if (!this.remoteStreams[stream.streamId]) {\n // Avoid race condition between stream.subscribe() in \"onParticipantPublished\" and in \"joinRoom\" rpc callback\n // This condition is false if openvidu-server sends \"participantPublished\" event to a subscriber participant that has\n // already subscribed to certain stream in the callback of \"joinRoom\" method\n if (this.subscribeToStreams) {\n stream.subscribe();\n }\n this.ee.emitEvent('streamCreated', [{ stream: stream }]);\n // Store the remote stream\n this.remoteStreams[stream.streamId] = stream;\n }\n }\n };\n SessionInternal.prototype.onParticipantUnpublished = function (msg) {\n var _this = this;\n var connection = this.participants[msg.name];\n if (connection !== undefined) {\n var streams = connection.getStreams();\n for (var key in streams) {\n this.ee.emitEvent('streamDestroyed', [{\n stream: streams[key],\n preventDefault: function () { _this.ee.removeEvent('stream-destroyed-default'); }\n }]);\n this.ee.emitEvent('stream-destroyed-default', [{\n stream: streams[key]\n }]);\n // Deleting the remote stream\n var streamId = streams[key].streamId;\n var stream = this.remoteStreams[streamId];\n stream.dispose();\n delete this.remoteStreams[stream.streamId];\n connection.removeStream(stream.streamId);\n }\n }\n else {\n console.warn(\"Participant \" + msg.name\n + \" unknown. Participants: \"\n + JSON.stringify(this.participants));\n }\n };\n SessionInternal.prototype.onParticipantJoined = function (response) {\n var connection = new Connection_1.Connection(this.openVidu, false, this, response);\n connection.creationTime = new Date().getTime();\n var pid = connection.connectionId;\n if (!(pid in this.participants)) {\n this.participants[pid] = connection;\n }\n else {\n //use existing so that we don't lose streams info\n console.warn(\"Connection already exists in connections list with \" +\n \"the same connectionId, old:\", this.participants[pid], \", joined now:\", connection);\n connection = this.participants[pid];\n }\n this.ee.emitEvent('participant-joined', [{\n connection: connection\n }]);\n this.ee.emitEvent('connectionCreated', [{\n connection: connection\n }]);\n };\n SessionInternal.prototype.onParticipantLeft = function (msg) {\n var _this = this;\n var connection = this.participants[msg.name];\n if (connection !== undefined) {\n this.ee.emitEvent('participant-left', [{\n connection: connection\n }]);\n var streams = connection.getStreams();\n for (var key in streams) {\n this.ee.emitEvent('streamDestroyed', [{\n stream: streams[key],\n preventDefault: function () { _this.ee.removeEvent('stream-destroyed-default'); }\n }]);\n this.ee.emitEvent('stream-destroyed-default', [{\n stream: streams[key]\n }]);\n // Deleting the remote stream\n var streamId = streams[key].streamId;\n delete this.remoteStreams[streamId];\n }\n connection.dispose();\n delete this.participants[msg.name];\n this.ee.emitEvent('connectionDestroyed', [{\n connection: connection\n }]);\n }\n else {\n console.warn(\"Participant \" + msg.name\n + \" unknown. Participants: \"\n + JSON.stringify(this.participants));\n }\n };\n ;\n SessionInternal.prototype.onParticipantEvicted = function (msg) {\n this.ee.emitEvent('participant-evicted', [{\n localParticipant: this.localParticipant\n }]);\n };\n ;\n SessionInternal.prototype.onNewMessage = function (msg) {\n console.info(\"New signal: \" + JSON.stringify(msg));\n this.ee.emitEvent('signal', [{\n data: msg.data,\n from: this.participants[msg.from],\n type: msg.type\n }]);\n this.ee.emitEvent('signal:' + msg.type, [{\n data: msg.data,\n from: this.participants[msg.from],\n type: msg.type\n }]);\n };\n SessionInternal.prototype.recvIceCandidate = function (msg) {\n var candidate = {\n candidate: msg.candidate,\n sdpMid: msg.sdpMid,\n sdpMLineIndex: msg.sdpMLineIndex\n };\n var connection = this.participants[msg.endpointName];\n if (!connection) {\n console.error(\"Participant not found for endpoint \" +\n msg.endpointName + \". Ice candidate will be ignored.\", candidate);\n return;\n }\n var streams = connection.getStreams();\n var _loop_1 = function (key) {\n var stream = streams[key];\n stream.getWebRtcPeer().addIceCandidate(candidate, function (error) {\n if (error) {\n console.error(\"Error adding candidate for \" + key\n + \" stream of endpoint \" + msg.endpointName\n + \": \" + error);\n }\n });\n };\n for (var key in streams) {\n _loop_1(key);\n }\n };\n SessionInternal.prototype.onRoomClosed = function (msg) {\n console.info(\"Session closed: \" + JSON.stringify(msg));\n var room = msg.room;\n if (room !== undefined) {\n this.ee.emitEvent('room-closed', [{\n room: room\n }]);\n }\n else {\n console.warn(\"Session undefined on session closed\", msg);\n }\n };\n SessionInternal.prototype.onLostConnection = function () {\n if (!this.connected) {\n console.warn('Not connected to session: if you are not debugging, this is probably a certificate error');\n if (window.confirm('If you are not debugging, this is probably a certificate error at \\\"' + this.openVidu.getOpenViduServerURL() + '\\\"\\n\\nClick OK to navigate and accept it')) {\n location.assign(this.openVidu.getOpenViduServerURL() + '/accept-certificate');\n }\n ;\n return;\n }\n console.warn('Lost connection in Session ' + this.id);\n var room = this.id;\n if (room !== undefined) {\n this.ee.emitEvent('lost-connection', [{ room: room }]);\n }\n else {\n console.warn('Session undefined when lost connection');\n }\n };\n SessionInternal.prototype.onMediaError = function (params) {\n console.error(\"Media error: \" + JSON.stringify(params));\n var error = params.error;\n if (error) {\n this.ee.emitEvent('error-media', [{\n error: error\n }]);\n }\n else {\n console.warn(\"Received undefined media error. Params:\", params);\n }\n };\n /*\n * forced means the user was evicted, no need to send the 'leaveRoom' request\n */\n SessionInternal.prototype.leave = function (forced, jsonRpcClient) {\n forced = !!forced;\n console.info(\"Leaving Session (forced=\" + forced + \")\");\n if (this.connected && !forced) {\n this.openVidu.sendRequest('leaveRoom', function (error, response) {\n if (error) {\n console.error(error);\n }\n jsonRpcClient.close();\n });\n }\n else {\n jsonRpcClient.close();\n }\n this.connected = false;\n if (this.participants) {\n for (var pid in this.participants) {\n this.participants[pid].dispose();\n delete this.participants[pid];\n }\n }\n };\n SessionInternal.prototype.disconnect = function (stream) {\n var connection = stream.getParticipant();\n if (!connection) {\n console.error(\"Stream to disconnect has no participant\", stream);\n return;\n }\n delete this.participants[connection.connectionId];\n connection.dispose();\n if (connection === this.localParticipant) {\n console.info(\"Unpublishing my media (I'm \" + connection.connectionId + \")\");\n delete this.localParticipant;\n this.openVidu.sendRequest('unpublishVideo', function (error, response) {\n if (error) {\n console.error(error);\n }\n else {\n console.info(\"Media unpublished correctly\");\n }\n });\n }\n else {\n this.unsubscribe(stream);\n }\n };\n SessionInternal.prototype.unpublish = function (publisher) {\n var _this = this;\n var stream = publisher.stream;\n if (!stream.connection) {\n console.error(\"The associated Connection object of this Publisher is null\", stream);\n return;\n }\n else if (stream.connection !== this.localParticipant) {\n console.error(\"The associated Connection object of this Publisher is not your local Connection.\" +\n \"Only moderators can force unpublish on remote Streams via 'forceUnpublish' method\", stream);\n return;\n }\n else {\n stream.dispose();\n console.info(\"Unpublishing local media (\" + stream.connection.connectionId + \")\");\n this.openVidu.sendRequest('unpublishVideo', function (error, response) {\n if (error) {\n console.error(error);\n }\n else {\n console.info(\"Media unpublished correctly\");\n }\n });\n stream.isReadyToPublish = false;\n stream.isScreenRequestedReady = false;\n delete stream.connection.getStreams()[stream.streamId];\n publisher.ee.emitEvent('streamDestroyed', [{\n stream: publisher.stream,\n preventDefault: function () { _this.ee.removeEvent('stream-destroyed-default'); }\n }]);\n publisher.ee.emitEvent('stream-destroyed-default', [{\n stream: publisher.stream\n }]);\n }\n };\n SessionInternal.prototype.getRemoteStreams = function () {\n return this.remoteStreams;\n };\n SessionInternal.prototype.addParticipantSpeaking = function (participantId) {\n this.publishersSpeaking.push(participantId);\n this.ee.emitEvent('publisherStartSpeaking', [{\n participantId: participantId\n }]);\n };\n SessionInternal.prototype.removeParticipantSpeaking = function (participantId) {\n var pos = -1;\n for (var i = 0; i < this.publishersSpeaking.length; i++) {\n if (this.publishersSpeaking[i] == participantId) {\n pos = i;\n break;\n }\n }\n if (pos != -1) {\n this.publishersSpeaking.splice(pos, 1);\n this.ee.emitEvent('publisherStopSpeaking', [{\n participantId: participantId\n }]);\n }\n };\n SessionInternal.prototype.stringClientMetadata = function (metadata) {\n if (!(typeof metadata === 'string')) {\n return JSON.stringify(metadata);\n }\n else {\n return metadata;\n }\n };\n SessionInternal.prototype.randomToken = function () {\n return Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2);\n };\n return SessionInternal;\n}());\nexports.SessionInternal = SessionInternal;\n//# sourceMappingURL=SessionInternal.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/SessionInternal.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/SessionInternal.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenViduError_1 = require(\"./OpenViduError\");\nvar WebRtcStats_1 = require(\"./WebRtcStats\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar kurentoUtils = require(\"../KurentoUtils/kurento-utils-js\");\nvar adapter = require(\"webrtc-adapter\");\nif (window) {\n window[\"adapter\"] = adapter;\n}\nfunction jq(id) {\n return id.replace(/(@|:|\\.|\\[|\\]|,)/g, \"\\\\$1\");\n}\nfunction show(id) {\n document.getElementById(jq(id)).style.display = 'block';\n}\nfunction hide(id) {\n document.getElementById(jq(id)).style.display = 'none';\n}\nvar Stream = /** @class */ (function () {\n function Stream(openVidu, local, room, options) {\n var _this = this;\n this.openVidu = openVidu;\n this.local = local;\n this.room = room;\n this.ee = new EventEmitter();\n this.showMyRemote = false;\n this.localMirrored = false;\n this.chanId = 0;\n this.dataChannelOpened = false;\n this.isReadyToPublish = false;\n this.isPublisherPublished = false;\n this.isVideoELementCreated = false;\n this.accessIsAllowed = false;\n this.accessIsDenied = false;\n this.isScreenRequestedReady = false;\n this.isScreenRequested = false;\n if (options !== 'screen-options') {\n // Outbound stream (not screen share) or Inbound stream\n if ('id' in options) {\n this.inboundOptions = options;\n }\n else {\n this.outboundOptions = options;\n }\n this.streamId = (options.id != null) ? options.id : ((options.sendVideo) ? \"CAMERA\" : \"MICRO\");\n this.typeOfVideo = (options.typeOfVideo != null) ? options.typeOfVideo : '';\n if ('recvAudio' in options) {\n // Set Connection for an Inbound stream (for Outbound streams will be set on Session.Publish(Publisher))\n this.connection = options.connection;\n }\n }\n else {\n // Outbound stream for screen share\n this.isScreenRequested = true;\n this.typeOfVideo = 'SCREEN';\n }\n this.addEventListener('mediastream-updated', function () {\n if (_this.video)\n _this.video.srcObject = _this.mediaStream;\n console.debug(\"Video srcObject [\" + _this.mediaStream + \"] added to stream [\" + _this.streamId + \"]\");\n });\n }\n Stream.prototype.emitStreamReadyEvent = function () {\n this.ee.emitEvent('stream-ready');\n };\n Stream.prototype.removeVideo = function (parentElement) {\n if (this.video) {\n if (typeof parentElement === \"string\") {\n document.getElementById(parentElement).removeChild(this.video);\n this.ee.emitEvent('video-removed');\n }\n else if (parentElement instanceof Element) {\n parentElement.removeChild(this.video);\n this.ee.emitEvent('video-removed');\n }\n else if (!parentElement) {\n if (document.getElementById(this.parentId)) {\n document.getElementById(this.parentId).removeChild(this.video);\n this.ee.emitEvent('video-removed');\n }\n }\n delete this.video;\n }\n };\n Stream.prototype.getVideoElement = function () {\n return this.video;\n };\n Stream.prototype.setVideoElement = function (video) {\n if (!!video)\n this.video = video;\n };\n Stream.prototype.getParentId = function () {\n return this.parentId;\n };\n Stream.prototype.getRecvVideo = function () {\n return this.inboundOptions.recvVideo;\n };\n Stream.prototype.getRecvAudio = function () {\n return this.inboundOptions.recvAudio;\n };\n Stream.prototype.getSendVideo = function () {\n return this.outboundOptions.sendVideo;\n };\n Stream.prototype.getSendAudio = function () {\n return this.outboundOptions.sendAudio;\n };\n Stream.prototype.subscribeToMyRemote = function () {\n this.showMyRemote = true;\n };\n Stream.prototype.displayMyRemote = function () {\n return this.showMyRemote;\n };\n Stream.prototype.mirrorLocalStream = function (wr) {\n this.showMyRemote = true;\n this.localMirrored = true;\n if (wr) {\n this.mediaStream = wr;\n this.ee.emitEvent('mediastream-updated');\n }\n };\n Stream.prototype.isLocalMirrored = function () {\n return this.localMirrored;\n };\n Stream.prototype.getChannelName = function () {\n return this.streamId + '_' + this.chanId++;\n };\n Stream.prototype.isDataChannelEnabled = function () {\n return this.outboundOptions.dataChannel;\n };\n Stream.prototype.isDataChannelOpened = function () {\n return this.dataChannelOpened;\n };\n Stream.prototype.onDataChannelOpen = function (event) {\n console.debug('Data channel is opened');\n this.dataChannelOpened = true;\n };\n Stream.prototype.onDataChannelClosed = function (event) {\n console.debug('Data channel is closed');\n this.dataChannelOpened = false;\n };\n Stream.prototype.sendData = function (data) {\n if (this.wp === undefined) {\n throw new Error('WebRTC peer has not been created yet');\n }\n if (!this.dataChannelOpened) {\n throw new Error('Data channel is not opened');\n }\n console.info(\"Sending through data channel: \" + data);\n this.wp.send(data);\n };\n Stream.prototype.getMediaStream = function () {\n return this.mediaStream;\n };\n Stream.prototype.getWebRtcPeer = function () {\n return this.wp;\n };\n Stream.prototype.getRTCPeerConnection = function () {\n return this.wp.peerConnection;\n };\n Stream.prototype.addEventListener = function (eventName, listener) {\n this.ee.addListener(eventName, listener);\n };\n Stream.prototype.addOnceEventListener = function (eventName, listener) {\n this.ee.addOnceListener(eventName, listener);\n };\n Stream.prototype.removeListener = function (eventName) {\n this.ee.removeAllListeners(eventName);\n };\n Stream.prototype.showSpinner = function (spinnerParentId) {\n var progress = document.createElement('div');\n progress.id = 'progress-' + this.streamId;\n progress.style.background = \"center transparent url('img/spinner.gif') no-repeat\";\n var spinnerParent = document.getElementById(spinnerParentId);\n if (spinnerParent) {\n spinnerParent.appendChild(progress);\n }\n };\n Stream.prototype.hideSpinner = function (spinnerId) {\n spinnerId = (spinnerId === undefined) ? this.streamId : spinnerId;\n hide('progress-' + spinnerId);\n };\n Stream.prototype.playOnlyVideo = function (parentElement, thumbnailId) {\n var _this = this;\n if (!!parentElement) {\n this.video = document.createElement('video');\n this.video.id = (this.local ? 'local-' : 'remote-') + 'video-' + this.streamId;\n this.video.autoplay = true;\n this.video.controls = false;\n this.ee.emitEvent('mediastream-updated');\n if (this.local && !this.displayMyRemote()) {\n this.video.muted = true;\n this.video.oncanplay = function () {\n console.info(\"Local 'Stream' with id [\" + _this.streamId + \"] video is now playing\");\n _this.ee.emitEvent('video-is-playing', [{\n element: _this.video\n }]);\n };\n }\n else {\n this.video.title = this.streamId;\n }\n if (typeof parentElement === \"string\") {\n this.parentId = parentElement;\n var parentElementDom = document.getElementById(parentElement);\n if (parentElementDom) {\n this.video = parentElementDom.appendChild(this.video);\n this.ee.emitEvent('video-element-created-by-stream', [{\n element: this.video\n }]);\n this.isVideoELementCreated = true;\n }\n }\n else {\n this.parentId = parentElement.id;\n this.video = parentElement.appendChild(this.video);\n }\n this.isReadyToPublish = true;\n return this.video;\n }\n this.isReadyToPublish = true;\n return null;\n };\n Stream.prototype.playThumbnail = function (thumbnailId) {\n var container = document.createElement('div');\n container.className = \"participant\";\n container.id = this.streamId;\n var thumbnail = document.getElementById(thumbnailId);\n if (thumbnail) {\n thumbnail.appendChild(container);\n }\n var name = document.createElement('div');\n container.appendChild(name);\n var userName = this.streamId.replace('_webcam', '');\n if (userName.length >= 16) {\n userName = userName.substring(0, 16) + \"...\";\n }\n name.appendChild(document.createTextNode(userName));\n name.id = \"name-\" + this.streamId;\n name.className = \"name\";\n name.title = this.streamId;\n this.showSpinner(thumbnailId);\n return this.playOnlyVideo(container, thumbnailId);\n };\n Stream.prototype.getParticipant = function () {\n return this.connection;\n };\n Stream.prototype.requestCameraAccess = function (callback) {\n var _this = this;\n var constraints = this.outboundOptions.mediaConstraints;\n /*let constraints2 = {\n audio: true,\n video: {\n width: {\n ideal: 1280\n },\n frameRate: {\n ideal: 15\n }\n }\n };*/\n this.userMediaHasVideo(function (hasVideo) {\n if (!hasVideo) {\n if (_this.outboundOptions.sendVideo) {\n callback(new OpenViduError_1.OpenViduError(\"NO_VIDEO_DEVICE\" /* NO_VIDEO_DEVICE */, 'You have requested camera access but there is no video input device available. Trying to connect with an audio input device only'), _this);\n }\n if (!_this.outboundOptions.sendAudio) {\n callback(new OpenViduError_1.OpenViduError(\"NO_INPUT_DEVICE\" /* NO_INPUT_DEVICE */, 'You must init Publisher object with audio or video streams enabled'), undefined);\n }\n else {\n constraints.video = false;\n _this.outboundOptions.sendVideo = false;\n _this.requestCameraAccesAux(constraints, callback);\n }\n }\n else {\n _this.requestCameraAccesAux(constraints, callback);\n }\n });\n };\n Stream.prototype.requestCameraAccesAux = function (constraints, callback) {\n var _this = this;\n console.log(constraints);\n navigator.mediaDevices.getUserMedia(constraints)\n .then(function (userStream) {\n _this.cameraAccessSuccess(userStream, callback);\n })[\"catch\"](function (error) {\n _this.accessIsDenied = true;\n _this.accessIsAllowed = false;\n var errorName;\n var errorMessage = error.toString();\n ;\n if (!_this.isScreenRequested) {\n errorName = _this.outboundOptions.sendVideo ? \"CAMERA_ACCESS_DENIED\" /* CAMERA_ACCESS_DENIED */ : \"MICROPHONE_ACCESS_DENIED\" /* MICROPHONE_ACCESS_DENIED */;\n }\n else {\n errorName = \"SCREEN_CAPTURE_DENIED\" /* SCREEN_CAPTURE_DENIED */; // This code is only reachable for Firefox\n }\n callback(new OpenViduError_1.OpenViduError(errorName, errorMessage), undefined);\n });\n };\n Stream.prototype.cameraAccessSuccess = function (userStream, callback) {\n this.accessIsAllowed = true;\n this.accessIsDenied = false;\n this.ee.emitEvent('access-allowed-by-publisher');\n if (userStream.getAudioTracks()[0] != null) {\n userStream.getAudioTracks()[0].enabled = this.outboundOptions.activeAudio;\n }\n if (userStream.getVideoTracks()[0] != null) {\n userStream.getVideoTracks()[0].enabled = this.outboundOptions.activeVideo;\n }\n this.mediaStream = userStream;\n this.ee.emitEvent('mediastream-updated');\n callback(undefined, this);\n };\n Stream.prototype.userMediaHasVideo = function (callback) {\n // If the user is going to publish its screen there's a video source\n if (this.isScreenRequested) {\n callback(true);\n return;\n }\n else {\n // List all input devices and serach for a video kind\n navigator.mediaDevices.enumerateDevices().then(function (mediaDevices) {\n var videoInput = mediaDevices.filter(function (deviceInfo) {\n return deviceInfo.kind === 'videoinput';\n })[0];\n callback(videoInput != null);\n });\n }\n };\n Stream.prototype.publishVideoCallback = function (error, sdpOfferParam, wp) {\n var _this = this;\n if (error) {\n return console.error(\"(publish) SDP offer error: \"\n + JSON.stringify(error));\n }\n console.debug(\"Sending SDP offer to publish as \"\n + this.streamId, sdpOfferParam);\n this.openVidu.sendRequest(\"publishVideo\", {\n sdpOffer: sdpOfferParam,\n doLoopback: this.displayMyRemote() || false,\n audioActive: this.outboundOptions.sendAudio,\n videoActive: this.outboundOptions.sendVideo,\n typeOfVideo: ((this.outboundOptions.sendVideo) ? ((this.isScreenRequested) ? 'SCREEN' : 'CAMERA') : '')\n }, function (error, response) {\n if (error) {\n console.error(\"Error on publishVideo: \" + JSON.stringify(error));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer);\n console.info(\"'Publisher' succesfully published to session\");\n }\n });\n };\n Stream.prototype.startVideoCallback = function (error, sdpOfferParam, wp) {\n var _this = this;\n if (error) {\n return console.error(\"(subscribe) SDP offer error: \"\n + JSON.stringify(error));\n }\n console.debug(\"Sending SDP offer to subscribe to \"\n + this.streamId, sdpOfferParam);\n this.openVidu.sendRequest(\"receiveVideoFrom\", {\n sender: this.streamId,\n sdpOffer: sdpOfferParam\n }, function (error, response) {\n if (error) {\n console.error(\"Error on recvVideoFrom: \" + JSON.stringify(error));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer);\n }\n });\n };\n Stream.prototype.initWebRtcPeer = function (sdpOfferCallback) {\n var _this = this;\n if (this.local) {\n var userMediaConstraints = {\n audio: this.outboundOptions.sendAudio,\n video: this.outboundOptions.sendVideo\n };\n var options = {\n videoStream: this.mediaStream,\n mediaConstraints: userMediaConstraints,\n onicecandidate: this.connection.sendIceCandidate.bind(this.connection)\n };\n if (this.outboundOptions.dataChannel) {\n options.dataChannelConfig = {\n id: this.getChannelName(),\n onopen: this.onDataChannelOpen,\n onclose: this.onDataChannelClosed\n };\n options.dataChannels = true;\n }\n if (this.displayMyRemote()) {\n this.wp = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (error) {\n if (error) {\n return console.error(error);\n }\n _this.wp.generateOffer(sdpOfferCallback.bind(_this));\n });\n }\n else {\n this.wp = kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) {\n if (error) {\n return console.error(error);\n }\n _this.wp.generateOffer(sdpOfferCallback.bind(_this));\n });\n }\n this.isPublisherPublished = true;\n this.ee.emitEvent('stream-created-by-publisher');\n }\n else {\n var offerConstraints = {\n audio: this.inboundOptions.recvAudio,\n video: this.inboundOptions.recvVideo\n };\n console.debug(\"'Session.subscribe(Stream)' called. Constraints of generate SDP offer\", offerConstraints);\n var options = {\n onicecandidate: this.connection.sendIceCandidate.bind(this.connection),\n mediaConstraints: offerConstraints\n };\n this.wp = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) {\n if (error) {\n return console.error(error);\n }\n _this.wp.generateOffer(sdpOfferCallback.bind(_this));\n });\n }\n console.debug(\"Waiting for SDP offer to be generated (\"\n + (this.local ? \"local\" : \"remote\") + \" 'Stream': \" + this.streamId + \")\");\n };\n Stream.prototype.publish = function () {\n var _this = this;\n // FIXME: Throw error when stream is not local\n if (this.isReadyToPublish) {\n this.initWebRtcPeer(this.publishVideoCallback);\n }\n else {\n this.ee.once('stream-ready', function (streamEvent) {\n _this.publish();\n });\n }\n // FIXME: Now we have coupled connecting to a room and adding a\n // stream to this room. But in the new API, there are two steps.\n // This is the second step. For now, it do nothing.\n };\n Stream.prototype.subscribe = function () {\n // FIXME: In the current implementation all participants are subscribed\n // automatically to all other participants. We use this method only to\n // negotiate SDP\n this.initWebRtcPeer(this.startVideoCallback);\n };\n Stream.prototype.processSdpAnswer = function (sdpAnswer) {\n var _this = this;\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n console.debug(this.streamId + \": set peer connection with recvd SDP answer\", sdpAnswer);\n var participantId = this.streamId;\n var pc = this.wp.peerConnection;\n pc.setRemoteDescription(answer, function () {\n // Avoids to subscribe to your own stream remotely \n // except when showMyRemote is true\n if (!_this.local || _this.displayMyRemote()) {\n _this.mediaStream = pc.getRemoteStreams()[0];\n console.debug(\"Peer remote stream\", _this.mediaStream);\n if (_this.mediaStream != undefined) {\n _this.ee.emitEvent('mediastream-updated');\n if (_this.mediaStream.getAudioTracks()[0] != null) {\n _this.speechEvent = kurentoUtils.WebRtcPeer.hark(_this.mediaStream, { threshold: _this.room.thresholdSpeaker });\n _this.speechEvent.on('speaking', function () {\n //this.room.addParticipantSpeaking(participantId);\n _this.room.emitEvent('publisherStartSpeaking', [{\n connection: _this.connection,\n streamId: _this.streamId\n }]);\n });\n _this.speechEvent.on('stopped_speaking', function () {\n //this.room.removeParticipantSpeaking(participantId);\n _this.room.emitEvent('publisherStopSpeaking', [{\n connection: _this.connection,\n streamId: _this.streamId\n }]);\n });\n }\n }\n if (!!_this.video) {\n // let thumbnailId = this.video.thumb;\n _this.video.oncanplay = function () {\n if (_this.local && _this.displayMyRemote()) {\n console.info(\"Your own remote 'Stream' with id [\" + _this.streamId + \"] video is now playing\");\n _this.ee.emitEvent('remote-video-is-playing', [{\n element: _this.video\n }]);\n }\n else if (!_this.local && !_this.displayMyRemote()) {\n console.info(\"Remote 'Stream' with id [\" + _this.streamId + \"] video is now playing\");\n _this.ee.emitEvent('video-is-playing', [{\n element: _this.video\n }]);\n }\n //show(thumbnailId);\n //this.hideSpinner(this.streamId);\n };\n }\n _this.room.emitEvent('stream-subscribed', [{\n stream: _this\n }]);\n }\n _this.initWebRtcStats();\n }, function (error) {\n console.error(_this.streamId + \": Error setting SDP to the peer connection: \"\n + JSON.stringify(error));\n });\n };\n Stream.prototype.unpublish = function () {\n if (this.wp) {\n this.wp.dispose();\n }\n else {\n if (this.mediaStream) {\n this.mediaStream.getAudioTracks().forEach(function (track) {\n track.stop && track.stop();\n });\n this.mediaStream.getVideoTracks().forEach(function (track) {\n track.stop && track.stop();\n });\n }\n }\n if (this.speechEvent) {\n this.speechEvent.stop();\n }\n console.info(this.streamId + \": Stream '\" + this.streamId + \"' unpublished\");\n };\n Stream.prototype.dispose = function () {\n function disposeElement(element) {\n if (element && element.parentNode) {\n element.parentNode.removeChild(element);\n }\n }\n disposeElement(\"progress-\" + this.streamId);\n if (this.wp) {\n this.wp.dispose();\n }\n else {\n if (this.mediaStream) {\n this.mediaStream.getAudioTracks().forEach(function (track) {\n track.stop && track.stop();\n });\n this.mediaStream.getVideoTracks().forEach(function (track) {\n track.stop && track.stop();\n });\n }\n }\n if (this.speechEvent) {\n this.speechEvent.stop();\n }\n this.stopWebRtcStats();\n console.info((this.local ? \"Local \" : \"Remote \") + \"'Stream' with id [\" + this.streamId + \"]' has been succesfully disposed\");\n };\n Stream.prototype.configureScreenOptions = function (options) {\n this.outboundOptions = options;\n this.streamId = \"SCREEN\";\n };\n Stream.prototype.initWebRtcStats = function () {\n this.webRtcStats = new WebRtcStats_1.WebRtcStats(this);\n this.webRtcStats.initWebRtcStats();\n };\n Stream.prototype.stopWebRtcStats = function () {\n if (this.webRtcStats != null && this.webRtcStats.isEnabled()) {\n this.webRtcStats.stopWebRtcStats();\n }\n };\n return Stream;\n}());\nexports.Stream = Stream;\n//# sourceMappingURL=Stream.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Stream.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Stream.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar DetectRTC = require(\"../KurentoUtils/DetectRTC\");\nvar WebRtcStats = /** @class */ (function () {\n function WebRtcStats(stream) {\n this.stream = stream;\n this.webRtcStatsEnabled = false;\n this.statsInterval = 1;\n this.stats = {\n \"inbound\": {\n \"audio\": {\n \"bytesReceived\": 0,\n \"packetsReceived\": 0,\n \"packetsLost\": 0\n },\n \"video\": {\n \"bytesReceived\": 0,\n \"packetsReceived\": 0,\n \"packetsLost\": 0,\n \"framesDecoded\": 0,\n \"nackCount\": 0\n }\n },\n \"outbound\": {\n \"audio\": {\n \"bytesSent\": 0,\n \"packetsSent\": 0\n },\n \"video\": {\n \"bytesSent\": 0,\n \"packetsSent\": 0,\n \"framesEncoded\": 0,\n \"nackCount\": 0\n }\n }\n };\n }\n WebRtcStats.prototype.isEnabled = function () {\n return this.webRtcStatsEnabled;\n };\n WebRtcStats.prototype.initWebRtcStats = function () {\n var _this = this;\n var elastestInstrumentation = localStorage.getItem('elastest-instrumentation');\n if (elastestInstrumentation) {\n // ElasTest instrumentation object found in local storage\n console.warn(\"WebRtc stats enabled for stream \" + this.stream.streamId + \" of connection \" + this.stream.connection.connectionId);\n this.webRtcStatsEnabled = true;\n var instrumentation_1 = JSON.parse(elastestInstrumentation);\n this.statsInterval = instrumentation_1.webrtc.interval; // Interval in seconds\n console.warn(\"localStorage item: \" + JSON.stringify(instrumentation_1));\n this.webRtcStatsIntervalId = setInterval(function () {\n _this.sendStatsToHttpEndpoint(instrumentation_1);\n }, this.statsInterval * 1000);\n return;\n }\n console.debug(\"WebRtc stats not enabled\");\n };\n WebRtcStats.prototype.stopWebRtcStats = function () {\n if (this.webRtcStatsEnabled) {\n clearInterval(this.webRtcStatsIntervalId);\n console.warn(\"WebRtc stats stopped for disposed stream \" + this.stream.streamId + \" of connection \" + this.stream.connection.connectionId);\n }\n };\n WebRtcStats.prototype.sendStatsToHttpEndpoint = function (instrumentation) {\n var _this = this;\n var sendPost = function (json) {\n var http = new XMLHttpRequest();\n var url = instrumentation.webrtc.httpEndpoint;\n http.open(\"POST\", url, true);\n http.setRequestHeader(\"Content-type\", \"application/json\");\n http.onreadystatechange = function () {\n if (http.readyState == 4 && http.status == 200) {\n console.log(\"WebRtc stats succesfully sent to \" + url + \" for stream \" + _this.stream.streamId + \" of connection \" + _this.stream.connection.connectionId);\n }\n };\n http.send(json);\n };\n var f = function (stats) {\n if (DetectRTC.browser.name === 'Firefox') {\n stats.forEach(function (stat) {\n var json = {};\n if ((stat.type === 'inbound-rtp') &&\n (\n // Avoid firefox empty outbound-rtp statistics\n stat.nackCount != null &&\n stat.isRemote === false &&\n stat.id.startsWith('inbound') &&\n stat.remoteId.startsWith('inbound'))) {\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var jitter = stat.jitter * 1000;\n var metrics = {\n \"bytesReceived\": (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n \"jitter\": jitter,\n \"packetsReceived\": (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n \"packetsLost\": (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n \"bytesReceived\": \"bytes\",\n \"jitter\": \"ms\",\n \"packetsReceived\": \"packets\",\n \"packetsLost\": \"packets\"\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.nackCount - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = \"frames\";\n units['nackCount'] = \"packets\";\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.nackCount;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n \"@timestamp\": new Date(stat.timestamp).toISOString(),\n \"exec\": instrumentation.exec,\n \"component\": instrumentation.component,\n \"stream\": \"webRtc\",\n \"type\": metricId,\n \"stream_type\": \"composed_metrics\",\n \"units\": units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ((stat.type === 'outbound-rtp') &&\n (\n // Avoid firefox empty inbound-rtp statistics\n stat.isRemote === false &&\n stat.id.toLowerCase().includes('outbound'))) {\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n \"bytesSent\": (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n \"packetsSent\": (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n \"bytesSent\": \"bytes\",\n \"packetsSent\": \"packets\"\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = \"frames\";\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n \"@timestamp\": new Date(stat.timestamp).toISOString(),\n \"exec\": instrumentation.exec,\n \"component\": instrumentation.component,\n \"stream\": \"webRtc\",\n \"type\": metricId,\n \"stream_type\": \"composed_metrics\",\n \"units\": units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n });\n }\n else if (DetectRTC.browser.name === 'Chrome') {\n for (var _i = 0, _a = Object.keys(stats); _i < _a.length; _i++) {\n var key = _a[_i];\n var stat = stats[key];\n if (stat.type === 'ssrc') {\n var json = {};\n if ('bytesReceived' in stat && ((stat.mediaType === 'audio' && 'audioOutputLevel' in stat) ||\n (stat.mediaType === 'video' && 'qpSum' in stat))) {\n // inbound-rtp\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n \"bytesReceived\": (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n \"jitter\": stat.googJitterBufferMs,\n \"packetsReceived\": (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n \"packetsLost\": (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n \"bytesReceived\": \"bytes\",\n \"jitter\": \"ms\",\n \"packetsReceived\": \"packets\",\n \"packetsLost\": \"packets\"\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.googNacksSent - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = \"frames\";\n units['nackCount'] = \"packets\";\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.googNacksSent;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n \"@timestamp\": new Date(stat.timestamp).toISOString(),\n \"exec\": instrumentation.exec,\n \"component\": instrumentation.component,\n \"stream\": \"webRtc\",\n \"type\": metricId,\n \"stream_type\": \"composed_metrics\",\n \"units\": units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ('bytesSent' in stat) {\n // outbound-rtp\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n \"bytesSent\": (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n \"packetsSent\": (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n \"bytesSent\": \"bytes\",\n \"packetsSent\": \"packets\"\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = \"frames\";\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n \"@timestamp\": new Date(stat.timestamp).toISOString(),\n \"exec\": instrumentation.exec,\n \"component\": instrumentation.component,\n \"stream\": \"webRtc\",\n \"type\": metricId,\n \"stream_type\": \"composed_metrics\",\n \"units\": units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n }\n }\n }\n };\n this.getStatsAgnostic(this.stream.getRTCPeerConnection(), null, f, function (error) { console.log(error); });\n };\n WebRtcStats.prototype.standardizeReport = function (response) {\n if (DetectRTC.browser.name === 'Firefox') {\n return response;\n }\n var standardReport = {};\n response.result().forEach(function (report) {\n var standardStats = {\n id: report.id,\n timestamp: report.timestamp,\n type: report.type\n };\n report.names().forEach(function (name) {\n standardStats[name] = report.stat(name);\n });\n standardReport[standardStats.id] = standardStats;\n });\n return standardReport;\n };\n WebRtcStats.prototype.getStatsAgnostic = function (pc, selector, successCb, failureCb) {\n var _this = this;\n if (DetectRTC.browser.name === 'Firefox') {\n // getStats takes args in different order in Chrome and Firefox\n return pc.getStats(selector, function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, failureCb);\n }\n else if (DetectRTC.browser.name === 'Chrome') {\n // In Chrome, the first two arguments are reversed\n return pc.getStats(function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, selector, failureCb);\n }\n };\n return WebRtcStats;\n}());\nexports.WebRtcStats = WebRtcStats;\n//# sourceMappingURL=WebRtcStats.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/WebRtcStats.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/WebRtcStats.js\n// module chunks = main","// Last time updated at Feb 16, 2017, 08:32:23\n// Latest file can be found here: https://cdn.webrtc-experiment.com/getScreenId.js\n// Muaz Khan - www.MuazKhan.com\n// MIT License - www.WebRTC-Experiment.com/licence\n// Documentation - https://github.com/muaz-khan/getScreenId.\n// ______________\n// getScreenId.js\n/*\ngetScreenId(function (error, sourceId, screen_constraints) {\n // error == null || 'permission-denied' || 'not-installed' || 'installed-disabled' || 'not-chrome'\n // sourceId == null || 'string' || 'firefox'\n \n if(sourceId == 'firefox') {\n navigator.mozGetUserMedia(screen_constraints, onSuccess, onFailure);\n }\n else navigator.webkitGetUserMedia(screen_constraints, onSuccess, onFailure);\n});\n*/\nwindow.getScreenId = function (callback) {\n // for Firefox:\n // sourceId == 'firefox'\n // screen_constraints = {...}\n if (!!navigator.mozGetUserMedia) {\n callback(null, 'firefox', {\n video: {\n mozMediaSource: 'window',\n mediaSource: 'window'\n }\n });\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeMediaSourceId) {\n if (event.data.chromeMediaSourceId === 'PermissionDeniedError') {\n callback('permission-denied');\n }\n else\n callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId));\n }\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus));\n }\n // this event listener is no more needed\n window.removeEventListener('message', onIFrameCallback);\n }\n setTimeout(postGetSourceIdMessage, 100);\n};\nfunction getScreenConstraints(error, sourceId) {\n var screen_constraints = {\n audio: false,\n video: {\n mandatory: {\n chromeMediaSource: error ? 'screen' : 'desktop',\n maxWidth: window.screen.width > 1920 ? window.screen.width : 1920,\n maxHeight: window.screen.height > 1080 ? window.screen.height : 1080\n },\n optional: []\n }\n };\n if (sourceId) {\n screen_constraints.video.mandatory.chromeMediaSourceId = sourceId;\n }\n return screen_constraints;\n}\nfunction postGetSourceIdMessage() {\n if (!iframe) {\n loadIFrame(postGetSourceIdMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetSourceIdMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n captureSourceId: true\n }, '*');\n}\nvar iframe;\n// this function is used in RTCMultiConnection v3\nwindow.getScreenConstraints = function (callback) {\n loadIFrame(function () {\n getScreenId(function (error, sourceId, screen_constraints) {\n callback(error, screen_constraints.video);\n });\n });\n};\nfunction loadIFrame(loadCallback) {\n if (iframe) {\n loadCallback();\n return;\n }\n iframe = document.createElement('iframe');\n iframe.onload = function () {\n iframe.isLoaded = true;\n loadCallback();\n };\n iframe.src = 'https://www.webrtc-experiment.com/getSourceId/'; // https://wwww.yourdomain.com/getScreenId.html\n iframe.style.display = 'none';\n (document.body || document.documentElement).appendChild(iframe);\n}\nwindow.getChromeExtensionStatus = function (callback) {\n // for Firefox:\n if (!!navigator.mozGetUserMedia) {\n callback('installed-enabled');\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus);\n }\n // this event listener is no more needed\n window.removeEventListener('message', onIFrameCallback);\n }\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n};\nfunction postGetChromeExtensionStatusMessage() {\n if (!iframe) {\n loadIFrame(postGetChromeExtensionStatusMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n getChromeExtensionStatus: true\n }, '*');\n}\nexports.getScreenId = getScreenId;\nexports.getChromeExtensionStatus = getChromeExtensionStatus;\n//# sourceMappingURL=Screen-Capturing-Auto.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/ScreenSharing/Screen-Capturing-Auto.js\n// module id = ../../../../openvidu-browser/lib/ScreenSharing/Screen-Capturing-Auto.js\n// module chunks = main","/* jshint node: true */\n'use strict';\n\nvar normalice = require('normalice');\n\n/**\n # freeice\n\n The `freeice` module is a simple way of getting random STUN or TURN server\n for your WebRTC application. The list of servers (just STUN at this stage)\n were sourced from this [gist](https://gist.github.com/zziuni/3741933).\n\n ## Example Use\n\n The following demonstrates how you can use `freeice` with\n [rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect):\n\n <<< examples/quickconnect.js\n\n As the `freeice` module generates ice servers in a list compliant with the\n WebRTC spec you will be able to use it with raw `RTCPeerConnection`\n constructors and other WebRTC libraries.\n\n ## Hey, don't use my STUN/TURN server!\n\n If for some reason your free STUN or TURN server ends up in the\n list of servers ([stun](https://github.com/DamonOehlman/freeice/blob/master/stun.json) or\n [turn](https://github.com/DamonOehlman/freeice/blob/master/turn.json))\n that is used in this module, you can feel\n free to open an issue on this repository and those servers will be removed\n within 24 hours (or sooner). This is the quickest and probably the most\n polite way to have something removed (and provides us some visibility\n if someone opens a pull request requesting that a server is added).\n\n ## Please add my server!\n\n If you have a server that you wish to add to the list, that's awesome! I'm\n sure I speak on behalf of a whole pile of WebRTC developers who say thanks.\n To get it into the list, feel free to either open a pull request or if you\n find that process a bit daunting then just create an issue requesting\n the addition of the server (make sure you provide all the details, and if\n you have a Terms of Service then including that in the PR/issue would be\n awesome).\n\n ## I know of a free server, can I add it?\n\n Sure, if you do your homework and make sure it is ok to use (I'm currently\n in the process of reviewing the terms of those STUN servers included from\n the original list). If it's ok to go, then please see the previous entry\n for how to add it.\n\n ## Current List of Servers\n\n * current as at the time of last `README.md` file generation\n\n ### STUN\n\n <<< stun.json\n\n ### TURN\n\n <<< turn.json\n\n**/\n\nvar freeice = module.exports = function(opts) {\n // if a list of servers has been provided, then use it instead of defaults\n var servers = {\n stun: (opts || {}).stun || require('./stun.json'),\n turn: (opts || {}).turn || require('./turn.json')\n };\n\n var stunCount = (opts || {}).stunCount || 2;\n var turnCount = (opts || {}).turnCount || 0;\n var selected;\n\n function getServers(type, count) {\n var out = [];\n var input = [].concat(servers[type]);\n var idx;\n\n while (input.length && out.length < count) {\n idx = (Math.random() * input.length) | 0;\n out = out.concat(input.splice(idx, 1));\n }\n\n return out.map(function(url) {\n //If it's a not a string, don't try to \"normalice\" it otherwise using type:url will screw it up\n if ((typeof url !== 'string') && (! (url instanceof String))) {\n return url;\n } else {\n return normalice(type + ':' + url);\n }\n });\n }\n\n // add stun servers\n selected = [].concat(getServers('stun', stunCount));\n\n if (turnCount) {\n selected = selected.concat(getServers('turn', turnCount));\n }\n\n return selected;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/index.js\n// module id = ../../../../openvidu-browser/node_modules/freeice/index.js\n// module chunks = main","module.exports = [\"stun.l.google.com:19302\",\"stun1.l.google.com:19302\",\"stun2.l.google.com:19302\",\"stun3.l.google.com:19302\",\"stun4.l.google.com:19302\",\"stun.ekiga.net\",\"stun.ideasip.com\",\"stun.schlund.de\",\"stun.stunprotocol.org:3478\",\"stun.voiparound.com\",\"stun.voipbuster.com\",\"stun.voipstunt.com\",\"stun.voxgratia.org\",\"stun.services.mozilla.com\"]\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/stun.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/stun.json\n// module chunks = main","module.exports = []\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/turn.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/turn.json\n// module chunks = main","var WildEmitter = require('wildemitter');\n\nfunction getMaxVolume (analyser, fftBins) {\n var maxVolume = -Infinity;\n analyser.getFloatFrequencyData(fftBins);\n\n for(var i=4, ii=fftBins.length; i < ii; i++) {\n if (fftBins[i] > maxVolume && fftBins[i] < 0) {\n maxVolume = fftBins[i];\n }\n };\n\n return maxVolume;\n}\n\n\nvar audioContextType;\nif (typeof window !== 'undefined') {\n audioContextType = window.AudioContext || window.webkitAudioContext;\n}\n// use a single audio context due to hardware limits\nvar audioContext = null;\nmodule.exports = function(stream, options) {\n var harker = new WildEmitter();\n\n\n // make it not break in non-supported browsers\n if (!audioContextType) return harker;\n\n //Config\n var options = options || {},\n smoothing = (options.smoothing || 0.1),\n interval = (options.interval || 50),\n threshold = options.threshold,\n play = options.play,\n history = options.history || 10,\n running = true;\n\n //Setup Audio Context\n if (!audioContext) {\n audioContext = new audioContextType();\n }\n var sourceNode, fftBins, analyser;\n\n analyser = audioContext.createAnalyser();\n analyser.fftSize = 512;\n analyser.smoothingTimeConstant = smoothing;\n fftBins = new Float32Array(analyser.frequencyBinCount);\n\n if (stream.jquery) stream = stream[0];\n if (stream instanceof HTMLAudioElement || stream instanceof HTMLVideoElement) {\n //Audio Tag\n sourceNode = audioContext.createMediaElementSource(stream);\n if (typeof play === 'undefined') play = true;\n threshold = threshold || -50;\n } else {\n //WebRTC Stream\n sourceNode = audioContext.createMediaStreamSource(stream);\n threshold = threshold || -50;\n }\n\n sourceNode.connect(analyser);\n if (play) analyser.connect(audioContext.destination);\n\n harker.speaking = false;\n\n harker.setThreshold = function(t) {\n threshold = t;\n };\n\n harker.setInterval = function(i) {\n interval = i;\n };\n\n harker.stop = function() {\n running = false;\n harker.emit('volume_change', -100, threshold);\n if (harker.speaking) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n analyser.disconnect();\n sourceNode.disconnect();\n };\n harker.speakingHistory = [];\n for (var i = 0; i < history; i++) {\n harker.speakingHistory.push(0);\n }\n\n // Poll the analyser node to determine if speaking\n // and emit events if changed\n var looper = function() {\n setTimeout(function() {\n\n //check if stop has been called\n if(!running) {\n return;\n }\n\n var currentVolume = getMaxVolume(analyser, fftBins);\n\n harker.emit('volume_change', currentVolume, threshold);\n\n var history = 0;\n if (currentVolume > threshold && !harker.speaking) {\n // trigger quickly, short history\n for (var i = harker.speakingHistory.length - 3; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history >= 2) {\n harker.speaking = true;\n harker.emit('speaking');\n }\n } else if (currentVolume < threshold && harker.speaking) {\n for (var i = 0; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history == 0) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n }\n harker.speakingHistory.shift();\n harker.speakingHistory.push(0 + (currentVolume > threshold));\n\n looper();\n }, interval);\n };\n looper();\n\n\n return harker;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/hark/hark.js\n// module id = ../../../../openvidu-browser/node_modules/hark/hark.js\n// module chunks = main","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/inherits/inherits_browser.js\n// module id = ../../../../openvidu-browser/node_modules/inherits/inherits_browser.js\n// module chunks = main","/*!\r\n * @name JavaScript/NodeJS Merge v1.2.0\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\r\n\r\n;(function(isNode) {\r\n\r\n\t/**\r\n\t * Merge one or more objects \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tvar Public = function(clone) {\r\n\r\n\t\treturn merge(clone === true, false, arguments);\r\n\r\n\t}, publicName = 'merge';\r\n\r\n\t/**\r\n\t * Merge two or more objects recursively \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tPublic.recursive = function(clone) {\r\n\r\n\t\treturn merge(clone === true, true, arguments);\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Clone the input removing any reference\r\n\t * @param mixed input\r\n\t * @return mixed\r\n\t */\r\n\r\n\tPublic.clone = function(input) {\r\n\r\n\t\tvar output = input,\r\n\t\t\ttype = typeOf(input),\r\n\t\t\tindex, size;\r\n\r\n\t\tif (type === 'array') {\r\n\r\n\t\t\toutput = [];\r\n\t\t\tsize = input.length;\r\n\r\n\t\t\tfor (index=0;index 1) {\n url = parts[1];\n parts = parts[0].split(':');\n\n // add the output credential and username\n output.username = parts[0];\n output.credential = (input || {}).credential || parts[1] || '';\n }\n\n output.url = protocol + url;\n output.urls = [ output.url ];\n\n return output;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/normalice/index.js\n// module id = ../../../../openvidu-browser/node_modules/normalice/index.js\n// module chunks = main","/*\n * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar SDPUtils = require('sdp');\n\nfunction writeMediaSection(transceiver, caps, type, stream, dtlsRole) {\n var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);\n\n // Map ICE parameters (ufrag, pwd) to SDP.\n sdp += SDPUtils.writeIceParameters(\n transceiver.iceGatherer.getLocalParameters());\n\n // Map DTLS parameters to SDP.\n sdp += SDPUtils.writeDtlsParameters(\n transceiver.dtlsTransport.getLocalParameters(),\n type === 'offer' ? 'actpass' : dtlsRole || 'active');\n\n sdp += 'a=mid:' + transceiver.mid + '\\r\\n';\n\n if (transceiver.rtpSender && transceiver.rtpReceiver) {\n sdp += 'a=sendrecv\\r\\n';\n } else if (transceiver.rtpSender) {\n sdp += 'a=sendonly\\r\\n';\n } else if (transceiver.rtpReceiver) {\n sdp += 'a=recvonly\\r\\n';\n } else {\n sdp += 'a=inactive\\r\\n';\n }\n\n if (transceiver.rtpSender) {\n var trackId = transceiver.rtpSender._initialTrackId ||\n transceiver.rtpSender.track.id;\n transceiver.rtpSender._initialTrackId = trackId;\n // spec.\n var msid = 'msid:' + (stream ? stream.id : '-') + ' ' +\n trackId + '\\r\\n';\n sdp += 'a=' + msid;\n // for Chrome. Legacy should no longer be required.\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc +\n ' ' + msid;\n\n // RTX\n if (transceiver.sendEncodingParameters[0].rtx) {\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +\n ' ' + msid;\n sdp += 'a=ssrc-group:FID ' +\n transceiver.sendEncodingParameters[0].ssrc + ' ' +\n transceiver.sendEncodingParameters[0].rtx.ssrc +\n '\\r\\n';\n }\n }\n // FIXME: this should be written by writeRtpDescription.\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc +\n ' cname:' + SDPUtils.localCName + '\\r\\n';\n if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) {\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +\n ' cname:' + SDPUtils.localCName + '\\r\\n';\n }\n return sdp;\n}\n\n// Edge does not like\n// 1) stun: filtered after 14393 unless ?transport=udp is present\n// 2) turn: that does not have all of turn:host:port?transport=udp\n// 3) turn: with ipv6 addresses\n// 4) turn: occurring muliple times\nfunction filterIceServers(iceServers, edgeVersion) {\n var hasTurn = false;\n iceServers = JSON.parse(JSON.stringify(iceServers));\n return iceServers.filter(function(server) {\n if (server && (server.urls || server.url)) {\n var urls = server.urls || server.url;\n if (server.url && !server.urls) {\n console.warn('RTCIceServer.url is deprecated! Use urls instead.');\n }\n var isString = typeof urls === 'string';\n if (isString) {\n urls = [urls];\n }\n urls = urls.filter(function(url) {\n var validTurn = url.indexOf('turn:') === 0 &&\n url.indexOf('transport=udp') !== -1 &&\n url.indexOf('turn:[') === -1 &&\n !hasTurn;\n\n if (validTurn) {\n hasTurn = true;\n return true;\n }\n return url.indexOf('stun:') === 0 && edgeVersion >= 14393 &&\n url.indexOf('?transport=udp') === -1;\n });\n\n delete server.url;\n server.urls = isString ? urls[0] : urls;\n return !!urls.length;\n }\n });\n}\n\n// Determines the intersection of local and remote capabilities.\nfunction getCommonCapabilities(localCapabilities, remoteCapabilities) {\n var commonCapabilities = {\n codecs: [],\n headerExtensions: [],\n fecMechanisms: []\n };\n\n var findCodecByPayloadType = function(pt, codecs) {\n pt = parseInt(pt, 10);\n for (var i = 0; i < codecs.length; i++) {\n if (codecs[i].payloadType === pt ||\n codecs[i].preferredPayloadType === pt) {\n return codecs[i];\n }\n }\n };\n\n var rtxCapabilityMatches = function(lRtx, rRtx, lCodecs, rCodecs) {\n var lCodec = findCodecByPayloadType(lRtx.parameters.apt, lCodecs);\n var rCodec = findCodecByPayloadType(rRtx.parameters.apt, rCodecs);\n return lCodec && rCodec &&\n lCodec.name.toLowerCase() === rCodec.name.toLowerCase();\n };\n\n localCapabilities.codecs.forEach(function(lCodec) {\n for (var i = 0; i < remoteCapabilities.codecs.length; i++) {\n var rCodec = remoteCapabilities.codecs[i];\n if (lCodec.name.toLowerCase() === rCodec.name.toLowerCase() &&\n lCodec.clockRate === rCodec.clockRate) {\n if (lCodec.name.toLowerCase() === 'rtx' &&\n lCodec.parameters && rCodec.parameters.apt) {\n // for RTX we need to find the local rtx that has a apt\n // which points to the same local codec as the remote one.\n if (!rtxCapabilityMatches(lCodec, rCodec,\n localCapabilities.codecs, remoteCapabilities.codecs)) {\n continue;\n }\n }\n rCodec = JSON.parse(JSON.stringify(rCodec)); // deepcopy\n // number of channels is the highest common number of channels\n rCodec.numChannels = Math.min(lCodec.numChannels,\n rCodec.numChannels);\n // push rCodec so we reply with offerer payload type\n commonCapabilities.codecs.push(rCodec);\n\n // determine common feedback mechanisms\n rCodec.rtcpFeedback = rCodec.rtcpFeedback.filter(function(fb) {\n for (var j = 0; j < lCodec.rtcpFeedback.length; j++) {\n if (lCodec.rtcpFeedback[j].type === fb.type &&\n lCodec.rtcpFeedback[j].parameter === fb.parameter) {\n return true;\n }\n }\n return false;\n });\n // FIXME: also need to determine .parameters\n // see https://github.com/openpeer/ortc/issues/569\n break;\n }\n }\n });\n\n localCapabilities.headerExtensions.forEach(function(lHeaderExtension) {\n for (var i = 0; i < remoteCapabilities.headerExtensions.length;\n i++) {\n var rHeaderExtension = remoteCapabilities.headerExtensions[i];\n if (lHeaderExtension.uri === rHeaderExtension.uri) {\n commonCapabilities.headerExtensions.push(rHeaderExtension);\n break;\n }\n }\n });\n\n // FIXME: fecMechanisms\n return commonCapabilities;\n}\n\n// is action=setLocalDescription with type allowed in signalingState\nfunction isActionAllowedInSignalingState(action, type, signalingState) {\n return {\n offer: {\n setLocalDescription: ['stable', 'have-local-offer'],\n setRemoteDescription: ['stable', 'have-remote-offer']\n },\n answer: {\n setLocalDescription: ['have-remote-offer', 'have-local-pranswer'],\n setRemoteDescription: ['have-local-offer', 'have-remote-pranswer']\n }\n }[type][action].indexOf(signalingState) !== -1;\n}\n\nfunction maybeAddCandidate(iceTransport, candidate) {\n // Edge's internal representation adds some fields therefore\n // not all fieldѕ are taken into account.\n var alreadyAdded = iceTransport.getRemoteCandidates()\n .find(function(remoteCandidate) {\n return candidate.foundation === remoteCandidate.foundation &&\n candidate.ip === remoteCandidate.ip &&\n candidate.port === remoteCandidate.port &&\n candidate.priority === remoteCandidate.priority &&\n candidate.protocol === remoteCandidate.protocol &&\n candidate.type === remoteCandidate.type;\n });\n if (!alreadyAdded) {\n iceTransport.addRemoteCandidate(candidate);\n }\n return !alreadyAdded;\n}\n\n\nfunction makeError(name, description) {\n var e = new Error(description);\n e.name = name;\n // legacy error codes from https://heycam.github.io/webidl/#idl-DOMException-error-names\n e.code = {\n NotSupportedError: 9,\n InvalidStateError: 11,\n InvalidAccessError: 15,\n TypeError: undefined,\n OperationError: undefined\n }[name];\n return e;\n}\n\nmodule.exports = function(window, edgeVersion) {\n // https://w3c.github.io/mediacapture-main/#mediastream\n // Helper function to add the track to the stream and\n // dispatch the event ourselves.\n function addTrackToStreamAndFireEvent(track, stream) {\n stream.addTrack(track);\n stream.dispatchEvent(new window.MediaStreamTrackEvent('addtrack',\n {track: track}));\n }\n\n function removeTrackFromStreamAndFireEvent(track, stream) {\n stream.removeTrack(track);\n stream.dispatchEvent(new window.MediaStreamTrackEvent('removetrack',\n {track: track}));\n }\n\n function fireAddTrack(pc, track, receiver, streams) {\n var trackEvent = new Event('track');\n trackEvent.track = track;\n trackEvent.receiver = receiver;\n trackEvent.transceiver = {receiver: receiver};\n trackEvent.streams = streams;\n window.setTimeout(function() {\n pc._dispatchEvent('track', trackEvent);\n });\n }\n\n var RTCPeerConnection = function(config) {\n var pc = this;\n\n var _eventTarget = document.createDocumentFragment();\n ['addEventListener', 'removeEventListener', 'dispatchEvent']\n .forEach(function(method) {\n pc[method] = _eventTarget[method].bind(_eventTarget);\n });\n\n this.canTrickleIceCandidates = null;\n\n this.needNegotiation = false;\n\n this.localStreams = [];\n this.remoteStreams = [];\n\n this.localDescription = null;\n this.remoteDescription = null;\n\n this.signalingState = 'stable';\n this.iceConnectionState = 'new';\n this.connectionState = 'new';\n this.iceGatheringState = 'new';\n\n config = JSON.parse(JSON.stringify(config || {}));\n\n this.usingBundle = config.bundlePolicy === 'max-bundle';\n if (config.rtcpMuxPolicy === 'negotiate') {\n throw(makeError('NotSupportedError',\n 'rtcpMuxPolicy \\'negotiate\\' is not supported'));\n } else if (!config.rtcpMuxPolicy) {\n config.rtcpMuxPolicy = 'require';\n }\n\n switch (config.iceTransportPolicy) {\n case 'all':\n case 'relay':\n break;\n default:\n config.iceTransportPolicy = 'all';\n break;\n }\n\n switch (config.bundlePolicy) {\n case 'balanced':\n case 'max-compat':\n case 'max-bundle':\n break;\n default:\n config.bundlePolicy = 'balanced';\n break;\n }\n\n config.iceServers = filterIceServers(config.iceServers || [], edgeVersion);\n\n this._iceGatherers = [];\n if (config.iceCandidatePoolSize) {\n for (var i = config.iceCandidatePoolSize; i > 0; i--) {\n this._iceGatherers.push(new window.RTCIceGatherer({\n iceServers: config.iceServers,\n gatherPolicy: config.iceTransportPolicy\n }));\n }\n } else {\n config.iceCandidatePoolSize = 0;\n }\n\n this._config = config;\n\n // per-track iceGathers, iceTransports, dtlsTransports, rtpSenders, ...\n // everything that is needed to describe a SDP m-line.\n this.transceivers = [];\n\n this._sdpSessionId = SDPUtils.generateSessionId();\n this._sdpSessionVersion = 0;\n\n this._dtlsRole = undefined; // role for a=setup to use in answers.\n\n this._isClosed = false;\n };\n\n // set up event handlers on prototype\n RTCPeerConnection.prototype.onicecandidate = null;\n RTCPeerConnection.prototype.onaddstream = null;\n RTCPeerConnection.prototype.ontrack = null;\n RTCPeerConnection.prototype.onremovestream = null;\n RTCPeerConnection.prototype.onsignalingstatechange = null;\n RTCPeerConnection.prototype.oniceconnectionstatechange = null;\n RTCPeerConnection.prototype.onconnectionstatechange = null;\n RTCPeerConnection.prototype.onicegatheringstatechange = null;\n RTCPeerConnection.prototype.onnegotiationneeded = null;\n RTCPeerConnection.prototype.ondatachannel = null;\n\n RTCPeerConnection.prototype._dispatchEvent = function(name, event) {\n if (this._isClosed) {\n return;\n }\n this.dispatchEvent(event);\n if (typeof this['on' + name] === 'function') {\n this['on' + name](event);\n }\n };\n\n RTCPeerConnection.prototype._emitGatheringStateChange = function() {\n var event = new Event('icegatheringstatechange');\n this._dispatchEvent('icegatheringstatechange', event);\n };\n\n RTCPeerConnection.prototype.getConfiguration = function() {\n return this._config;\n };\n\n RTCPeerConnection.prototype.getLocalStreams = function() {\n return this.localStreams;\n };\n\n RTCPeerConnection.prototype.getRemoteStreams = function() {\n return this.remoteStreams;\n };\n\n // internal helper to create a transceiver object.\n // (which is not yet the same as the WebRTC 1.0 transceiver)\n RTCPeerConnection.prototype._createTransceiver = function(kind, doNotAdd) {\n var hasBundleTransport = this.transceivers.length > 0;\n var transceiver = {\n track: null,\n iceGatherer: null,\n iceTransport: null,\n dtlsTransport: null,\n localCapabilities: null,\n remoteCapabilities: null,\n rtpSender: null,\n rtpReceiver: null,\n kind: kind,\n mid: null,\n sendEncodingParameters: null,\n recvEncodingParameters: null,\n stream: null,\n associatedRemoteMediaStreams: [],\n wantReceive: true\n };\n if (this.usingBundle && hasBundleTransport) {\n transceiver.iceTransport = this.transceivers[0].iceTransport;\n transceiver.dtlsTransport = this.transceivers[0].dtlsTransport;\n } else {\n var transports = this._createIceAndDtlsTransports();\n transceiver.iceTransport = transports.iceTransport;\n transceiver.dtlsTransport = transports.dtlsTransport;\n }\n if (!doNotAdd) {\n this.transceivers.push(transceiver);\n }\n return transceiver;\n };\n\n RTCPeerConnection.prototype.addTrack = function(track, stream) {\n if (this._isClosed) {\n throw makeError('InvalidStateError',\n 'Attempted to call addTrack on a closed peerconnection.');\n }\n\n var alreadyExists = this.transceivers.find(function(s) {\n return s.track === track;\n });\n\n if (alreadyExists) {\n throw makeError('InvalidAccessError', 'Track already exists.');\n }\n\n var transceiver;\n for (var i = 0; i < this.transceivers.length; i++) {\n if (!this.transceivers[i].track &&\n this.transceivers[i].kind === track.kind) {\n transceiver = this.transceivers[i];\n }\n }\n if (!transceiver) {\n transceiver = this._createTransceiver(track.kind);\n }\n\n this._maybeFireNegotiationNeeded();\n\n if (this.localStreams.indexOf(stream) === -1) {\n this.localStreams.push(stream);\n }\n\n transceiver.track = track;\n transceiver.stream = stream;\n transceiver.rtpSender = new window.RTCRtpSender(track,\n transceiver.dtlsTransport);\n return transceiver.rtpSender;\n };\n\n RTCPeerConnection.prototype.addStream = function(stream) {\n var pc = this;\n if (edgeVersion >= 15025) {\n stream.getTracks().forEach(function(track) {\n pc.addTrack(track, stream);\n });\n } else {\n // Clone is necessary for local demos mostly, attaching directly\n // to two different senders does not work (build 10547).\n // Fixed in 15025 (or earlier)\n var clonedStream = stream.clone();\n stream.getTracks().forEach(function(track, idx) {\n var clonedTrack = clonedStream.getTracks()[idx];\n track.addEventListener('enabled', function(event) {\n clonedTrack.enabled = event.enabled;\n });\n });\n clonedStream.getTracks().forEach(function(track) {\n pc.addTrack(track, clonedStream);\n });\n }\n };\n\n RTCPeerConnection.prototype.removeTrack = function(sender) {\n if (this._isClosed) {\n throw makeError('InvalidStateError',\n 'Attempted to call removeTrack on a closed peerconnection.');\n }\n\n if (!(sender instanceof window.RTCRtpSender)) {\n throw new TypeError('Argument 1 of RTCPeerConnection.removeTrack ' +\n 'does not implement interface RTCRtpSender.');\n }\n\n var transceiver = this.transceivers.find(function(t) {\n return t.rtpSender === sender;\n });\n\n if (!transceiver) {\n throw makeError('InvalidAccessError',\n 'Sender was not created by this connection.');\n }\n var stream = transceiver.stream;\n\n transceiver.rtpSender.stop();\n transceiver.rtpSender = null;\n transceiver.track = null;\n transceiver.stream = null;\n\n // remove the stream from the set of local streams\n var localStreams = this.transceivers.map(function(t) {\n return t.stream;\n });\n if (localStreams.indexOf(stream) === -1 &&\n this.localStreams.indexOf(stream) > -1) {\n this.localStreams.splice(this.localStreams.indexOf(stream), 1);\n }\n\n this._maybeFireNegotiationNeeded();\n };\n\n RTCPeerConnection.prototype.removeStream = function(stream) {\n var pc = this;\n stream.getTracks().forEach(function(track) {\n var sender = pc.getSenders().find(function(s) {\n return s.track === track;\n });\n if (sender) {\n pc.removeTrack(sender);\n }\n });\n };\n\n RTCPeerConnection.prototype.getSenders = function() {\n return this.transceivers.filter(function(transceiver) {\n return !!transceiver.rtpSender;\n })\n .map(function(transceiver) {\n return transceiver.rtpSender;\n });\n };\n\n RTCPeerConnection.prototype.getReceivers = function() {\n return this.transceivers.filter(function(transceiver) {\n return !!transceiver.rtpReceiver;\n })\n .map(function(transceiver) {\n return transceiver.rtpReceiver;\n });\n };\n\n\n RTCPeerConnection.prototype._createIceGatherer = function(sdpMLineIndex,\n usingBundle) {\n var pc = this;\n if (usingBundle && sdpMLineIndex > 0) {\n return this.transceivers[0].iceGatherer;\n } else if (this._iceGatherers.length) {\n return this._iceGatherers.shift();\n }\n var iceGatherer = new window.RTCIceGatherer({\n iceServers: this._config.iceServers,\n gatherPolicy: this._config.iceTransportPolicy\n });\n Object.defineProperty(iceGatherer, 'state',\n {value: 'new', writable: true}\n );\n\n this.transceivers[sdpMLineIndex].bufferedCandidateEvents = [];\n this.transceivers[sdpMLineIndex].bufferCandidates = function(event) {\n var end = !event.candidate || Object.keys(event.candidate).length === 0;\n // polyfill since RTCIceGatherer.state is not implemented in\n // Edge 10547 yet.\n iceGatherer.state = end ? 'completed' : 'gathering';\n if (pc.transceivers[sdpMLineIndex].bufferedCandidateEvents !== null) {\n pc.transceivers[sdpMLineIndex].bufferedCandidateEvents.push(event);\n }\n };\n iceGatherer.addEventListener('localcandidate',\n this.transceivers[sdpMLineIndex].bufferCandidates);\n return iceGatherer;\n };\n\n // start gathering from an RTCIceGatherer.\n RTCPeerConnection.prototype._gather = function(mid, sdpMLineIndex) {\n var pc = this;\n var iceGatherer = this.transceivers[sdpMLineIndex].iceGatherer;\n if (iceGatherer.onlocalcandidate) {\n return;\n }\n var bufferedCandidateEvents =\n this.transceivers[sdpMLineIndex].bufferedCandidateEvents;\n this.transceivers[sdpMLineIndex].bufferedCandidateEvents = null;\n iceGatherer.removeEventListener('localcandidate',\n this.transceivers[sdpMLineIndex].bufferCandidates);\n iceGatherer.onlocalcandidate = function(evt) {\n if (pc.usingBundle && sdpMLineIndex > 0) {\n // if we know that we use bundle we can drop candidates with\n // ѕdpMLineIndex > 0. If we don't do this then our state gets\n // confused since we dispose the extra ice gatherer.\n return;\n }\n var event = new Event('icecandidate');\n event.candidate = {sdpMid: mid, sdpMLineIndex: sdpMLineIndex};\n\n var cand = evt.candidate;\n // Edge emits an empty object for RTCIceCandidateComplete‥\n var end = !cand || Object.keys(cand).length === 0;\n if (end) {\n // polyfill since RTCIceGatherer.state is not implemented in\n // Edge 10547 yet.\n if (iceGatherer.state === 'new' || iceGatherer.state === 'gathering') {\n iceGatherer.state = 'completed';\n }\n } else {\n if (iceGatherer.state === 'new') {\n iceGatherer.state = 'gathering';\n }\n // RTCIceCandidate doesn't have a component, needs to be added\n cand.component = 1;\n var serializedCandidate = SDPUtils.writeCandidate(cand);\n event.candidate = Object.assign(event.candidate,\n SDPUtils.parseCandidate(serializedCandidate));\n event.candidate.candidate = serializedCandidate;\n }\n\n // update local description.\n var sections = SDPUtils.getMediaSections(pc.localDescription.sdp);\n if (!end) {\n sections[event.candidate.sdpMLineIndex] +=\n 'a=' + event.candidate.candidate + '\\r\\n';\n } else {\n sections[event.candidate.sdpMLineIndex] +=\n 'a=end-of-candidates\\r\\n';\n }\n pc.localDescription.sdp =\n SDPUtils.getDescription(pc.localDescription.sdp) +\n sections.join('');\n var complete = pc.transceivers.every(function(transceiver) {\n return transceiver.iceGatherer &&\n transceiver.iceGatherer.state === 'completed';\n });\n\n if (pc.iceGatheringState !== 'gathering') {\n pc.iceGatheringState = 'gathering';\n pc._emitGatheringStateChange();\n }\n\n // Emit candidate. Also emit null candidate when all gatherers are\n // complete.\n if (!end) {\n pc._dispatchEvent('icecandidate', event);\n }\n if (complete) {\n pc._dispatchEvent('icecandidate', new Event('icecandidate'));\n pc.iceGatheringState = 'complete';\n pc._emitGatheringStateChange();\n }\n };\n\n // emit already gathered candidates.\n window.setTimeout(function() {\n bufferedCandidateEvents.forEach(function(e) {\n iceGatherer.onlocalcandidate(e);\n });\n }, 0);\n };\n\n // Create ICE transport and DTLS transport.\n RTCPeerConnection.prototype._createIceAndDtlsTransports = function() {\n var pc = this;\n var iceTransport = new window.RTCIceTransport(null);\n iceTransport.onicestatechange = function() {\n pc._updateIceConnectionState();\n pc._updateConnectionState();\n };\n\n var dtlsTransport = new window.RTCDtlsTransport(iceTransport);\n dtlsTransport.ondtlsstatechange = function() {\n pc._updateConnectionState();\n };\n dtlsTransport.onerror = function() {\n // onerror does not set state to failed by itself.\n Object.defineProperty(dtlsTransport, 'state',\n {value: 'failed', writable: true});\n pc._updateConnectionState();\n };\n\n return {\n iceTransport: iceTransport,\n dtlsTransport: dtlsTransport\n };\n };\n\n // Destroy ICE gatherer, ICE transport and DTLS transport.\n // Without triggering the callbacks.\n RTCPeerConnection.prototype._disposeIceAndDtlsTransports = function(\n sdpMLineIndex) {\n var iceGatherer = this.transceivers[sdpMLineIndex].iceGatherer;\n if (iceGatherer) {\n delete iceGatherer.onlocalcandidate;\n delete this.transceivers[sdpMLineIndex].iceGatherer;\n }\n var iceTransport = this.transceivers[sdpMLineIndex].iceTransport;\n if (iceTransport) {\n delete iceTransport.onicestatechange;\n delete this.transceivers[sdpMLineIndex].iceTransport;\n }\n var dtlsTransport = this.transceivers[sdpMLineIndex].dtlsTransport;\n if (dtlsTransport) {\n delete dtlsTransport.ondtlsstatechange;\n delete dtlsTransport.onerror;\n delete this.transceivers[sdpMLineIndex].dtlsTransport;\n }\n };\n\n // Start the RTP Sender and Receiver for a transceiver.\n RTCPeerConnection.prototype._transceive = function(transceiver,\n send, recv) {\n var params = getCommonCapabilities(transceiver.localCapabilities,\n transceiver.remoteCapabilities);\n if (send && transceiver.rtpSender) {\n params.encodings = transceiver.sendEncodingParameters;\n params.rtcp = {\n cname: SDPUtils.localCName,\n compound: transceiver.rtcpParameters.compound\n };\n if (transceiver.recvEncodingParameters.length) {\n params.rtcp.ssrc = transceiver.recvEncodingParameters[0].ssrc;\n }\n transceiver.rtpSender.send(params);\n }\n if (recv && transceiver.rtpReceiver && params.codecs.length > 0) {\n // remove RTX field in Edge 14942\n if (transceiver.kind === 'video'\n && transceiver.recvEncodingParameters\n && edgeVersion < 15019) {\n transceiver.recvEncodingParameters.forEach(function(p) {\n delete p.rtx;\n });\n }\n if (transceiver.recvEncodingParameters.length) {\n params.encodings = transceiver.recvEncodingParameters;\n } else {\n params.encodings = [{}];\n }\n params.rtcp = {\n compound: transceiver.rtcpParameters.compound\n };\n if (transceiver.rtcpParameters.cname) {\n params.rtcp.cname = transceiver.rtcpParameters.cname;\n }\n if (transceiver.sendEncodingParameters.length) {\n params.rtcp.ssrc = transceiver.sendEncodingParameters[0].ssrc;\n }\n transceiver.rtpReceiver.receive(params);\n }\n };\n\n RTCPeerConnection.prototype.setLocalDescription = function(description) {\n var pc = this;\n\n // Note: pranswer is not supported.\n if (['offer', 'answer'].indexOf(description.type) === -1) {\n return Promise.reject(makeError('TypeError',\n 'Unsupported type \"' + description.type + '\"'));\n }\n\n if (!isActionAllowedInSignalingState('setLocalDescription',\n description.type, pc.signalingState) || pc._isClosed) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not set local ' + description.type +\n ' in state ' + pc.signalingState));\n }\n\n var sections;\n var sessionpart;\n if (description.type === 'offer') {\n // VERY limited support for SDP munging. Limited to:\n // * changing the order of codecs\n sections = SDPUtils.splitSections(description.sdp);\n sessionpart = sections.shift();\n sections.forEach(function(mediaSection, sdpMLineIndex) {\n var caps = SDPUtils.parseRtpParameters(mediaSection);\n pc.transceivers[sdpMLineIndex].localCapabilities = caps;\n });\n\n pc.transceivers.forEach(function(transceiver, sdpMLineIndex) {\n pc._gather(transceiver.mid, sdpMLineIndex);\n });\n } else if (description.type === 'answer') {\n sections = SDPUtils.splitSections(pc.remoteDescription.sdp);\n sessionpart = sections.shift();\n var isIceLite = SDPUtils.matchPrefix(sessionpart,\n 'a=ice-lite').length > 0;\n sections.forEach(function(mediaSection, sdpMLineIndex) {\n var transceiver = pc.transceivers[sdpMLineIndex];\n var iceGatherer = transceiver.iceGatherer;\n var iceTransport = transceiver.iceTransport;\n var dtlsTransport = transceiver.dtlsTransport;\n var localCapabilities = transceiver.localCapabilities;\n var remoteCapabilities = transceiver.remoteCapabilities;\n\n // treat bundle-only as not-rejected.\n var rejected = SDPUtils.isRejected(mediaSection) &&\n SDPUtils.matchPrefix(mediaSection, 'a=bundle-only').length === 0;\n\n if (!rejected && !transceiver.rejected) {\n var remoteIceParameters = SDPUtils.getIceParameters(\n mediaSection, sessionpart);\n var remoteDtlsParameters = SDPUtils.getDtlsParameters(\n mediaSection, sessionpart);\n if (isIceLite) {\n remoteDtlsParameters.role = 'server';\n }\n\n if (!pc.usingBundle || sdpMLineIndex === 0) {\n pc._gather(transceiver.mid, sdpMLineIndex);\n if (iceTransport.state === 'new') {\n iceTransport.start(iceGatherer, remoteIceParameters,\n isIceLite ? 'controlling' : 'controlled');\n }\n if (dtlsTransport.state === 'new') {\n dtlsTransport.start(remoteDtlsParameters);\n }\n }\n\n // Calculate intersection of capabilities.\n var params = getCommonCapabilities(localCapabilities,\n remoteCapabilities);\n\n // Start the RTCRtpSender. The RTCRtpReceiver for this\n // transceiver has already been started in setRemoteDescription.\n pc._transceive(transceiver,\n params.codecs.length > 0,\n false);\n }\n });\n }\n\n pc.localDescription = {\n type: description.type,\n sdp: description.sdp\n };\n if (description.type === 'offer') {\n pc._updateSignalingState('have-local-offer');\n } else {\n pc._updateSignalingState('stable');\n }\n\n return Promise.resolve();\n };\n\n RTCPeerConnection.prototype.setRemoteDescription = function(description) {\n var pc = this;\n\n // Note: pranswer is not supported.\n if (['offer', 'answer'].indexOf(description.type) === -1) {\n return Promise.reject(makeError('TypeError',\n 'Unsupported type \"' + description.type + '\"'));\n }\n\n if (!isActionAllowedInSignalingState('setRemoteDescription',\n description.type, pc.signalingState) || pc._isClosed) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not set remote ' + description.type +\n ' in state ' + pc.signalingState));\n }\n\n var streams = {};\n pc.remoteStreams.forEach(function(stream) {\n streams[stream.id] = stream;\n });\n var receiverList = [];\n var sections = SDPUtils.splitSections(description.sdp);\n var sessionpart = sections.shift();\n var isIceLite = SDPUtils.matchPrefix(sessionpart,\n 'a=ice-lite').length > 0;\n var usingBundle = SDPUtils.matchPrefix(sessionpart,\n 'a=group:BUNDLE ').length > 0;\n pc.usingBundle = usingBundle;\n var iceOptions = SDPUtils.matchPrefix(sessionpart,\n 'a=ice-options:')[0];\n if (iceOptions) {\n pc.canTrickleIceCandidates = iceOptions.substr(14).split(' ')\n .indexOf('trickle') >= 0;\n } else {\n pc.canTrickleIceCandidates = false;\n }\n\n sections.forEach(function(mediaSection, sdpMLineIndex) {\n var lines = SDPUtils.splitLines(mediaSection);\n var kind = SDPUtils.getKind(mediaSection);\n // treat bundle-only as not-rejected.\n var rejected = SDPUtils.isRejected(mediaSection) &&\n SDPUtils.matchPrefix(mediaSection, 'a=bundle-only').length === 0;\n var protocol = lines[0].substr(2).split(' ')[2];\n\n var direction = SDPUtils.getDirection(mediaSection, sessionpart);\n var remoteMsid = SDPUtils.parseMsid(mediaSection);\n\n var mid = SDPUtils.getMid(mediaSection) || SDPUtils.generateIdentifier();\n\n // Reject datachannels which are not implemented yet.\n if ((kind === 'application' && protocol === 'DTLS/SCTP') || rejected) {\n // TODO: this is dangerous in the case where a non-rejected m-line\n // becomes rejected.\n pc.transceivers[sdpMLineIndex] = {\n mid: mid,\n kind: kind,\n rejected: true\n };\n return;\n }\n\n if (!rejected && pc.transceivers[sdpMLineIndex] &&\n pc.transceivers[sdpMLineIndex].rejected) {\n // recycle a rejected transceiver.\n pc.transceivers[sdpMLineIndex] = pc._createTransceiver(kind, true);\n }\n\n var transceiver;\n var iceGatherer;\n var iceTransport;\n var dtlsTransport;\n var rtpReceiver;\n var sendEncodingParameters;\n var recvEncodingParameters;\n var localCapabilities;\n\n var track;\n // FIXME: ensure the mediaSection has rtcp-mux set.\n var remoteCapabilities = SDPUtils.parseRtpParameters(mediaSection);\n var remoteIceParameters;\n var remoteDtlsParameters;\n if (!rejected) {\n remoteIceParameters = SDPUtils.getIceParameters(mediaSection,\n sessionpart);\n remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection,\n sessionpart);\n remoteDtlsParameters.role = 'client';\n }\n recvEncodingParameters =\n SDPUtils.parseRtpEncodingParameters(mediaSection);\n\n var rtcpParameters = SDPUtils.parseRtcpParameters(mediaSection);\n\n var isComplete = SDPUtils.matchPrefix(mediaSection,\n 'a=end-of-candidates', sessionpart).length > 0;\n var cands = SDPUtils.matchPrefix(mediaSection, 'a=candidate:')\n .map(function(cand) {\n return SDPUtils.parseCandidate(cand);\n })\n .filter(function(cand) {\n return cand.component === 1;\n });\n\n // Check if we can use BUNDLE and dispose transports.\n if ((description.type === 'offer' || description.type === 'answer') &&\n !rejected && usingBundle && sdpMLineIndex > 0 &&\n pc.transceivers[sdpMLineIndex]) {\n pc._disposeIceAndDtlsTransports(sdpMLineIndex);\n pc.transceivers[sdpMLineIndex].iceGatherer =\n pc.transceivers[0].iceGatherer;\n pc.transceivers[sdpMLineIndex].iceTransport =\n pc.transceivers[0].iceTransport;\n pc.transceivers[sdpMLineIndex].dtlsTransport =\n pc.transceivers[0].dtlsTransport;\n if (pc.transceivers[sdpMLineIndex].rtpSender) {\n pc.transceivers[sdpMLineIndex].rtpSender.setTransport(\n pc.transceivers[0].dtlsTransport);\n }\n if (pc.transceivers[sdpMLineIndex].rtpReceiver) {\n pc.transceivers[sdpMLineIndex].rtpReceiver.setTransport(\n pc.transceivers[0].dtlsTransport);\n }\n }\n if (description.type === 'offer' && !rejected) {\n transceiver = pc.transceivers[sdpMLineIndex] ||\n pc._createTransceiver(kind);\n transceiver.mid = mid;\n\n if (!transceiver.iceGatherer) {\n transceiver.iceGatherer = pc._createIceGatherer(sdpMLineIndex,\n usingBundle);\n }\n\n if (cands.length && transceiver.iceTransport.state === 'new') {\n if (isComplete && (!usingBundle || sdpMLineIndex === 0)) {\n transceiver.iceTransport.setRemoteCandidates(cands);\n } else {\n cands.forEach(function(candidate) {\n maybeAddCandidate(transceiver.iceTransport, candidate);\n });\n }\n }\n\n localCapabilities = window.RTCRtpReceiver.getCapabilities(kind);\n\n // filter RTX until additional stuff needed for RTX is implemented\n // in adapter.js\n if (edgeVersion < 15019) {\n localCapabilities.codecs = localCapabilities.codecs.filter(\n function(codec) {\n return codec.name !== 'rtx';\n });\n }\n\n sendEncodingParameters = transceiver.sendEncodingParameters || [{\n ssrc: (2 * sdpMLineIndex + 2) * 1001\n }];\n\n // TODO: rewrite to use http://w3c.github.io/webrtc-pc/#set-associated-remote-streams\n var isNewTrack = false;\n if (direction === 'sendrecv' || direction === 'sendonly') {\n isNewTrack = !transceiver.rtpReceiver;\n rtpReceiver = transceiver.rtpReceiver ||\n new window.RTCRtpReceiver(transceiver.dtlsTransport, kind);\n\n if (isNewTrack) {\n var stream;\n track = rtpReceiver.track;\n // FIXME: does not work with Plan B.\n if (remoteMsid && remoteMsid.stream === '-') {\n // no-op. a stream id of '-' means: no associated stream.\n } else if (remoteMsid) {\n if (!streams[remoteMsid.stream]) {\n streams[remoteMsid.stream] = new window.MediaStream();\n Object.defineProperty(streams[remoteMsid.stream], 'id', {\n get: function() {\n return remoteMsid.stream;\n }\n });\n }\n Object.defineProperty(track, 'id', {\n get: function() {\n return remoteMsid.track;\n }\n });\n stream = streams[remoteMsid.stream];\n } else {\n if (!streams.default) {\n streams.default = new window.MediaStream();\n }\n stream = streams.default;\n }\n if (stream) {\n addTrackToStreamAndFireEvent(track, stream);\n transceiver.associatedRemoteMediaStreams.push(stream);\n }\n receiverList.push([track, rtpReceiver, stream]);\n }\n } else if (transceiver.rtpReceiver && transceiver.rtpReceiver.track) {\n transceiver.associatedRemoteMediaStreams.forEach(function(s) {\n var nativeTrack = s.getTracks().find(function(t) {\n return t.id === transceiver.rtpReceiver.track.id;\n });\n if (nativeTrack) {\n removeTrackFromStreamAndFireEvent(nativeTrack, s);\n }\n });\n transceiver.associatedRemoteMediaStreams = [];\n }\n\n transceiver.localCapabilities = localCapabilities;\n transceiver.remoteCapabilities = remoteCapabilities;\n transceiver.rtpReceiver = rtpReceiver;\n transceiver.rtcpParameters = rtcpParameters;\n transceiver.sendEncodingParameters = sendEncodingParameters;\n transceiver.recvEncodingParameters = recvEncodingParameters;\n\n // Start the RTCRtpReceiver now. The RTPSender is started in\n // setLocalDescription.\n pc._transceive(pc.transceivers[sdpMLineIndex],\n false,\n isNewTrack);\n } else if (description.type === 'answer' && !rejected) {\n transceiver = pc.transceivers[sdpMLineIndex];\n iceGatherer = transceiver.iceGatherer;\n iceTransport = transceiver.iceTransport;\n dtlsTransport = transceiver.dtlsTransport;\n rtpReceiver = transceiver.rtpReceiver;\n sendEncodingParameters = transceiver.sendEncodingParameters;\n localCapabilities = transceiver.localCapabilities;\n\n pc.transceivers[sdpMLineIndex].recvEncodingParameters =\n recvEncodingParameters;\n pc.transceivers[sdpMLineIndex].remoteCapabilities =\n remoteCapabilities;\n pc.transceivers[sdpMLineIndex].rtcpParameters = rtcpParameters;\n\n if (cands.length && iceTransport.state === 'new') {\n if ((isIceLite || isComplete) &&\n (!usingBundle || sdpMLineIndex === 0)) {\n iceTransport.setRemoteCandidates(cands);\n } else {\n cands.forEach(function(candidate) {\n maybeAddCandidate(transceiver.iceTransport, candidate);\n });\n }\n }\n\n if (!usingBundle || sdpMLineIndex === 0) {\n if (iceTransport.state === 'new') {\n iceTransport.start(iceGatherer, remoteIceParameters,\n 'controlling');\n }\n if (dtlsTransport.state === 'new') {\n dtlsTransport.start(remoteDtlsParameters);\n }\n }\n\n pc._transceive(transceiver,\n direction === 'sendrecv' || direction === 'recvonly',\n direction === 'sendrecv' || direction === 'sendonly');\n\n // TODO: rewrite to use http://w3c.github.io/webrtc-pc/#set-associated-remote-streams\n if (rtpReceiver &&\n (direction === 'sendrecv' || direction === 'sendonly')) {\n track = rtpReceiver.track;\n if (remoteMsid) {\n if (!streams[remoteMsid.stream]) {\n streams[remoteMsid.stream] = new window.MediaStream();\n }\n addTrackToStreamAndFireEvent(track, streams[remoteMsid.stream]);\n receiverList.push([track, rtpReceiver, streams[remoteMsid.stream]]);\n } else {\n if (!streams.default) {\n streams.default = new window.MediaStream();\n }\n addTrackToStreamAndFireEvent(track, streams.default);\n receiverList.push([track, rtpReceiver, streams.default]);\n }\n } else {\n // FIXME: actually the receiver should be created later.\n delete transceiver.rtpReceiver;\n }\n }\n });\n\n if (pc._dtlsRole === undefined) {\n pc._dtlsRole = description.type === 'offer' ? 'active' : 'passive';\n }\n\n pc.remoteDescription = {\n type: description.type,\n sdp: description.sdp\n };\n if (description.type === 'offer') {\n pc._updateSignalingState('have-remote-offer');\n } else {\n pc._updateSignalingState('stable');\n }\n Object.keys(streams).forEach(function(sid) {\n var stream = streams[sid];\n if (stream.getTracks().length) {\n if (pc.remoteStreams.indexOf(stream) === -1) {\n pc.remoteStreams.push(stream);\n var event = new Event('addstream');\n event.stream = stream;\n window.setTimeout(function() {\n pc._dispatchEvent('addstream', event);\n });\n }\n\n receiverList.forEach(function(item) {\n var track = item[0];\n var receiver = item[1];\n if (stream.id !== item[2].id) {\n return;\n }\n fireAddTrack(pc, track, receiver, [stream]);\n });\n }\n });\n receiverList.forEach(function(item) {\n if (item[2]) {\n return;\n }\n fireAddTrack(pc, item[0], item[1], []);\n });\n\n // check whether addIceCandidate({}) was called within four seconds after\n // setRemoteDescription.\n window.setTimeout(function() {\n if (!(pc && pc.transceivers)) {\n return;\n }\n pc.transceivers.forEach(function(transceiver) {\n if (transceiver.iceTransport &&\n transceiver.iceTransport.state === 'new' &&\n transceiver.iceTransport.getRemoteCandidates().length > 0) {\n console.warn('Timeout for addRemoteCandidate. Consider sending ' +\n 'an end-of-candidates notification');\n transceiver.iceTransport.addRemoteCandidate({});\n }\n });\n }, 4000);\n\n return Promise.resolve();\n };\n\n RTCPeerConnection.prototype.close = function() {\n this.transceivers.forEach(function(transceiver) {\n /* not yet\n if (transceiver.iceGatherer) {\n transceiver.iceGatherer.close();\n }\n */\n if (transceiver.iceTransport) {\n transceiver.iceTransport.stop();\n }\n if (transceiver.dtlsTransport) {\n transceiver.dtlsTransport.stop();\n }\n if (transceiver.rtpSender) {\n transceiver.rtpSender.stop();\n }\n if (transceiver.rtpReceiver) {\n transceiver.rtpReceiver.stop();\n }\n });\n // FIXME: clean up tracks, local streams, remote streams, etc\n this._isClosed = true;\n this._updateSignalingState('closed');\n };\n\n // Update the signaling state.\n RTCPeerConnection.prototype._updateSignalingState = function(newState) {\n this.signalingState = newState;\n var event = new Event('signalingstatechange');\n this._dispatchEvent('signalingstatechange', event);\n };\n\n // Determine whether to fire the negotiationneeded event.\n RTCPeerConnection.prototype._maybeFireNegotiationNeeded = function() {\n var pc = this;\n if (this.signalingState !== 'stable' || this.needNegotiation === true) {\n return;\n }\n this.needNegotiation = true;\n window.setTimeout(function() {\n if (pc.needNegotiation) {\n pc.needNegotiation = false;\n var event = new Event('negotiationneeded');\n pc._dispatchEvent('negotiationneeded', event);\n }\n }, 0);\n };\n\n // Update the ice connection state.\n RTCPeerConnection.prototype._updateIceConnectionState = function() {\n var newState;\n var states = {\n 'new': 0,\n closed: 0,\n checking: 0,\n connected: 0,\n completed: 0,\n disconnected: 0,\n failed: 0\n };\n this.transceivers.forEach(function(transceiver) {\n states[transceiver.iceTransport.state]++;\n });\n\n newState = 'new';\n if (states.failed > 0) {\n newState = 'failed';\n } else if (states.checking > 0) {\n newState = 'checking';\n } else if (states.disconnected > 0) {\n newState = 'disconnected';\n } else if (states.new > 0) {\n newState = 'new';\n } else if (states.connected > 0) {\n newState = 'connected';\n } else if (states.completed > 0) {\n newState = 'completed';\n }\n\n if (newState !== this.iceConnectionState) {\n this.iceConnectionState = newState;\n var event = new Event('iceconnectionstatechange');\n this._dispatchEvent('iceconnectionstatechange', event);\n }\n };\n\n // Update the connection state.\n RTCPeerConnection.prototype._updateConnectionState = function() {\n var newState;\n var states = {\n 'new': 0,\n closed: 0,\n connecting: 0,\n connected: 0,\n completed: 0,\n disconnected: 0,\n failed: 0\n };\n this.transceivers.forEach(function(transceiver) {\n states[transceiver.iceTransport.state]++;\n states[transceiver.dtlsTransport.state]++;\n });\n // ICETransport.completed and connected are the same for this purpose.\n states.connected += states.completed;\n\n newState = 'new';\n if (states.failed > 0) {\n newState = 'failed';\n } else if (states.connecting > 0) {\n newState = 'connecting';\n } else if (states.disconnected > 0) {\n newState = 'disconnected';\n } else if (states.new > 0) {\n newState = 'new';\n } else if (states.connected > 0) {\n newState = 'connected';\n }\n\n if (newState !== this.connectionState) {\n this.connectionState = newState;\n var event = new Event('connectionstatechange');\n this._dispatchEvent('connectionstatechange', event);\n }\n };\n\n RTCPeerConnection.prototype.createOffer = function() {\n var pc = this;\n\n if (pc._isClosed) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not call createOffer after close'));\n }\n\n var numAudioTracks = pc.transceivers.filter(function(t) {\n return t.kind === 'audio';\n }).length;\n var numVideoTracks = pc.transceivers.filter(function(t) {\n return t.kind === 'video';\n }).length;\n\n // Determine number of audio and video tracks we need to send/recv.\n var offerOptions = arguments[0];\n if (offerOptions) {\n // Reject Chrome legacy constraints.\n if (offerOptions.mandatory || offerOptions.optional) {\n throw new TypeError(\n 'Legacy mandatory/optional constraints not supported.');\n }\n if (offerOptions.offerToReceiveAudio !== undefined) {\n if (offerOptions.offerToReceiveAudio === true) {\n numAudioTracks = 1;\n } else if (offerOptions.offerToReceiveAudio === false) {\n numAudioTracks = 0;\n } else {\n numAudioTracks = offerOptions.offerToReceiveAudio;\n }\n }\n if (offerOptions.offerToReceiveVideo !== undefined) {\n if (offerOptions.offerToReceiveVideo === true) {\n numVideoTracks = 1;\n } else if (offerOptions.offerToReceiveVideo === false) {\n numVideoTracks = 0;\n } else {\n numVideoTracks = offerOptions.offerToReceiveVideo;\n }\n }\n }\n\n pc.transceivers.forEach(function(transceiver) {\n if (transceiver.kind === 'audio') {\n numAudioTracks--;\n if (numAudioTracks < 0) {\n transceiver.wantReceive = false;\n }\n } else if (transceiver.kind === 'video') {\n numVideoTracks--;\n if (numVideoTracks < 0) {\n transceiver.wantReceive = false;\n }\n }\n });\n\n // Create M-lines for recvonly streams.\n while (numAudioTracks > 0 || numVideoTracks > 0) {\n if (numAudioTracks > 0) {\n pc._createTransceiver('audio');\n numAudioTracks--;\n }\n if (numVideoTracks > 0) {\n pc._createTransceiver('video');\n numVideoTracks--;\n }\n }\n\n var sdp = SDPUtils.writeSessionBoilerplate(pc._sdpSessionId,\n pc._sdpSessionVersion++);\n pc.transceivers.forEach(function(transceiver, sdpMLineIndex) {\n // For each track, create an ice gatherer, ice transport,\n // dtls transport, potentially rtpsender and rtpreceiver.\n var track = transceiver.track;\n var kind = transceiver.kind;\n var mid = transceiver.mid || SDPUtils.generateIdentifier();\n transceiver.mid = mid;\n\n if (!transceiver.iceGatherer) {\n transceiver.iceGatherer = pc._createIceGatherer(sdpMLineIndex,\n pc.usingBundle);\n }\n\n var localCapabilities = window.RTCRtpSender.getCapabilities(kind);\n // filter RTX until additional stuff needed for RTX is implemented\n // in adapter.js\n if (edgeVersion < 15019) {\n localCapabilities.codecs = localCapabilities.codecs.filter(\n function(codec) {\n return codec.name !== 'rtx';\n });\n }\n localCapabilities.codecs.forEach(function(codec) {\n // work around https://bugs.chromium.org/p/webrtc/issues/detail?id=6552\n // by adding level-asymmetry-allowed=1\n if (codec.name === 'H264' &&\n codec.parameters['level-asymmetry-allowed'] === undefined) {\n codec.parameters['level-asymmetry-allowed'] = '1';\n }\n\n // for subsequent offers, we might have to re-use the payload\n // type of the last offer.\n if (transceiver.remoteCapabilities &&\n transceiver.remoteCapabilities.codecs) {\n transceiver.remoteCapabilities.codecs.forEach(function(remoteCodec) {\n if (codec.name.toLowerCase() === remoteCodec.name.toLowerCase() &&\n codec.clockRate === remoteCodec.clockRate) {\n codec.preferredPayloadType = remoteCodec.payloadType;\n }\n });\n }\n });\n localCapabilities.headerExtensions.forEach(function(hdrExt) {\n var remoteExtensions = transceiver.remoteCapabilities &&\n transceiver.remoteCapabilities.headerExtensions || [];\n remoteExtensions.forEach(function(rHdrExt) {\n if (hdrExt.uri === rHdrExt.uri) {\n hdrExt.id = rHdrExt.id;\n }\n });\n });\n\n // generate an ssrc now, to be used later in rtpSender.send\n var sendEncodingParameters = transceiver.sendEncodingParameters || [{\n ssrc: (2 * sdpMLineIndex + 1) * 1001\n }];\n if (track) {\n // add RTX\n if (edgeVersion >= 15019 && kind === 'video' &&\n !sendEncodingParameters[0].rtx) {\n sendEncodingParameters[0].rtx = {\n ssrc: sendEncodingParameters[0].ssrc + 1\n };\n }\n }\n\n if (transceiver.wantReceive) {\n transceiver.rtpReceiver = new window.RTCRtpReceiver(\n transceiver.dtlsTransport, kind);\n }\n\n transceiver.localCapabilities = localCapabilities;\n transceiver.sendEncodingParameters = sendEncodingParameters;\n });\n\n // always offer BUNDLE and dispose on return if not supported.\n if (pc._config.bundlePolicy !== 'max-compat') {\n sdp += 'a=group:BUNDLE ' + pc.transceivers.map(function(t) {\n return t.mid;\n }).join(' ') + '\\r\\n';\n }\n sdp += 'a=ice-options:trickle\\r\\n';\n\n pc.transceivers.forEach(function(transceiver, sdpMLineIndex) {\n sdp += writeMediaSection(transceiver, transceiver.localCapabilities,\n 'offer', transceiver.stream, pc._dtlsRole);\n sdp += 'a=rtcp-rsize\\r\\n';\n\n if (transceiver.iceGatherer && pc.iceGatheringState !== 'new' &&\n (sdpMLineIndex === 0 || !pc.usingBundle)) {\n transceiver.iceGatherer.getLocalCandidates().forEach(function(cand) {\n cand.component = 1;\n sdp += 'a=' + SDPUtils.writeCandidate(cand) + '\\r\\n';\n });\n\n if (transceiver.iceGatherer.state === 'completed') {\n sdp += 'a=end-of-candidates\\r\\n';\n }\n }\n });\n\n var desc = new window.RTCSessionDescription({\n type: 'offer',\n sdp: sdp\n });\n return Promise.resolve(desc);\n };\n\n RTCPeerConnection.prototype.createAnswer = function() {\n var pc = this;\n\n if (pc._isClosed) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not call createAnswer after close'));\n }\n\n if (!(pc.signalingState === 'have-remote-offer' ||\n pc.signalingState === 'have-local-pranswer')) {\n return Promise.reject(makeError('InvalidStateError',\n 'Can not call createAnswer in signalingState ' + pc.signalingState));\n }\n\n var sdp = SDPUtils.writeSessionBoilerplate(pc._sdpSessionId,\n pc._sdpSessionVersion++);\n if (pc.usingBundle) {\n sdp += 'a=group:BUNDLE ' + pc.transceivers.map(function(t) {\n return t.mid;\n }).join(' ') + '\\r\\n';\n }\n var mediaSectionsInOffer = SDPUtils.getMediaSections(\n pc.remoteDescription.sdp).length;\n pc.transceivers.forEach(function(transceiver, sdpMLineIndex) {\n if (sdpMLineIndex + 1 > mediaSectionsInOffer) {\n return;\n }\n if (transceiver.rejected) {\n if (transceiver.kind === 'application') {\n sdp += 'm=application 0 DTLS/SCTP 5000\\r\\n';\n } else if (transceiver.kind === 'audio') {\n sdp += 'm=audio 0 UDP/TLS/RTP/SAVPF 0\\r\\n' +\n 'a=rtpmap:0 PCMU/8000\\r\\n';\n } else if (transceiver.kind === 'video') {\n sdp += 'm=video 0 UDP/TLS/RTP/SAVPF 120\\r\\n' +\n 'a=rtpmap:120 VP8/90000\\r\\n';\n }\n sdp += 'c=IN IP4 0.0.0.0\\r\\n' +\n 'a=inactive\\r\\n' +\n 'a=mid:' + transceiver.mid + '\\r\\n';\n return;\n }\n\n // FIXME: look at direction.\n if (transceiver.stream) {\n var localTrack;\n if (transceiver.kind === 'audio') {\n localTrack = transceiver.stream.getAudioTracks()[0];\n } else if (transceiver.kind === 'video') {\n localTrack = transceiver.stream.getVideoTracks()[0];\n }\n if (localTrack) {\n // add RTX\n if (edgeVersion >= 15019 && transceiver.kind === 'video' &&\n !transceiver.sendEncodingParameters[0].rtx) {\n transceiver.sendEncodingParameters[0].rtx = {\n ssrc: transceiver.sendEncodingParameters[0].ssrc + 1\n };\n }\n }\n }\n\n // Calculate intersection of capabilities.\n var commonCapabilities = getCommonCapabilities(\n transceiver.localCapabilities,\n transceiver.remoteCapabilities);\n\n var hasRtx = commonCapabilities.codecs.filter(function(c) {\n return c.name.toLowerCase() === 'rtx';\n }).length;\n if (!hasRtx && transceiver.sendEncodingParameters[0].rtx) {\n delete transceiver.sendEncodingParameters[0].rtx;\n }\n\n sdp += writeMediaSection(transceiver, commonCapabilities,\n 'answer', transceiver.stream, pc._dtlsRole);\n if (transceiver.rtcpParameters &&\n transceiver.rtcpParameters.reducedSize) {\n sdp += 'a=rtcp-rsize\\r\\n';\n }\n });\n\n var desc = new window.RTCSessionDescription({\n type: 'answer',\n sdp: sdp\n });\n return Promise.resolve(desc);\n };\n\n RTCPeerConnection.prototype.addIceCandidate = function(candidate) {\n var pc = this;\n var sections;\n if (candidate && !(candidate.sdpMLineIndex !== undefined ||\n candidate.sdpMid)) {\n return Promise.reject(new TypeError('sdpMLineIndex or sdpMid required'));\n }\n\n // TODO: needs to go into ops queue.\n return new Promise(function(resolve, reject) {\n if (!pc.remoteDescription) {\n return reject(makeError('InvalidStateError',\n 'Can not add ICE candidate without a remote description'));\n } else if (!candidate || candidate.candidate === '') {\n for (var j = 0; j < pc.transceivers.length; j++) {\n if (pc.transceivers[j].rejected) {\n continue;\n }\n pc.transceivers[j].iceTransport.addRemoteCandidate({});\n sections = SDPUtils.getMediaSections(pc.remoteDescription.sdp);\n sections[j] += 'a=end-of-candidates\\r\\n';\n pc.remoteDescription.sdp =\n SDPUtils.getDescription(pc.remoteDescription.sdp) +\n sections.join('');\n if (pc.usingBundle) {\n break;\n }\n }\n } else {\n var sdpMLineIndex = candidate.sdpMLineIndex;\n if (candidate.sdpMid) {\n for (var i = 0; i < pc.transceivers.length; i++) {\n if (pc.transceivers[i].mid === candidate.sdpMid) {\n sdpMLineIndex = i;\n break;\n }\n }\n }\n var transceiver = pc.transceivers[sdpMLineIndex];\n if (transceiver) {\n if (transceiver.rejected) {\n return resolve();\n }\n var cand = Object.keys(candidate.candidate).length > 0 ?\n SDPUtils.parseCandidate(candidate.candidate) : {};\n // Ignore Chrome's invalid candidates since Edge does not like them.\n if (cand.protocol === 'tcp' && (cand.port === 0 || cand.port === 9)) {\n return resolve();\n }\n // Ignore RTCP candidates, we assume RTCP-MUX.\n if (cand.component && cand.component !== 1) {\n return resolve();\n }\n // when using bundle, avoid adding candidates to the wrong\n // ice transport. And avoid adding candidates added in the SDP.\n if (sdpMLineIndex === 0 || (sdpMLineIndex > 0 &&\n transceiver.iceTransport !== pc.transceivers[0].iceTransport)) {\n if (!maybeAddCandidate(transceiver.iceTransport, cand)) {\n return reject(makeError('OperationError',\n 'Can not add ICE candidate'));\n }\n }\n\n // update the remoteDescription.\n var candidateString = candidate.candidate.trim();\n if (candidateString.indexOf('a=') === 0) {\n candidateString = candidateString.substr(2);\n }\n sections = SDPUtils.getMediaSections(pc.remoteDescription.sdp);\n sections[sdpMLineIndex] += 'a=' +\n (cand.type ? candidateString : 'end-of-candidates')\n + '\\r\\n';\n pc.remoteDescription.sdp = sections.join('');\n } else {\n return reject(makeError('OperationError',\n 'Can not add ICE candidate'));\n }\n }\n resolve();\n });\n };\n\n RTCPeerConnection.prototype.getStats = function() {\n var promises = [];\n this.transceivers.forEach(function(transceiver) {\n ['rtpSender', 'rtpReceiver', 'iceGatherer', 'iceTransport',\n 'dtlsTransport'].forEach(function(method) {\n if (transceiver[method]) {\n promises.push(transceiver[method].getStats());\n }\n });\n });\n var fixStatsType = function(stat) {\n return {\n inboundrtp: 'inbound-rtp',\n outboundrtp: 'outbound-rtp',\n candidatepair: 'candidate-pair',\n localcandidate: 'local-candidate',\n remotecandidate: 'remote-candidate'\n }[stat.type] || stat.type;\n };\n return new Promise(function(resolve) {\n // shim getStats with maplike support\n var results = new Map();\n Promise.all(promises).then(function(res) {\n res.forEach(function(result) {\n Object.keys(result).forEach(function(id) {\n result[id].type = fixStatsType(result[id]);\n results.set(id, result[id]);\n });\n });\n resolve(results);\n });\n });\n };\n\n // legacy callback shims. Should be moved to adapter.js some days.\n var methods = ['createOffer', 'createAnswer'];\n methods.forEach(function(method) {\n var nativeMethod = RTCPeerConnection.prototype[method];\n RTCPeerConnection.prototype[method] = function() {\n var args = arguments;\n if (typeof args[0] === 'function' ||\n typeof args[1] === 'function') { // legacy\n return nativeMethod.apply(this, [arguments[2]])\n .then(function(description) {\n if (typeof args[0] === 'function') {\n args[0].apply(null, [description]);\n }\n }, function(error) {\n if (typeof args[1] === 'function') {\n args[1].apply(null, [error]);\n }\n });\n }\n return nativeMethod.apply(this, arguments);\n };\n });\n\n methods = ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'];\n methods.forEach(function(method) {\n var nativeMethod = RTCPeerConnection.prototype[method];\n RTCPeerConnection.prototype[method] = function() {\n var args = arguments;\n if (typeof args[1] === 'function' ||\n typeof args[2] === 'function') { // legacy\n return nativeMethod.apply(this, arguments)\n .then(function() {\n if (typeof args[1] === 'function') {\n args[1].apply(null);\n }\n }, function(error) {\n if (typeof args[2] === 'function') {\n args[2].apply(null, [error]);\n }\n });\n }\n return nativeMethod.apply(this, arguments);\n };\n });\n\n // getStats is special. It doesn't have a spec legacy method yet we support\n // getStats(something, cb) without error callbacks.\n ['getStats'].forEach(function(method) {\n var nativeMethod = RTCPeerConnection.prototype[method];\n RTCPeerConnection.prototype[method] = function() {\n var args = arguments;\n if (typeof args[1] === 'function') {\n return nativeMethod.apply(this, arguments)\n .then(function() {\n if (typeof args[1] === 'function') {\n args[1].apply(null);\n }\n });\n }\n return nativeMethod.apply(this, arguments);\n };\n });\n\n return RTCPeerConnection;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/rtcpeerconnection-shim/rtcpeerconnection.js\n// module id = ../../../../openvidu-browser/node_modules/rtcpeerconnection-shim/rtcpeerconnection.js\n// module chunks = main","var grammar = module.exports = {\n v: [{\n name: 'version',\n reg: /^(\\d*)$/\n }],\n o: [{ //o=- 20518 0 IN IP4 203.0.113.1\n // NB: sessionId will be a String in most cases because it is huge\n name: 'origin',\n reg: /^(\\S*) (\\d*) (\\d*) (\\S*) IP(\\d) (\\S*)/,\n names: ['username', 'sessionId', 'sessionVersion', 'netType', 'ipVer', 'address'],\n format: \"%s %s %d %s IP%d %s\"\n }],\n // default parsing of these only (though some of these feel outdated)\n s: [{ name: 'name' }],\n i: [{ name: 'description' }],\n u: [{ name: 'uri' }],\n e: [{ name: 'email' }],\n p: [{ name: 'phone' }],\n z: [{ name: 'timezones' }], // TODO: this one can actually be parsed properly..\n r: [{ name: 'repeats' }], // TODO: this one can also be parsed properly\n //k: [{}], // outdated thing ignored\n t: [{ //t=0 0\n name: 'timing',\n reg: /^(\\d*) (\\d*)/,\n names: ['start', 'stop'],\n format: \"%d %d\"\n }],\n c: [{ //c=IN IP4 10.47.197.26\n name: 'connection',\n reg: /^IN IP(\\d) (\\S*)/,\n names: ['version', 'ip'],\n format: \"IN IP%d %s\"\n }],\n b: [{ //b=AS:4000\n push: 'bandwidth',\n reg: /^(TIAS|AS|CT|RR|RS):(\\d*)/,\n names: ['type', 'limit'],\n format: \"%s:%s\"\n }],\n m: [{ //m=video 51744 RTP/AVP 126 97 98 34 31\n // NB: special - pushes to session\n // TODO: rtp/fmtp should be filtered by the payloads found here?\n reg: /^(\\w*) (\\d*) ([\\w\\/]*)(?: (.*))?/,\n names: ['type', 'port', 'protocol', 'payloads'],\n format: \"%s %d %s %s\"\n }],\n a: [\n { //a=rtpmap:110 opus/48000/2\n push: 'rtp',\n reg: /^rtpmap:(\\d*) ([\\w\\-]*)(?:\\s*\\/(\\d*)(?:\\s*\\/(\\S*))?)?/,\n names: ['payload', 'codec', 'rate', 'encoding'],\n format: function (o) {\n return (o.encoding) ?\n \"rtpmap:%d %s/%s/%s\":\n o.rate ?\n \"rtpmap:%d %s/%s\":\n \"rtpmap:%d %s\";\n }\n },\n {\n //a=fmtp:108 profile-level-id=24;object=23;bitrate=64000\n //a=fmtp:111 minptime=10; useinbandfec=1\n push: 'fmtp',\n reg: /^fmtp:(\\d*) ([\\S| ]*)/,\n names: ['payload', 'config'],\n format: \"fmtp:%d %s\"\n },\n { //a=control:streamid=0\n name: 'control',\n reg: /^control:(.*)/,\n format: \"control:%s\"\n },\n { //a=rtcp:65179 IN IP4 193.84.77.194\n name: 'rtcp',\n reg: /^rtcp:(\\d*)(?: (\\S*) IP(\\d) (\\S*))?/,\n names: ['port', 'netType', 'ipVer', 'address'],\n format: function (o) {\n return (o.address != null) ?\n \"rtcp:%d %s IP%d %s\":\n \"rtcp:%d\";\n }\n },\n { //a=rtcp-fb:98 trr-int 100\n push: 'rtcpFbTrrInt',\n reg: /^rtcp-fb:(\\*|\\d*) trr-int (\\d*)/,\n names: ['payload', 'value'],\n format: \"rtcp-fb:%d trr-int %d\"\n },\n { //a=rtcp-fb:98 nack rpsi\n push: 'rtcpFb',\n reg: /^rtcp-fb:(\\*|\\d*) ([\\w-_]*)(?: ([\\w-_]*))?/,\n names: ['payload', 'type', 'subtype'],\n format: function (o) {\n return (o.subtype != null) ?\n \"rtcp-fb:%s %s %s\":\n \"rtcp-fb:%s %s\";\n }\n },\n { //a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\n //a=extmap:1/recvonly URI-gps-string\n push: 'ext',\n reg: /^extmap:([\\w_\\/]*) (\\S*)(?: (\\S*))?/,\n names: ['value', 'uri', 'config'], // value may include \"/direction\" suffix\n format: function (o) {\n return (o.config != null) ?\n \"extmap:%s %s %s\":\n \"extmap:%s %s\";\n }\n },\n {\n //a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32\n push: 'crypto',\n reg: /^crypto:(\\d*) ([\\w_]*) (\\S*)(?: (\\S*))?/,\n names: ['id', 'suite', 'config', 'sessionConfig'],\n format: function (o) {\n return (o.sessionConfig != null) ?\n \"crypto:%d %s %s %s\":\n \"crypto:%d %s %s\";\n }\n },\n { //a=setup:actpass\n name: 'setup',\n reg: /^setup:(\\w*)/,\n format: \"setup:%s\"\n },\n { //a=mid:1\n name: 'mid',\n reg: /^mid:([^\\s]*)/,\n format: \"mid:%s\"\n },\n { //a=msid:0c8b064d-d807-43b4-b434-f92a889d8587 98178685-d409-46e0-8e16-7ef0db0db64a\n name: 'msid',\n reg: /^msid:(.*)/,\n format: \"msid:%s\"\n },\n { //a=ptime:20\n name: 'ptime',\n reg: /^ptime:(\\d*)/,\n format: \"ptime:%d\"\n },\n { //a=maxptime:60\n name: 'maxptime',\n reg: /^maxptime:(\\d*)/,\n format: \"maxptime:%d\"\n },\n { //a=sendrecv\n name: 'direction',\n reg: /^(sendrecv|recvonly|sendonly|inactive)/\n },\n { //a=ice-lite\n name: 'icelite',\n reg: /^(ice-lite)/\n },\n { //a=ice-ufrag:F7gI\n name: 'iceUfrag',\n reg: /^ice-ufrag:(\\S*)/,\n format: \"ice-ufrag:%s\"\n },\n { //a=ice-pwd:x9cml/YzichV2+XlhiMu8g\n name: 'icePwd',\n reg: /^ice-pwd:(\\S*)/,\n format: \"ice-pwd:%s\"\n },\n { //a=fingerprint:SHA-1 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33\n name: 'fingerprint',\n reg: /^fingerprint:(\\S*) (\\S*)/,\n names: ['type', 'hash'],\n format: \"fingerprint:%s %s\"\n },\n {\n //a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host\n //a=candidate:1162875081 1 udp 2113937151 192.168.34.75 60017 typ host generation 0\n //a=candidate:3289912957 2 udp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 generation 0\n //a=candidate:229815620 1 tcp 1518280447 192.168.150.19 60017 typ host tcptype active generation 0\n //a=candidate:3289912957 2 tcp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 tcptype passive generation 0\n push:'candidates',\n reg: /^candidate:(\\S*) (\\d*) (\\S*) (\\d*) (\\S*) (\\d*) typ (\\S*)(?: raddr (\\S*) rport (\\d*))?(?: tcptype (\\S*))?(?: generation (\\d*))?/,\n names: ['foundation', 'component', 'transport', 'priority', 'ip', 'port', 'type', 'raddr', 'rport', 'tcptype', 'generation'],\n format: function (o) {\n var str = \"candidate:%s %d %s %d %s %d typ %s\";\n\n str += (o.raddr != null) ? \" raddr %s rport %d\" : \"%v%v\";\n\n // NB: candidate has three optional chunks, so %void middles one if it's missing\n str += (o.tcptype != null) ? \" tcptype %s\" : \"%v\";\n\n if (o.generation != null) {\n str += \" generation %d\";\n }\n return str;\n }\n },\n { //a=end-of-candidates (keep after the candidates line for readability)\n name: 'endOfCandidates',\n reg: /^(end-of-candidates)/\n },\n { //a=remote-candidates:1 203.0.113.1 54400 2 203.0.113.1 54401 ...\n name: 'remoteCandidates',\n reg: /^remote-candidates:(.*)/,\n format: \"remote-candidates:%s\"\n },\n { //a=ice-options:google-ice\n name: 'iceOptions',\n reg: /^ice-options:(\\S*)/,\n format: \"ice-options:%s\"\n },\n { //a=ssrc:2566107569 cname:t9YU8M1UxTF8Y1A1\n push: \"ssrcs\",\n reg: /^ssrc:(\\d*) ([\\w_]*):(.*)/,\n names: ['id', 'attribute', 'value'],\n format: \"ssrc:%d %s:%s\"\n },\n { //a=ssrc-group:FEC 1 2\n push: \"ssrcGroups\",\n reg: /^ssrc-group:(\\w*) (.*)/,\n names: ['semantics', 'ssrcs'],\n format: \"ssrc-group:%s %s\"\n },\n { //a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV\n name: \"msidSemantic\",\n reg: /^msid-semantic:\\s?(\\w*) (\\S*)/,\n names: ['semantic', 'token'],\n format: \"msid-semantic: %s %s\" // space after \":\" is not accidental\n },\n { //a=group:BUNDLE audio video\n push: 'groups',\n reg: /^group:(\\w*) (.*)/,\n names: ['type', 'mids'],\n format: \"group:%s %s\"\n },\n { //a=rtcp-mux\n name: 'rtcpMux',\n reg: /^(rtcp-mux)/\n },\n { //a=rtcp-rsize\n name: 'rtcpRsize',\n reg: /^(rtcp-rsize)/\n },\n { // any a= that we don't understand is kepts verbatim on media.invalid\n push: 'invalid',\n names: [\"value\"]\n }\n ]\n};\n\n// set sensible defaults to avoid polluting the grammar with boring details\nObject.keys(grammar).forEach(function (key) {\n var objs = grammar[key];\n objs.forEach(function (obj) {\n if (!obj.reg) {\n obj.reg = /(.*)/;\n }\n if (!obj.format) {\n obj.format = \"%s\";\n }\n });\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module chunks = main","var parser = require('./parser');\nvar writer = require('./writer');\n\nexports.write = writer;\nexports.parse = parser.parse;\nexports.parseFmtpConfig = parser.parseFmtpConfig;\nexports.parsePayloads = parser.parsePayloads;\nexports.parseRemoteCandidates = parser.parseRemoteCandidates;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module chunks = main","var toIntIfInt = function (v) {\n return String(Number(v)) === v ? Number(v) : v;\n};\n\nvar attachProperties = function (match, location, names, rawName) {\n if (rawName && !names) {\n location[rawName] = toIntIfInt(match[1]);\n }\n else {\n for (var i = 0; i < names.length; i += 1) {\n if (match[i+1] != null) {\n location[names[i]] = toIntIfInt(match[i+1]);\n }\n }\n }\n};\n\nvar parseReg = function (obj, location, content) {\n var needsBlank = obj.name && obj.names;\n if (obj.push && !location[obj.push]) {\n location[obj.push] = [];\n }\n else if (needsBlank && !location[obj.name]) {\n location[obj.name] = {};\n }\n var keyLocation = obj.push ?\n {} : // blank object that will be pushed\n needsBlank ? location[obj.name] : location; // otherwise, named location or root\n\n attachProperties(content.match(obj.reg), keyLocation, obj.names, obj.name);\n\n if (obj.push) {\n location[obj.push].push(keyLocation);\n }\n};\n\nvar grammar = require('./grammar');\nvar validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/);\n\nexports.parse = function (sdp) {\n var session = {}\n , media = []\n , location = session; // points at where properties go under (one of the above)\n\n // parse lines we understand\n sdp.split(/(\\r\\n|\\r|\\n)/).filter(validLine).forEach(function (l) {\n var type = l[0];\n var content = l.slice(2);\n if (type === 'm') {\n media.push({rtp: [], fmtp: []});\n location = media[media.length-1]; // point at latest media line\n }\n\n for (var j = 0; j < (grammar[type] || []).length; j += 1) {\n var obj = grammar[type][j];\n if (obj.reg.test(content)) {\n return parseReg(obj, location, content);\n }\n }\n });\n\n session.media = media; // link it up\n return session;\n};\n\nvar fmtpReducer = function (acc, expr) {\n var s = expr.split('=');\n if (s.length === 2) {\n acc[s[0]] = toIntIfInt(s[1]);\n }\n return acc;\n};\n\nexports.parseFmtpConfig = function (str) {\n return str.split(/\\;\\s?/).reduce(fmtpReducer, {});\n};\n\nexports.parsePayloads = function (str) {\n return str.split(' ').map(Number);\n};\n\nexports.parseRemoteCandidates = function (str) {\n var candidates = [];\n var parts = str.split(' ').map(toIntIfInt);\n for (var i = 0; i < parts.length; i += 3) {\n candidates.push({\n component: parts[i],\n ip: parts[i + 1],\n port: parts[i + 2]\n });\n }\n return candidates;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module chunks = main","var grammar = require('./grammar');\n\n// customized util.format - discards excess arguments and can void middle ones\nvar formatRegExp = /%[sdv%]/g;\nvar format = function (formatStr) {\n var i = 1;\n var args = arguments;\n var len = args.length;\n return formatStr.replace(formatRegExp, function (x) {\n if (i >= len) {\n return x; // missing argument\n }\n var arg = args[i];\n i += 1;\n switch (x) {\n case '%%':\n return '%';\n case '%s':\n return String(arg);\n case '%d':\n return Number(arg);\n case '%v':\n return '';\n }\n });\n // NB: we discard excess arguments - they are typically undefined from makeLine\n};\n\nvar makeLine = function (type, obj, location) {\n var str = obj.format instanceof Function ?\n (obj.format(obj.push ? location : location[obj.name])) :\n obj.format;\n\n var args = [type + '=' + str];\n if (obj.names) {\n for (var i = 0; i < obj.names.length; i += 1) {\n var n = obj.names[i];\n if (obj.name) {\n args.push(location[obj.name][n]);\n }\n else { // for mLine and push attributes\n args.push(location[obj.names[i]]);\n }\n }\n }\n else {\n args.push(location[obj.name]);\n }\n return format.apply(null, args);\n};\n\n// RFC specified order\n// TODO: extend this with all the rest\nvar defaultOuterOrder = [\n 'v', 'o', 's', 'i',\n 'u', 'e', 'p', 'c',\n 'b', 't', 'r', 'z', 'a'\n];\nvar defaultInnerOrder = ['i', 'c', 'b', 'a'];\n\n\nmodule.exports = function (session, opts) {\n opts = opts || {};\n // ensure certain properties exist\n if (session.version == null) {\n session.version = 0; // \"v=0\" must be there (only defined version atm)\n }\n if (session.name == null) {\n session.name = \" \"; // \"s= \" must be there if no meaningful name set\n }\n session.media.forEach(function (mLine) {\n if (mLine.payloads == null) {\n mLine.payloads = \"\";\n }\n });\n\n var outerOrder = opts.outerOrder || defaultOuterOrder;\n var innerOrder = opts.innerOrder || defaultInnerOrder;\n var sdp = [];\n\n // loop through outerOrder for matching properties on session\n outerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in session && session[obj.name] != null) {\n sdp.push(makeLine(type, obj, session));\n }\n else if (obj.push in session && session[obj.push] != null) {\n session[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n\n // then for each media line, follow the innerOrder\n session.media.forEach(function (mLine) {\n sdp.push(makeLine('m', grammar.m[0], mLine));\n\n innerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in mLine && mLine[obj.name] != null) {\n sdp.push(makeLine(type, obj, mLine));\n }\n else if (obj.push in mLine && mLine[obj.push] != null) {\n mLine[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n });\n\n return sdp.join('\\r\\n') + '\\r\\n';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = function arrayEquals(array) {\n // if the other array is a falsy value, return\n if (!array)\n return false;\n\n // compare lengths - can save a lot of time\n if (this.length != array.length)\n return false;\n\n for (var i = 0, l = this.length; i < l; i++) {\n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array) {\n // recurse into the nested arrays\n if (!arrayEquals.apply(this[i], [array[i]]))\n return false;\n } else if (this[i] != array[i]) {\n // Warning - two different object instances will never be equal:\n // {x:20} != {x:20}\n return false;\n }\n }\n return true;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexports.Interop = require('./interop');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* global RTCSessionDescription */\n/* global RTCIceCandidate */\n/* jshint -W097 */\n\"use strict\";\n\nvar transform = require('./transform');\nvar arrayEquals = require('./array-equals');\n\nfunction Interop() {\n\n /**\n * This map holds the most recent Unified Plan offer/answer SDP that was\n * converted to Plan B, with the SDP type ('offer' or 'answer') as keys and\n * the SDP string as values.\n *\n * @type {{}}\n */\n this.cache = {\n mlB2UMap : {},\n mlU2BMap : {}\n };\n}\n\nmodule.exports = Interop;\n\n/**\n * Changes the candidate args to match with the related Unified Plan\n */\nInterop.prototype.candidateToUnifiedPlan = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n cand.sdpMLineIndex = this.cache.mlB2UMap[cand.sdpMLineIndex];\n /* TODO: change sdpMid to (audio|video)-SSRC */\n\n return cand;\n};\n\n/**\n * Changes the candidate args to match with the related Plan B\n */\nInterop.prototype.candidateToPlanB = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n if (cand.sdpMid.indexOf('audio') === 0) {\n cand.sdpMid = 'audio';\n } else if (cand.sdpMid.indexOf('video') === 0) {\n cand.sdpMid = 'video';\n } else {\n throw new Error('candidate with ' + cand.sdpMid + ' not allowed');\n }\n\n cand.sdpMLineIndex = this.cache.mlU2BMap[cand.sdpMLineIndex];\n\n return cand;\n};\n\n/**\n * Returns the index of the first m-line with the given media type and with a\n * direction which allows sending, in the last Unified Plan description with\n * type \"answer\" converted to Plan B. Returns {null} if there is no saved\n * answer, or if none of its m-lines with the given type allow sending.\n * @param type the media type (\"audio\" or \"video\").\n * @returns {*}\n */\nInterop.prototype.getFirstSendingIndexFromAnswer = function(type) {\n if (!this.cache.answer) {\n return null;\n }\n\n var session = transform.parse(this.cache.answer);\n if (session && session.media && Array.isArray(session.media)){\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type == type &&\n (!session.media[i].direction /* default to sendrecv */ ||\n session.media[i].direction === 'sendrecv' ||\n session.media[i].direction === 'sendonly')){\n return i;\n }\n }\n }\n\n return null;\n};\n\n/**\n * This method transforms a Unified Plan SDP to an equivalent Plan B SDP. A\n * PeerConnection wrapper transforms the SDP to Plan B before passing it to the\n * application.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toPlanB = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n // Objectify the SDP for easier manipulation.\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Unified Plan SDP. Plan B\n // SDP has a video, an audio and a data \"channel\" at most.\n if (session.media.length <= 3 && session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Unified Plan.');\n return desc;\n }\n\n //#endregion\n\n // HACK https://bugzilla.mozilla.org/show_bug.cgi?id=1113443\n var sdp = desc.sdp;\n var rewrite = false;\n for (var i = 0; i < session.media.length; i++) {\n var uLine = session.media[i];\n uLine.rtp.forEach(function(rtp) {\n if (rtp.codec === 'NULL')\n {\n rewrite = true;\n var offer = transform.parse(self.cache.offer);\n rtp.codec = offer.media[i].rtp[0].codec;\n }\n });\n }\n if (rewrite) {\n sdp = transform.write(session);\n }\n\n // Unified Plan SDP is our \"precious\". Cache it for later use in the Plan B\n // -> Unified Plan transformation.\n this.cache[desc.type] = sdp;\n\n //#region Convert from Unified Plan to Plan B.\n\n // We rebuild the session.media array.\n var media = session.media;\n session.media = [];\n\n // Associative array that maps channel types to channel objects for fast\n // access to channel objects by their type, e.g. type2bl['audio']->channel\n // obj.\n var type2bl = {};\n\n // Used to build the group:BUNDLE value after the channels construction\n // loop.\n var types = [];\n\n media.forEach(function(uLine) {\n // rtcp-mux is required in the Plan B SDP.\n if ((typeof uLine.rtcpMux !== 'string' ||\n uLine.rtcpMux !== 'rtcp-mux') &&\n uLine.direction !== 'inactive') {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'without the rtcp-mux attribute were found.');\n }\n\n // If we don't have a channel for this uLine.type OR the selected is\n // inactive, then select this uLine as the channel basis.\n if (typeof type2bl[uLine.type] === 'undefined' ||\n type2bl[uLine.type].direction === 'inactive') {\n type2bl[uLine.type] = uLine;\n }\n\n if (uLine.protocol != type2bl[uLine.type].protocol) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different protocols and this library does not have ' +\n 'support for that');\n }\n\n if (uLine.payloads != type2bl[uLine.type].payloads) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different payloads and this library does not have ' +\n 'support for that');\n }\n\n });\n\n // Implode the Unified Plan m-lines/tracks into Plan B channels.\n media.forEach(function(uLine) {\n if (uLine.type === 'application') {\n session.media.push(uLine);\n types.push(uLine.mid);\n return;\n }\n\n // Add sources to the channel and handle a=msid.\n if (typeof uLine.sources === 'object') {\n Object.keys(uLine.sources).forEach(function(ssrc) {\n if (typeof type2bl[uLine.type].sources !== 'object')\n type2bl[uLine.type].sources = {};\n\n // Assign the sources to the channel.\n type2bl[uLine.type].sources[ssrc] =\n uLine.sources[ssrc];\n\n if (typeof uLine.msid !== 'undefined') {\n // In Plan B the msid is an SSRC attribute. Also, we don't\n // care about the obsolete label and mslabel attributes.\n //\n // Note that it is not guaranteed that the uLine will\n // have an msid. recvonly channels in particular don't have\n // one.\n type2bl[uLine.type].sources[ssrc].msid =\n uLine.msid;\n }\n // NOTE ssrcs in ssrc groups will share msids, as\n // draft-uberti-rtcweb-plan-00 mandates.\n });\n }\n\n // Add ssrc groups to the channel.\n if (typeof uLine.ssrcGroups !== 'undefined' &&\n Array.isArray(uLine.ssrcGroups)) {\n\n // Create the ssrcGroups array, if it's not defined.\n if (typeof type2bl[uLine.type].ssrcGroups === 'undefined' ||\n !Array.isArray(type2bl[uLine.type].ssrcGroups)) {\n type2bl[uLine.type].ssrcGroups = [];\n }\n\n type2bl[uLine.type].ssrcGroups =\n type2bl[uLine.type].ssrcGroups.concat(\n uLine.ssrcGroups);\n }\n\n if (type2bl[uLine.type] === uLine) {\n // Plan B mids are in ['audio', 'video', 'data']\n uLine.mid = uLine.type;\n\n // Plan B doesn't support/need the bundle-only attribute.\n delete uLine.bundleOnly;\n\n // In Plan B the msid is an SSRC attribute.\n delete uLine.msid;\n\n\t if (uLine.type == media[0].type) {\n\t types.unshift(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.unshift(uLine);\n\t } else {\n\t types.push(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.push(uLine);\n\t }\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group with the new mids.\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = types.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n/* follow rules defined in RFC4145 */\nfunction addSetupAttr(uLine) {\n if (typeof uLine.setup === 'undefined') {\n return;\n }\n\n if (uLine.setup === \"active\") {\n uLine.setup = \"passive\";\n } else if (uLine.setup === \"passive\") {\n uLine.setup = \"active\";\n }\n}\n\n/**\n * This method transforms a Plan B SDP to an equivalent Unified Plan SDP. A\n * PeerConnection wrapper transforms the SDP to Unified Plan before passing it\n * to FF.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toUnifiedPlan = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Plan B SDP. Plan B SDP has\n // a video, an audio and a data \"channel\" at most.\n if (session.media.length > 3 || !session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Plan B.');\n return desc;\n }\n\n // Make sure this Plan B SDP can be converted to a Unified Plan SDP.\n var mids = [];\n session.media.forEach(function(m) {\n mids.push(m.mid);\n });\n\n var hasBundle = false;\n if (typeof session.groups !== 'undefined' &&\n Array.isArray(session.groups)) {\n hasBundle = session.groups.every(function(g) {\n return g.type !== 'BUNDLE' ||\n arrayEquals.apply(g.mids.sort(), [mids.sort()]);\n });\n }\n\n if (!hasBundle) {\n var mustBeBundle = false;\n\n session.media.forEach(function(m) {\n if (m.direction !== 'inactive') {\n mustBeBundle = true;\n }\n });\n\n if (mustBeBundle) {\n throw new Error(\"Cannot convert to Unified Plan because m-lines that\" +\n \" are not bundled were found.\");\n }\n }\n\n //#endregion\n\n\n //#region Convert from Plan B to Unified Plan.\n\n // Unfortunately, a Plan B offer/answer doesn't have enough information to\n // rebuild an equivalent Unified Plan offer/answer.\n //\n // For example, if this is a local answer (in Unified Plan style) that we\n // convert to Plan B prior to handing it over to the application (the\n // PeerConnection wrapper called us, for instance, after a successful\n // createAnswer), we want to remember the m-line at which we've seen the\n // (local) SSRC. That's because when the application wants to do call the\n // SLD method, forcing us to do the inverse transformation (from Plan B to\n // Unified Plan), we need to know to which m-line to assign the (local)\n // SSRC. We also need to know all the other m-lines that the original\n // answer had and include them in the transformed answer as well.\n //\n // Another example is if this is a remote offer that we convert to Plan B\n // prior to giving it to the application, we want to remember the mid at\n // which we've seen the (remote) SSRC.\n //\n // In the iteration that follows, we use the cached Unified Plan (if it\n // exists) to assign mids to ssrcs.\n\n var type;\n if (desc.type === 'answer') {\n type = 'offer';\n } else if (desc.type === 'offer') {\n type = 'answer';\n } else {\n throw new Error(\"Type '\" + desc.type + \"' not supported.\");\n }\n\n var cached;\n if (typeof this.cache[type] !== 'undefined') {\n cached = transform.parse(this.cache[type]);\n }\n\n var recvonlySsrcs = {\n audio: {},\n video: {}\n };\n\n // A helper map that sends mids to m-line objects. We use it later to\n // rebuild the Unified Plan style session.media array.\n var mid2ul = {};\n var bIdx = 0;\n var uIdx = 0;\n\n var sources2ul = {};\n\n var candidates;\n var iceUfrag;\n var icePwd;\n var fingerprint;\n var payloads = {};\n var rtcpFb = {};\n var rtp = {};\n\n session.media.forEach(function(bLine) {\n if ((typeof bLine.rtcpMux !== 'string' ||\n bLine.rtcpMux !== 'rtcp-mux') &&\n bLine.direction !== 'inactive') {\n throw new Error(\"Cannot convert to Unified Plan because m-lines \" +\n \"without the rtcp-mux attribute were found.\");\n }\n\n if (bLine.type === 'application') {\n mid2ul[bLine.mid] = bLine;\n return;\n }\n\n // With rtcp-mux and bundle all the channels should have the same ICE\n // stuff.\n var sources = bLine.sources;\n var ssrcGroups = bLine.ssrcGroups;\n var port = bLine.port;\n\n /* Chrome adds different candidates even using bundle, so we concat the candidates list */\n if (typeof bLine.candidates != 'undefined') {\n if (typeof candidates != 'undefined') {\n candidates = candidates.concat(bLine.candidates);\n } else {\n candidates = bLine.candidates;\n }\n }\n\n if ((typeof iceUfrag != 'undefined') && (typeof bLine.iceUfrag != 'undefined') && (iceUfrag != bLine.iceUfrag)) {\n throw new Error(\"Only BUNDLE supported, iceUfrag must be the same for all m-lines.\\n\" +\n \"\\tLast iceUfrag: \" + iceUfrag + \"\\n\" +\n \"\\tNew iceUfrag: \" + bLine.iceUfrag\n );\n }\n\n if (typeof bLine.iceUfrag != 'undefined') {\n iceUfrag = bLine.iceUfrag;\n }\n\n if ((typeof icePwd != 'undefined') && (typeof bLine.icePwd != 'undefined') && (icePwd != bLine.icePwd)) {\n throw new Error(\"Only BUNDLE supported, icePwd must be the same for all m-lines.\\n\" +\n \"\\tLast icePwd: \" + icePwd + \"\\n\" +\n \"\\tNew icePwd: \" + bLine.icePwd\n );\n }\n\n if (typeof bLine.icePwd != 'undefined') {\n icePwd = bLine.icePwd;\n }\n\n if ((typeof fingerprint != 'undefined') && (typeof bLine.fingerprint != 'undefined') &&\n (fingerprint.type != bLine.fingerprint.type || fingerprint.hash != bLine.fingerprint.hash)) {\n throw new Error(\"Only BUNDLE supported, fingerprint must be the same for all m-lines.\\n\" +\n \"\\tLast fingerprint: \" + JSON.stringify(fingerprint) + \"\\n\" +\n \"\\tNew fingerprint: \" + JSON.stringify(bLine.fingerprint)\n );\n }\n\n if (typeof bLine.fingerprint != 'undefined') {\n fingerprint = bLine.fingerprint;\n }\n\n payloads[bLine.type] = bLine.payloads;\n rtcpFb[bLine.type] = bLine.rtcpFb;\n rtp[bLine.type] = bLine.rtp;\n\n // inverted ssrc group map\n var ssrc2group = {};\n if (typeof ssrcGroups !== 'undefined' && Array.isArray(ssrcGroups)) {\n ssrcGroups.forEach(function (ssrcGroup) {\n // XXX This might brake if an SSRC is in more than one group\n // for some reason.\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs.forEach(function (ssrc) {\n if (typeof ssrc2group[ssrc] === 'undefined') {\n ssrc2group[ssrc] = [];\n }\n\n ssrc2group[ssrc].push(ssrcGroup);\n });\n }\n });\n }\n\n // ssrc to m-line index.\n var ssrc2ml = {};\n\n if (typeof sources === 'object') {\n\n // We'll use the \"bLine\" object as a prototype for each new \"mLine\"\n // that we create, but first we need to clean it up a bit.\n delete bLine.sources;\n delete bLine.ssrcGroups;\n delete bLine.candidates;\n delete bLine.iceUfrag;\n delete bLine.icePwd;\n delete bLine.fingerprint;\n delete bLine.port;\n delete bLine.mid;\n\n // Explode the Plan B channel sources with one m-line per source.\n Object.keys(sources).forEach(function(ssrc) {\n\n // The (unified) m-line for this SSRC. We either create it from\n // scratch or, if it's a grouped SSRC, we re-use a related\n // mline. In other words, if the source is grouped with another\n // source, put the two together in the same m-line.\n var uLine;\n\n // We assume here that we are the answerer in the O/A, so any\n // offers which we translate come from the remote side, while\n // answers are local. So the check below is to make that we\n // handle receive-only SSRCs in a special way only if they come\n // from the remote side.\n if (desc.type==='offer') {\n // We want to detect SSRCs which are used by a remote peer\n // in an m-line with direction=recvonly (i.e. they are\n // being used for RTCP only).\n // This information would have gotten lost if the remote\n // peer used Unified Plan and their local description was\n // translated to Plan B. So we use the lack of an MSID\n // attribute to deduce a \"receive only\" SSRC.\n if (!sources[ssrc].msid) {\n recvonlySsrcs[bLine.type][ssrc] = sources[ssrc];\n // Receive-only SSRCs must not create new m-lines. We\n // will assign them to an existing m-line later.\n return;\n }\n }\n\n if (typeof ssrc2group[ssrc] !== 'undefined' &&\n Array.isArray(ssrc2group[ssrc])) {\n ssrc2group[ssrc].some(function (ssrcGroup) {\n // ssrcGroup.ssrcs *is* an Array, no need to check\n // again here.\n return ssrcGroup.ssrcs.some(function (related) {\n if (typeof ssrc2ml[related] === 'object') {\n uLine = ssrc2ml[related];\n return true;\n }\n });\n });\n }\n\n if (typeof uLine === 'object') {\n // the m-line already exists. Just add the source.\n uLine.sources[ssrc] = sources[ssrc];\n delete sources[ssrc].msid;\n } else {\n // Use the \"bLine\" as a prototype for the \"uLine\".\n uLine = Object.create(bLine);\n ssrc2ml[ssrc] = uLine;\n\n if (typeof sources[ssrc].msid !== 'undefined') {\n // Assign the msid of the source to the m-line. Note\n // that it is not guaranteed that the source will have\n // msid. In particular \"recvonly\" sources don't have an\n // msid. Note that \"recvonly\" is a term only defined\n // for m-lines.\n uLine.msid = sources[ssrc].msid;\n delete sources[ssrc].msid;\n }\n\n // We assign one SSRC per media line.\n uLine.sources = {};\n uLine.sources[ssrc] = sources[ssrc];\n uLine.ssrcGroups = ssrc2group[ssrc];\n\n // Use the cached Unified Plan SDP (if it exists) to assign\n // SSRCs to mids.\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n\n cached.media.forEach(function (m) {\n if (typeof m.sources === 'object') {\n Object.keys(m.sources).forEach(function (s) {\n if (s === ssrc) {\n uLine.mid = m.mid;\n }\n });\n }\n });\n }\n\n if (typeof uLine.mid === 'undefined') {\n\n // If this is an SSRC that we see for the first time\n // assign it a new mid. This is typically the case when\n // this method is called to transform a remote\n // description for the first time or when there is a\n // new SSRC in the remote description because a new\n // peer has joined the conference. Local SSRCs should\n // have already been added to the map in the toPlanB\n // method.\n //\n // Because FF generates answers in Unified Plan style,\n // we MUST already have a cached answer with all the\n // local SSRCs mapped to some m-line/mid.\n\n uLine.mid = [bLine.type, '-', ssrc].join('');\n }\n\n // Include the candidates in the 1st media line.\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n sources2ul[uIdx] = uLine.sources;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n uIdx++;\n }\n });\n } else {\n var uLine = bLine;\n\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n }\n\n bIdx++;\n });\n\n // Rebuild the media array in the right order and add the missing mLines\n // (missing from the Plan B SDP).\n session.media = [];\n mids = []; // reuse\n\n if (desc.type === 'answer') {\n\n // The media lines in the answer must match the media lines in the\n // offer. The order is important too. Here we assume that Firefox is\n // the answerer, so we merely have to use the reconstructed (unified)\n // answer to update the cached (unified) answer accordingly.\n //\n // In the general case, one would have to use the cached (unified)\n // offer to find the m-lines that are missing from the reconstructed\n // answer, potentially grabbing them from the cached (unified) answer.\n // One has to be careful with this approach because inactive m-lines do\n // not always have an mid, making it tricky (impossible?) to find where\n // exactly and which m-lines are missing from the reconstructed answer.\n\n for (var i = 0; i < cached.media.length; i++) {\n var uLine = cached.media[i];\n\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (typeof sources2ul[i] === 'undefined') {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'recvonly';\n else if (uLine.direction === 'sendonly')\n uLine.direction = 'inactive';\n } else {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'sendrecv';\n else if (uLine.direction === 'recvonly')\n uLine.direction = 'sendonly';\n }\n\n uLine.sources = sources2ul[i];\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n\n uLine.rtp = rtp[uLine.type];\n uLine.payloads = payloads[uLine.type];\n uLine.rtcpFb = rtcpFb[uLine.type];\n\n session.media.push(uLine);\n\n if (typeof uLine.mid === 'string') {\n // inactive lines don't/may not have an mid.\n mids.push(uLine.mid);\n }\n }\n } else {\n\n // SDP offer/answer (and the JSEP spec) forbids removing an m-section\n // under any circumstances. If we are no longer interested in sending a\n // track, we just remove the msid and ssrc attributes and set it to\n // either a=recvonly (as the reofferer, we must use recvonly if the\n // other side was previously sending on the m-section, but we can also\n // leave the possibility open if it wasn't previously in use), or\n // a=inactive.\n\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n cached.media.forEach(function(uLine) {\n mids.push(uLine.mid);\n if (typeof mid2ul[uLine.mid] !== 'undefined') {\n session.media.push(mid2ul[uLine.mid]);\n } else {\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (!uLine.direction\n || uLine.direction === 'sendrecv') {\n uLine.direction = 'sendonly';\n }\n if (!uLine.direction\n || uLine.direction === 'recvonly') {\n uLine.direction = 'inactive';\n }\n\n addSetupAttr (uLine);\n session.media.push(uLine);\n }\n });\n }\n\n // Add all the remaining (new) m-lines of the transformed SDP.\n Object.keys(mid2ul).forEach(function(mid) {\n if (mids.indexOf(mid) === -1) {\n mids.push(mid);\n if (mid2ul[mid].direction === 'recvonly') {\n // This is a remote recvonly channel. Add its SSRC to the\n // appropriate sendrecv or sendonly channel.\n // TODO(gp) what if we don't have sendrecv/sendonly\n // channel?\n\n var done = false;\n\n session.media.some(function (uLine) {\n if ((uLine.direction === 'sendrecv' ||\n uLine.direction === 'sendonly') &&\n uLine.type === mid2ul[mid].type) {\n // mid2ul[mid] shouldn't have any ssrc-groups\n Object.keys(mid2ul[mid].sources).forEach(\n function (ssrc) {\n uLine.sources[ssrc] =\n mid2ul[mid].sources[ssrc];\n });\n\n done = true;\n return true;\n }\n });\n\n if (!done) {\n session.media.push(mid2ul[mid]);\n }\n } else {\n session.media.push(mid2ul[mid]);\n }\n }\n });\n }\n\n // After we have constructed the Plan Unified m-lines we can figure out\n // where (in which m-line) to place the 'recvonly SSRCs'.\n // Note: we assume here that we are the answerer in the O/A, so any offers\n // which we translate come from the remote side, while answers are local\n // (and so our last local description is cached as an 'answer').\n [\"audio\", \"video\"].forEach(function (type) {\n if (!session || !session.media || !Array.isArray(session.media))\n return;\n\n var idx = null;\n if (Object.keys(recvonlySsrcs[type]).length > 0) {\n idx = self.getFirstSendingIndexFromAnswer(type);\n if (idx === null){\n // If this is the first offer we receive, we don't have a\n // cached answer. Assume that we will be sending media using\n // the first m-line for each media type.\n\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type === type) {\n idx = i;\n break;\n }\n }\n }\n }\n\n if (idx && session.media.length > idx) {\n var mLine = session.media[idx];\n Object.keys(recvonlySsrcs[type]).forEach(function(ssrc) {\n if (mLine.sources && mLine.sources[ssrc]) {\n console.warn(\"Replacing an existing SSRC.\");\n }\n if (!mLine.sources) {\n mLine.sources = {};\n }\n\n mLine.sources[ssrc] = recvonlySsrcs[type][ssrc];\n });\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group (since we regenerated the mids)\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = mids.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n // Cache the transformed SDP (Unified Plan) for later re-use in this\n // function.\n this.cache[desc.type] = resStr;\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar transform = require('sdp-transform');\n\nexports.write = function(session, opts) {\n\n if (typeof session !== 'undefined' &&\n typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // expand sources to ssrcs\n if (typeof mLine.sources !== 'undefined' &&\n Object.keys(mLine.sources).length !== 0) {\n mLine.ssrcs = [];\n Object.keys(mLine.sources).forEach(function (ssrc) {\n var source = mLine.sources[ssrc];\n Object.keys(source).forEach(function (attribute) {\n mLine.ssrcs.push({\n id: ssrc,\n attribute: attribute,\n value: source[attribute]\n });\n });\n });\n delete mLine.sources;\n }\n\n // join ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.join(' ');\n }\n });\n }\n });\n }\n\n // join group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids !== 'undefined' && Array.isArray(g.mids)) {\n g.mids = g.mids.join(' ');\n }\n });\n }\n\n return transform.write(session, opts);\n};\n\nexports.parse = function(sdp) {\n var session = transform.parse(sdp);\n\n if (typeof session !== 'undefined' && typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // group sources attributes by ssrc\n if (typeof mLine.ssrcs !== 'undefined' && Array.isArray(mLine.ssrcs)) {\n mLine.sources = {};\n mLine.ssrcs.forEach(function (ssrc) {\n if (!mLine.sources[ssrc.id])\n mLine.sources[ssrc.id] = {};\n mLine.sources[ssrc.id][ssrc.attribute] = ssrc.value;\n });\n\n delete mLine.ssrcs;\n }\n\n // split ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs === 'string') {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.split(' ');\n }\n });\n }\n });\n }\n // split group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids === 'string') {\n g.mids = g.mids.split(' ');\n }\n });\n }\n\n return session;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module chunks = main"," /* eslint-env node */\n'use strict';\n\n// SDP helpers.\nvar SDPUtils = {};\n\n// Generate an alphanumeric identifier for cname or mids.\n// TODO: use UUIDs instead? https://gist.github.com/jed/982883\nSDPUtils.generateIdentifier = function() {\n return Math.random().toString(36).substr(2, 10);\n};\n\n// The RTCP CNAME used by all peerconnections from the same JS.\nSDPUtils.localCName = SDPUtils.generateIdentifier();\n\n// Splits SDP into lines, dealing with both CRLF and LF.\nSDPUtils.splitLines = function(blob) {\n return blob.trim().split('\\n').map(function(line) {\n return line.trim();\n });\n};\n// Splits SDP into sessionpart and mediasections. Ensures CRLF.\nSDPUtils.splitSections = function(blob) {\n var parts = blob.split('\\nm=');\n return parts.map(function(part, index) {\n return (index > 0 ? 'm=' + part : part).trim() + '\\r\\n';\n });\n};\n\n// returns the session description.\nSDPUtils.getDescription = function(blob) {\n var sections = SDPUtils.splitSections(blob);\n return sections && sections[0];\n};\n\n// returns the individual media sections.\nSDPUtils.getMediaSections = function(blob) {\n var sections = SDPUtils.splitSections(blob);\n sections.shift();\n return sections;\n};\n\n// Returns lines that start with a certain prefix.\nSDPUtils.matchPrefix = function(blob, prefix) {\n return SDPUtils.splitLines(blob).filter(function(line) {\n return line.indexOf(prefix) === 0;\n });\n};\n\n// Parses an ICE candidate line. Sample input:\n// candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8\n// rport 55996\"\nSDPUtils.parseCandidate = function(line) {\n var parts;\n // Parse both variants.\n if (line.indexOf('a=candidate:') === 0) {\n parts = line.substring(12).split(' ');\n } else {\n parts = line.substring(10).split(' ');\n }\n\n var candidate = {\n foundation: parts[0],\n component: parseInt(parts[1], 10),\n protocol: parts[2].toLowerCase(),\n priority: parseInt(parts[3], 10),\n ip: parts[4],\n port: parseInt(parts[5], 10),\n // skip parts[6] == 'typ'\n type: parts[7]\n };\n\n for (var i = 8; i < parts.length; i += 2) {\n switch (parts[i]) {\n case 'raddr':\n candidate.relatedAddress = parts[i + 1];\n break;\n case 'rport':\n candidate.relatedPort = parseInt(parts[i + 1], 10);\n break;\n case 'tcptype':\n candidate.tcpType = parts[i + 1];\n break;\n case 'ufrag':\n candidate.ufrag = parts[i + 1]; // for backward compability.\n candidate.usernameFragment = parts[i + 1];\n break;\n default: // extension handling, in particular ufrag\n candidate[parts[i]] = parts[i + 1];\n break;\n }\n }\n return candidate;\n};\n\n// Translates a candidate object into SDP candidate attribute.\nSDPUtils.writeCandidate = function(candidate) {\n var sdp = [];\n sdp.push(candidate.foundation);\n sdp.push(candidate.component);\n sdp.push(candidate.protocol.toUpperCase());\n sdp.push(candidate.priority);\n sdp.push(candidate.ip);\n sdp.push(candidate.port);\n\n var type = candidate.type;\n sdp.push('typ');\n sdp.push(type);\n if (type !== 'host' && candidate.relatedAddress &&\n candidate.relatedPort) {\n sdp.push('raddr');\n sdp.push(candidate.relatedAddress); // was: relAddr\n sdp.push('rport');\n sdp.push(candidate.relatedPort); // was: relPort\n }\n if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {\n sdp.push('tcptype');\n sdp.push(candidate.tcpType);\n }\n if (candidate.usernameFragment || candidate.ufrag) {\n sdp.push('ufrag');\n sdp.push(candidate.usernameFragment || candidate.ufrag);\n }\n return 'candidate:' + sdp.join(' ');\n};\n\n// Parses an ice-options line, returns an array of option tags.\n// a=ice-options:foo bar\nSDPUtils.parseIceOptions = function(line) {\n return line.substr(14).split(' ');\n}\n\n// Parses an rtpmap line, returns RTCRtpCoddecParameters. Sample input:\n// a=rtpmap:111 opus/48000/2\nSDPUtils.parseRtpMap = function(line) {\n var parts = line.substr(9).split(' ');\n var parsed = {\n payloadType: parseInt(parts.shift(), 10) // was: id\n };\n\n parts = parts[0].split('/');\n\n parsed.name = parts[0];\n parsed.clockRate = parseInt(parts[1], 10); // was: clockrate\n // was: channels\n parsed.numChannels = parts.length === 3 ? parseInt(parts[2], 10) : 1;\n return parsed;\n};\n\n// Generate an a=rtpmap line from RTCRtpCodecCapability or\n// RTCRtpCodecParameters.\nSDPUtils.writeRtpMap = function(codec) {\n var pt = codec.payloadType;\n if (codec.preferredPayloadType !== undefined) {\n pt = codec.preferredPayloadType;\n }\n return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate +\n (codec.numChannels !== 1 ? '/' + codec.numChannels : '') + '\\r\\n';\n};\n\n// Parses an a=extmap line (headerextension from RFC 5285). Sample input:\n// a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\n// a=extmap:2/sendonly urn:ietf:params:rtp-hdrext:toffset\nSDPUtils.parseExtmap = function(line) {\n var parts = line.substr(9).split(' ');\n return {\n id: parseInt(parts[0], 10),\n direction: parts[0].indexOf('/') > 0 ? parts[0].split('/')[1] : 'sendrecv',\n uri: parts[1]\n };\n};\n\n// Generates a=extmap line from RTCRtpHeaderExtensionParameters or\n// RTCRtpHeaderExtension.\nSDPUtils.writeExtmap = function(headerExtension) {\n return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) +\n (headerExtension.direction && headerExtension.direction !== 'sendrecv'\n ? '/' + headerExtension.direction\n : '') +\n ' ' + headerExtension.uri + '\\r\\n';\n};\n\n// Parses an ftmp line, returns dictionary. Sample input:\n// a=fmtp:96 vbr=on;cng=on\n// Also deals with vbr=on; cng=on\nSDPUtils.parseFmtp = function(line) {\n var parsed = {};\n var kv;\n var parts = line.substr(line.indexOf(' ') + 1).split(';');\n for (var j = 0; j < parts.length; j++) {\n kv = parts[j].trim().split('=');\n parsed[kv[0].trim()] = kv[1];\n }\n return parsed;\n};\n\n// Generates an a=ftmp line from RTCRtpCodecCapability or RTCRtpCodecParameters.\nSDPUtils.writeFmtp = function(codec) {\n var line = '';\n var pt = codec.payloadType;\n if (codec.preferredPayloadType !== undefined) {\n pt = codec.preferredPayloadType;\n }\n if (codec.parameters && Object.keys(codec.parameters).length) {\n var params = [];\n Object.keys(codec.parameters).forEach(function(param) {\n params.push(param + '=' + codec.parameters[param]);\n });\n line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\\r\\n';\n }\n return line;\n};\n\n// Parses an rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:\n// a=rtcp-fb:98 nack rpsi\nSDPUtils.parseRtcpFb = function(line) {\n var parts = line.substr(line.indexOf(' ') + 1).split(' ');\n return {\n type: parts.shift(),\n parameter: parts.join(' ')\n };\n};\n// Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.\nSDPUtils.writeRtcpFb = function(codec) {\n var lines = '';\n var pt = codec.payloadType;\n if (codec.preferredPayloadType !== undefined) {\n pt = codec.preferredPayloadType;\n }\n if (codec.rtcpFeedback && codec.rtcpFeedback.length) {\n // FIXME: special handling for trr-int?\n codec.rtcpFeedback.forEach(function(fb) {\n lines += 'a=rtcp-fb:' + pt + ' ' + fb.type +\n (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') +\n '\\r\\n';\n });\n }\n return lines;\n};\n\n// Parses an RFC 5576 ssrc media attribute. Sample input:\n// a=ssrc:3735928559 cname:something\nSDPUtils.parseSsrcMedia = function(line) {\n var sp = line.indexOf(' ');\n var parts = {\n ssrc: parseInt(line.substr(7, sp - 7), 10)\n };\n var colon = line.indexOf(':', sp);\n if (colon > -1) {\n parts.attribute = line.substr(sp + 1, colon - sp - 1);\n parts.value = line.substr(colon + 1);\n } else {\n parts.attribute = line.substr(sp + 1);\n }\n return parts;\n};\n\n// Extracts the MID (RFC 5888) from a media section.\n// returns the MID or undefined if no mid line was found.\nSDPUtils.getMid = function(mediaSection) {\n var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0];\n if (mid) {\n return mid.substr(6);\n }\n}\n\nSDPUtils.parseFingerprint = function(line) {\n var parts = line.substr(14).split(' ');\n return {\n algorithm: parts[0].toLowerCase(), // algorithm is case-sensitive in Edge.\n value: parts[1]\n };\n};\n\n// Extracts DTLS parameters from SDP media section or sessionpart.\n// FIXME: for consistency with other functions this should only\n// get the fingerprint line as input. See also getIceParameters.\nSDPUtils.getDtlsParameters = function(mediaSection, sessionpart) {\n var lines = SDPUtils.matchPrefix(mediaSection + sessionpart,\n 'a=fingerprint:');\n // Note: a=setup line is ignored since we use the 'auto' role.\n // Note2: 'algorithm' is not case sensitive except in Edge.\n return {\n role: 'auto',\n fingerprints: lines.map(SDPUtils.parseFingerprint)\n };\n};\n\n// Serializes DTLS parameters to SDP.\nSDPUtils.writeDtlsParameters = function(params, setupType) {\n var sdp = 'a=setup:' + setupType + '\\r\\n';\n params.fingerprints.forEach(function(fp) {\n sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\\r\\n';\n });\n return sdp;\n};\n// Parses ICE information from SDP media section or sessionpart.\n// FIXME: for consistency with other functions this should only\n// get the ice-ufrag and ice-pwd lines as input.\nSDPUtils.getIceParameters = function(mediaSection, sessionpart) {\n var lines = SDPUtils.splitLines(mediaSection);\n // Search in session part, too.\n lines = lines.concat(SDPUtils.splitLines(sessionpart));\n var iceParameters = {\n usernameFragment: lines.filter(function(line) {\n return line.indexOf('a=ice-ufrag:') === 0;\n })[0].substr(12),\n password: lines.filter(function(line) {\n return line.indexOf('a=ice-pwd:') === 0;\n })[0].substr(10)\n };\n return iceParameters;\n};\n\n// Serializes ICE parameters to SDP.\nSDPUtils.writeIceParameters = function(params) {\n return 'a=ice-ufrag:' + params.usernameFragment + '\\r\\n' +\n 'a=ice-pwd:' + params.password + '\\r\\n';\n};\n\n// Parses the SDP media section and returns RTCRtpParameters.\nSDPUtils.parseRtpParameters = function(mediaSection) {\n var description = {\n codecs: [],\n headerExtensions: [],\n fecMechanisms: [],\n rtcp: []\n };\n var lines = SDPUtils.splitLines(mediaSection);\n var mline = lines[0].split(' ');\n for (var i = 3; i < mline.length; i++) { // find all codecs from mline[3..]\n var pt = mline[i];\n var rtpmapline = SDPUtils.matchPrefix(\n mediaSection, 'a=rtpmap:' + pt + ' ')[0];\n if (rtpmapline) {\n var codec = SDPUtils.parseRtpMap(rtpmapline);\n var fmtps = SDPUtils.matchPrefix(\n mediaSection, 'a=fmtp:' + pt + ' ');\n // Only the first a=fmtp: is considered.\n codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};\n codec.rtcpFeedback = SDPUtils.matchPrefix(\n mediaSection, 'a=rtcp-fb:' + pt + ' ')\n .map(SDPUtils.parseRtcpFb);\n description.codecs.push(codec);\n // parse FEC mechanisms from rtpmap lines.\n switch (codec.name.toUpperCase()) {\n case 'RED':\n case 'ULPFEC':\n description.fecMechanisms.push(codec.name.toUpperCase());\n break;\n default: // only RED and ULPFEC are recognized as FEC mechanisms.\n break;\n }\n }\n }\n SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(function(line) {\n description.headerExtensions.push(SDPUtils.parseExtmap(line));\n });\n // FIXME: parse rtcp.\n return description;\n};\n\n// Generates parts of the SDP media section describing the capabilities /\n// parameters.\nSDPUtils.writeRtpDescription = function(kind, caps) {\n var sdp = '';\n\n // Build the mline.\n sdp += 'm=' + kind + ' ';\n sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.\n sdp += ' UDP/TLS/RTP/SAVPF ';\n sdp += caps.codecs.map(function(codec) {\n if (codec.preferredPayloadType !== undefined) {\n return codec.preferredPayloadType;\n }\n return codec.payloadType;\n }).join(' ') + '\\r\\n';\n\n sdp += 'c=IN IP4 0.0.0.0\\r\\n';\n sdp += 'a=rtcp:9 IN IP4 0.0.0.0\\r\\n';\n\n // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.\n caps.codecs.forEach(function(codec) {\n sdp += SDPUtils.writeRtpMap(codec);\n sdp += SDPUtils.writeFmtp(codec);\n sdp += SDPUtils.writeRtcpFb(codec);\n });\n var maxptime = 0;\n caps.codecs.forEach(function(codec) {\n if (codec.maxptime > maxptime) {\n maxptime = codec.maxptime;\n }\n });\n if (maxptime > 0) {\n sdp += 'a=maxptime:' + maxptime + '\\r\\n';\n }\n sdp += 'a=rtcp-mux\\r\\n';\n\n caps.headerExtensions.forEach(function(extension) {\n sdp += SDPUtils.writeExtmap(extension);\n });\n // FIXME: write fecMechanisms.\n return sdp;\n};\n\n// Parses the SDP media section and returns an array of\n// RTCRtpEncodingParameters.\nSDPUtils.parseRtpEncodingParameters = function(mediaSection) {\n var encodingParameters = [];\n var description = SDPUtils.parseRtpParameters(mediaSection);\n var hasRed = description.fecMechanisms.indexOf('RED') !== -1;\n var hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1;\n\n // filter a=ssrc:... cname:, ignore PlanB-msid\n var ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')\n .map(function(line) {\n return SDPUtils.parseSsrcMedia(line);\n })\n .filter(function(parts) {\n return parts.attribute === 'cname';\n });\n var primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc;\n var secondarySsrc;\n\n var flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID')\n .map(function(line) {\n var parts = line.split(' ');\n parts.shift();\n return parts.map(function(part) {\n return parseInt(part, 10);\n });\n });\n if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) {\n secondarySsrc = flows[0][1];\n }\n\n description.codecs.forEach(function(codec) {\n if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) {\n var encParam = {\n ssrc: primarySsrc,\n codecPayloadType: parseInt(codec.parameters.apt, 10),\n rtx: {\n ssrc: secondarySsrc\n }\n };\n encodingParameters.push(encParam);\n if (hasRed) {\n encParam = JSON.parse(JSON.stringify(encParam));\n encParam.fec = {\n ssrc: secondarySsrc,\n mechanism: hasUlpfec ? 'red+ulpfec' : 'red'\n };\n encodingParameters.push(encParam);\n }\n }\n });\n if (encodingParameters.length === 0 && primarySsrc) {\n encodingParameters.push({\n ssrc: primarySsrc\n });\n }\n\n // we support both b=AS and b=TIAS but interpret AS as TIAS.\n var bandwidth = SDPUtils.matchPrefix(mediaSection, 'b=');\n if (bandwidth.length) {\n if (bandwidth[0].indexOf('b=TIAS:') === 0) {\n bandwidth = parseInt(bandwidth[0].substr(7), 10);\n } else if (bandwidth[0].indexOf('b=AS:') === 0) {\n // use formula from JSEP to convert b=AS to TIAS value.\n bandwidth = parseInt(bandwidth[0].substr(5), 10) * 1000 * 0.95\n - (50 * 40 * 8);\n } else {\n bandwidth = undefined;\n }\n encodingParameters.forEach(function(params) {\n params.maxBitrate = bandwidth;\n });\n }\n return encodingParameters;\n};\n\n// parses http://draft.ortc.org/#rtcrtcpparameters*\nSDPUtils.parseRtcpParameters = function(mediaSection) {\n var rtcpParameters = {};\n\n var cname;\n // Gets the first SSRC. Note that with RTX there might be multiple\n // SSRCs.\n var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')\n .map(function(line) {\n return SDPUtils.parseSsrcMedia(line);\n })\n .filter(function(obj) {\n return obj.attribute === 'cname';\n })[0];\n if (remoteSsrc) {\n rtcpParameters.cname = remoteSsrc.value;\n rtcpParameters.ssrc = remoteSsrc.ssrc;\n }\n\n // Edge uses the compound attribute instead of reducedSize\n // compound is !reducedSize\n var rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize');\n rtcpParameters.reducedSize = rsize.length > 0;\n rtcpParameters.compound = rsize.length === 0;\n\n // parses the rtcp-mux attrіbute.\n // Note that Edge does not support unmuxed RTCP.\n var mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux');\n rtcpParameters.mux = mux.length > 0;\n\n return rtcpParameters;\n};\n\n// parses either a=msid: or a=ssrc:... msid lines and returns\n// the id of the MediaStream and MediaStreamTrack.\nSDPUtils.parseMsid = function(mediaSection) {\n var parts;\n var spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:');\n if (spec.length === 1) {\n parts = spec[0].substr(7).split(' ');\n return {stream: parts[0], track: parts[1]};\n }\n var planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')\n .map(function(line) {\n return SDPUtils.parseSsrcMedia(line);\n })\n .filter(function(parts) {\n return parts.attribute === 'msid';\n });\n if (planB.length > 0) {\n parts = planB[0].value.split(' ');\n return {stream: parts[0], track: parts[1]};\n }\n};\n\n// Generate a session ID for SDP.\n// https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.2.1\n// recommends using a cryptographically random +ve 64-bit value\n// but right now this should be acceptable and within the right range\nSDPUtils.generateSessionId = function() {\n return Math.random().toString().substr(2, 21);\n};\n\n// Write boilder plate for start of SDP\n// sessId argument is optional - if not supplied it will\n// be generated randomly\n// sessVersion is optional and defaults to 2\nSDPUtils.writeSessionBoilerplate = function(sessId, sessVer) {\n var sessionId;\n var version = sessVer !== undefined ? sessVer : 2;\n if (sessId) {\n sessionId = sessId;\n } else {\n sessionId = SDPUtils.generateSessionId();\n }\n // FIXME: sess-id should be an NTP timestamp.\n return 'v=0\\r\\n' +\n 'o=thisisadapterortc ' + sessionId + ' ' + version + ' IN IP4 127.0.0.1\\r\\n' +\n 's=-\\r\\n' +\n 't=0 0\\r\\n';\n};\n\nSDPUtils.writeMediaSection = function(transceiver, caps, type, stream) {\n var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);\n\n // Map ICE parameters (ufrag, pwd) to SDP.\n sdp += SDPUtils.writeIceParameters(\n transceiver.iceGatherer.getLocalParameters());\n\n // Map DTLS parameters to SDP.\n sdp += SDPUtils.writeDtlsParameters(\n transceiver.dtlsTransport.getLocalParameters(),\n type === 'offer' ? 'actpass' : 'active');\n\n sdp += 'a=mid:' + transceiver.mid + '\\r\\n';\n\n if (transceiver.direction) {\n sdp += 'a=' + transceiver.direction + '\\r\\n';\n } else if (transceiver.rtpSender && transceiver.rtpReceiver) {\n sdp += 'a=sendrecv\\r\\n';\n } else if (transceiver.rtpSender) {\n sdp += 'a=sendonly\\r\\n';\n } else if (transceiver.rtpReceiver) {\n sdp += 'a=recvonly\\r\\n';\n } else {\n sdp += 'a=inactive\\r\\n';\n }\n\n if (transceiver.rtpSender) {\n // spec.\n var msid = 'msid:' + stream.id + ' ' +\n transceiver.rtpSender.track.id + '\\r\\n';\n sdp += 'a=' + msid;\n\n // for Chrome.\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc +\n ' ' + msid;\n if (transceiver.sendEncodingParameters[0].rtx) {\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +\n ' ' + msid;\n sdp += 'a=ssrc-group:FID ' +\n transceiver.sendEncodingParameters[0].ssrc + ' ' +\n transceiver.sendEncodingParameters[0].rtx.ssrc +\n '\\r\\n';\n }\n }\n // FIXME: this should be written by writeRtpDescription.\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc +\n ' cname:' + SDPUtils.localCName + '\\r\\n';\n if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) {\n sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +\n ' cname:' + SDPUtils.localCName + '\\r\\n';\n }\n return sdp;\n};\n\n// Gets the direction from the mediaSection or the sessionpart.\nSDPUtils.getDirection = function(mediaSection, sessionpart) {\n // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.\n var lines = SDPUtils.splitLines(mediaSection);\n for (var i = 0; i < lines.length; i++) {\n switch (lines[i]) {\n case 'a=sendrecv':\n case 'a=sendonly':\n case 'a=recvonly':\n case 'a=inactive':\n return lines[i].substr(2);\n default:\n // FIXME: What should happen here?\n }\n }\n if (sessionpart) {\n return SDPUtils.getDirection(sessionpart);\n }\n return 'sendrecv';\n};\n\nSDPUtils.getKind = function(mediaSection) {\n var lines = SDPUtils.splitLines(mediaSection);\n var mline = lines[0].split(' ');\n return mline[0].substr(2);\n};\n\nSDPUtils.isRejected = function(mediaSection) {\n return mediaSection.split(' ', 2)[1] === '0';\n};\n\nSDPUtils.parseMLine = function(mediaSection) {\n var lines = SDPUtils.splitLines(mediaSection);\n var parts = lines[0].substr(2).split(' ');\n return {\n kind: parts[0],\n port: parseInt(parts[1], 10),\n protocol: parts[2],\n fmt: parts.slice(3).join(' ')\n };\n};\n\nSDPUtils.parseOLine = function(mediaSection) {\n var line = SDPUtils.matchPrefix(mediaSection, 'o=')[0];\n var parts = line.substr(2).split(' ');\n return {\n username: parts[0],\n sessionId: parts[1],\n sessionVersion: parseInt(parts[2], 10),\n netType: parts[3],\n addressType: parts[4],\n address: parts[5],\n };\n}\n\n// Expose public methods.\nif (typeof module === 'object') {\n module.exports = SDPUtils;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp/sdp.js\n// module id = ../../../../openvidu-browser/node_modules/sdp/sdp.js\n// module chunks = main","/**\n * UAParser.js v0.7.17\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2016 Faisal Salman \n * Dual licensed under GPLv2 & MIT\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.17',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var margedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n margedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n margedRegexes[i] = regexes[i];\n }\n }\n return margedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n //var result = {},\n var i = 0, j, k, p, q, matches, match;//, args = arguments;\n\n /*// construct object barebones\n for (p = 0; p < args[1].length; p++) {\n q = args[1][p];\n result[typeof q === OBJ_TYPE ? q[0] : q] = undefined;\n }*/\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n // console.log(this);\n //return this;\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]+)*/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n\n // Trident based\n /(avant\\s|iemobile|slim|baidu)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser/Baidu\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]+)*/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser\n ], [NAME, VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [NAME, VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i\n // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(konqueror)\\/([\\w\\.]+)/i, // Konqueror\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\\/([\\w\\.-]+)/i,\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]+)*/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n\n /* /////////////////////\n // Media players BEGIN\n ////////////////////////\n\n , [\n\n /(apple(?:coremedia|))\\/((\\d+)[\\w\\._]+)/i, // Generic Apple CoreMedia\n /(coremedia) v((\\d+)[\\w\\._]+)/i\n ], [NAME, VERSION], [\n\n /(aqualung|lyssna|bsplayer)\\/((\\d+)?[\\w\\.-]+)/i // Aqualung/Lyssna/BSPlayer\n ], [NAME, VERSION], [\n\n /(ares|ossproxy)\\s((\\d+)[\\w\\.-]+)/i // Ares/OSSProxy\n ], [NAME, VERSION], [\n\n /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\\/((\\d+)[\\w\\.-]+)/i,\n // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC\n // NSPlayer/PSP-InternetRadioPlayer/Videos\n /(clementine|music player daemon)\\s((\\d+)[\\w\\.-]+)/i, // Clementine/MPD\n /(lg player|nexplayer)\\s((\\d+)[\\d\\.]+)/i,\n /player\\/(nexplayer|lg player)\\s((\\d+)[\\w\\.-]+)/i // NexPlayer/LG Player\n ], [NAME, VERSION], [\n /(nexplayer)\\s((\\d+)[\\w\\.-]+)/i // Nexplayer\n ], [NAME, VERSION], [\n\n /(flrp)\\/((\\d+)[\\w\\.-]+)/i // Flip Player\n ], [[NAME, 'Flip Player'], VERSION], [\n\n /(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i\n // FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit\n ], [NAME], [\n\n /(gstreamer) souphttpsrc (?:\\([^\\)]+\\)){0,1} libsoup\\/((\\d+)[\\w\\.-]+)/i\n // Gstreamer\n ], [NAME, VERSION], [\n\n /(htc streaming player)\\s[\\w_]+\\s\\/\\s((\\d+)[\\d\\.]+)/i, // HTC Streaming Player\n /(java|python-urllib|python-requests|wget|libcurl)\\/((\\d+)[\\w\\.-_]+)/i,\n // Java/urllib/requests/wget/cURL\n /(lavf)((\\d+)[\\d\\.]+)/i // Lavf (FFMPEG)\n ], [NAME, VERSION], [\n\n /(htc_one_s)\\/((\\d+)[\\d\\.]+)/i // HTC One S\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(mplayer)(?:\\s|\\/)(?:(?:sherpya-){0,1}svn)(?:-|\\s)(r\\d+(?:-\\d+[\\w\\.-]+){0,1})/i\n // MPlayer SVN\n ], [NAME, VERSION], [\n\n /(mplayer)(?:\\s|\\/|[unkow-]+)((\\d+)[\\w\\.-]+)/i // MPlayer\n ], [NAME, VERSION], [\n\n /(mplayer)/i, // MPlayer (no other info)\n /(yourmuze)/i, // YourMuze\n /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime\n ], [NAME], [\n\n /(nero (?:home|scout))\\/((\\d+)[\\w\\.-]+)/i // Nero Home/Nero Scout\n ], [NAME, VERSION], [\n\n /(nokia\\d+)\\/((\\d+)[\\w\\.-]+)/i // Nokia\n ], [NAME, VERSION], [\n\n /\\s(songbird)\\/((\\d+)[\\w\\.-]+)/i // Songbird/Philips-Songbird\n ], [NAME, VERSION], [\n\n /(winamp)3 version ((\\d+)[\\w\\.-]+)/i, // Winamp\n /(winamp)\\s((\\d+)[\\w\\.-]+)/i,\n /(winamp)mpeg\\/((\\d+)[\\w\\.-]+)/i\n ], [NAME, VERSION], [\n\n /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)\n // inlight radio\n ], [NAME], [\n\n /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\\/((\\d+)[\\w\\.-]+)/i\n // QuickTime/RealMedia/RadioApp/RadioClientApplication/\n // SoundTap/Totem/Stagefright/Streamium\n ], [NAME, VERSION], [\n\n /(smp)((\\d+)[\\d\\.]+)/i // SMP\n ], [NAME, VERSION], [\n\n /(vlc) media player - version ((\\d+)[\\w\\.]+)/i, // VLC Videolan\n /(vlc)\\/((\\d+)[\\w\\.-]+)/i,\n /(xbmc|gvfs|xine|xmms|irapp)\\/((\\d+)[\\w\\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp\n /(foobar2000)\\/((\\d+)[\\d\\.]+)/i, // Foobar2000\n /(itunes)\\/((\\d+)[\\d\\.]+)/i // iTunes\n ], [NAME, VERSION], [\n\n /(wmplayer)\\/((\\d+)[\\w\\.-]+)/i, // Windows Media Player\n /(windows-media-player)\\/((\\d+)[\\w\\.-]+)/i\n ], [[NAME, /-/g, ' '], VERSION], [\n\n /windows\\/((\\d+)[\\w\\.-]+) upnp\\/[\\d\\.]+ dlnadoc\\/[\\d\\.]+ (home media server)/i\n // Windows Media Server\n ], [VERSION, [NAME, 'Windows']], [\n\n /(com\\.riseupradioalarm)\\/((\\d+)[\\d\\.]*)/i // RiseUP Radio Alarm\n ], [NAME, VERSION], [\n\n /(rad.io)\\s((\\d+)[\\d\\.]+)/i, // Rad.io\n /(radio.(?:de|at|fr))\\s((\\d+)[\\d\\.]+)/i\n ], [[NAME, 'rad.io'], VERSION]\n\n //////////////////////\n // Media players END\n ////////////////////*/\n\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+;))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\);-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/[\\w\\.]+.*silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/[\\w\\.]+.*silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]+)*/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(S(?:5000|6000)+(?:[-][\\w+]))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\))|\\w+)*/i, // HTC\n /(zte)-(\\w+)*/i, // ZTE\n /(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]+)*/i\n // Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?(:?\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w+)*/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)*/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w+)*/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]+)*/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android\\s3\\.[\\s\\w;-]{10}(a\\d{3})/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w+)*/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)\\s/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel xl|pixel)\\s/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+)?)\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)?(?:[\\s_]*[\\w\\s]+)?)\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu Tablet\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [\n\n /android.+a000(1)\\s+build/i // OnePlus\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Venue[\\d\\s]*)\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(zte)?.+(k\\d{2})\\s+build/i // ZTE K Series Tablet\n ], [[VENDOR, 'ZTE'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2}x?.*)\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(.+)\\s+build/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?.+)\\s+build/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?.+)\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-?)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(.*\\b)\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q.+)\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /(android.+)[;\\/].+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n\n\n /*//////////////////////////\n // TODO: move to string map\n ////////////////////////////\n\n /(C6603)/i // Sony Xperia Z C6603\n ], [[MODEL, 'Xperia Z C6603'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n /(C6903)/i // Sony Xperia Z 1\n ], [[MODEL, 'Xperia Z 1'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /(SM-G900[F|H])/i // Samsung Galaxy S5\n ], [[MODEL, 'Galaxy S5'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G7102)/i // Samsung Galaxy Grand 2\n ], [[MODEL, 'Galaxy Grand 2'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G530H)/i // Samsung Galaxy Grand Prime\n ], [[MODEL, 'Galaxy Grand Prime'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G313HZ)/i // Samsung Galaxy V\n ], [[MODEL, 'Galaxy V'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T805)/i // Samsung Galaxy Tab S 10.5\n ], [[MODEL, 'Galaxy Tab S 10.5'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n /(SM-G800F)/i // Samsung Galaxy S5 Mini\n ], [[MODEL, 'Galaxy S5 Mini'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T311)/i // Samsung Galaxy Tab 3 8.0\n ], [[MODEL, 'Galaxy Tab 3 8.0'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n\n /(T3C)/i // Advan Vandroid T3C\n ], [MODEL, [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN T1J\\+)/i // Advan Vandroid T1J+\n ], [[MODEL, 'Vandroid T1J+'], [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN S4A)/i // Advan Vandroid S4A\n ], [[MODEL, 'Vandroid S4A'], [VENDOR, 'Advan'], [TYPE, MOBILE]], [\n\n /(V972M)/i // ZTE V972M\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n\n /(i-mobile)\\s(IQ\\s[\\d\\.]+)/i // i-mobile IQ\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(IQ6.3)/i // i-mobile IQ IQ 6.3\n ], [[MODEL, 'IQ 6.3'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n /(i-mobile)\\s(i-style\\s[\\d\\.]+)/i // i-mobile i-STYLE\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1\n ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n\n /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512\n ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [\n\n /////////////\n // END TODO\n ///////////*/\n\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]+).*(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s]+\\w)*/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]+)*/i, // Blackberry\n /(tizen)[\\/\\s]([\\w\\.]+)/i, // Tizen\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|contiki)[\\/\\s-]?([\\w\\.]+)*/i,\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki\n /linux;.+(sailfish);/i // Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]+)*/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w+)*/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]+)*/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]+)*/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]+)*/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.]+\\d)*/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]+(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]+\\w)*/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]+)*/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.]*)*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS\n /(unix)\\s?([\\w\\.]+)*/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n /*\n var Browser = function (name, version) {\n this[NAME] = name;\n this[VERSION] = version;\n };\n var CPU = function (arch) {\n this[ARCHITECTURE] = arch;\n };\n var Device = function (vendor, model, type) {\n this[VENDOR] = vendor;\n this[MODEL] = model;\n this[TYPE] = type;\n };\n var Engine = Browser;\n var OS = Browser;\n */\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n //var browser = new Browser();\n //var cpu = new CPU();\n //var device = new Device();\n //var engine = new Engine();\n //var os = new OS();\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n //browser = new Browser();\n //cpu = new CPU();\n //device = new Device();\n //engine = new Engine();\n //os = new OS();\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n //UAParser.Utils = util;\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n // TODO: test!!!!!!!!\n /*\n if (require && require.main === module && process) {\n // cli\n var jsonize = function (arr) {\n var res = [];\n for (var i in arr) {\n res.push(new UAParser(arr[i]).getResult());\n }\n process.stdout.write(JSON.stringify(res, null, 2) + '\\n');\n };\n if (process.stdin.isTTY) {\n // via args\n jsonize(process.argv.slice(2));\n } else {\n // via pipe\n var str = '';\n process.stdin.on('readable', function() {\n var read = process.stdin.read();\n if (read !== null) {\n str += read;\n }\n });\n process.stdin.on('end', function () {\n jsonize(str.replace(/\\n$/, '').split('\\n'));\n });\n }\n }\n */\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (window) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if (typeof $ !== UNDEF_TYPE) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module id = ../../../../openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module chunks = main","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/index.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/index.js\n// module chunks = main","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module chunks = main","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\nvar rng;\n\nvar crypto = global.crypto || global.msCrypto; // for IE 11\nif (crypto && crypto.getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n rng = function whatwgRNG() {\n crypto.getRandomValues(rnds8);\n return rnds8;\n };\n}\n\nif (!rng) {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n rng = function() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n\nmodule.exports = rng;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\n// random #'s we need to init node and clockseq\nvar _seedBytes = rng();\n\n// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\nvar _nodeId = [\n _seedBytes[0] | 0x01,\n _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]\n];\n\n// Per 4.2.2, randomize (14 bit) clockseq\nvar _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;\n\n// Previous uuid creation time\nvar _lastMSecs = 0, _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n var node = options.node || _nodeId;\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v1.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v1.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options == 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v4.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v4.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n\n'use strict';\n\nvar adapterFactory = require('./adapter_factory.js');\nmodule.exports = adapterFactory({window: global.window});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_core.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_core.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n\n'use strict';\n\nvar utils = require('./utils');\n// Shimming starts here.\nmodule.exports = function(dependencies, opts) {\n var window = dependencies && dependencies.window;\n\n var options = {\n shimChrome: true,\n shimFirefox: true,\n shimEdge: true,\n shimSafari: true,\n };\n\n for (var key in opts) {\n if (hasOwnProperty.call(opts, key)) {\n options[key] = opts[key];\n }\n }\n\n // Utils.\n var logging = utils.log;\n var browserDetails = utils.detectBrowser(window);\n\n // Uncomment the line below if you want logging to occur, including logging\n // for the switch statement below. Can also be turned on in the browser via\n // adapter.disableLog(false), but then logging from the switch statement below\n // will not appear.\n // require('./utils').disableLog(false);\n\n // Browser shims.\n var chromeShim = require('./chrome/chrome_shim') || null;\n var edgeShim = require('./edge/edge_shim') || null;\n var firefoxShim = require('./firefox/firefox_shim') || null;\n var safariShim = require('./safari/safari_shim') || null;\n var commonShim = require('./common_shim') || null;\n\n // Export to the adapter global object visible in the browser.\n var adapter = {\n browserDetails: browserDetails,\n commonShim: commonShim,\n extractVersion: utils.extractVersion,\n disableLog: utils.disableLog,\n disableWarnings: utils.disableWarnings\n };\n\n // Shim browser if found.\n switch (browserDetails.browser) {\n case 'chrome':\n if (!chromeShim || !chromeShim.shimPeerConnection ||\n !options.shimChrome) {\n logging('Chrome shim is not included in this adapter release.');\n return adapter;\n }\n logging('adapter.js shimming chrome.');\n // Export to the adapter global object visible in the browser.\n adapter.browserShim = chromeShim;\n commonShim.shimCreateObjectURL(window);\n\n chromeShim.shimGetUserMedia(window);\n chromeShim.shimMediaStream(window);\n chromeShim.shimSourceObject(window);\n chromeShim.shimPeerConnection(window);\n chromeShim.shimOnTrack(window);\n chromeShim.shimAddTrackRemoveTrack(window);\n chromeShim.shimGetSendersWithDtmf(window);\n\n commonShim.shimRTCIceCandidate(window);\n commonShim.shimMaxMessageSize(window);\n commonShim.shimSendThrowTypeError(window);\n break;\n case 'firefox':\n if (!firefoxShim || !firefoxShim.shimPeerConnection ||\n !options.shimFirefox) {\n logging('Firefox shim is not included in this adapter release.');\n return adapter;\n }\n logging('adapter.js shimming firefox.');\n // Export to the adapter global object visible in the browser.\n adapter.browserShim = firefoxShim;\n commonShim.shimCreateObjectURL(window);\n\n firefoxShim.shimGetUserMedia(window);\n firefoxShim.shimSourceObject(window);\n firefoxShim.shimPeerConnection(window);\n firefoxShim.shimOnTrack(window);\n firefoxShim.shimRemoveStream(window);\n\n commonShim.shimRTCIceCandidate(window);\n commonShim.shimMaxMessageSize(window);\n commonShim.shimSendThrowTypeError(window);\n break;\n case 'edge':\n if (!edgeShim || !edgeShim.shimPeerConnection || !options.shimEdge) {\n logging('MS edge shim is not included in this adapter release.');\n return adapter;\n }\n logging('adapter.js shimming edge.');\n // Export to the adapter global object visible in the browser.\n adapter.browserShim = edgeShim;\n commonShim.shimCreateObjectURL(window);\n\n edgeShim.shimGetUserMedia(window);\n edgeShim.shimPeerConnection(window);\n edgeShim.shimReplaceTrack(window);\n\n // the edge shim implements the full RTCIceCandidate object.\n\n commonShim.shimMaxMessageSize(window);\n commonShim.shimSendThrowTypeError(window);\n break;\n case 'safari':\n if (!safariShim || !options.shimSafari) {\n logging('Safari shim is not included in this adapter release.');\n return adapter;\n }\n logging('adapter.js shimming safari.');\n // Export to the adapter global object visible in the browser.\n adapter.browserShim = safariShim;\n commonShim.shimCreateObjectURL(window);\n\n safariShim.shimRTCIceServerUrls(window);\n safariShim.shimCallbacksAPI(window);\n safariShim.shimLocalStreamsAPI(window);\n safariShim.shimRemoteStreamsAPI(window);\n safariShim.shimTrackEventTransceiver(window);\n safariShim.shimGetUserMedia(window);\n safariShim.shimCreateOfferLegacy(window);\n\n commonShim.shimRTCIceCandidate(window);\n commonShim.shimMaxMessageSize(window);\n commonShim.shimSendThrowTypeError(window);\n break;\n default:\n logging('Unsupported browser!');\n break;\n }\n\n return adapter;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_factory.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/adapter_factory.js\n// module chunks = main","\n/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\nvar utils = require('../utils.js');\nvar logging = utils.log;\n\nmodule.exports = {\n shimGetUserMedia: require('./getusermedia'),\n shimMediaStream: function(window) {\n window.MediaStream = window.MediaStream || window.webkitMediaStream;\n },\n\n shimOnTrack: function(window) {\n if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in\n window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {\n get: function() {\n return this._ontrack;\n },\n set: function(f) {\n if (this._ontrack) {\n this.removeEventListener('track', this._ontrack);\n }\n this.addEventListener('track', this._ontrack = f);\n }\n });\n var origSetRemoteDescription =\n window.RTCPeerConnection.prototype.setRemoteDescription;\n window.RTCPeerConnection.prototype.setRemoteDescription = function() {\n var pc = this;\n if (!pc._ontrackpoly) {\n pc._ontrackpoly = function(e) {\n // onaddstream does not fire when a track is added to an existing\n // stream. But stream.onaddtrack is implemented so we use that.\n e.stream.addEventListener('addtrack', function(te) {\n var receiver;\n if (window.RTCPeerConnection.prototype.getReceivers) {\n receiver = pc.getReceivers().find(function(r) {\n return r.track && r.track.id === te.track.id;\n });\n } else {\n receiver = {track: te.track};\n }\n\n var event = new Event('track');\n event.track = te.track;\n event.receiver = receiver;\n event.transceiver = {receiver: receiver};\n event.streams = [e.stream];\n pc.dispatchEvent(event);\n });\n e.stream.getTracks().forEach(function(track) {\n var receiver;\n if (window.RTCPeerConnection.prototype.getReceivers) {\n receiver = pc.getReceivers().find(function(r) {\n return r.track && r.track.id === track.id;\n });\n } else {\n receiver = {track: track};\n }\n var event = new Event('track');\n event.track = track;\n event.receiver = receiver;\n event.transceiver = {receiver: receiver};\n event.streams = [e.stream];\n pc.dispatchEvent(event);\n });\n };\n pc.addEventListener('addstream', pc._ontrackpoly);\n }\n return origSetRemoteDescription.apply(pc, arguments);\n };\n } else if (!('RTCRtpTransceiver' in window)) {\n utils.wrapPeerConnectionEvent(window, 'track', function(e) {\n if (!e.transceiver) {\n e.transceiver = {receiver: e.receiver};\n }\n return e;\n });\n }\n },\n\n shimGetSendersWithDtmf: function(window) {\n // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.\n if (typeof window === 'object' && window.RTCPeerConnection &&\n !('getSenders' in window.RTCPeerConnection.prototype) &&\n 'createDTMFSender' in window.RTCPeerConnection.prototype) {\n var shimSenderWithDtmf = function(pc, track) {\n return {\n track: track,\n get dtmf() {\n if (this._dtmf === undefined) {\n if (track.kind === 'audio') {\n this._dtmf = pc.createDTMFSender(track);\n } else {\n this._dtmf = null;\n }\n }\n return this._dtmf;\n },\n _pc: pc\n };\n };\n\n // augment addTrack when getSenders is not available.\n if (!window.RTCPeerConnection.prototype.getSenders) {\n window.RTCPeerConnection.prototype.getSenders = function() {\n this._senders = this._senders || [];\n return this._senders.slice(); // return a copy of the internal state.\n };\n var origAddTrack = window.RTCPeerConnection.prototype.addTrack;\n window.RTCPeerConnection.prototype.addTrack = function(track, stream) {\n var pc = this;\n var sender = origAddTrack.apply(pc, arguments);\n if (!sender) {\n sender = shimSenderWithDtmf(pc, track);\n pc._senders.push(sender);\n }\n return sender;\n };\n\n var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;\n window.RTCPeerConnection.prototype.removeTrack = function(sender) {\n var pc = this;\n origRemoveTrack.apply(pc, arguments);\n var idx = pc._senders.indexOf(sender);\n if (idx !== -1) {\n pc._senders.splice(idx, 1);\n }\n };\n }\n var origAddStream = window.RTCPeerConnection.prototype.addStream;\n window.RTCPeerConnection.prototype.addStream = function(stream) {\n var pc = this;\n pc._senders = pc._senders || [];\n origAddStream.apply(pc, [stream]);\n stream.getTracks().forEach(function(track) {\n pc._senders.push(shimSenderWithDtmf(pc, track));\n });\n };\n\n var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n var pc = this;\n pc._senders = pc._senders || [];\n origRemoveStream.apply(pc, [stream]);\n\n stream.getTracks().forEach(function(track) {\n var sender = pc._senders.find(function(s) {\n return s.track === track;\n });\n if (sender) {\n pc._senders.splice(pc._senders.indexOf(sender), 1); // remove sender\n }\n });\n };\n } else if (typeof window === 'object' && window.RTCPeerConnection &&\n 'getSenders' in window.RTCPeerConnection.prototype &&\n 'createDTMFSender' in window.RTCPeerConnection.prototype &&\n window.RTCRtpSender &&\n !('dtmf' in window.RTCRtpSender.prototype)) {\n var origGetSenders = window.RTCPeerConnection.prototype.getSenders;\n window.RTCPeerConnection.prototype.getSenders = function() {\n var pc = this;\n var senders = origGetSenders.apply(pc, []);\n senders.forEach(function(sender) {\n sender._pc = pc;\n });\n return senders;\n };\n\n Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {\n get: function() {\n if (this._dtmf === undefined) {\n if (this.track.kind === 'audio') {\n this._dtmf = this._pc.createDTMFSender(this.track);\n } else {\n this._dtmf = null;\n }\n }\n return this._dtmf;\n }\n });\n }\n },\n\n shimSourceObject: function(window) {\n var URL = window && window.URL;\n\n if (typeof window === 'object') {\n if (window.HTMLMediaElement &&\n !('srcObject' in window.HTMLMediaElement.prototype)) {\n // Shim the srcObject property, once, when HTMLMediaElement is found.\n Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', {\n get: function() {\n return this._srcObject;\n },\n set: function(stream) {\n var self = this;\n // Use _srcObject as a private property for this shim\n this._srcObject = stream;\n if (this.src) {\n URL.revokeObjectURL(this.src);\n }\n\n if (!stream) {\n this.src = '';\n return undefined;\n }\n this.src = URL.createObjectURL(stream);\n // We need to recreate the blob url when a track is added or\n // removed. Doing it manually since we want to avoid a recursion.\n stream.addEventListener('addtrack', function() {\n if (self.src) {\n URL.revokeObjectURL(self.src);\n }\n self.src = URL.createObjectURL(stream);\n });\n stream.addEventListener('removetrack', function() {\n if (self.src) {\n URL.revokeObjectURL(self.src);\n }\n self.src = URL.createObjectURL(stream);\n });\n }\n });\n }\n }\n },\n\n shimAddTrackRemoveTrackWithNative: function(window) {\n // shim addTrack/removeTrack with native variants in order to make\n // the interactions with legacy getLocalStreams behave as in other browsers.\n // Keeps a mapping stream.id => [stream, rtpsenders...]\n window.RTCPeerConnection.prototype.getLocalStreams = function() {\n var pc = this;\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n return Object.keys(this._shimmedLocalStreams).map(function(streamId) {\n return pc._shimmedLocalStreams[streamId][0];\n });\n };\n\n var origAddTrack = window.RTCPeerConnection.prototype.addTrack;\n window.RTCPeerConnection.prototype.addTrack = function(track, stream) {\n if (!stream) {\n return origAddTrack.apply(this, arguments);\n }\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n\n var sender = origAddTrack.apply(this, arguments);\n if (!this._shimmedLocalStreams[stream.id]) {\n this._shimmedLocalStreams[stream.id] = [stream, sender];\n } else if (this._shimmedLocalStreams[stream.id].indexOf(sender) === -1) {\n this._shimmedLocalStreams[stream.id].push(sender);\n }\n return sender;\n };\n\n var origAddStream = window.RTCPeerConnection.prototype.addStream;\n window.RTCPeerConnection.prototype.addStream = function(stream) {\n var pc = this;\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n\n stream.getTracks().forEach(function(track) {\n var alreadyExists = pc.getSenders().find(function(s) {\n return s.track === track;\n });\n if (alreadyExists) {\n throw new DOMException('Track already exists.',\n 'InvalidAccessError');\n }\n });\n var existingSenders = pc.getSenders();\n origAddStream.apply(this, arguments);\n var newSenders = pc.getSenders().filter(function(newSender) {\n return existingSenders.indexOf(newSender) === -1;\n });\n this._shimmedLocalStreams[stream.id] = [stream].concat(newSenders);\n };\n\n var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n delete this._shimmedLocalStreams[stream.id];\n return origRemoveStream.apply(this, arguments);\n };\n\n var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;\n window.RTCPeerConnection.prototype.removeTrack = function(sender) {\n var pc = this;\n this._shimmedLocalStreams = this._shimmedLocalStreams || {};\n if (sender) {\n Object.keys(this._shimmedLocalStreams).forEach(function(streamId) {\n var idx = pc._shimmedLocalStreams[streamId].indexOf(sender);\n if (idx !== -1) {\n pc._shimmedLocalStreams[streamId].splice(idx, 1);\n }\n if (pc._shimmedLocalStreams[streamId].length === 1) {\n delete pc._shimmedLocalStreams[streamId];\n }\n });\n }\n return origRemoveTrack.apply(this, arguments);\n };\n },\n\n shimAddTrackRemoveTrack: function(window) {\n var browserDetails = utils.detectBrowser(window);\n // shim addTrack and removeTrack.\n if (window.RTCPeerConnection.prototype.addTrack &&\n browserDetails.version >= 65) {\n return this.shimAddTrackRemoveTrackWithNative(window);\n }\n\n // also shim pc.getLocalStreams when addTrack is shimmed\n // to return the original streams.\n var origGetLocalStreams = window.RTCPeerConnection.prototype\n .getLocalStreams;\n window.RTCPeerConnection.prototype.getLocalStreams = function() {\n var pc = this;\n var nativeStreams = origGetLocalStreams.apply(this);\n pc._reverseStreams = pc._reverseStreams || {};\n return nativeStreams.map(function(stream) {\n return pc._reverseStreams[stream.id];\n });\n };\n\n var origAddStream = window.RTCPeerConnection.prototype.addStream;\n window.RTCPeerConnection.prototype.addStream = function(stream) {\n var pc = this;\n pc._streams = pc._streams || {};\n pc._reverseStreams = pc._reverseStreams || {};\n\n stream.getTracks().forEach(function(track) {\n var alreadyExists = pc.getSenders().find(function(s) {\n return s.track === track;\n });\n if (alreadyExists) {\n throw new DOMException('Track already exists.',\n 'InvalidAccessError');\n }\n });\n // Add identity mapping for consistency with addTrack.\n // Unless this is being used with a stream from addTrack.\n if (!pc._reverseStreams[stream.id]) {\n var newStream = new window.MediaStream(stream.getTracks());\n pc._streams[stream.id] = newStream;\n pc._reverseStreams[newStream.id] = stream;\n stream = newStream;\n }\n origAddStream.apply(pc, [stream]);\n };\n\n var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n var pc = this;\n pc._streams = pc._streams || {};\n pc._reverseStreams = pc._reverseStreams || {};\n\n origRemoveStream.apply(pc, [(pc._streams[stream.id] || stream)]);\n delete pc._reverseStreams[(pc._streams[stream.id] ?\n pc._streams[stream.id].id : stream.id)];\n delete pc._streams[stream.id];\n };\n\n window.RTCPeerConnection.prototype.addTrack = function(track, stream) {\n var pc = this;\n if (pc.signalingState === 'closed') {\n throw new DOMException(\n 'The RTCPeerConnection\\'s signalingState is \\'closed\\'.',\n 'InvalidStateError');\n }\n var streams = [].slice.call(arguments, 1);\n if (streams.length !== 1 ||\n !streams[0].getTracks().find(function(t) {\n return t === track;\n })) {\n // this is not fully correct but all we can manage without\n // [[associated MediaStreams]] internal slot.\n throw new DOMException(\n 'The adapter.js addTrack polyfill only supports a single ' +\n ' stream which is associated with the specified track.',\n 'NotSupportedError');\n }\n\n var alreadyExists = pc.getSenders().find(function(s) {\n return s.track === track;\n });\n if (alreadyExists) {\n throw new DOMException('Track already exists.',\n 'InvalidAccessError');\n }\n\n pc._streams = pc._streams || {};\n pc._reverseStreams = pc._reverseStreams || {};\n var oldStream = pc._streams[stream.id];\n if (oldStream) {\n // this is using odd Chrome behaviour, use with caution:\n // https://bugs.chromium.org/p/webrtc/issues/detail?id=7815\n // Note: we rely on the high-level addTrack/dtmf shim to\n // create the sender with a dtmf sender.\n oldStream.addTrack(track);\n\n // Trigger ONN async.\n Promise.resolve().then(function() {\n pc.dispatchEvent(new Event('negotiationneeded'));\n });\n } else {\n var newStream = new window.MediaStream([track]);\n pc._streams[stream.id] = newStream;\n pc._reverseStreams[newStream.id] = stream;\n pc.addStream(newStream);\n }\n return pc.getSenders().find(function(s) {\n return s.track === track;\n });\n };\n\n // replace the internal stream id with the external one and\n // vice versa.\n function replaceInternalStreamId(pc, description) {\n var sdp = description.sdp;\n Object.keys(pc._reverseStreams || []).forEach(function(internalId) {\n var externalStream = pc._reverseStreams[internalId];\n var internalStream = pc._streams[externalStream.id];\n sdp = sdp.replace(new RegExp(internalStream.id, 'g'),\n externalStream.id);\n });\n return new RTCSessionDescription({\n type: description.type,\n sdp: sdp\n });\n }\n function replaceExternalStreamId(pc, description) {\n var sdp = description.sdp;\n Object.keys(pc._reverseStreams || []).forEach(function(internalId) {\n var externalStream = pc._reverseStreams[internalId];\n var internalStream = pc._streams[externalStream.id];\n sdp = sdp.replace(new RegExp(externalStream.id, 'g'),\n internalStream.id);\n });\n return new RTCSessionDescription({\n type: description.type,\n sdp: sdp\n });\n }\n ['createOffer', 'createAnswer'].forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n var pc = this;\n var args = arguments;\n var isLegacyCall = arguments.length &&\n typeof arguments[0] === 'function';\n if (isLegacyCall) {\n return nativeMethod.apply(pc, [\n function(description) {\n var desc = replaceInternalStreamId(pc, description);\n args[0].apply(null, [desc]);\n },\n function(err) {\n if (args[1]) {\n args[1].apply(null, err);\n }\n }, arguments[2]\n ]);\n }\n return nativeMethod.apply(pc, arguments)\n .then(function(description) {\n return replaceInternalStreamId(pc, description);\n });\n };\n });\n\n var origSetLocalDescription =\n window.RTCPeerConnection.prototype.setLocalDescription;\n window.RTCPeerConnection.prototype.setLocalDescription = function() {\n var pc = this;\n if (!arguments.length || !arguments[0].type) {\n return origSetLocalDescription.apply(pc, arguments);\n }\n arguments[0] = replaceExternalStreamId(pc, arguments[0]);\n return origSetLocalDescription.apply(pc, arguments);\n };\n\n // TODO: mangle getStats: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamstats-streamidentifier\n\n var origLocalDescription = Object.getOwnPropertyDescriptor(\n window.RTCPeerConnection.prototype, 'localDescription');\n Object.defineProperty(window.RTCPeerConnection.prototype,\n 'localDescription', {\n get: function() {\n var pc = this;\n var description = origLocalDescription.get.apply(this);\n if (description.type === '') {\n return description;\n }\n return replaceInternalStreamId(pc, description);\n }\n });\n\n window.RTCPeerConnection.prototype.removeTrack = function(sender) {\n var pc = this;\n if (pc.signalingState === 'closed') {\n throw new DOMException(\n 'The RTCPeerConnection\\'s signalingState is \\'closed\\'.',\n 'InvalidStateError');\n }\n // We can not yet check for sender instanceof RTCRtpSender\n // since we shim RTPSender. So we check if sender._pc is set.\n if (!sender._pc) {\n throw new DOMException('Argument 1 of RTCPeerConnection.removeTrack ' +\n 'does not implement interface RTCRtpSender.', 'TypeError');\n }\n var isLocal = sender._pc === pc;\n if (!isLocal) {\n throw new DOMException('Sender was not created by this connection.',\n 'InvalidAccessError');\n }\n\n // Search for the native stream the senders track belongs to.\n pc._streams = pc._streams || {};\n var stream;\n Object.keys(pc._streams).forEach(function(streamid) {\n var hasTrack = pc._streams[streamid].getTracks().find(function(track) {\n return sender.track === track;\n });\n if (hasTrack) {\n stream = pc._streams[streamid];\n }\n });\n\n if (stream) {\n if (stream.getTracks().length === 1) {\n // if this is the last track of the stream, remove the stream. This\n // takes care of any shimmed _senders.\n pc.removeStream(pc._reverseStreams[stream.id]);\n } else {\n // relying on the same odd chrome behaviour as above.\n stream.removeTrack(sender.track);\n }\n pc.dispatchEvent(new Event('negotiationneeded'));\n }\n };\n },\n\n shimPeerConnection: function(window) {\n var browserDetails = utils.detectBrowser(window);\n\n // The RTCPeerConnection object.\n if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) {\n window.RTCPeerConnection = function(pcConfig, pcConstraints) {\n // Translate iceTransportPolicy to iceTransports,\n // see https://code.google.com/p/webrtc/issues/detail?id=4869\n // this was fixed in M56 along with unprefixing RTCPeerConnection.\n logging('PeerConnection');\n if (pcConfig && pcConfig.iceTransportPolicy) {\n pcConfig.iceTransports = pcConfig.iceTransportPolicy;\n }\n\n return new window.webkitRTCPeerConnection(pcConfig, pcConstraints);\n };\n window.RTCPeerConnection.prototype =\n window.webkitRTCPeerConnection.prototype;\n // wrap static methods. Currently just generateCertificate.\n if (window.webkitRTCPeerConnection.generateCertificate) {\n Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {\n get: function() {\n return window.webkitRTCPeerConnection.generateCertificate;\n }\n });\n }\n } else {\n // migrate from non-spec RTCIceServer.url to RTCIceServer.urls\n var OrigPeerConnection = window.RTCPeerConnection;\n window.RTCPeerConnection = function(pcConfig, pcConstraints) {\n if (pcConfig && pcConfig.iceServers) {\n var newIceServers = [];\n for (var i = 0; i < pcConfig.iceServers.length; i++) {\n var server = pcConfig.iceServers[i];\n if (!server.hasOwnProperty('urls') &&\n server.hasOwnProperty('url')) {\n utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');\n server = JSON.parse(JSON.stringify(server));\n server.urls = server.url;\n newIceServers.push(server);\n } else {\n newIceServers.push(pcConfig.iceServers[i]);\n }\n }\n pcConfig.iceServers = newIceServers;\n }\n return new OrigPeerConnection(pcConfig, pcConstraints);\n };\n window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;\n // wrap static methods. Currently just generateCertificate.\n Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {\n get: function() {\n return OrigPeerConnection.generateCertificate;\n }\n });\n }\n\n var origGetStats = window.RTCPeerConnection.prototype.getStats;\n window.RTCPeerConnection.prototype.getStats = function(selector,\n successCallback, errorCallback) {\n var pc = this;\n var args = arguments;\n\n // If selector is a function then we are in the old style stats so just\n // pass back the original getStats format to avoid breaking old users.\n if (arguments.length > 0 && typeof selector === 'function') {\n return origGetStats.apply(this, arguments);\n }\n\n // When spec-style getStats is supported, return those when called with\n // either no arguments or the selector argument is null.\n if (origGetStats.length === 0 && (arguments.length === 0 ||\n typeof arguments[0] !== 'function')) {\n return origGetStats.apply(this, []);\n }\n\n var fixChromeStats_ = function(response) {\n var standardReport = {};\n var reports = response.result();\n reports.forEach(function(report) {\n var standardStats = {\n id: report.id,\n timestamp: report.timestamp,\n type: {\n localcandidate: 'local-candidate',\n remotecandidate: 'remote-candidate'\n }[report.type] || report.type\n };\n report.names().forEach(function(name) {\n standardStats[name] = report.stat(name);\n });\n standardReport[standardStats.id] = standardStats;\n });\n\n return standardReport;\n };\n\n // shim getStats with maplike support\n var makeMapStats = function(stats) {\n return new Map(Object.keys(stats).map(function(key) {\n return [key, stats[key]];\n }));\n };\n\n if (arguments.length >= 2) {\n var successCallbackWrapper_ = function(response) {\n args[1](makeMapStats(fixChromeStats_(response)));\n };\n\n return origGetStats.apply(this, [successCallbackWrapper_,\n arguments[0]]);\n }\n\n // promise-support\n return new Promise(function(resolve, reject) {\n origGetStats.apply(pc, [\n function(response) {\n resolve(makeMapStats(fixChromeStats_(response)));\n }, reject]);\n }).then(successCallback, errorCallback);\n };\n\n // add promise support -- natively available in Chrome 51\n if (browserDetails.version < 51) {\n ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']\n .forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n var args = arguments;\n var pc = this;\n var promise = new Promise(function(resolve, reject) {\n nativeMethod.apply(pc, [args[0], resolve, reject]);\n });\n if (args.length < 2) {\n return promise;\n }\n return promise.then(function() {\n args[1].apply(null, []);\n },\n function(err) {\n if (args.length >= 3) {\n args[2].apply(null, [err]);\n }\n });\n };\n });\n }\n\n // promise support for createOffer and createAnswer. Available (without\n // bugs) since M52: crbug/619289\n if (browserDetails.version < 52) {\n ['createOffer', 'createAnswer'].forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n var pc = this;\n if (arguments.length < 1 || (arguments.length === 1 &&\n typeof arguments[0] === 'object')) {\n var opts = arguments.length === 1 ? arguments[0] : undefined;\n return new Promise(function(resolve, reject) {\n nativeMethod.apply(pc, [resolve, reject, opts]);\n });\n }\n return nativeMethod.apply(this, arguments);\n };\n });\n }\n\n // shim implicit creation of RTCSessionDescription/RTCIceCandidate\n ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']\n .forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n arguments[0] = new ((method === 'addIceCandidate') ?\n window.RTCIceCandidate :\n window.RTCSessionDescription)(arguments[0]);\n return nativeMethod.apply(this, arguments);\n };\n });\n\n // support for addIceCandidate(null or undefined)\n var nativeAddIceCandidate =\n window.RTCPeerConnection.prototype.addIceCandidate;\n window.RTCPeerConnection.prototype.addIceCandidate = function() {\n if (!arguments[0]) {\n if (arguments[1]) {\n arguments[1].apply(null);\n }\n return Promise.resolve();\n }\n return nativeAddIceCandidate.apply(this, arguments);\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\nvar utils = require('../utils.js');\nvar logging = utils.log;\n\n// Expose public methods.\nmodule.exports = function(window) {\n var browserDetails = utils.detectBrowser(window);\n var navigator = window && window.navigator;\n\n var constraintsToChrome_ = function(c) {\n if (typeof c !== 'object' || c.mandatory || c.optional) {\n return c;\n }\n var cc = {};\n Object.keys(c).forEach(function(key) {\n if (key === 'require' || key === 'advanced' || key === 'mediaSource') {\n return;\n }\n var r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]};\n if (r.exact !== undefined && typeof r.exact === 'number') {\n r.min = r.max = r.exact;\n }\n var oldname_ = function(prefix, name) {\n if (prefix) {\n return prefix + name.charAt(0).toUpperCase() + name.slice(1);\n }\n return (name === 'deviceId') ? 'sourceId' : name;\n };\n if (r.ideal !== undefined) {\n cc.optional = cc.optional || [];\n var oc = {};\n if (typeof r.ideal === 'number') {\n oc[oldname_('min', key)] = r.ideal;\n cc.optional.push(oc);\n oc = {};\n oc[oldname_('max', key)] = r.ideal;\n cc.optional.push(oc);\n } else {\n oc[oldname_('', key)] = r.ideal;\n cc.optional.push(oc);\n }\n }\n if (r.exact !== undefined && typeof r.exact !== 'number') {\n cc.mandatory = cc.mandatory || {};\n cc.mandatory[oldname_('', key)] = r.exact;\n } else {\n ['min', 'max'].forEach(function(mix) {\n if (r[mix] !== undefined) {\n cc.mandatory = cc.mandatory || {};\n cc.mandatory[oldname_(mix, key)] = r[mix];\n }\n });\n }\n });\n if (c.advanced) {\n cc.optional = (cc.optional || []).concat(c.advanced);\n }\n return cc;\n };\n\n var shimConstraints_ = function(constraints, func) {\n if (browserDetails.version >= 61) {\n return func(constraints);\n }\n constraints = JSON.parse(JSON.stringify(constraints));\n if (constraints && typeof constraints.audio === 'object') {\n var remap = function(obj, a, b) {\n if (a in obj && !(b in obj)) {\n obj[b] = obj[a];\n delete obj[a];\n }\n };\n constraints = JSON.parse(JSON.stringify(constraints));\n remap(constraints.audio, 'autoGainControl', 'googAutoGainControl');\n remap(constraints.audio, 'noiseSuppression', 'googNoiseSuppression');\n constraints.audio = constraintsToChrome_(constraints.audio);\n }\n if (constraints && typeof constraints.video === 'object') {\n // Shim facingMode for mobile & surface pro.\n var face = constraints.video.facingMode;\n face = face && ((typeof face === 'object') ? face : {ideal: face});\n var getSupportedFacingModeLies = browserDetails.version < 66;\n\n if ((face && (face.exact === 'user' || face.exact === 'environment' ||\n face.ideal === 'user' || face.ideal === 'environment')) &&\n !(navigator.mediaDevices.getSupportedConstraints &&\n navigator.mediaDevices.getSupportedConstraints().facingMode &&\n !getSupportedFacingModeLies)) {\n delete constraints.video.facingMode;\n var matches;\n if (face.exact === 'environment' || face.ideal === 'environment') {\n matches = ['back', 'rear'];\n } else if (face.exact === 'user' || face.ideal === 'user') {\n matches = ['front'];\n }\n if (matches) {\n // Look for matches in label, or use last cam for back (typical).\n return navigator.mediaDevices.enumerateDevices()\n .then(function(devices) {\n devices = devices.filter(function(d) {\n return d.kind === 'videoinput';\n });\n var dev = devices.find(function(d) {\n return matches.some(function(match) {\n return d.label.toLowerCase().indexOf(match) !== -1;\n });\n });\n if (!dev && devices.length && matches.indexOf('back') !== -1) {\n dev = devices[devices.length - 1]; // more likely the back cam\n }\n if (dev) {\n constraints.video.deviceId = face.exact ? {exact: dev.deviceId} :\n {ideal: dev.deviceId};\n }\n constraints.video = constraintsToChrome_(constraints.video);\n logging('chrome: ' + JSON.stringify(constraints));\n return func(constraints);\n });\n }\n }\n constraints.video = constraintsToChrome_(constraints.video);\n }\n logging('chrome: ' + JSON.stringify(constraints));\n return func(constraints);\n };\n\n var shimError_ = function(e) {\n return {\n name: {\n PermissionDeniedError: 'NotAllowedError',\n PermissionDismissedError: 'NotAllowedError',\n InvalidStateError: 'NotAllowedError',\n DevicesNotFoundError: 'NotFoundError',\n ConstraintNotSatisfiedError: 'OverconstrainedError',\n TrackStartError: 'NotReadableError',\n MediaDeviceFailedDueToShutdown: 'NotAllowedError',\n MediaDeviceKillSwitchOn: 'NotAllowedError',\n TabCaptureError: 'AbortError',\n ScreenCaptureError: 'AbortError',\n DeviceCaptureError: 'AbortError'\n }[e.name] || e.name,\n message: e.message,\n constraint: e.constraintName,\n toString: function() {\n return this.name + (this.message && ': ') + this.message;\n }\n };\n };\n\n var getUserMedia_ = function(constraints, onSuccess, onError) {\n shimConstraints_(constraints, function(c) {\n navigator.webkitGetUserMedia(c, onSuccess, function(e) {\n if (onError) {\n onError(shimError_(e));\n }\n });\n });\n };\n\n navigator.getUserMedia = getUserMedia_;\n\n // Returns the result of getUserMedia as a Promise.\n var getUserMediaPromise_ = function(constraints) {\n return new Promise(function(resolve, reject) {\n navigator.getUserMedia(constraints, resolve, reject);\n });\n };\n\n if (!navigator.mediaDevices) {\n navigator.mediaDevices = {\n getUserMedia: getUserMediaPromise_,\n enumerateDevices: function() {\n return new Promise(function(resolve) {\n var kinds = {audio: 'audioinput', video: 'videoinput'};\n return window.MediaStreamTrack.getSources(function(devices) {\n resolve(devices.map(function(device) {\n return {label: device.label,\n kind: kinds[device.kind],\n deviceId: device.id,\n groupId: ''};\n }));\n });\n });\n },\n getSupportedConstraints: function() {\n return {\n deviceId: true, echoCancellation: true, facingMode: true,\n frameRate: true, height: true, width: true\n };\n }\n };\n }\n\n // A shim for getUserMedia method on the mediaDevices object.\n // TODO(KaptenJansson) remove once implemented in Chrome stable.\n if (!navigator.mediaDevices.getUserMedia) {\n navigator.mediaDevices.getUserMedia = function(constraints) {\n return getUserMediaPromise_(constraints);\n };\n } else {\n // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia\n // function which returns a Promise, it does not accept spec-style\n // constraints.\n var origGetUserMedia = navigator.mediaDevices.getUserMedia.\n bind(navigator.mediaDevices);\n navigator.mediaDevices.getUserMedia = function(cs) {\n return shimConstraints_(cs, function(c) {\n return origGetUserMedia(c).then(function(stream) {\n if (c.audio && !stream.getAudioTracks().length ||\n c.video && !stream.getVideoTracks().length) {\n stream.getTracks().forEach(function(track) {\n track.stop();\n });\n throw new DOMException('', 'NotFoundError');\n }\n return stream;\n }, function(e) {\n return Promise.reject(shimError_(e));\n });\n });\n };\n }\n\n // Dummy devicechange event methods.\n // TODO(KaptenJansson) remove once implemented in Chrome stable.\n if (typeof navigator.mediaDevices.addEventListener === 'undefined') {\n navigator.mediaDevices.addEventListener = function() {\n logging('Dummy mediaDevices.addEventListener called.');\n };\n }\n if (typeof navigator.mediaDevices.removeEventListener === 'undefined') {\n navigator.mediaDevices.removeEventListener = function() {\n logging('Dummy mediaDevices.removeEventListener called.');\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js\n// module chunks = main","/*\n * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar SDPUtils = require('sdp');\nvar utils = require('./utils');\n\nmodule.exports = {\n shimRTCIceCandidate: function(window) {\n // foundation is arbitrarily chosen as an indicator for full support for\n // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface\n if (!window.RTCIceCandidate || (window.RTCIceCandidate && 'foundation' in\n window.RTCIceCandidate.prototype)) {\n return;\n }\n\n var NativeRTCIceCandidate = window.RTCIceCandidate;\n window.RTCIceCandidate = function(args) {\n // Remove the a= which shouldn't be part of the candidate string.\n if (typeof args === 'object' && args.candidate &&\n args.candidate.indexOf('a=') === 0) {\n args = JSON.parse(JSON.stringify(args));\n args.candidate = args.candidate.substr(2);\n }\n\n if (args.candidate && args.candidate.length) {\n // Augment the native candidate with the parsed fields.\n var nativeCandidate = new NativeRTCIceCandidate(args);\n var parsedCandidate = SDPUtils.parseCandidate(args.candidate);\n var augmentedCandidate = Object.assign(nativeCandidate,\n parsedCandidate);\n\n // Add a serializer that does not serialize the extra attributes.\n augmentedCandidate.toJSON = function() {\n return {\n candidate: augmentedCandidate.candidate,\n sdpMid: augmentedCandidate.sdpMid,\n sdpMLineIndex: augmentedCandidate.sdpMLineIndex,\n usernameFragment: augmentedCandidate.usernameFragment,\n };\n };\n return augmentedCandidate;\n }\n return new NativeRTCIceCandidate(args);\n };\n window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;\n\n // Hook up the augmented candidate in onicecandidate and\n // addEventListener('icecandidate', ...)\n utils.wrapPeerConnectionEvent(window, 'icecandidate', function(e) {\n if (e.candidate) {\n Object.defineProperty(e, 'candidate', {\n value: new window.RTCIceCandidate(e.candidate),\n writable: 'false'\n });\n }\n return e;\n });\n },\n\n // shimCreateObjectURL must be called before shimSourceObject to avoid loop.\n\n shimCreateObjectURL: function(window) {\n var URL = window && window.URL;\n\n if (!(typeof window === 'object' && window.HTMLMediaElement &&\n 'srcObject' in window.HTMLMediaElement.prototype &&\n URL.createObjectURL && URL.revokeObjectURL)) {\n // Only shim CreateObjectURL using srcObject if srcObject exists.\n return undefined;\n }\n\n var nativeCreateObjectURL = URL.createObjectURL.bind(URL);\n var nativeRevokeObjectURL = URL.revokeObjectURL.bind(URL);\n var streams = new Map(), newId = 0;\n\n URL.createObjectURL = function(stream) {\n if ('getTracks' in stream) {\n var url = 'polyblob:' + (++newId);\n streams.set(url, stream);\n utils.deprecated('URL.createObjectURL(stream)',\n 'elem.srcObject = stream');\n return url;\n }\n return nativeCreateObjectURL(stream);\n };\n URL.revokeObjectURL = function(url) {\n nativeRevokeObjectURL(url);\n streams.delete(url);\n };\n\n var dsc = Object.getOwnPropertyDescriptor(window.HTMLMediaElement.prototype,\n 'src');\n Object.defineProperty(window.HTMLMediaElement.prototype, 'src', {\n get: function() {\n return dsc.get.apply(this);\n },\n set: function(url) {\n this.srcObject = streams.get(url) || null;\n return dsc.set.apply(this, [url]);\n }\n });\n\n var nativeSetAttribute = window.HTMLMediaElement.prototype.setAttribute;\n window.HTMLMediaElement.prototype.setAttribute = function() {\n if (arguments.length === 2 &&\n ('' + arguments[0]).toLowerCase() === 'src') {\n this.srcObject = streams.get(arguments[1]) || null;\n }\n return nativeSetAttribute.apply(this, arguments);\n };\n },\n\n shimMaxMessageSize: function(window) {\n if (window.RTCSctpTransport || !window.RTCPeerConnection) {\n return;\n }\n var browserDetails = utils.detectBrowser(window);\n\n if (!('sctp' in window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {\n get: function() {\n return typeof this._sctp === 'undefined' ? null : this._sctp;\n }\n });\n }\n\n var sctpInDescription = function(description) {\n var sections = SDPUtils.splitSections(description.sdp);\n sections.shift();\n return sections.some(function(mediaSection) {\n var mLine = SDPUtils.parseMLine(mediaSection);\n return mLine && mLine.kind === 'application'\n && mLine.protocol.indexOf('SCTP') !== -1;\n });\n };\n\n var getRemoteFirefoxVersion = function(description) {\n // TODO: Is there a better solution for detecting Firefox?\n var match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\\d+)/);\n if (match === null || match.length < 2) {\n return -1;\n }\n var version = parseInt(match[1], 10);\n // Test for NaN (yes, this is ugly)\n return version !== version ? -1 : version;\n };\n\n var getCanSendMaxMessageSize = function(remoteIsFirefox) {\n // Every implementation we know can send at least 64 KiB.\n // Note: Although Chrome is technically able to send up to 256 KiB, the\n // data does not reach the other peer reliably.\n // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419\n var canSendMaxMessageSize = 65536;\n if (browserDetails.browser === 'firefox') {\n if (browserDetails.version < 57) {\n if (remoteIsFirefox === -1) {\n // FF < 57 will send in 16 KiB chunks using the deprecated PPID\n // fragmentation.\n canSendMaxMessageSize = 16384;\n } else {\n // However, other FF (and RAWRTC) can reassemble PPID-fragmented\n // messages. Thus, supporting ~2 GiB when sending.\n canSendMaxMessageSize = 2147483637;\n }\n } else {\n // Currently, all FF >= 57 will reset the remote maximum message size\n // to the default value when a data channel is created at a later\n // stage. :(\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831\n canSendMaxMessageSize =\n browserDetails.version === 57 ? 65535 : 65536;\n }\n }\n return canSendMaxMessageSize;\n };\n\n var getMaxMessageSize = function(description, remoteIsFirefox) {\n // Note: 65536 bytes is the default value from the SDP spec. Also,\n // every implementation we know supports receiving 65536 bytes.\n var maxMessageSize = 65536;\n\n // FF 57 has a slightly incorrect default remote max message size, so\n // we need to adjust it here to avoid a failure when sending.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697\n if (browserDetails.browser === 'firefox'\n && browserDetails.version === 57) {\n maxMessageSize = 65535;\n }\n\n var match = SDPUtils.matchPrefix(description.sdp, 'a=max-message-size:');\n if (match.length > 0) {\n maxMessageSize = parseInt(match[0].substr(19), 10);\n } else if (browserDetails.browser === 'firefox' &&\n remoteIsFirefox !== -1) {\n // If the maximum message size is not present in the remote SDP and\n // both local and remote are Firefox, the remote peer can receive\n // ~2 GiB.\n maxMessageSize = 2147483637;\n }\n return maxMessageSize;\n };\n\n var origSetRemoteDescription =\n window.RTCPeerConnection.prototype.setRemoteDescription;\n window.RTCPeerConnection.prototype.setRemoteDescription = function() {\n var pc = this;\n pc._sctp = null;\n\n if (sctpInDescription(arguments[0])) {\n // Check if the remote is FF.\n var isFirefox = getRemoteFirefoxVersion(arguments[0]);\n\n // Get the maximum message size the local peer is capable of sending\n var canSendMMS = getCanSendMaxMessageSize(isFirefox);\n\n // Get the maximum message size of the remote peer.\n var remoteMMS = getMaxMessageSize(arguments[0], isFirefox);\n\n // Determine final maximum message size\n var maxMessageSize;\n if (canSendMMS === 0 && remoteMMS === 0) {\n maxMessageSize = Number.POSITIVE_INFINITY;\n } else if (canSendMMS === 0 || remoteMMS === 0) {\n maxMessageSize = Math.max(canSendMMS, remoteMMS);\n } else {\n maxMessageSize = Math.min(canSendMMS, remoteMMS);\n }\n\n // Create a dummy RTCSctpTransport object and the 'maxMessageSize'\n // attribute.\n var sctp = {};\n Object.defineProperty(sctp, 'maxMessageSize', {\n get: function() {\n return maxMessageSize;\n }\n });\n pc._sctp = sctp;\n }\n\n return origSetRemoteDescription.apply(pc, arguments);\n };\n },\n\n shimSendThrowTypeError: function(window) {\n if (!window.RTCPeerConnection) {\n return;\n }\n\n // Note: Although Firefox >= 57 has a native implementation, the maximum\n // message size can be reset for all data channels at a later stage.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831\n\n var origCreateDataChannel =\n window.RTCPeerConnection.prototype.createDataChannel;\n window.RTCPeerConnection.prototype.createDataChannel = function() {\n var pc = this;\n var dataChannel = origCreateDataChannel.apply(pc, arguments);\n var origDataChannelSend = dataChannel.send;\n\n // Patch 'send' method\n dataChannel.send = function() {\n var dc = this;\n var data = arguments[0];\n var length = data.length || data.size || data.byteLength;\n if (length > pc.sctp.maxMessageSize) {\n throw new DOMException('Message too large (can send a maximum of ' +\n pc.sctp.maxMessageSize + ' bytes)', 'TypeError');\n }\n return origDataChannelSend.apply(dc, arguments);\n };\n\n return dataChannel;\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/common_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/common_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar utils = require('../utils');\nvar shimRTCPeerConnection = require('rtcpeerconnection-shim');\n\nmodule.exports = {\n shimGetUserMedia: require('./getusermedia'),\n shimPeerConnection: function(window) {\n var browserDetails = utils.detectBrowser(window);\n\n if (window.RTCIceGatherer) {\n if (!window.RTCIceCandidate) {\n window.RTCIceCandidate = function(args) {\n return args;\n };\n }\n if (!window.RTCSessionDescription) {\n window.RTCSessionDescription = function(args) {\n return args;\n };\n }\n // this adds an additional event listener to MediaStrackTrack that signals\n // when a tracks enabled property was changed. Workaround for a bug in\n // addStream, see below. No longer required in 15025+\n if (browserDetails.version < 15025) {\n var origMSTEnabled = Object.getOwnPropertyDescriptor(\n window.MediaStreamTrack.prototype, 'enabled');\n Object.defineProperty(window.MediaStreamTrack.prototype, 'enabled', {\n set: function(value) {\n origMSTEnabled.set.call(this, value);\n var ev = new Event('enabled');\n ev.enabled = value;\n this.dispatchEvent(ev);\n }\n });\n }\n }\n\n // ORTC defines the DTMF sender a bit different.\n // https://github.com/w3c/ortc/issues/714\n if (window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {\n Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {\n get: function() {\n if (this._dtmf === undefined) {\n if (this.track.kind === 'audio') {\n this._dtmf = new window.RTCDtmfSender(this);\n } else if (this.track.kind === 'video') {\n this._dtmf = null;\n }\n }\n return this._dtmf;\n }\n });\n }\n // Edge currently only implements the RTCDtmfSender, not the\n // RTCDTMFSender alias. See http://draft.ortc.org/#rtcdtmfsender2*\n if (window.RTCDtmfSender && !window.RTCDTMFSender) {\n window.RTCDTMFSender = window.RTCDtmfSender;\n }\n\n window.RTCPeerConnection =\n shimRTCPeerConnection(window, browserDetails.version);\n },\n shimReplaceTrack: function(window) {\n // ORTC has replaceTrack -- https://github.com/w3c/ortc/issues/614\n if (window.RTCRtpSender &&\n !('replaceTrack' in window.RTCRtpSender.prototype)) {\n window.RTCRtpSender.prototype.replaceTrack =\n window.RTCRtpSender.prototype.setTrack;\n }\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/edge/edge_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/edge/edge_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\n// Expose public methods.\nmodule.exports = function(window) {\n var navigator = window && window.navigator;\n\n var shimError_ = function(e) {\n return {\n name: {PermissionDeniedError: 'NotAllowedError'}[e.name] || e.name,\n message: e.message,\n constraint: e.constraint,\n toString: function() {\n return this.name;\n }\n };\n };\n\n // getUserMedia error shim.\n var origGetUserMedia = navigator.mediaDevices.getUserMedia.\n bind(navigator.mediaDevices);\n navigator.mediaDevices.getUserMedia = function(c) {\n return origGetUserMedia(c).catch(function(e) {\n return Promise.reject(shimError_(e));\n });\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/edge/getusermedia.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/edge/getusermedia.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = {\n shimGetUserMedia: require('./getusermedia'),\n shimOnTrack: function(window) {\n if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in\n window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {\n get: function() {\n return this._ontrack;\n },\n set: function(f) {\n if (this._ontrack) {\n this.removeEventListener('track', this._ontrack);\n this.removeEventListener('addstream', this._ontrackpoly);\n }\n this.addEventListener('track', this._ontrack = f);\n this.addEventListener('addstream', this._ontrackpoly = function(e) {\n e.stream.getTracks().forEach(function(track) {\n var event = new Event('track');\n event.track = track;\n event.receiver = {track: track};\n event.transceiver = {receiver: event.receiver};\n event.streams = [e.stream];\n this.dispatchEvent(event);\n }.bind(this));\n }.bind(this));\n }\n });\n }\n if (typeof window === 'object' && window.RTCTrackEvent &&\n ('receiver' in window.RTCTrackEvent.prototype) &&\n !('transceiver' in window.RTCTrackEvent.prototype)) {\n Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {\n get: function() {\n return {receiver: this.receiver};\n }\n });\n }\n },\n\n shimSourceObject: function(window) {\n // Firefox has supported mozSrcObject since FF22, unprefixed in 42.\n if (typeof window === 'object') {\n if (window.HTMLMediaElement &&\n !('srcObject' in window.HTMLMediaElement.prototype)) {\n // Shim the srcObject property, once, when HTMLMediaElement is found.\n Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', {\n get: function() {\n return this.mozSrcObject;\n },\n set: function(stream) {\n this.mozSrcObject = stream;\n }\n });\n }\n }\n },\n\n shimPeerConnection: function(window) {\n var browserDetails = utils.detectBrowser(window);\n\n if (typeof window !== 'object' || !(window.RTCPeerConnection ||\n window.mozRTCPeerConnection)) {\n return; // probably media.peerconnection.enabled=false in about:config\n }\n // The RTCPeerConnection object.\n if (!window.RTCPeerConnection) {\n window.RTCPeerConnection = function(pcConfig, pcConstraints) {\n if (browserDetails.version < 38) {\n // .urls is not supported in FF < 38.\n // create RTCIceServers with a single url.\n if (pcConfig && pcConfig.iceServers) {\n var newIceServers = [];\n for (var i = 0; i < pcConfig.iceServers.length; i++) {\n var server = pcConfig.iceServers[i];\n if (server.hasOwnProperty('urls')) {\n for (var j = 0; j < server.urls.length; j++) {\n var newServer = {\n url: server.urls[j]\n };\n if (server.urls[j].indexOf('turn') === 0) {\n newServer.username = server.username;\n newServer.credential = server.credential;\n }\n newIceServers.push(newServer);\n }\n } else {\n newIceServers.push(pcConfig.iceServers[i]);\n }\n }\n pcConfig.iceServers = newIceServers;\n }\n }\n return new window.mozRTCPeerConnection(pcConfig, pcConstraints);\n };\n window.RTCPeerConnection.prototype =\n window.mozRTCPeerConnection.prototype;\n\n // wrap static methods. Currently just generateCertificate.\n if (window.mozRTCPeerConnection.generateCertificate) {\n Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {\n get: function() {\n return window.mozRTCPeerConnection.generateCertificate;\n }\n });\n }\n\n window.RTCSessionDescription = window.mozRTCSessionDescription;\n window.RTCIceCandidate = window.mozRTCIceCandidate;\n }\n\n // shim away need for obsolete RTCIceCandidate/RTCSessionDescription.\n ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']\n .forEach(function(method) {\n var nativeMethod = window.RTCPeerConnection.prototype[method];\n window.RTCPeerConnection.prototype[method] = function() {\n arguments[0] = new ((method === 'addIceCandidate') ?\n window.RTCIceCandidate :\n window.RTCSessionDescription)(arguments[0]);\n return nativeMethod.apply(this, arguments);\n };\n });\n\n // support for addIceCandidate(null or undefined)\n var nativeAddIceCandidate =\n window.RTCPeerConnection.prototype.addIceCandidate;\n window.RTCPeerConnection.prototype.addIceCandidate = function() {\n if (!arguments[0]) {\n if (arguments[1]) {\n arguments[1].apply(null);\n }\n return Promise.resolve();\n }\n return nativeAddIceCandidate.apply(this, arguments);\n };\n\n // shim getStats with maplike support\n var makeMapStats = function(stats) {\n var map = new Map();\n Object.keys(stats).forEach(function(key) {\n map.set(key, stats[key]);\n map[key] = stats[key];\n });\n return map;\n };\n\n var modernStatsTypes = {\n inboundrtp: 'inbound-rtp',\n outboundrtp: 'outbound-rtp',\n candidatepair: 'candidate-pair',\n localcandidate: 'local-candidate',\n remotecandidate: 'remote-candidate'\n };\n\n var nativeGetStats = window.RTCPeerConnection.prototype.getStats;\n window.RTCPeerConnection.prototype.getStats = function(\n selector,\n onSucc,\n onErr\n ) {\n return nativeGetStats.apply(this, [selector || null])\n .then(function(stats) {\n if (browserDetails.version < 48) {\n stats = makeMapStats(stats);\n }\n if (browserDetails.version < 53 && !onSucc) {\n // Shim only promise getStats with spec-hyphens in type names\n // Leave callback version alone; misc old uses of forEach before Map\n try {\n stats.forEach(function(stat) {\n stat.type = modernStatsTypes[stat.type] || stat.type;\n });\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n // Avoid TypeError: \"type\" is read-only, in old versions. 34-43ish\n stats.forEach(function(stat, i) {\n stats.set(i, Object.assign({}, stat, {\n type: modernStatsTypes[stat.type] || stat.type\n }));\n });\n }\n }\n return stats;\n })\n .then(onSucc, onErr);\n };\n },\n\n shimRemoveStream: function(window) {\n if (!window.RTCPeerConnection ||\n 'removeStream' in window.RTCPeerConnection.prototype) {\n return;\n }\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n var pc = this;\n utils.deprecated('removeStream', 'removeTrack');\n this.getSenders().forEach(function(sender) {\n if (sender.track && stream.getTracks().indexOf(sender.track) !== -1) {\n pc.removeTrack(sender);\n }\n });\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar utils = require('../utils');\nvar logging = utils.log;\n\n// Expose public methods.\nmodule.exports = function(window) {\n var browserDetails = utils.detectBrowser(window);\n var navigator = window && window.navigator;\n var MediaStreamTrack = window && window.MediaStreamTrack;\n\n var shimError_ = function(e) {\n return {\n name: {\n InternalError: 'NotReadableError',\n NotSupportedError: 'TypeError',\n PermissionDeniedError: 'NotAllowedError',\n SecurityError: 'NotAllowedError'\n }[e.name] || e.name,\n message: {\n 'The operation is insecure.': 'The request is not allowed by the ' +\n 'user agent or the platform in the current context.'\n }[e.message] || e.message,\n constraint: e.constraint,\n toString: function() {\n return this.name + (this.message && ': ') + this.message;\n }\n };\n };\n\n // getUserMedia constraints shim.\n var getUserMedia_ = function(constraints, onSuccess, onError) {\n var constraintsToFF37_ = function(c) {\n if (typeof c !== 'object' || c.require) {\n return c;\n }\n var require = [];\n Object.keys(c).forEach(function(key) {\n if (key === 'require' || key === 'advanced' || key === 'mediaSource') {\n return;\n }\n var r = c[key] = (typeof c[key] === 'object') ?\n c[key] : {ideal: c[key]};\n if (r.min !== undefined ||\n r.max !== undefined || r.exact !== undefined) {\n require.push(key);\n }\n if (r.exact !== undefined) {\n if (typeof r.exact === 'number') {\n r. min = r.max = r.exact;\n } else {\n c[key] = r.exact;\n }\n delete r.exact;\n }\n if (r.ideal !== undefined) {\n c.advanced = c.advanced || [];\n var oc = {};\n if (typeof r.ideal === 'number') {\n oc[key] = {min: r.ideal, max: r.ideal};\n } else {\n oc[key] = r.ideal;\n }\n c.advanced.push(oc);\n delete r.ideal;\n if (!Object.keys(r).length) {\n delete c[key];\n }\n }\n });\n if (require.length) {\n c.require = require;\n }\n return c;\n };\n constraints = JSON.parse(JSON.stringify(constraints));\n if (browserDetails.version < 38) {\n logging('spec: ' + JSON.stringify(constraints));\n if (constraints.audio) {\n constraints.audio = constraintsToFF37_(constraints.audio);\n }\n if (constraints.video) {\n constraints.video = constraintsToFF37_(constraints.video);\n }\n logging('ff37: ' + JSON.stringify(constraints));\n }\n return navigator.mozGetUserMedia(constraints, onSuccess, function(e) {\n onError(shimError_(e));\n });\n };\n\n // Returns the result of getUserMedia as a Promise.\n var getUserMediaPromise_ = function(constraints) {\n return new Promise(function(resolve, reject) {\n getUserMedia_(constraints, resolve, reject);\n });\n };\n\n // Shim for mediaDevices on older versions.\n if (!navigator.mediaDevices) {\n navigator.mediaDevices = {getUserMedia: getUserMediaPromise_,\n addEventListener: function() { },\n removeEventListener: function() { }\n };\n }\n navigator.mediaDevices.enumerateDevices =\n navigator.mediaDevices.enumerateDevices || function() {\n return new Promise(function(resolve) {\n var infos = [\n {kind: 'audioinput', deviceId: 'default', label: '', groupId: ''},\n {kind: 'videoinput', deviceId: 'default', label: '', groupId: ''}\n ];\n resolve(infos);\n });\n };\n\n if (browserDetails.version < 41) {\n // Work around http://bugzil.la/1169665\n var orgEnumerateDevices =\n navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);\n navigator.mediaDevices.enumerateDevices = function() {\n return orgEnumerateDevices().then(undefined, function(e) {\n if (e.name === 'NotFoundError') {\n return [];\n }\n throw e;\n });\n };\n }\n if (browserDetails.version < 49) {\n var origGetUserMedia = navigator.mediaDevices.getUserMedia.\n bind(navigator.mediaDevices);\n navigator.mediaDevices.getUserMedia = function(c) {\n return origGetUserMedia(c).then(function(stream) {\n // Work around https://bugzil.la/802326\n if (c.audio && !stream.getAudioTracks().length ||\n c.video && !stream.getVideoTracks().length) {\n stream.getTracks().forEach(function(track) {\n track.stop();\n });\n throw new DOMException('The object can not be found here.',\n 'NotFoundError');\n }\n return stream;\n }, function(e) {\n return Promise.reject(shimError_(e));\n });\n };\n }\n if (!(browserDetails.version > 55 &&\n 'autoGainControl' in navigator.mediaDevices.getSupportedConstraints())) {\n var remap = function(obj, a, b) {\n if (a in obj && !(b in obj)) {\n obj[b] = obj[a];\n delete obj[a];\n }\n };\n\n var nativeGetUserMedia = navigator.mediaDevices.getUserMedia.\n bind(navigator.mediaDevices);\n navigator.mediaDevices.getUserMedia = function(c) {\n if (typeof c === 'object' && typeof c.audio === 'object') {\n c = JSON.parse(JSON.stringify(c));\n remap(c.audio, 'autoGainControl', 'mozAutoGainControl');\n remap(c.audio, 'noiseSuppression', 'mozNoiseSuppression');\n }\n return nativeGetUserMedia(c);\n };\n\n if (MediaStreamTrack && MediaStreamTrack.prototype.getSettings) {\n var nativeGetSettings = MediaStreamTrack.prototype.getSettings;\n MediaStreamTrack.prototype.getSettings = function() {\n var obj = nativeGetSettings.apply(this, arguments);\n remap(obj, 'mozAutoGainControl', 'autoGainControl');\n remap(obj, 'mozNoiseSuppression', 'noiseSuppression');\n return obj;\n };\n }\n\n if (MediaStreamTrack && MediaStreamTrack.prototype.applyConstraints) {\n var nativeApplyConstraints = MediaStreamTrack.prototype.applyConstraints;\n MediaStreamTrack.prototype.applyConstraints = function(c) {\n if (this.kind === 'audio' && typeof c === 'object') {\n c = JSON.parse(JSON.stringify(c));\n remap(c, 'autoGainControl', 'mozAutoGainControl');\n remap(c, 'noiseSuppression', 'mozNoiseSuppression');\n }\n return nativeApplyConstraints.apply(this, [c]);\n };\n }\n }\n navigator.getUserMedia = function(constraints, onSuccess, onError) {\n if (browserDetails.version < 44) {\n return getUserMedia_(constraints, onSuccess, onError);\n }\n // Replace Firefox 44+'s deprecation warning with unprefixed version.\n utils.deprecated('navigator.getUserMedia',\n 'navigator.mediaDevices.getUserMedia');\n navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n'use strict';\nvar utils = require('../utils');\n\nmodule.exports = {\n shimLocalStreamsAPI: function(window) {\n if (typeof window !== 'object' || !window.RTCPeerConnection) {\n return;\n }\n if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {\n window.RTCPeerConnection.prototype.getLocalStreams = function() {\n if (!this._localStreams) {\n this._localStreams = [];\n }\n return this._localStreams;\n };\n }\n if (!('getStreamById' in window.RTCPeerConnection.prototype)) {\n window.RTCPeerConnection.prototype.getStreamById = function(id) {\n var result = null;\n if (this._localStreams) {\n this._localStreams.forEach(function(stream) {\n if (stream.id === id) {\n result = stream;\n }\n });\n }\n if (this._remoteStreams) {\n this._remoteStreams.forEach(function(stream) {\n if (stream.id === id) {\n result = stream;\n }\n });\n }\n return result;\n };\n }\n if (!('addStream' in window.RTCPeerConnection.prototype)) {\n var _addTrack = window.RTCPeerConnection.prototype.addTrack;\n window.RTCPeerConnection.prototype.addStream = function(stream) {\n if (!this._localStreams) {\n this._localStreams = [];\n }\n if (this._localStreams.indexOf(stream) === -1) {\n this._localStreams.push(stream);\n }\n var pc = this;\n stream.getTracks().forEach(function(track) {\n _addTrack.call(pc, track, stream);\n });\n };\n\n window.RTCPeerConnection.prototype.addTrack = function(track, stream) {\n if (stream) {\n if (!this._localStreams) {\n this._localStreams = [stream];\n } else if (this._localStreams.indexOf(stream) === -1) {\n this._localStreams.push(stream);\n }\n }\n return _addTrack.call(this, track, stream);\n };\n }\n if (!('removeStream' in window.RTCPeerConnection.prototype)) {\n window.RTCPeerConnection.prototype.removeStream = function(stream) {\n if (!this._localStreams) {\n this._localStreams = [];\n }\n var index = this._localStreams.indexOf(stream);\n if (index === -1) {\n return;\n }\n this._localStreams.splice(index, 1);\n var pc = this;\n var tracks = stream.getTracks();\n this.getSenders().forEach(function(sender) {\n if (tracks.indexOf(sender.track) !== -1) {\n pc.removeTrack(sender);\n }\n });\n };\n }\n },\n shimRemoteStreamsAPI: function(window) {\n if (typeof window !== 'object' || !window.RTCPeerConnection) {\n return;\n }\n if (!('getRemoteStreams' in window.RTCPeerConnection.prototype)) {\n window.RTCPeerConnection.prototype.getRemoteStreams = function() {\n return this._remoteStreams ? this._remoteStreams : [];\n };\n }\n if (!('onaddstream' in window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'onaddstream', {\n get: function() {\n return this._onaddstream;\n },\n set: function(f) {\n var pc = this;\n if (this._onaddstream) {\n this.removeEventListener('addstream', this._onaddstream);\n this.removeEventListener('track', this._onaddstreampoly);\n }\n this.addEventListener('addstream', this._onaddstream = f);\n this.addEventListener('track', this._onaddstreampoly = function(e) {\n e.streams.forEach(function(stream) {\n if (!pc._remoteStreams) {\n pc._remoteStreams = [];\n }\n if (pc._remoteStreams.indexOf(stream) >= 0) {\n return;\n }\n pc._remoteStreams.push(stream);\n var event = new Event('addstream');\n event.stream = stream;\n pc.dispatchEvent(event);\n });\n });\n }\n });\n }\n },\n shimCallbacksAPI: function(window) {\n if (typeof window !== 'object' || !window.RTCPeerConnection) {\n return;\n }\n var prototype = window.RTCPeerConnection.prototype;\n var createOffer = prototype.createOffer;\n var createAnswer = prototype.createAnswer;\n var setLocalDescription = prototype.setLocalDescription;\n var setRemoteDescription = prototype.setRemoteDescription;\n var addIceCandidate = prototype.addIceCandidate;\n\n prototype.createOffer = function(successCallback, failureCallback) {\n var options = (arguments.length >= 2) ? arguments[2] : arguments[0];\n var promise = createOffer.apply(this, [options]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n\n prototype.createAnswer = function(successCallback, failureCallback) {\n var options = (arguments.length >= 2) ? arguments[2] : arguments[0];\n var promise = createAnswer.apply(this, [options]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n\n var withCallback = function(description, successCallback, failureCallback) {\n var promise = setLocalDescription.apply(this, [description]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n prototype.setLocalDescription = withCallback;\n\n withCallback = function(description, successCallback, failureCallback) {\n var promise = setRemoteDescription.apply(this, [description]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n prototype.setRemoteDescription = withCallback;\n\n withCallback = function(candidate, successCallback, failureCallback) {\n var promise = addIceCandidate.apply(this, [candidate]);\n if (!failureCallback) {\n return promise;\n }\n promise.then(successCallback, failureCallback);\n return Promise.resolve();\n };\n prototype.addIceCandidate = withCallback;\n },\n shimGetUserMedia: function(window) {\n var navigator = window && window.navigator;\n\n if (!navigator.getUserMedia) {\n if (navigator.webkitGetUserMedia) {\n navigator.getUserMedia = navigator.webkitGetUserMedia.bind(navigator);\n } else if (navigator.mediaDevices &&\n navigator.mediaDevices.getUserMedia) {\n navigator.getUserMedia = function(constraints, cb, errcb) {\n navigator.mediaDevices.getUserMedia(constraints)\n .then(cb, errcb);\n }.bind(navigator);\n }\n }\n },\n shimRTCIceServerUrls: function(window) {\n // migrate from non-spec RTCIceServer.url to RTCIceServer.urls\n var OrigPeerConnection = window.RTCPeerConnection;\n window.RTCPeerConnection = function(pcConfig, pcConstraints) {\n if (pcConfig && pcConfig.iceServers) {\n var newIceServers = [];\n for (var i = 0; i < pcConfig.iceServers.length; i++) {\n var server = pcConfig.iceServers[i];\n if (!server.hasOwnProperty('urls') &&\n server.hasOwnProperty('url')) {\n utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');\n server = JSON.parse(JSON.stringify(server));\n server.urls = server.url;\n delete server.url;\n newIceServers.push(server);\n } else {\n newIceServers.push(pcConfig.iceServers[i]);\n }\n }\n pcConfig.iceServers = newIceServers;\n }\n return new OrigPeerConnection(pcConfig, pcConstraints);\n };\n window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;\n // wrap static methods. Currently just generateCertificate.\n if ('generateCertificate' in window.RTCPeerConnection) {\n Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {\n get: function() {\n return OrigPeerConnection.generateCertificate;\n }\n });\n }\n },\n shimTrackEventTransceiver: function(window) {\n // Add event.transceiver member over deprecated event.receiver\n if (typeof window === 'object' && window.RTCPeerConnection &&\n ('receiver' in window.RTCTrackEvent.prototype) &&\n // can't check 'transceiver' in window.RTCTrackEvent.prototype, as it is\n // defined for some reason even when window.RTCTransceiver is not.\n !window.RTCTransceiver) {\n Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {\n get: function() {\n return {receiver: this.receiver};\n }\n });\n }\n },\n\n shimCreateOfferLegacy: function(window) {\n var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;\n window.RTCPeerConnection.prototype.createOffer = function(offerOptions) {\n var pc = this;\n if (offerOptions) {\n var audioTransceiver = pc.getTransceivers().find(function(transceiver) {\n return transceiver.sender.track &&\n transceiver.sender.track.kind === 'audio';\n });\n if (offerOptions.offerToReceiveAudio === false && audioTransceiver) {\n if (audioTransceiver.direction === 'sendrecv') {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection('sendonly');\n } else {\n audioTransceiver.direction = 'sendonly';\n }\n } else if (audioTransceiver.direction === 'recvonly') {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection('inactive');\n } else {\n audioTransceiver.direction = 'inactive';\n }\n }\n } else if (offerOptions.offerToReceiveAudio === true &&\n !audioTransceiver) {\n pc.addTransceiver('audio');\n }\n\n var videoTransceiver = pc.getTransceivers().find(function(transceiver) {\n return transceiver.sender.track &&\n transceiver.sender.track.kind === 'video';\n });\n if (offerOptions.offerToReceiveVideo === false && videoTransceiver) {\n if (videoTransceiver.direction === 'sendrecv') {\n videoTransceiver.setDirection('sendonly');\n } else if (videoTransceiver.direction === 'recvonly') {\n videoTransceiver.setDirection('inactive');\n }\n } else if (offerOptions.offerToReceiveVideo === true &&\n !videoTransceiver) {\n pc.addTransceiver('video');\n }\n }\n return origCreateOffer.apply(pc, arguments);\n };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/safari/safari_shim.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/safari/safari_shim.js\n// module chunks = main","/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n /* eslint-env node */\n'use strict';\n\nvar logDisabled_ = true;\nvar deprecationWarnings_ = true;\n\n/**\n * Extract browser version out of the provided user agent string.\n *\n * @param {!string} uastring userAgent string.\n * @param {!string} expr Regular expression used as match criteria.\n * @param {!number} pos position in the version string to be returned.\n * @return {!number} browser version.\n */\nfunction extractVersion(uastring, expr, pos) {\n var match = uastring.match(expr);\n return match && match.length >= pos && parseInt(match[pos], 10);\n}\n\n// Wraps the peerconnection event eventNameToWrap in a function\n// which returns the modified event object.\nfunction wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {\n if (!window.RTCPeerConnection) {\n return;\n }\n var proto = window.RTCPeerConnection.prototype;\n var nativeAddEventListener = proto.addEventListener;\n proto.addEventListener = function(nativeEventName, cb) {\n if (nativeEventName !== eventNameToWrap) {\n return nativeAddEventListener.apply(this, arguments);\n }\n var wrappedCallback = function(e) {\n cb(wrapper(e));\n };\n this._eventMap = this._eventMap || {};\n this._eventMap[cb] = wrappedCallback;\n return nativeAddEventListener.apply(this, [nativeEventName,\n wrappedCallback]);\n };\n\n var nativeRemoveEventListener = proto.removeEventListener;\n proto.removeEventListener = function(nativeEventName, cb) {\n if (nativeEventName !== eventNameToWrap || !this._eventMap\n || !this._eventMap[cb]) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n var unwrappedCb = this._eventMap[cb];\n delete this._eventMap[cb];\n return nativeRemoveEventListener.apply(this, [nativeEventName,\n unwrappedCb]);\n };\n\n Object.defineProperty(proto, 'on' + eventNameToWrap, {\n get: function() {\n return this['_on' + eventNameToWrap];\n },\n set: function(cb) {\n if (this['_on' + eventNameToWrap]) {\n this.removeEventListener(eventNameToWrap,\n this['_on' + eventNameToWrap]);\n delete this['_on' + eventNameToWrap];\n }\n if (cb) {\n this.addEventListener(eventNameToWrap,\n this['_on' + eventNameToWrap] = cb);\n }\n }\n });\n}\n\n// Utility methods.\nmodule.exports = {\n extractVersion: extractVersion,\n wrapPeerConnectionEvent: wrapPeerConnectionEvent,\n disableLog: function(bool) {\n if (typeof bool !== 'boolean') {\n return new Error('Argument type: ' + typeof bool +\n '. Please use a boolean.');\n }\n logDisabled_ = bool;\n return (bool) ? 'adapter.js logging disabled' :\n 'adapter.js logging enabled';\n },\n\n /**\n * Disable or enable deprecation warnings\n * @param {!boolean} bool set to true to disable warnings.\n */\n disableWarnings: function(bool) {\n if (typeof bool !== 'boolean') {\n return new Error('Argument type: ' + typeof bool +\n '. Please use a boolean.');\n }\n deprecationWarnings_ = !bool;\n return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');\n },\n\n log: function() {\n if (typeof window === 'object') {\n if (logDisabled_) {\n return;\n }\n if (typeof console !== 'undefined' && typeof console.log === 'function') {\n console.log.apply(console, arguments);\n }\n }\n },\n\n /**\n * Shows a deprecation warning suggesting the modern and spec-compatible API.\n */\n deprecated: function(oldMethod, newMethod) {\n if (!deprecationWarnings_) {\n return;\n }\n console.warn(oldMethod + ' is deprecated, please use ' + newMethod +\n ' instead.');\n },\n\n /**\n * Browser detector.\n *\n * @return {object} result containing browser and version\n * properties.\n */\n detectBrowser: function(window) {\n var navigator = window && window.navigator;\n\n // Returned result object.\n var result = {};\n result.browser = null;\n result.version = null;\n\n // Fail early if it's not a browser\n if (typeof window === 'undefined' || !window.navigator) {\n result.browser = 'Not a browser.';\n return result;\n }\n\n if (navigator.mozGetUserMedia) { // Firefox.\n result.browser = 'firefox';\n result.version = extractVersion(navigator.userAgent,\n /Firefox\\/(\\d+)\\./, 1);\n } else if (navigator.webkitGetUserMedia) {\n // Chrome, Chromium, Webview, Opera.\n // Version matches Chrome/WebRTC version.\n result.browser = 'chrome';\n result.version = extractVersion(navigator.userAgent,\n /Chrom(e|ium)\\/(\\d+)\\./, 2);\n } else if (navigator.mediaDevices &&\n navigator.userAgent.match(/Edge\\/(\\d+).(\\d+)$/)) { // Edge.\n result.browser = 'edge';\n result.version = extractVersion(navigator.userAgent,\n /Edge\\/(\\d+).(\\d+)$/, 2);\n } else if (window.RTCPeerConnection &&\n navigator.userAgent.match(/AppleWebKit\\/(\\d+)\\./)) { // Safari.\n result.browser = 'safari';\n result.version = extractVersion(navigator.userAgent,\n /AppleWebKit\\/(\\d+)\\./, 1);\n } else { // Default fallthrough: not supported.\n result.browser = 'Not a supported browser.';\n return result;\n }\n\n return result;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/webrtc-adapter/src/js/utils.js\n// module id = ../../../../openvidu-browser/node_modules/webrtc-adapter/src/js/utils.js\n// module chunks = main","/*\r\nWildEmitter.js is a slim little event emitter by @henrikjoreteg largely based\r\non @visionmedia's Emitter from UI Kit.\r\n\r\nWhy? I wanted it standalone.\r\n\r\nI also wanted support for wildcard emitters like this:\r\n\r\nemitter.on('*', function (eventName, other, event, payloads) {\r\n\r\n});\r\n\r\nemitter.on('somenamespace*', function (eventName, payloads) {\r\n\r\n});\r\n\r\nPlease note that callbacks triggered by wildcard registered events also get\r\nthe event name as the first argument.\r\n*/\r\n\r\nmodule.exports = WildEmitter;\r\n\r\nfunction WildEmitter() { }\r\n\r\nWildEmitter.mixin = function (constructor) {\r\n var prototype = constructor.prototype || constructor;\r\n\r\n prototype.isWildEmitter= true;\r\n\r\n // Listen on the given `event` with `fn`. Store a group name if present.\r\n prototype.on = function (event, groupName, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n func._groupName = group;\r\n (this.callbacks[event] = this.callbacks[event] || []).push(func);\r\n return this;\r\n };\r\n\r\n // Adds an `event` listener that will be invoked a single\r\n // time then automatically removed.\r\n prototype.once = function (event, groupName, fn) {\r\n var self = this,\r\n hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n function on() {\r\n self.off(event, on);\r\n func.apply(this, arguments);\r\n }\r\n this.on(event, group, on);\r\n return this;\r\n };\r\n\r\n // Unbinds an entire group\r\n prototype.releaseGroup = function (groupName) {\r\n this.callbacks = this.callbacks || {};\r\n var item, i, len, handlers;\r\n for (item in this.callbacks) {\r\n handlers = this.callbacks[item];\r\n for (i = 0, len = handlers.length; i < len; i++) {\r\n if (handlers[i]._groupName === groupName) {\r\n //console.log('removing');\r\n // remove it and shorten the array we're looping through\r\n handlers.splice(i, 1);\r\n i--;\r\n len--;\r\n }\r\n }\r\n }\r\n return this;\r\n };\r\n\r\n // Remove the given callback for `event` or all\r\n // registered callbacks.\r\n prototype.off = function (event, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var callbacks = this.callbacks[event],\r\n i;\r\n\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (arguments.length === 1) {\r\n delete this.callbacks[event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n i = callbacks.indexOf(fn);\r\n callbacks.splice(i, 1);\r\n if (callbacks.length === 0) {\r\n delete this.callbacks[event];\r\n }\r\n return this;\r\n };\r\n\r\n /// Emit `event` with the given args.\r\n // also calls any `*` handlers\r\n prototype.emit = function (event) {\r\n this.callbacks = this.callbacks || {};\r\n var args = [].slice.call(arguments, 1),\r\n callbacks = this.callbacks[event],\r\n specialCallbacks = this.getWildcardCallbacks(event),\r\n i,\r\n len,\r\n item,\r\n listeners;\r\n\r\n if (callbacks) {\r\n listeners = callbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, args);\r\n }\r\n }\r\n\r\n if (specialCallbacks) {\r\n len = specialCallbacks.length;\r\n listeners = specialCallbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, [event].concat(args));\r\n }\r\n }\r\n\r\n return this;\r\n };\r\n\r\n // Helper for for finding special wildcard event handlers that match the event\r\n prototype.getWildcardCallbacks = function (eventName) {\r\n this.callbacks = this.callbacks || {};\r\n var item,\r\n split,\r\n result = [];\r\n\r\n for (item in this.callbacks) {\r\n split = item.split('*');\r\n if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) {\r\n result = result.concat(this.callbacks[item]);\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n};\r\n\r\nWildEmitter.mixin(WildEmitter);\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module id = ../../../../openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module chunks = main","/*!\n * EventEmitter v5.2.4 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(this || {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module id = ../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module chunks = main","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./src/$$_lazy_route_resource lazy recursive\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/$$_lazy_route_resource lazy\n// module id = ./src/$$_lazy_route_resource lazy recursive\n// module chunks = main","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.css\n// module id = ./src/app/app.component.css\n// module chunks = main","module.exports = \"
\\n \\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.html\n// module id = ./src/app/app.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { InfoService } from 'app/services/info.service';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.component.ts","import { NgModule } from '@angular/core';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n} from '@angular/material';\n\n@NgModule({\n imports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n exports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n})\nexport class AppMaterialModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.material.module.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { HttpModule } from '@angular/http';\nimport { RouterModule } from '@angular/router';\nimport 'hammerjs';\n\nimport { routing } from './app.routing';\nimport { AppMaterialModule } from 'app/app.material.module';\n\nimport { InfoService } from './services/info.service';\nimport { RestService } from './services/rest.service';\n\nimport { AppComponent } from './app.component';\nimport { DashboardComponent } from './components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from './components/session-details/session-details.component';\nimport { CredentialsDialogComponent } from './components/dashboard/credentials-dialog.component';\nimport { LayoutBestFitComponent } from './components/layouts/layout-best-fit/layout-best-fit.component';\n\n\n@NgModule({\n declarations: [\n AppComponent,\n DashboardComponent,\n SessionDetailsComponent,\n CredentialsDialogComponent,\n LayoutBestFitComponent,\n ],\n imports: [\n BrowserModule,\n FormsModule,\n HttpModule,\n routing,\n AppMaterialModule,\n FlexLayoutModule\n ],\n entryComponents: [\n CredentialsDialogComponent,\n ],\n providers: [InfoService, RestService],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.module.ts","import { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { DashboardComponent } from 'app/components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from 'app/components/session-details/session-details.component';\nimport { LayoutBestFitComponent } from 'app/components/layouts/layout-best-fit/layout-best-fit.component';\n\nconst appRoutes: Routes = [\n {\n path: '',\n component: DashboardComponent,\n pathMatch: 'full'\n },\n {\n path: 'session/:sessionId',\n component: SessionDetailsComponent,\n pathMatch: 'full'\n },\n {\n path: 'layout-best-fit/:sessionId/:secret',\n component: LayoutBestFitComponent,\n pathMatch: 'full'\n }\n];\n\nexport const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true });\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.routing.ts","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material';\n\n@Component({\n selector: 'app-credentials-dialog',\n template: `\n
\n

\n Insert your secret\n

\n
\n \n \n \n \n \n \n \n \n \n
\n
\n `,\n styles: [`\n #quality-div {\n margin-top: 20px;\n }\n #join-div {\n margin-top: 25px;\n margin-bottom: 20px;\n }\n #quality-tag {\n display: block;\n }\n h5 {\n margin-bottom: 10px;\n text-align: left;\n }\n #joinWithVideo {\n margin-right: 50px;\n }\n mat-dialog-actions {\n display: block;\n }\n #join-btn {\n float: right;\n }\n `],\n})\nexport class CredentialsDialogComponent {\n\n public myReference: MatDialogRef;\n secret: string;\n\n constructor() { }\n\n testVideo() {\n this.myReference.close(this.secret);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/credentials-dialog.component.ts","module.exports = \"#dashboard-div {\\n padding: 20px;\\n}\\n\\n#log {\\n height: 90%;\\n}\\n\\n#log-content {\\n height: 90%;\\n font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;\\n overflow-y: auto;\\n overflow-x: hidden\\n}\\n\\nul {\\n margin: 0;\\n}\\n\\n#test-btn {\\n text-transform: uppercase;\\n float: right;\\n}\\n\\nmat-card-title button.blue {\\n color: #ffffff;\\n background-color: #0088aa;\\n}\\n\\nmat-card-title button.yellow {\\n color: rgba(0, 0, 0, 0.87);\\n background-color: #ffcc00;\\n}\\n\\nmat-spinner {\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tick-div {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tooltip-tick {\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n z-index: 2;\\n}\\n\\n.circ {\\n opacity: 0;\\n stroke-dasharray: 130;\\n stroke-dashoffset: 130;\\n -webkit-transition: all 1s;\\n transition: all 1s;\\n}\\n\\n.tick {\\n stroke-dasharray: 50;\\n stroke-dashoffset: 50;\\n -webkit-transition: stroke-dashoffset 1s 0.5s ease-out;\\n transition: stroke-dashoffset 1s 0.5s ease-out;\\n}\\n\\n.drawn+svg .path {\\n opacity: 1;\\n stroke-dashoffset: 0;\\n}\\n\\n#mirrored-video {\\n position: relative;\\n}\\n\\n/* Pure CSS loader */\\n\\n#loader {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#loader * {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::after {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::before {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n.loader-1 {\\n height: 100px;\\n width: 100px;\\n -webkit-animation: loader-1-1 4.8s linear infinite;\\n animation: loader-1-1 4.8s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.loader-1 span {\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n -webkit-animation: loader-1-2 1.2s linear infinite;\\n animation: loader-1-2 1.2s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n }\\n}\\n\\n@keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n transform: rotate(220deg);\\n }\\n}\\n\\n.loader-1 span::after {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n border: 8px solid #4d4d4d;\\n border-radius: 50%;\\n -webkit-animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n}\\n\\n@-webkit-keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n }\\n}\\n\\n@keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n transform: rotate(140deg);\\n }\\n}\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.css\n// module id = ./src/app/components/dashboard/dashboard.component.css\n// module chunks = main","module.exports = \"
\\n\\n
\\n \\n Server events\\n \\n lock_outline\\n \\n \\n \\n \\n
    \\n
  • \\n

    {{i}}

    \\n
  • \\n
\\n
\\n
\\n
\\n\\n
\\n \\n Test the connection\\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n \\n \\n \\n
\\n
\\n

{{msg}}

\\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.html\n// module id = ./src/app/components/dashboard/dashboard.component.html\n// module chunks = main","import { Component, OnInit, ViewChild, ElementRef, HostListener, OnDestroy } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material';\nimport { Subscription } from 'rxjs/Subscription';\n\nimport { InfoService } from '../../services/info.service';\nimport { RestService } from '../../services/rest.service';\n\nimport { OpenVidu, Session } from 'openvidu-browser';\nimport { CredentialsDialogComponent } from './credentials-dialog.component';\n\ndeclare const $;\n\n@Component({\n selector: 'app-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css'],\n})\nexport class DashboardComponent implements OnInit, OnDestroy {\n\n websocket: WebSocket;\n\n @ViewChild('scrollMe') private myScrollContainer: ElementRef;\n lockScroll = false;\n\n infoSubscription: Subscription;\n info = [];\n\n session: Session;\n\n testStatus = 'DISCONNECTED';\n testButton = 'Test';\n tickClass = 'trigger';\n showSpinner = false;\n msgChain = [];\n\n openviduPublicUrl: string;\n\n constructor(private infoService: InfoService, private restService: RestService, public dialog: MatDialog) {\n // Subscription to info updated event raised by InfoService\n this.infoSubscription = this.infoService.newInfo$.subscribe(\n info => {\n this.info.push(info);\n this.scrollToBottom();\n });\n }\n\n ngOnInit() {\n\n const protocol = location.protocol.includes('https') ? 'wss://' : 'ws://';\n const port = (location.port) ? (':' + location.port) : '';\n\n this.websocket = new WebSocket(protocol + location.hostname + port + '/info');\n\n this.websocket.onopen = (event) => {\n console.log('Info websocket connected');\n };\n this.websocket.onclose = (event) => {\n console.log('Info websocket closed');\n };\n this.websocket.onerror = (event) => {\n console.log('Info websocket error');\n };\n this.websocket.onmessage = (event) => {\n console.log('Info websocket message');\n console.log(event.data);\n this.infoService.updateInfo(event.data);\n };\n\n this.restService.getOpenViduPublicUrl()\n .then(url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n })\n .catch(error => {\n console.error(error);\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n // On window closed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n ngOnDestroy() {\n // On component destroyed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n toggleTestVideo() {\n if (!this.session) {\n this.testVideo();\n } else {\n this.endTestVideo();\n }\n }\n\n testVideo() {\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n if (!this.openviduPublicUrl) {\n this.restService.getOpenViduPublicUrl()\n .then((url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n this.connectToSession(this.openviduPublicUrl + 'testSession?secret=' + secret);\n }))\n .catch(error => {\n console.error(error);\n });\n } else {\n this.connectToSession(this.openviduPublicUrl + 'testSession?secret=' + secret);\n }\n }\n });\n }\n\n connectToSession(mySessionId: string) {\n this.msgChain = [];\n\n const OV = new OpenVidu();\n this.session = OV.initSession(mySessionId);\n\n this.testStatus = 'CONNECTING';\n this.testButton = 'Testing...';\n\n this.session.connect('token', (error) => {\n if (!error) {\n\n this.testStatus = 'CONNECTED';\n\n const publisherRemote = OV.initPublisher('mirrored-video', {\n audio: true,\n video: true,\n audioActive: true,\n videoActive: true,\n quality: 'MEDIUM'\n },\n e => {\n if (!!e) {\n console.error(e);\n }\n }\n );\n\n publisherRemote.on('accessAllowed', () => {\n this.msgChain.push('Camera access allowed');\n });\n\n publisherRemote.on('accessDenied', () => {\n this.endTestVideo();\n this.msgChain.push('Camera access denied');\n });\n\n publisherRemote.on('videoElementCreated', (video) => {\n this.showSpinner = true;\n this.msgChain.push('Video element created');\n });\n\n publisherRemote.on('remoteVideoPlaying', (video) => {\n this.msgChain.push('Remote video playing');\n this.testButton = 'End test';\n this.testStatus = 'PLAYING';\n this.showSpinner = false;\n });\n\n publisherRemote.subscribeToRemote();\n this.session.publish(publisherRemote);\n } else {\n if (error.code === 401) { // User unauthorized error. OpenVidu security is active\n this.endTestVideo();\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n this.connectToSession('wss://' + location.hostname + ':8443/testSession?secret=' + secret);\n }\n });\n } else {\n console.error(error);\n }\n }\n });\n }\n\n endTestVideo() {\n this.session.disconnect();\n this.session = null;\n this.testStatus = 'DISCONNECTED';\n this.testButton = 'Test';\n this.showSpinner = false;\n this.info = [];\n this.msgChain = [];\n }\n\n scrollToBottom(): void {\n try {\n if (!this.lockScroll) {\n this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;\n }\n } catch (err) {\n console.error('[Error]:' + err.toString());\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/dashboard.component.ts","module.exports = \".bounds {\\n background-color: black;\\n overflow: hidden;\\n cursor: none !important;\\n position: absolute;\\n left: 0;\\n right: 0;\\n top: 0;\\n bottom: 0;\\n}\\n\\nvideo {\\n -o-object-fit: cover;\\n object-fit: cover;\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n}\\n\\n/*!\\n * Copyright (c) 2017 TokBox, Inc.\\n * Released under the MIT license\\n * http://opensource.org/licenses/MIT\\n */\\n\\n.custom-class {\\n min-height: 0px !important;\\n}\\n\\n/**\\n * OT Base styles\\n */\\n\\n/* Root OT object, this is where our CSS reset happens */\\n\\n.OT_root,\\n.OT_root * {\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n vertical-align: baseline;\\n}\\n\\n.OT_dialog-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_dialog-centering-child {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_dialog {\\n position: relative;\\n\\n -webkit-box-sizing: border-box;\\n\\n box-sizing: border-box;\\n max-width: 576px;\\n margin-right: auto;\\n margin-left: auto;\\n padding: 36px;\\n text-align: center; /* centers all the inline content */\\n\\n background-color: #363636;\\n color: #fff;\\n -webkit-box-shadow: 2px 4px 6px #999;\\n box-shadow: 2px 4px 6px #999;\\n font-family: 'Didact Gothic', sans-serif;\\n font-size: 13px;\\n line-height: 1.4;\\n}\\n\\n.OT_dialog * {\\n font-family: inherit;\\n -webkit-box-sizing: inherit;\\n box-sizing: inherit;\\n}\\n\\n.OT_closeButton {\\n color: #999999;\\n cursor: pointer;\\n font-size: 32px;\\n line-height: 36px;\\n position: absolute;\\n right: 18px;\\n top: 0;\\n}\\n\\n.OT_dialog-messages {\\n text-align: center;\\n}\\n\\n.OT_dialog-messages-main {\\n margin-bottom: 36px;\\n line-height: 36px;\\n\\n font-weight: 300;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-messages-minor {\\n margin-bottom: 18px;\\n\\n font-size: 13px;\\n line-height: 18px;\\n color: #A4A4A4;\\n}\\n\\n.OT_dialog-messages-minor strong {\\n color: #ffffff;\\n}\\n\\n.OT_dialog-actions-card {\\n display: inline-block;\\n}\\n\\n.OT_dialog-button-title {\\n margin-bottom: 18px;\\n line-height: 18px;\\n\\n font-weight: 300;\\n text-align: center;\\n font-size: 14px;\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title label {\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title a,\\n.OT_dialog-button-title a:link,\\n.OT_dialog-button-title a:active {\\n color: #02A1DE;\\n}\\n\\n.OT_dialog-button-title strong {\\n color: #ffffff;\\n font-weight: 100;\\n display: block;\\n}\\n\\n.OT_dialog-button {\\n display: inline-block;\\n\\n margin-bottom: 18px;\\n padding: 0 1em;\\n\\n background-color: #1CA3DC;\\n text-align: center;\\n cursor: pointer;\\n}\\n\\n.OT_dialog-button:disabled {\\n cursor: not-allowed;\\n opacity: 0.5;\\n}\\n\\n.OT_dialog-button-large {\\n line-height: 36px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n\\n font-weight: 100;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-button-small {\\n line-height: 18px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n\\n background-color: #444444;\\n color: #999999;\\n font-size: 16px;\\n}\\n\\n.OT_dialog-progress-bar {\\n display: inline-block; /* prevents margin collapse */\\n width: 100%;\\n margin-top: 5px;\\n margin-bottom: 41px;\\n\\n border: 1px solid #4E4E4E;\\n height: 8px;\\n}\\n\\n.OT_dialog-progress-bar-fill {\\n height: 100%;\\n\\n background-color: #29A4DA;\\n}\\n\\n.OT_dialog-plugin-upgrading .OT_dialog-plugin-upgrade-percentage {\\n line-height: 54px;\\n\\n font-size: 48px;\\n font-weight: 100;\\n}\\n\\n/* Helpers */\\n\\n.OT_centered {\\n position: fixed;\\n left: 50%;\\n top: 50%;\\n margin: 0;\\n}\\n\\n.OT_dialog-hidden {\\n display: none;\\n}\\n\\n.OT_dialog-button-block {\\n display: block;\\n}\\n\\n.OT_dialog-no-natural-margin {\\n margin-bottom: 0;\\n}\\n\\n/* Publisher and Subscriber styles */\\n\\n.OT_publisher, .OT_subscriber {\\n position: relative;\\n min-width: 48px;\\n min-height: 48px;\\n}\\n\\n.OT_publisher .OT_video-element,\\n.OT_subscriber .OT_video-element {\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n\\n -webkit-transform-origin: 0 0;\\n\\n transform-origin: 0 0;\\n}\\n\\n/* Styles that are applied when the video element should be mirrored */\\n\\n.OT_publisher.OT_mirrored .OT_video-element {\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n -webkit-transform-origin: 50% 50%;\\n transform-origin: 50% 50%;\\n}\\n\\n.OT_subscriber_error {\\n background-color: #000;\\n color: #fff;\\n text-align: center;\\n}\\n\\n.OT_subscriber_error > p {\\n padding: 20px;\\n}\\n\\n/* The publisher/subscriber name/mute background */\\n\\n.OT_publisher .OT_bar,\\n.OT_subscriber .OT_bar,\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name,\\n.OT_publisher .OT_archiving,\\n.OT_subscriber .OT_archiving,\\n.OT_publisher .OT_archiving-status,\\n.OT_subscriber .OT_archiving-status,\\n.OT_publisher .OT_archiving-light-box,\\n.OT_subscriber .OT_archiving-light-box {\\n -webkit-box-sizing: border-box;\\n -ms-box-sizing: border-box;\\n box-sizing: border-box;\\n top: 0;\\n left: 0;\\n right: 0;\\n display: block;\\n height: 34px;\\n position: absolute;\\n}\\n\\n.OT_publisher .OT_bar,\\n.OT_subscriber .OT_bar {\\n background: rgba(0, 0, 0, 0.4);\\n}\\n\\n.OT_publisher .OT_edge-bar-item,\\n.OT_subscriber .OT_edge-bar-item {\\n z-index: 1; /* required to get audio level meter underneath */\\n}\\n\\n/* The publisher/subscriber name panel/archiving status bar */\\n\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name {\\n background-color: transparent;\\n color: #ffffff;\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n padding: 0 4px 0 36px;\\n}\\n\\n.OT_publisher .OT_archiving-status,\\n.OT_subscriber .OT_archiving-status {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n left: 34px;\\n padding: 0 4px;\\n color: rgba(255, 255, 255, 0.8);\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n}\\n\\n.OT_micro .OT_archiving-status,\\n.OT_micro:hover .OT_archiving-status,\\n.OT_mini .OT_archiving-status,\\n.OT_mini:hover .OT_archiving-status {\\n display: none;\\n}\\n\\n.OT_publisher .OT_archiving-light-box,\\n.OT_subscriber .OT_archiving-light-box {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n right: auto;\\n width: 34px;\\n height: 34px;\\n}\\n\\n.OT_archiving-light {\\n width: 7px;\\n height: 7px;\\n border-radius: 30px;\\n position: absolute;\\n top: 14px;\\n left: 14px;\\n background-color: #575757;\\n -webkit-box-shadow: 0 0 5px 1px #575757;\\n box-shadow: 0 0 5px 1px #575757;\\n}\\n\\n.OT_archiving-light.OT_active {\\n background-color: #970d13;\\n animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n -moz-animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n -moz-animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n.OT_mini .OT_bar,\\n.OT_bar.OT_mode-mini,\\n.OT_bar.OT_mode-mini-auto {\\n bottom: 0;\\n height: auto;\\n}\\n\\n.OT_mini .OT_name.OT_mode-off,\\n.OT_mini .OT_name.OT_mode-on,\\n.OT_mini .OT_name.OT_mode-auto,\\n.OT_mini:hover .OT_name.OT_mode-auto {\\n display: none;\\n}\\n\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name {\\n left: 10px;\\n right: 37px;\\n height: 34px;\\n padding-left: 0;\\n}\\n\\n.OT_publisher .OT_mute,\\n.OT_subscriber .OT_mute {\\n border: none;\\n cursor: pointer;\\n display: block;\\n position: absolute;\\n text-align: center;\\n text-indent: -9999em;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n}\\n\\n.OT_publisher .OT_mute,\\n.OT_subscriber .OT_mute {\\n right: 0;\\n top: 0;\\n border-left: 1px solid rgba(255, 255, 255, 0.2);\\n height: 36px;\\n width: 37px;\\n}\\n\\n.OT_mini .OT_mute,\\n.OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold,\\n.OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold {\\n top: 50%;\\n left: 50%;\\n right: auto;\\n margin-top: -18px;\\n margin-left: -18.5px;\\n border-left: none;\\n}\\n\\n.OT_publisher .OT_mute {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMAAAC02HQrAAAA1VBMVEUAAAD3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3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\\n.OT_subscriber .OT_mute {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII=);\\n background-position: 8px 7px;\\n}\\n\\n.OT_subscriber .OT_mute.OT_active {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg==);\\n background-position: 7px 7px;\\n}\\n\\n/**\\n * Styles for display modes\\n *\\n * Note: It's important that these completely control the display and opacity\\n * attributes, no other selectors should atempt to change them.\\n */\\n\\n/* Default display mode transitions for various chrome elements */\\n\\n.OT_publisher .OT_edge-bar-item,\\n.OT_subscriber .OT_edge-bar-item {\\n -webkit-transition-property: top, bottom, opacity;\\n transition-property: top, bottom, opacity;\\n -webkit-transition-duration: 0.5s;\\n transition-duration: 0.5s;\\n -webkit-transition-timing-function: ease-in;\\n transition-timing-function: ease-in;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-off,\\n.OT_publisher .OT_edge-bar-item.OT_mode-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto,\\n.OT_publisher .OT_edge-bar-item.OT_mode-mini-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\\n top: -25px;\\n opacity: 0;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-auto,\\n.OT_publisher .OT_mute.OT_mode-mini-auto,\\n.OT_subscriber .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\\n top: auto;\\n bottom: -25px;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-on,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-on,\\n.OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto,\\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\\n top: 0;\\n opacity: 1;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-on,\\n.OT_mini:hover .OT_mute.OT_mode-auto,\\n.OT_mute.OT_mode-mini,\\n.OT_root:hover .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\\n.OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\\n top: auto;\\n bottom: 0;\\n opacity: 1;\\n}\\n\\n/* Contains the video element, used to fix video letter-boxing */\\n\\n.OT_widget-container {\\n width: 100%;\\n height: 100%;\\n position: absolute;\\n background-color: #000000;\\n overflow: hidden;\\n}\\n\\n/* Load animation */\\n\\n.OT_root .OT_video-loading {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n\\n background-color: rgba(0, 0, 0, .75);\\n}\\n\\n.OT_root .OT_video-loading .OT_video-loading-spinner {\\n background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjA4Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiI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NODYuNiA1MEExMDAgMTAwIDAgMCAxIDAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNjKSIgZD0iTTAgMTAwYTEwMCAxMDAgMCAwIDEtODYuNi01MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48cGF0aCBzdHJva2U9InVybCgjZCkiIGQ9Ik0tODYuNiA1MGExMDAgMTAwIDAgMCAxIDAtMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNlKSIgZD0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAgMSA4Ni42IDUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjwvZz48L21hc2s+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9Ii0yMCIgeT0iLTIwIiBtYXNrPSJ1cmwoI2cpIiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;\\n position: absolute;\\n width: 32px;\\n height: 32px;\\n left: 50%;\\n top: 50%;\\n margin-left: -16px;\\n margin-top: -16px;\\n -webkit-animation: OT_spin 2s linear infinite;\\n animation: OT_spin 2s linear infinite;\\n}\\n\\n@-webkit-keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.OT_publisher.OT_loading .OT_video-loading,\\n.OT_subscriber.OT_loading .OT_video-loading {\\n display: block;\\n}\\n\\n.OT_video-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_video-container {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_video-poster {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n\\n opacity: .25;\\n\\n background-repeat: no-repeat;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSI2Ni42NiUiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTc5IDMwOGMxNC4yNS02LjUgNTQuMjUtMTkuNzUgNzEtMjkgOS0zLjI1IDI1LTIxIDI1LTIxczMuNzUtMTMgMy0yMmMtMS43NS02Ljc1LTE1LTQzLTE1LTQzLTIuNSAzLTQuNzQxIDMuMjU5LTcgMS0zLjI1LTcuNS0yMC41LTQ0LjUtMTYtNTcgMS4yNS03LjUgMTAtNiAxMC02LTExLjI1LTMzLjc1LTgtNjctOC02N3MuMDczLTcuMzQ2IDYtMTVjLTMuNDguNjM3LTkgNC05IDQgMi41NjMtMTEuNzI3IDE1LTIxIDE1LTIxIC4xNDgtLjMxMi0xLjMyMS0xLjQ1NC0xMCAxIDEuNS0yLjc4IDE2LjY3NS04LjY1NCAzMC0xMSAzLjc4Ny05LjM2MSAxMi43ODItMTcuMzk4IDIyLTIyLTIuMzY1IDMuMTMzLTMgNi0zIDZzMTUuNjQ3LTguMDg4IDQxLTZjLTE5Ljc1IDItMjQgNi0yNCA2czc0LjUtMTAuNzUgMTA0IDM3YzcuNSA5LjUgMjQuNzUgNTUuNzUgMTAgODkgMy43NS0xLjUgNC41LTQuNSA5IDEgLjI1IDE0Ljc1LTExLjUgNjMtMTkgNjItMi43NSAxLTQtMy00LTMtMTAuNzUgMjkuNS0xNCAzOC0xNCAzOC0yIDQuMjUtMy43NSAxOC41LTEgMjIgMS4yNSA0LjUgMjMgMjMgMjMgMjNsMTI3IDUzYzM3IDM1IDIzIDEzNSAyMyAxMzVMMCA0NjRzLTMtOTYuNzUgMTQtMTIwYzUuMjUtNi4yNSAyMS43NS0xOS43NSA2NS0zNnoiLz48L3N2Zz4=);\\n background-size: auto 76%;\\n}\\n\\n.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: cover;\\n object-fit: cover;\\n}\\n\\n/* Workaround for iOS freezing issue when cropping videos */\\n\\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\\n\\n@media only screen\\n and (orientation: portrait) {\\n .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: contain !important;\\n object-fit: contain !important;\\n }\\n}\\n\\n.OT_fit-mode-contain .OT_video-element {\\n -o-object-fit: contain;\\n object-fit: contain;\\n}\\n\\n.OT_fit-mode-cover .OT_video-poster {\\n background-position: center bottom;\\n}\\n\\n.OT_fit-mode-contain .OT_video-poster {\\n background-position: center;\\n}\\n\\n.OT_audio-level-meter {\\n position: absolute;\\n width: 25%;\\n max-width: 224px;\\n min-width: 21px;\\n top: 0;\\n right: 0;\\n overflow: hidden;\\n}\\n\\n.OT_audio-level-meter:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__bar {\\n position: absolute;\\n width: 192%; /* meter value can overflow of 8% */\\n height: 192%;\\n top: -96% /* half of the size */;\\n right: -96%;\\n border-radius: 50%;\\n\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_audio-level-meter__audio-only-img {\\n position: absolute;\\n top: 22%;\\n right: 15%;\\n width: 40%;\\n\\n opacity: .7;\\n\\n background: url(data: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QtMy43ODIuNTY5LTcuMzM1IDMuMTM0LTcuOTIxIDIuNjM2LS42MDMgNS40ODUgMi4xNSA2LjI4OSA2LjEzMi43OTcgMy45NDgtLjc1MiA3LjQ1Ny0zLjM4OCA3Ljg1OS0yLjU2Ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+) no-repeat center;\\n}\\n\\n.OT_audio-level-meter__audio-only-img:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__value {\\n position: absolute;\\n border-radius: 50%;\\n background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\\n}\\n\\n.OT_audio-level-meter.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_audio-level-meter.OT_mode-on,\\n.OT_audio-only .OT_audio-level-meter.OT_mode-auto {\\n display: block;\\n}\\n\\n.OT_audio-only.OT_publisher .OT_video-element,\\n.OT_audio-only.OT_subscriber .OT_video-element {\\n display: none;\\n}\\n\\n.OT_video-disabled-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: bottom right;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 3px;\\n right: 3px;\\n}\\n\\n.OT_video-disabled {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3BxeEtim/UbNpnbQiqF4MmT7kqrbr4lkMcTo46TTSpJB5g+8NHuVWnWuaampvhmO/7duHmrGluoO4C6OsJZGRrkDIld43ZqUOTnlkDSmXmabAoBU0vqBf+6KgFSxQ9++uzZ8rZApM81TJ8xM5me0Z/UF7PuBmdVdkGEb5gYDeQmyZNW3SJLIP9Kj64lGyMpmxRN6sOfIbkoAhKOdnv2/PmB1kB88eLF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G/wBOl0vjcw70xwAAAABJRU5ErkJggg==);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-warning {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAuDaNitJonTGIqHgQGQjDsJglMrUH5iDSEQbRa6y2yrNvv/PuWVmV/PTzLz8steTit1B9FtGJeZrJksmWdBzBMcami4xUkaY1A1Qe94WIaPGBApJhaERrLrXkElf8+NPPz6YMLs1DDjn0Wn9PnI/UiQadM4jNEkhzVsEGE8nIHESM1j5/KqRX+/IEiOQ/yifNBlEkpnb00cccesbpp13T3983H88/48xzrrvm6it/8U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sxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_audio-blocked-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n}\\n\\n.OT_audio-blocked {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwIDEgNDMgNDRhOC45ODggOC45ODggMCAwIDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAgMSAxMC4zNzQtLjQyQzUxLjcwMiAxOS4xMTQgNTQgMjkuMjA4IDU0IDQ1LjIwOGMwIDE0LjUyNy0yLjM0MyAyMy44OC03LjAzIDI4LjA1OGE3LjI4IDcuMjggMCAwIDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwIDEtNS01di0xM2E1IDUgMCAwIDEgNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 90px auto;\\n}\\n\\n.OT_container-audio-blocked {\\n cursor: pointer;\\n}\\n\\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\\n display: none;\\n}\\n\\n.OT_container-audio-blocked .OT_mute {\\n display: none;\\n}\\n\\n.OT_audio-blocked-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_video-unsupported {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 58px auto;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin-top: -30px;\\n}\\n\\n.OT_video-unsupported-bar {\\n display: none;\\n position: absolute;\\n width: 192%; /* copy the size of the audio meter bar for symmetry */\\n height: 192%;\\n top: -96% /* half of the size */;\\n left: -96%;\\n border-radius: 50%;\\n\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_video-unsupported-img {\\n display: none;\\n position: absolute;\\n top: 11%;\\n left: 15%;\\n width: 70%;\\n opacity: .7;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-repeat: no-repeat;\\n background-position: center;\\n background-size: 100% auto;\\n}\\n\\n.OT_video-unsupported-img:before {\\n /* makes the height of the container 93% of its width (90/97 px) */\\n content: '';\\n display: block;\\n padding-top: 93%;\\n}\\n\\n.OT_video-unsupported-text {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n text-align: center;\\n height: 100%;\\n margin-top: 40px;\\n}\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module chunks = main","module.exports = \"
\\n
\\n
\\n \\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener, ViewEncapsulation, ApplicationRef } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { OpenVidu, Session, Stream, Subscriber } from 'openvidu-browser';\n\nimport { OpenViduLayout } from '../openvidu-layout';\n\n@Component({\n selector: 'app-layout-best-fit',\n templateUrl: './layout-best-fit.component.html',\n styleUrls: ['./layout-best-fit.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LayoutBestFitComponent implements OnInit, OnDestroy {\n\n openviduLayout: OpenViduLayout;\n sessionId: string;\n secret: string;\n\n session: Session;\n streams = [];\n\n layout: any;\n resizeTimeout;\n\n constructor(private route: ActivatedRoute, private appRef: ApplicationRef) {\n this.route.params.subscribe(params => {\n this.sessionId = params.sessionId;\n this.secret = params.secret;\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n this.leaveSession();\n }\n\n @HostListener('window:resize', ['$event'])\n sizeChange(event) {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.openviduLayout.updateLayout();\n }, 20);\n }\n\n ngOnDestroy() {\n this.leaveSession();\n }\n\n ngOnInit() {\n const OV = new OpenVidu();\n const fullSessionId = 'wss://' + location.hostname + ':8443/' + this.sessionId + '?secret=' + this.secret + '&recorder=true';\n\n this.session = OV.initSession(fullSessionId);\n\n this.session.on('streamCreated', (event) => {\n const subscriber: Subscriber = this.session.subscribe(event.stream, '');\n this.addRemoteStream(event.stream);\n });\n\n this.session.on('streamDestroyed', (event) => {\n event.preventDefault();\n this.deleteRemoteStream(event.stream);\n this.openviduLayout.updateLayout();\n });\n\n this.session.connect(null, (error) => {\n if (error) {\n console.error(error);\n }\n });\n\n this.openviduLayout = new OpenViduLayout();\n this.openviduLayout.initLayoutContainer(document.getElementById('layout'), {\n maxRatio: 3 / 2, // The narrowest ratio that will be used (default 2x3)\n minRatio: 9 / 16, // The widest ratio that will be used (default 16x9)\n fixedRatio: false, /* If this is true then the aspect ratio of the video is maintained\n and minRatio and maxRatio are ignored (default false) */\n bigClass: 'OV_big', // The class to add to elements that should be sized bigger\n bigPercentage: 0.8, // The maximum percentage of space the big ones should take up\n bigFixedRatio: false, // fixedRatio for the big ones\n bigMaxRatio: 3 / 2, // The narrowest ratio to use for the big elements (default 2x3)\n bigMinRatio: 9 / 16, // The widest ratio to use for the big elements (default 16x9)\n bigFirst: true, // Whether to place the big one in the top left (true) or bottom right\n animate: true // Whether you want to animate the transitions\n });\n }\n\n private addRemoteStream(stream: Stream): void {\n this.streams.push(stream);\n this.appRef.tick();\n }\n\n private deleteRemoteStream(stream: Stream): void {\n const index = this.streams.indexOf(stream, 0);\n if (index > -1) {\n this.streams.splice(index, 1);\n }\n this.appRef.tick();\n }\n\n leaveSession() {\n if (this.session) { this.session.disconnect(); };\n this.streams = [];\n this.session = null;\n }\n\n onVideoPlaying(event) {\n const video: HTMLVideoElement = event.target;\n video.parentElement.parentElement.classList.remove('custom-class');\n this.openviduLayout.updateLayout();\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","declare var $: any;\n\nexport interface OpenViduLayoutOptions {\n maxRatio: number;\n minRatio: number;\n fixedRatio: boolean;\n animate: any;\n bigClass: string;\n bigPercentage: any;\n bigFixedRatio: any;\n bigMaxRatio: any;\n bigMinRatio: any;\n bigFirst: any;\n}\n\nexport class OpenViduLayout {\n\n private layoutContainer: HTMLElement;\n private opts: OpenViduLayoutOptions;\n\n private fixAspectRatio(elem: HTMLVideoElement, width: number) {\n const sub: HTMLVideoElement = elem.querySelector('.OT_root');\n if (sub) {\n // If this is the parent of a subscriber or publisher then we need\n // to force the mutation observer on the publisher or subscriber to\n // trigger to get it to fix it's layout\n const oldWidth = sub.style.width;\n sub.style.width = width + 'px';\n // sub.style.height = height + 'px';\n sub.style.width = oldWidth || '';\n }\n }\n\n private positionElement(elem: HTMLVideoElement, x: number, y: number, width: number, height: number, animate: any) {\n const targetPosition = {\n left: x + 'px',\n top: y + 'px',\n width: width + 'px',\n height: height + 'px'\n };\n\n this.fixAspectRatio(elem, width);\n\n if (animate && $) {\n $(elem).stop();\n $(elem).animate(targetPosition, animate.duration || 200, animate.easing || 'swing',\n () => {\n this.fixAspectRatio(elem, width);\n if (animate.complete) { animate.complete.call(this); }\n });\n } else {\n $(elem).css(targetPosition);\n }\n this.fixAspectRatio(elem, width);\n }\n\n private getVideoRatio(elem: HTMLVideoElement) {\n if (!elem) {\n return 3 / 4;\n }\n const video: HTMLVideoElement = elem.querySelector('video');\n if (video && video.videoHeight && video.videoWidth) {\n return video.videoHeight / video.videoWidth;\n } else if (elem.videoHeight && elem.videoWidth) {\n return elem.videoHeight / elem.videoWidth;\n }\n return 3 / 4;\n }\n\n private getCSSNumber(elem: HTMLElement, prop: string) {\n const cssStr = $(elem).css(prop);\n return cssStr ? parseInt(cssStr, 10) : 0;\n }\n\n // Really cheap UUID function\n private cheapUUID() {\n return (Math.random() * 100000000).toFixed(0);\n }\n\n private getHeight(elem: HTMLElement) {\n const heightStr = $(elem).css('height');\n return heightStr ? parseInt(heightStr, 10) : 0;\n }\n\n private getWidth(elem: HTMLElement) {\n const widthStr = $(elem).css('width');\n return widthStr ? parseInt(widthStr, 10) : 0;\n }\n\n private getBestDimensions(minR: number, maxR: number, count: number, WIDTH: number, HEIGHT: number, targetHeight: number) {\n let maxArea,\n targetCols,\n targetRows,\n targetWidth,\n tWidth,\n tHeight,\n tRatio;\n\n // Iterate through every possible combination of rows and columns\n // and see which one has the least amount of whitespace\n for (let i = 1; i <= count; i++) {\n const colsAux = i;\n const rowsAux = Math.ceil(count / colsAux);\n\n // Try taking up the whole height and width\n tHeight = Math.floor(HEIGHT / rowsAux);\n tWidth = Math.floor(WIDTH / colsAux);\n\n tRatio = tHeight / tWidth;\n if (tRatio > maxR) {\n // We went over decrease the height\n tRatio = maxR;\n tHeight = tWidth * tRatio;\n } else if (tRatio < minR) {\n // We went under decrease the width\n tRatio = minR;\n tWidth = tHeight / tRatio;\n }\n\n const area = (tWidth * tHeight) * count;\n\n // If this width and height takes up the most space then we're going with that\n if (maxArea === undefined || (area > maxArea)) {\n maxArea = area;\n targetHeight = tHeight;\n targetWidth = tWidth;\n targetCols = colsAux;\n targetRows = rowsAux;\n }\n }\n return {\n maxArea: maxArea,\n targetCols: targetCols,\n targetRows: targetRows,\n targetHeight: targetHeight,\n targetWidth: targetWidth,\n ratio: targetHeight / targetWidth\n };\n };\n\n private arrange(children: HTMLVideoElement[], WIDTH: number, HEIGHT: number, offsetLeft: number, offsetTop: number, fixedRatio: boolean,\n minRatio: number, maxRatio: number, animate: any) {\n\n let targetHeight;\n\n const count = children.length;\n let dimensions;\n\n if (!fixedRatio) {\n dimensions = this.getBestDimensions(minRatio, maxRatio, count, WIDTH, HEIGHT, targetHeight);\n } else {\n // Use the ratio of the first video element we find to approximate\n const ratio = this.getVideoRatio(children.length > 0 ? children[0] : null);\n dimensions = this.getBestDimensions(ratio, ratio, count, WIDTH, HEIGHT, targetHeight);\n }\n\n // Loop through each stream in the container and place it inside\n let x = 0,\n y = 0;\n const rows = [];\n let row;\n // Iterate through the children and create an array with a new item for each row\n // and calculate the width of each row so that we know if we go over the size and need\n // to adjust\n for (let i = 0; i < children.length; i++) {\n if (i % dimensions.targetCols === 0) {\n // This is a new row\n row = {\n children: [],\n width: 0,\n height: 0\n };\n rows.push(row);\n }\n const elem: HTMLVideoElement = children[i];\n row.children.push(elem);\n let targetWidth = dimensions.targetWidth;\n targetHeight = dimensions.targetHeight;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = targetHeight / this.getVideoRatio(elem);\n }\n row.width += targetWidth;\n row.height = targetHeight;\n }\n // Calculate total row height adjusting if we go too wide\n let totalRowHeight = 0;\n let remainingShortRows = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width > WIDTH) {\n // Went over on the width, need to adjust the height proportionally\n row.height = Math.floor(row.height * (WIDTH / row.width));\n row.width = WIDTH;\n } else if (row.width < WIDTH) {\n remainingShortRows += 1;\n }\n totalRowHeight += row.height;\n }\n if (totalRowHeight < HEIGHT && remainingShortRows > 0) {\n // We can grow some of the rows, we're not taking up the whole height\n let remainingHeightDiff = HEIGHT - totalRowHeight;\n totalRowHeight = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width < WIDTH) {\n // Evenly distribute the extra height between the short rows\n let extraHeight = remainingHeightDiff / remainingShortRows;\n if ((extraHeight / row.height) > ((WIDTH - row.width) / row.width)) {\n // We can't go that big or we'll go too wide\n extraHeight = Math.floor(((WIDTH - row.width) / row.width) * row.height);\n }\n row.width += Math.floor((extraHeight / row.height) * row.width);\n row.height += extraHeight;\n remainingHeightDiff -= extraHeight;\n remainingShortRows -= 1;\n }\n totalRowHeight += row.height;\n }\n }\n // vertical centering\n y = ((HEIGHT - (totalRowHeight)) / 2);\n // Iterate through each row and place each child\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n // center the row\n const rowMarginLeft = ((WIDTH - row.width) / 2);\n x = rowMarginLeft;\n for (let j = 0; j < row.children.length; j++) {\n const elem: HTMLVideoElement = row.children[j];\n\n let targetWidth = dimensions.targetWidth;\n targetHeight = row.height;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = Math.floor(targetHeight / this.getVideoRatio(elem));\n }\n elem.style.position = 'absolute';\n // $(elem).css('position', 'absolute');\n const actualWidth = targetWidth - this.getCSSNumber(elem, 'paddingLeft') -\n this.getCSSNumber(elem, 'paddingRight') -\n this.getCSSNumber(elem, 'marginLeft') -\n this.getCSSNumber(elem, 'marginRight') -\n this.getCSSNumber(elem, 'borderLeft') -\n this.getCSSNumber(elem, 'borderRight');\n\n const actualHeight = targetHeight - this.getCSSNumber(elem, 'paddingTop') -\n this.getCSSNumber(elem, 'paddingBottom') -\n this.getCSSNumber(elem, 'marginTop') -\n this.getCSSNumber(elem, 'marginBottom') -\n this.getCSSNumber(elem, 'borderTop') -\n this.getCSSNumber(elem, 'borderBottom');\n\n this.positionElement(elem, x + offsetLeft, y + offsetTop, actualWidth, actualHeight, animate);\n x += targetWidth;\n }\n y += targetHeight;\n }\n }\n\n private filterDisplayNone(element: HTMLElement) {\n return element.style.display !== 'none';\n }\n\n updateLayout() {\n if (this.layoutContainer.style.display === 'none') {\n return;\n }\n let id = this.layoutContainer.id;\n if (!id) {\n id = 'OT_' + this.cheapUUID();\n this.layoutContainer.id = id;\n }\n\n const HEIGHT = this.getHeight(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderTop') -\n this.getCSSNumber(this.layoutContainer, 'borderBottom');\n const WIDTH = this.getWidth(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderLeft') -\n this.getCSSNumber(this.layoutContainer, 'borderRight');\n\n const availableRatio = HEIGHT / WIDTH;\n\n let offsetLeft = 0;\n let offsetTop = 0;\n let bigOffsetTop = 0;\n let bigOffsetLeft = 0;\n\n const bigOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>.' + this.opts.bigClass),\n this.filterDisplayNone);\n const smallOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>*:not(.' + this.opts.bigClass + ')'),\n this.filterDisplayNone);\n\n if (bigOnes.length > 0 && smallOnes.length > 0) {\n let bigWidth, bigHeight;\n\n if (availableRatio > this.getVideoRatio(bigOnes[0])) {\n // We are tall, going to take up the whole width and arrange small\n // guys at the bottom\n bigWidth = WIDTH;\n bigHeight = Math.floor(HEIGHT * this.opts.bigPercentage);\n offsetTop = bigHeight;\n bigOffsetTop = HEIGHT - offsetTop;\n } else {\n // We are wide, going to take up the whole height and arrange the small\n // guys on the right\n bigHeight = HEIGHT;\n bigWidth = Math.floor(WIDTH * this.opts.bigPercentage);\n offsetLeft = bigWidth;\n bigOffsetLeft = WIDTH - offsetLeft;\n }\n if (this.opts.bigFirst) {\n this.arrange(bigOnes, bigWidth, bigHeight, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, 0, 0, this.opts.fixedRatio,\n this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n this.arrange(bigOnes, bigWidth, bigHeight, bigOffsetLeft, bigOffsetTop,\n this.opts.bigFixedRatio, this.opts.bigMinRatio, this.opts.bigMaxRatio, this.opts.animate);\n }\n } else if (bigOnes.length > 0 && smallOnes.length === 0) {\n this.\n // We only have one bigOne just center it\n arrange(bigOnes, WIDTH, HEIGHT, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n }\n }\n\n initLayoutContainer(container, opts) {\n this.opts = {\n maxRatio: (opts.maxRatio != null) ? opts.maxRatio : 3 / 2,\n minRatio: (opts.minRatio != null) ? opts.minRatio : 9 / 16,\n fixedRatio: (opts.fixedRatio != null) ? opts.fixedRatio : false,\n animate: (opts.animate != null) ? opts.animate : false,\n bigClass: (opts.bigClass != null) ? opts.bigClass : 'OT_big',\n bigPercentage: (opts.bigPercentage != null) ? opts.bigPercentage : 0.8,\n bigFixedRatio: (opts.bigFixedRatio != null) ? opts.bigFixedRatio : false,\n bigMaxRatio: (opts.bigMaxRatio != null) ? opts.bigMaxRatio : 3 / 2,\n bigMinRatio: (opts.bigMinRatio != null) ? opts.bigMinRatio : 9 / 16,\n bigFirst: (opts.bigFirst != null) ? opts.bigFirst : true\n };\n this.layoutContainer = typeof (container) === 'string' ? $(container) : container;\n }\n\n setLayoutOptions(options: OpenViduLayoutOptions) {\n this.opts = options;\n }\n\n}\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/openvidu-layout.ts","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.css\n// module id = ./src/app/components/session-details/session-details.component.css\n// module chunks = main","module.exports = \"

\\n session-details works!\\n

\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.html\n// module id = ./src/app/components/session-details/session-details.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-session-details',\n templateUrl: './session-details.component.html',\n styleUrls: ['./session-details.component.css']\n})\nexport class SessionDetailsComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/session-details/session-details.component.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class InfoService {\n\n info: string;\n newInfo$: Subject;\n\n constructor() {\n this.newInfo$ = new Subject();\n }\n\n getInfo() {\n return this.info;\n }\n\n updateInfo(info: string) {\n this.info = info;\n this.newInfo$.next(info);\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/info.service.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class RestService {\n\n private openviduPublicUrl: string;\n\n getOpenViduPublicUrl(): Promise {\n return new Promise((resolve, reject) => {\n if (!!this.openviduPublicUrl) {\n resolve(this.openviduPublicUrl);\n } else {\n const url = location.protocol + '//' + location.hostname + ((!!location.port) ? (':' + location.port) : '') +\n '/config/openvidu-publicurl';\n const http = new XMLHttpRequest();\n\n http.onreadystatechange = () => {\n if (http.readyState === 4) {\n if (http.status === 200) {\n this.openviduPublicUrl = http.responseText;\n resolve(http.responseText);\n } else {\n reject('Error getting OpenVidu publicurl');\n }\n };\n }\n http.open('GET', url, true);\n http.send();\n }\n });\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/rest.service.ts","// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\n\nexport const environment = {\n production: false\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/environments/environment.ts","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.ts"],"sourceRoot":"webpack:///"} \ No newline at end of file