All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.js.kurento-client.min.js Maven / Gradle / Ivy

Go to download

Kurento Media Server, JavaScript client code for module kurento-client-js.

There is a newer version: 7.1.0
Show newest version
require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i=0)return"newref:"+t;o.push(n)}return n}function r(e,t){if(e)return n(e);i.forEach(c,t),n(null,t)}if(C.length)return transactionOperation.call(C,"transaction",e,n);n=n||noop;var i=e.operations,o=[];i.forEach(function(e){var n=e.params;switch(e.method){case"create":var r=n.constructorParams;for(var i in r)r[i]=t(e,r[i]);break;default:n.object=t(e,n.object);var o=n.operationParams;for(var i in o)o[i]=t(e,o[i])}}),Promise.all(o).then(function(){i.forEach(serializeOperation),d("transaction",e,r)},n)}function v(e,n){if(C.length)return transactionOperation.call(C,"transaction",e,n);var t=e.operations;async.each(t,function(e){switch(e.method){case"create":f(void 0,e.params,e.callback);break;case"transaction":v(e.params.operations,e.callback);break;default:m(void 0,e.method,e.params,e.callback)}},n)}function h(e,n){var t=O[n];return t||(e.emit("_id",null,n),O[n]=e,e.once("release",function(){delete O[n]}),e)}function g(e,n){function t(t,r){if(t)return n(t);var i=j.createInmediate(r);return n(null,h(i,e))}if(void 0==e)return n(new TypeError("'id' can't be null or undefined"));var r=O[e];if(r)return n(null,r);d("describe",{object:e},t)}function b(t){function r(){enabledPings=!0,pingPongStarted||(pingPongStarted=!0,pingInterval=setInterval(c,HEARTBEAT),c())}function o(){notReconnectIfNumLessThan=pingNextNum,console.log("notReconnectIfNumLessThan = "+notReconnectIfNumLessThan)}function c(){if(enabledPings){var e=null;0!=pingNextNum&&pingNextNum!=notReconnectIfNumLessThan||(e={interval:PING_INTERVAL}),pingNextNum++;s({method:"ping",params:e,callback:function(e){return function(n,t){n&&e>notReconnectIfNumLessThan&&(enabledPings=!1,o(),console.log("Server did not respond to ping message "+e+"."),clearInterval(pingInterval),pingPongStarted=!1)}}(pingNextNum)})}else console.log("Trying to send ping, but ping is not enabled")}t=(t||noop).bind(this);var u=!1,l=!1,d=reconnect({failAfter:I},function(e){if(u&&(e.writable=!1),N.transport=e,r(),l){s({method:"connect",params:{sessionId:T.sessionId},callback:function(e,n){e?e.code===INVALID_SESSION&&(console.log("Invalid Session"),O={},i(!1)):i(!0)}})}else a()}).connect(e,n.socket);Object.defineProperty(this,"_re",{get:function(){return d}}),this.close=function(){u=!0,P.then(d.disconnect.bind(d))},d.on("fail",this.emit.bind(this,"disconnect")),d.on("reconnect",function(e,n){console.log("reconnect to server",e,n,T.sessionId),void 0!=pingInterval&&(clearInterval(pingInterval),pingPongStarted=!1),l=!0}),this.then=function(e,n){if(d.connected)var t=Promise.resolve(disguise.unthenable(this));else if(d.reconnect)var r=this,t=new Promise(function(e,n){function t(){d.removeListener("fail",i),e(disguise.unthenable(r))}function i(){d.removeListener("connection",t),n(new Error("Connection error"))}d.once("connection",t),d.once("fail",i)});else var t=Promise.reject(new Error("Connection error"));return t=t.then(e?e.bind(this):function(e){return Promise.resolve(e)},n?n.bind(this):function(e){return Promise.reject(e)}),disguise(t,this)},this.catch=this.then.bind(this,null);var f=this;n.strict&&(f=this.getServerManager().then(function(e){return e.getInfo()}).then(function(e){var n=e.modules.map(function(e){return e.name}),t=KurentoClient.register.modules.filter(function(e){return n.indexOf(e)<0}),r=t.length;if(r){if(1===r)var i="Module '"+t[0]+"' is not installed in the Kurento Media Server";else var i="Modules '"+t.slice(0,-1).join("', '")+"' and '"+t[r-1]+"' are not installed in the Kurento Media Server";var o=new SyntaxError(i);return o.modules=t,Promise.reject(o)}return Promise.resolve(T)})),promiseCallback(f,t)}if(!(this instanceof KurentoClient))return new KurentoClient(e,n,t);var T=this;EventEmitter.call(this);var E=Promise.resolve(),P=Promise.resolve();n instanceof Function&&(t=n,n=void 0),n=n||{};var I=n.failAfter;void 0==I&&(I=1/0),void 0===n.enableTransactions&&(n.enableTransactions=!0),void 0===n.strict&&(n.strict=!0),n.request_timeout=n.request_timeout||BASE_TIMEOUT,n.response_timeout=n.response_timeout||BASE_TIMEOUT,n.duplicates_timeout=n.duplicates_timeout||BASE_TIMEOUT;var O={};if("string"==typeof e){var _=n.access_token;void 0!=_&&(e=url.parse(e,!0),e.query.access_token=_,e=url.format(e),delete n.access_token)}var N=new RpcBuilder(JsonRPC,n,function(e){if(e instanceof RpcBuilder.RpcNotification)return void 0!=e.duplicated?console.warn("Unexpected request:",e):r(e);console.error("Invalid request instance",e)}),k=n.enableTransactions?p:v,C=new TransactionsManager(this,function(e,n){k({object:T,operations:e},n)});this.beginTransaction=C.beginTransaction.bind(C),this.endTransaction=C.endTransaction.bind(C),this.transaction=C.transaction.bind(C),Object.defineProperty(this,"sessionId",{configurable:!0}),this.on("disconnect",function(){o(),Object.defineProperty(this,"sessionId",{configurable:!1,get:function(){throw new SyntaxError("Client has been disconnected")}});for(var e in O)O[e].emit("release")});var w=[];this.getMediaobjectById=function(e,n){return disguise(createPromise(e,g,n),this)};var j=new MediaObjectCreator(this,f,m,k,this.getMediaobjectById.bind(this),n.strict);Object.defineProperty(this,"_resetCache",{value:function(){O={}}}),this.create=j.create.bind(j),b.call(T,t)}var EventEmitter=require("events").EventEmitter,url=require("url"),async=require("async"),extend=require("extend"),inherits=require("inherits"),reconnect=require("reconnect-ws"),checkType=require("./checkType"),RpcBuilder=require("kurento-jsonrpc"),JsonRPC=RpcBuilder.packers.JsonRPC,promiseCallback=require("promisecallback"),disguise=require("./disguise"),createPromise=require("./createPromise"),MediaObjectCreator=require("./MediaObjectCreator"),TransactionsManager=require("./TransactionsManager"),TransactionNotCommitedException=TransactionsManager.TransactionNotCommitedException,transactionOperation=TransactionsManager.transactionOperation,MediaObject=require("kurento-client-core").abstracts.MediaObject;const MEDIA_OBJECT_TYPE_NOT_FOUND=40100,MEDIA_OBJECT_NOT_FOUND=40101,MEDIA_OBJECT_METHOD_NOT_FOUND=40105,INVALID_SESSION=40007,BASE_TIMEOUT=2e4;var PING_INTERVAL=5e3,HEARTBEAT=6e4,pingNextNum=0,enabledPings=!0,pingPongStarted=!1,pingInterval,notReconnectIfNumLessThan=-1;inherits(KurentoClient,EventEmitter),KurentoClient.prototype.connect=function(e,n){if(e instanceof Array||(e=Array.prototype.slice.call(arguments,0),n="function"==typeof e[e.length-1]?e.pop():void 0),n=(n||noop).bind(this),e.length<2)throw new SyntaxError("Need at least two media elements to connect");return e[0].connect(e.slice(1),n)},KurentoClient.prototype.getServerManager=function(e){return this.getMediaobjectById("manager_ServerManager",e)};var singletons={};KurentoClient.getSingleton=function(e,n,t){var r=singletons[e];return r||(n instanceof Function&&(t=n,n=void 0),r=KurentoClient(e,n,function(n,r){if(n)return t(n);singletons[e]=r,r.on("disconnect",function(){delete singletons[e]})})),disguise(promiseCallback(r,t),r)},KurentoClient.getComplexType=function(e){return KurentoClient.register.complexTypes[e]},module.exports=KurentoClient;
},{"./MediaObjectCreator":2,"./TransactionsManager":3,"./checkType":5,"./createPromise":6,"./disguise":7,"async":"async","events":21,"extend":22,"inherits":"inherits","kurento-client-core":"kurento-client-core","kurento-jsonrpc":117,"promisecallback":"promisecallback","reconnect-ws":143,"url":147}],2:[function(require,module,exports){
function getConstructor(e,r){var t=register.classes[e.qualifiedType]||register.abstracts[e.qualifiedType]||register.classes[e.type]||register.abstracts[e.type]||register.classes[e]||register.abstracts[e];if(t)return t;if(void 0!=e.hierarchy)for(var a=0;a<=e.hierarchy.length-1;a++){var t=register.classes[e.hierarchy[a]]||register.abstracts[e.hierarchy[a]];if(t)return t}if(r){var n=new SyntaxError("Unknown type '"+e+"'");throw n.type=e,n}return console.warn("Unknown type '",e,"', using MediaObject instead"),register.abstracts.MediaObject}function createConstructor(e,r){var t=getConstructor(e,r);if(t.create){e=t.create(e.params);var a=t.prototype;inherits(t,getConstructor(e,r)),extend(t.prototype,a)}return t.item=e,t}function MediaObjectCreator(e,r,t,a,n,i){function c(e){var c=new e(i);return c.on("_describe",n),c.on("_rpc",t),(c instanceof register.abstracts["kurento.Hub"]||c instanceof register.classes["kurento.MediaPipeline"])&&c.on("_create",r),c instanceof register.classes["kurento.MediaPipeline"]&&c.on("_transaction",a),c}function s(t,a){var n=t.transaction;delete t.transaction;var s=createConstructor(t,i);t=s.item,delete s.item;var o=t.params||{};delete t.params,void 0==o.mediaPipeline&&e instanceof register.classes.MediaPipeline&&(o.mediaPipeline=e);var u=extend({},o);t.constructorParams=checkParams(u,s.constructorParams,t.type),Object.keys(u)&&(t.properties=u),Object.keys(t.constructorParams).length||delete t.constructorParams;try{var d=c(s)}catch(e){return a(e)}return Object.defineProperty(t,"object",{value:d}),r(n,t,a),d}if(!(this instanceof MediaObjectCreator))return new MediaObjectCreator(e,r,t,a,n);this.create=function(r,t,a){function n(r,n){return r?a(r):!0===t&&e.connect?e.connect(n.filter(function(e){try{return checkMediaElement(e),!0}catch(e){}}),function(e){if(e)return a(e);a(null,n)}):void a(null,n)}var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(arguments.length){case 1:t=void 0;case 2:a=void 0}if(t instanceof Function){if(a)throw new SyntaxError("Nothing can be defined after the callback");a=t,t=void 0}if(r instanceof Array){var c=!1;return r.forEach(function(e){"number"==typeof(e.params||{}).mediaPipeline&&(c=!0)}),c?e.transaction(function(){var e=[];async.map(r,function(r,t){var a=r.params||{};"number"==typeof a.mediaPipeline&&(a.mediaPipeline=e[a.mediaPipeline]),e.push(s(r,t))},n)}):createPromise(r,s,n)}return r={params:t,transaction:i,type:r},s(r,a)},this.createInmediate=function(e){var r=createConstructor(e,i);return delete r.item,c(r)}}var async=require("async"),checkType=require("./checkType"),checkParams=checkType.checkParams,extend=require("extend"),createPromise=require("./createPromise"),register=require("./register"),Transaction=require("./TransactionsManager").Transaction,checkMediaElement=checkType.bind(null,"MediaElement","media");module.exports=MediaObjectCreator;
},{"./TransactionsManager":3,"./checkType":5,"./createPromise":6,"./register":8,"async":"async","extend":22}],3:[function(require,module,exports){
function onerror(t){this._transactionError=t}function TransactionNotExecutedException(t){TransactionNotExecutedException.super_.call(this,t)}function TransactionNotCommitedException(t){TransactionNotCommitedException.super_.call(this,t)}function TransactionRollbackException(t){TransactionRollbackException.super_.call(this,t)}function Transaction(t){Transaction.super_.call(this);var n=[];Object.defineProperty(this,"length",{get:function(){return n.length}}),this.push=n.push.bind(n),Object.defineProperty(this,"commited",{configurable:!0,value:!1}),this.commit=function(i){this.exit&&this.exit(),this.removeListener("error",onerror);var e;if(this._transactionError)e=Promise.reject(this._transactionError);else{n.forEach(function(t){var n=t.params.object;n&&n.transactions&&(n.transactions.shift(),n.transactions||delete n.transactions)});var r=this;e=new Promise(function(i,e){function a(t,n){if(Object.defineProperty(r,"commited",{value:void 0==t}),t)return e(t);i(n)}t(n,a)})}return e=promiseCallback(e,i),this.catch=e.catch.bind(e),this.then=e.then.bind(e),delete this.push,delete this.commit,delete this.endTransaction,this},this.rollback=function(t){Object.defineProperty(this,"commited",{value:!1});var i=new TransactionRollbackException("Transaction rollback by user");return n.forEach(function(t){"create"==t.method&&t.params.object.emit("_id",i);var n=t.callback;n instanceof Function&&n(i)}),t instanceof Function&&t(i),this},this.once("error",onerror),this.enter&&this.enter()}function TransactionsManager(t,n){var i=[];Object.defineProperty(this,"length",{get:function(){return i.length}}),this.beginTransaction=function(){return new Transaction(n)},this.endTransaction=function(t){},this.transaction=function(n,e){var r=this.beginTransaction();return i.unshift(r),r.run(n.bind(t)),i.shift().commit(e)},this.push=function(t){i[0].push(t)}}function transactionOperation(t,n,i){var e={method:t,params:n,callback:i},r=n.object;r&&(r.transactions?r.transactions.unshift(this):Object.defineProperty(r,"transactions",{configurable:!0,value:[this]})),this.push(e)}var inherits=require("inherits"),Domain=require("domain").Domain||function(){function t(){}return inherits(t,require("events").EventEmitter),t.prototype.run=function(t){try{t()}catch(t){this.emit("error",t)}return this},t}(),promiseCallback=require("promisecallback");inherits(TransactionNotExecutedException,Error),inherits(TransactionNotCommitedException,TransactionNotExecutedException),inherits(TransactionRollbackException,TransactionNotExecutedException),inherits(Transaction,Domain),module.exports=TransactionsManager,TransactionsManager.Transaction=Transaction,TransactionsManager.transactionOperation=transactionOperation,TransactionsManager.TransactionNotExecutedException=TransactionNotExecutedException,TransactionsManager.TransactionNotCommitedException=TransactionNotCommitedException,TransactionsManager.TransactionRollbackException=TransactionRollbackException;
},{"domain":19,"events":21,"inherits":"inherits","promisecallback":"promisecallback"}],4:[function(require,module,exports){
"undefined"==typeof kurentoClient&&(window.kurentoClient=require("."));
},{".":"kurento-client"}],5:[function(require,module,exports){
function ChecktypeError(e,r,c){return SyntaxError(e+" param should be a "+(r.name||r)+", not "+c.constructor.name)}function checkArray(e,r,c){if(!(c instanceof Array))throw ChecktypeError(r,"Array of "+e,c);c.forEach(function(c,t){checkType(e,r+"["+t+"]",c)})}function checkBoolean(e,r){if("boolean"!=typeof r)throw ChecktypeError(e,Boolean,r)}function checkNumber(e,r){if("number"!=typeof r)throw ChecktypeError(e,Number,r)}function checkInteger(e,r){if(!Number.isInteger(r))throw ChecktypeError(e,"Integer",r)}function checkObject(e,r){if("object"!=typeof r)throw ChecktypeError(e,Object,r)}function checkString(e,r){if("string"!=typeof r)throw ChecktypeError(e,String,r)}function checkType(e,r,c,t){if(t=t||{},void 0!=c){if(t.isArray)return checkArray(e,r,c);var n=checkType[e];if(n)return n(r,c);console.warn("Could not check "+r+", unknown type "+e)}else if(t.required)throw SyntaxError(r+" param is required")}function checkParams(e,r,c){var t={};for(var n in r){var o=e[n],h=r[n];checkType(h.type,n,o,h),void 0!=o&&(t[n]=o,delete e[n])}return t}function checkMethodParams(e,r){for(var c,t={},n=0;c=r[n];n++){var o=c.name,h=e[n];checkType(c.type,o,h,c),t[o]=h}var a=e.slice(n);return a.length&&console.warning("Unused params:",a),t}Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&e>-9007199254740992&&e<9007199254740992&&Math.floor(e)===e}),module.exports=checkType,checkType.checkArray=checkArray,checkType.checkParams=checkParams,checkType.ChecktypeError=ChecktypeError,checkType.boolean=checkBoolean,checkType.double=checkNumber,checkType.float=checkNumber,checkType.int=checkInteger,checkType.Object=checkObject,checkType.String=checkString;
},{}],6:[function(require,module,exports){
function createPromise(e,r,i){var a=new Promise(function(i,a){function s(e,r){if(e)return a(e);i(disguise.unthenable(r))}e instanceof Array?async.map(e,r,s):r(e,s)});return promiseCallback(a,i)}var async=require("async"),disguise=require("./disguise"),promiseCallback=require("promisecallback");module.exports=createPromise;
},{"./disguise":7,"async":"async","promisecallback":"promisecallback"}],7:[function(require,module,exports){
function promiseCatch(e){return this.then(null,e)}function disguise(e,n,i){if(null==n||e===n)return e;for(var t in n)if(void 0===e[t]&&(!i||"then"!==t&&"catch"!==t)){if("function"==typeof n[t])var u={value:n[t]};else var u={get:function(){return n[t]},set:function(e){n[t]=e}};u.enumerable=!0,Object.defineProperty(e,t,u)}return e}function disguiseThenable(e,n){function i(i,u){return null!=i&&(i=i.bind(e)),null!=u&&(u=u.bind(e)),disguiseThenable(t.call(e,i,u),n)}if(e===n)return e;if(e.then instanceof Function){var t=e.then;Object.defineProperties(e,{then:{value:i},catch:{value:promiseCatch}})}return disguise(e,n)}function unthenable(e){var n=Object.assign({},e);return delete n.then,void 0!==e&&(n.constructor=e.constructor),e&&e.then instanceof Function?disguise(n,e,!0):e}disguiseThenable.disguise=disguise,disguiseThenable.disguiseThenable=disguiseThenable,disguiseThenable.unthenable=unthenable,module.exports=disguiseThenable;
},{}],8:[function(require,module,exports){
function registerAbstracts(e,r){for(var s in e){var t=e[s],c=t.check;c&&(checkType[s]=c),abstracts[s]=t,abstracts[r+"."+s]=t}}function registerClass(e,r){var s=r.check;s&&(checkType[e]=s),classes[e]=r}function registerComplexTypes(e,r){for(var s in e){var t=e[s],c=t.check;c?(checkType[s]=c,checkType[r+"."+s]=c,complexTypes[s]=t,complexTypes[r+"."+s]=t):(checkType[s]=t,checkType[r+"."+s]=t)}}function registerModule(e){modules.push(e),modules.sort()}function register(e,r){if(!e)throw SyntaxError("Need to define an object, a module or a function");if("string"!=typeof e&&(r=e,e=void 0),void 0==r)return register(require(e));if("string"==typeof r)return register(e,require(r));if(r instanceof Function){if(e||(e=r.name),void 0==e)throw new SyntaxError("Can't register an anonymous module");return registerClass(e,r)}e||(e=r.name),e&®isterModule(e);for(var s in r){var t=r[s];"core"!==e&&"elements"!==e&&"filters"!==e||(e="kurento");var c=e+"."+s;if("string"!=typeof t)switch(s){case"abstracts":registerAbstracts(t,e);break;case"complexTypes":registerComplexTypes(t,e);break;default:registerClass(c,t),registerClass(s,t)}}}var checkType=require("./checkType"),abstracts={},classes={},complexTypes={},modules=[];module.exports=register,register.abstracts=abstracts,register.classes=classes,register.complexTypes=complexTypes,register.modules=modules;
},{"./checkType":5}],9:[function(require,module,exports){
var Backoff=require("./lib/backoff"),ExponentialBackoffStrategy=require("./lib/strategy/exponential"),FibonacciBackoffStrategy=require("./lib/strategy/fibonacci"),FunctionCall=require("./lib/function_call.js");module.exports.Backoff=Backoff,module.exports.FunctionCall=FunctionCall,module.exports.FibonacciStrategy=FibonacciBackoffStrategy,module.exports.ExponentialStrategy=ExponentialBackoffStrategy,module.exports.fibonacci=function(e){return new Backoff(new FibonacciBackoffStrategy(e))},module.exports.exponential=function(e){return new Backoff(new ExponentialBackoffStrategy(e))},module.exports.call=function(e,o,t){var a=Array.prototype.slice.call(arguments);return e=a[0],o=a.slice(1,a.length-1),t=a[a.length-1],new FunctionCall(e,o,t)};
},{"./lib/backoff":10,"./lib/function_call.js":11,"./lib/strategy/exponential":12,"./lib/strategy/fibonacci":13}],10:[function(require,module,exports){
function Backoff(t){events.EventEmitter.call(this),this.backoffStrategy_=t,this.maxNumberOfRetry_=-1,this.backoffNumber_=0,this.backoffDelay_=0,this.timeoutID_=-1,this.handlers={backoff:this.onBackoff_.bind(this)}}var events=require("events"),util=require("util");util.inherits(Backoff,events.EventEmitter),Backoff.prototype.failAfter=function(t){if(t<1)throw new Error("Maximum number of retry must be greater than 0. Actual: "+t);this.maxNumberOfRetry_=t},Backoff.prototype.backoff=function(t){if(-1!==this.timeoutID_)throw new Error("Backoff in progress.");this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",t),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,t))},Backoff.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},Backoff.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},module.exports=Backoff;
},{"events":21,"util":151}],11:[function(require,module,exports){
function isFunction(t){return"function"==typeof t}function FunctionCall(t,n,i){if(events.EventEmitter.call(this),!isFunction(t))throw new Error("fn should be a function.Actual: "+typeof t);if(!isFunction(i))throw new Error("callback should be a function.Actual: "+typeof t);this.function_=t,this.arguments_=n,this.callback_=i,this.results_=[],this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.state_=FunctionCall.State_.PENDING}var events=require("events"),util=require("util"),Backoff=require("./backoff"),FibonacciBackoffStrategy=require("./strategy/fibonacci");util.inherits(FunctionCall,events.EventEmitter),FunctionCall.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},FunctionCall.prototype.isPending=function(){return this.state_==FunctionCall.State_.PENDING},FunctionCall.prototype.isRunning=function(){return this.state_==FunctionCall.State_.RUNNING},FunctionCall.prototype.isCompleted=function(){return this.state_==FunctionCall.State_.COMPLETED},FunctionCall.prototype.isAborted=function(){return this.state_==FunctionCall.State_.ABORTED},FunctionCall.prototype.setStrategy=function(t){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.strategy_=t,this},FunctionCall.prototype.getResults=function(){return this.results_.concat()},FunctionCall.prototype.failAfter=function(t){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.failAfter_=t,this},FunctionCall.prototype.abort=function(){if(this.isCompleted())throw new Error("FunctionCall already completed.");this.isRunning()&&this.backoff_.reset(),this.state_=FunctionCall.State_.ABORTED},FunctionCall.prototype.start=function(t){if(this.isAborted())throw new Error("FunctionCall aborted.");if(!this.isPending())throw new Error("FunctionCall already started.");var n=this.strategy_||new FibonacciBackoffStrategy;this.backoff_=t?t(n):new Backoff(n),this.backoff_.on("ready",this.doCall_.bind(this)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=FunctionCall.State_.RUNNING,this.doCall_()},FunctionCall.prototype.doCall_=function(){var t=["call"].concat(this.arguments_);events.EventEmitter.prototype.emit.apply(this,t);var n=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(n))},FunctionCall.prototype.doCallback_=function(){var t=this.results_[this.results_.length-1];this.callback_.apply(null,t)},FunctionCall.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var t=Array.prototype.slice.call(arguments);this.results_.push(t),events.EventEmitter.prototype.emit.apply(this,["callback"].concat(t)),t[0]?this.backoff_.backoff(t[0]):(this.state_=FunctionCall.State_.COMPLETED,this.doCallback_())}},FunctionCall.prototype.handleBackoff_=function(t,n,i){this.emit("backoff",t,n,i)},module.exports=FunctionCall;
},{"./backoff":10,"./strategy/fibonacci":13,"events":21,"util":151}],12:[function(require,module,exports){
function ExponentialBackoffStrategy(t){BackoffStrategy.call(this,t),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var util=require("util"),BackoffStrategy=require("./strategy");util.inherits(ExponentialBackoffStrategy,BackoffStrategy),ExponentialBackoffStrategy.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=2*this.backoffDelay_,this.backoffDelay_},ExponentialBackoffStrategy.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},module.exports=ExponentialBackoffStrategy;
},{"./strategy":14,"util":151}],13:[function(require,module,exports){
function FibonacciBackoffStrategy(t){BackoffStrategy.call(this,t),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var util=require("util"),BackoffStrategy=require("./strategy");util.inherits(FibonacciBackoffStrategy,BackoffStrategy),FibonacciBackoffStrategy.prototype.next_=function(){var t=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=t,t},FibonacciBackoffStrategy.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},module.exports=FibonacciBackoffStrategy;
},{"./strategy":14,"util":151}],14:[function(require,module,exports){
function isDef(t){return void 0!==t&&null!==t}function BackoffStrategy(t){if(t=t||{},isDef(t.initialDelay)&&t.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(isDef(t.maxDelay)&&t.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=t.initialDelay||100,this.maxDelay_=t.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(isDef(t.randomisationFactor)&&(t.randomisationFactor<0||t.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=t.randomisationFactor||0}var events=require("events"),util=require("util");BackoffStrategy.prototype.getMaxDelay=function(){return this.maxDelay_},BackoffStrategy.prototype.getInitialDelay=function(){return this.initialDelay_},BackoffStrategy.prototype.next=function(){var t=this.next_(),e=1+Math.random()*this.randomisationFactor_;return Math.round(t*e)},BackoffStrategy.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},BackoffStrategy.prototype.reset=function(){this.reset_()},BackoffStrategy.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},module.exports=BackoffStrategy;
},{"events":21,"util":151}],15:[function(require,module,exports){
"use strict";function getLens(o){var r=o.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=o.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function byteLength(o){var r=getLens(o),e=r[0],t=r[1];return 3*(e+t)/4-t}function _byteLength(o,r,e){return 3*(r+e)/4-e}function toByteArray(o){for(var r,e=getLens(o),t=e[0],n=e[1],u=new Arr(_byteLength(o,t,n)),p=0,a=n>0?t-4:t,h=0;h>16&255,u[p++]=r>>8&255,u[p++]=255&r;return 2===n&&(r=revLookup[o.charCodeAt(h)]<<2|revLookup[o.charCodeAt(h+1)]>>4,u[p++]=255&r),1===n&&(r=revLookup[o.charCodeAt(h)]<<10|revLookup[o.charCodeAt(h+1)]<<4|revLookup[o.charCodeAt(h+2)]>>2,u[p++]=r>>8&255,u[p++]=255&r),u}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]}function encodeChunk(o,r,e){for(var t,n=[],u=r;up?p:u+16383));return 1===t?(r=o[e-1],n.push(lookup[r>>2]+lookup[r<<4&63]+"==")):2===t&&(r=(o[e-2]<<8)+o[e-1],n.push(lookup[r>>10]+lookup[r>>4&63]+lookup[r<<2&63]+"=")),n.join("")}exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;iK_MAX_LENGTH)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=Buffer.prototype,t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("string"==typeof e)return fromString(e,t);if(ArrayBuffer.isView(e))return fromArrayLike(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer))return fromArrayBuffer(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);var f=fromObject(e);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromString(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|byteLength(e,t),n=createBuffer(r),f=n.write(e,t);return f!==r&&(n=n.slice(0,f)),n}function fromArrayLike(e){for(var t=e.length<0?0:0|checked(e.length),r=createBuffer(t),n=0;n=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|e}function SlowBuffer(e){return+e!=e&&(e=0),Buffer.alloc(+e)}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var f=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(f)return n?-1:utf8ToBytes(e).length;t=(""+t).toLowerCase(),f=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,f){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,numberIsNaN(r)&&(r=f?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(f)return-1;r=e.length-1}else if(r<0){if(!f)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,f);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,f);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,f){function i(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,u=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,u/=2,s/=2,r/=2}var a;if(f){var h=-1;for(a=r;au&&(r=u-s),a=r;a>=0;a--){for(var c=!0,l=0;lf&&(n=f):n=f;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o239?4:i>223?3:i>191?2:1;if(f+u<=r){var s,a,h,c;switch(u){case 1:i<128&&(o=i);break;case 2:s=e[f+1],128==(192&s)&&(c=(31&i)<<6|63&s)>127&&(o=c);break;case 3:s=e[f+1],a=e[f+2],128==(192&s)&&128==(192&a)&&(c=(15&i)<<12|(63&s)<<6|63&a)>2047&&(c<55296||c>57343)&&(o=c);break;case 4:s=e[f+1],a=e[f+2],h=e[f+3],128==(192&s)&&128==(192&a)&&128==(192&h)&&(c=(15&i)<<18|(63&s)<<12|(63&a)<<6|63&h)>65535&&c<1114112&&(o=c)}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),f+=u}return decodeCodePointsArray(n)}function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var f="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,f,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>f||te.length)throw new RangeError("Index out of range")}function checkIEEE754(e,t,r,n,f,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(e,t,r,n,52,8),r+8}function base64clean(e){if(e=e.split("=")[0],e=e.trim().replace(INVALID_BASE64_RE,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function toHex(e){return e<16?"0"+e.toString(16):e.toString(16)}function utf8ToBytes(e,t){t=t||1/0;for(var r,n=e.length,f=null,i=[],o=0;o55295&&r<57344){if(!f){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),f=r;continue}r=65536+(f-55296<<10|r-56320)}else f&&(t-=3)>-1&&i.push(239,191,189);if(f=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(e){for(var t=[],r=0;r>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(e){return base64.toByteArray(base64clean(e))}function blitBuffer(e,t,r,n){for(var f=0;f=t.length||f>=e.length);++f)t[f+r]=e[f];return f}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function numberIsNaN(e){return e!==e}var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;exports.kMaxLength=K_MAX_LENGTH,Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(e,t,r){return alloc(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,f=0,i=Math.min(r,n);ft&&(e+=" ... "),""},Buffer.prototype.compare=function(e,t,r,n,f){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===f&&(f=this.length),t<0||r>e.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&t>=r)return 0;if(n>=f)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,f>>>=0,this===e)return 0;for(var i=f-n,o=r-t,u=Math.min(i,o),s=this.slice(n,f),a=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],f=1;t>0&&(f*=256);)n+=this[e+--t]*f;return n},Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i=f&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,f=1,i=this[e+--n];n>0&&(f*=256);)i+=this[e+--n]*f;return f*=128,i>=f&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}var f=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}var f=r-1,i=1;for(this[t+f]=255&e;--f>=0&&(i*=256);)this[t+f]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=0,o=1,u=0;for(this[t]=255&e;++i>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=r-1,o=1,u=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(!Buffer.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return f},Buffer.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var f=e.charCodeAt(0);("utf8"===n&&f<128||"latin1"===n)&&(e=f)}}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var i;if("number"==typeof e)for(i=t;i0&&o.length>i){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=o.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",a.name,a.message)}}else o=s[t]=n,++e._eventsCount;return e}function onceWrapper(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(n=o[e]))return!1;var u="function"==typeof n;switch(r=arguments.length){case 1:emitNone(n,u,this);break;case 2:emitOne(n,u,this,arguments[1]);break;case 3:emitTwo(n,u,this,arguments[1],arguments[2]);break;case 4:emitThree(n,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),s=1;s=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():spliceOne(n,i),1===n.length&&(r[e]=n[0]),r.removeListener&&this.emit("removeListener",e,o||t)}return this},EventEmitter.prototype.removeAllListeners=function(e){var t,n,r;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=objectCreate(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=objectCreate(null):delete n[e]),this;if(0===arguments.length){var i,s=objectKeys(n);for(r=0;r=0;r--)this.removeListener(e,t[r]);return this},EventEmitter.prototype.listeners=function(e){return _listeners(this,e,!0)},EventEmitter.prototype.rawListeners=function(e){return _listeners(this,e,!1)},EventEmitter.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):listenerCount.call(e,t)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};
},{}],22:[function(require,module,exports){
"use strict";var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(r){return"function"==typeof Array.isArray?Array.isArray(r):"[object Array]"===toStr.call(r)},isPlainObject=function(r){if(!r||"[object Object]"!==toStr.call(r))return!1;var t=hasOwn.call(r,"constructor"),e=r.constructor&&r.constructor.prototype&&hasOwn.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!e)return!1;var o;for(o in r);return void 0===o||hasOwn.call(r,o)},setProperty=function(r,t){defineProperty&&"__proto__"===t.name?defineProperty(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},getProperty=function(r,t){if("__proto__"===t){if(!hasOwn.call(r,t))return;if(gOPD)return gOPD(r,t).value}return r[t]};module.exports=function r(){var t,e,o,n,a,i,c=arguments[0],u=1,l=arguments.length,p=!1;for("boolean"==typeof c&&(p=c,c=arguments[1]||{},u=2),(null==c||"object"!=typeof c&&"function"!=typeof c)&&(c={});u>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
},{}],24:[function(require,module,exports){
function isBuffer(f){return!!f.constructor&&"function"==typeof f.constructor.isBuffer&&f.constructor.isBuffer(f)}function isSlowBuffer(f){return"function"==typeof f.readFloatLE&&"function"==typeof f.slice&&isBuffer(f.slice(0,0))}module.exports=function(f){return null!=f&&(isBuffer(f)||isSlowBuffer(f)||!!f._isBuffer)};
},{}],25:[function(require,module,exports){
var toString={}.toString;module.exports=Array.isArray||function(r){return"[object Array]"==toString.call(r)};
},{}],26:[function(require,module,exports){
(function (Buffer){
function isBuffer(r){return Buffer.isBuffer(r)||/\[object (.+Array|Array.+)\]/.test(Object.prototype.toString.call(r))}var Buffer=require("buffer").Buffer;module.exports=isBuffer;
}).call(this,{"isBuffer":require("../is-buffer/index.js")})

},{"../is-buffer/index.js":24,"buffer":17}],27:[function(require,module,exports){
function HubPort(){HubPort.super_.call(this)}function checkHubPort(e,r){if(!(r instanceof HubPort))throw ChecktypeError(e,HubPort,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,MediaElement=require("./abstracts/MediaElement");inherits(HubPort,MediaElement),HubPort.constructorParams={hub:{type:"kurento.Hub",required:!0}},HubPort.events=MediaElement.events,module.exports=HubPort,HubPort.check=checkHubPort;
},{"./abstracts/MediaElement":34,"inherits":"inherits","kurento-client":"kurento-client"}],28:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function MediaPipeline(e){function t(e,t,n){return e?transactionOperation.call(e,"create",t,n):r.length?transactionOperation.call(r,"create",t,n):void a.emit("_create",void 0,t,n)}function n(e,t,n,i){return e?transactionOperation.call(e,t,n,i):r.length?transactionOperation.call(r,t,n,i):void a.emit("_rpc",void 0,t,n,i)}function i(e,t){var n={operations:e};if(r.length)return transactionOperation.call(r,"transaction",n,t);a.emit("_transaction",n,t)}MediaPipeline.super_.call(this);var a=this,r=new TransactionsManager(this,i);this.beginTransaction=r.beginTransaction.bind(r),this.endTransaction=r.endTransaction.bind(r),this.transaction=r.transaction.bind(r);var o=this.emit.bind(this,"_describe"),c=new MediaObjectCreator(this,t,n,i,o,e);this.create=c.create.bind(c)}function checkMediaPipeline(e,t){if(!(t instanceof MediaPipeline))throw ChecktypeError(e,MediaPipeline,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,MediaObjectCreator=kurentoClient.MediaObjectCreator,TransactionsManager=kurentoClient.TransactionsManager,transactionOperation=TransactionsManager.transactionOperation,MediaObject=require("./abstracts/MediaObject");inherits(MediaPipeline,MediaObject),MediaPipeline.prototype.getLatencyStats=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getLatencyStats",e),this)},MediaPipeline.prototype.setLatencyStats=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,i={latencyStats:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setLatencyStats",i,t),this)},MediaPipeline.prototype.getGstreamerDot=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(t=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;break;case 1:break;default:var i=new RangeError("Number of params ("+arguments.length+") not in range [0-1]");throw i.length=arguments.length,i.min=0,i.max=1,i}var a={details:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"getGstreamerDot",a,t),this)},MediaPipeline.prototype.connect=function(e,t){if(e instanceof Array||(e=Array.prototype.slice.call(arguments,0),t="function"==typeof e[e.length-1]?e.pop():void 0),t=(t||noop).bind(this),e.length<2)throw new SyntaxError("Need at least two media elements to connect");return e[0].connect(e.slice(1),t)},MediaPipeline.constructorParams={},MediaPipeline.events=MediaObject.events,module.exports=MediaPipeline,MediaPipeline.check=checkMediaPipeline;
},{"./abstracts/MediaObject":35,"inherits":"inherits","kurento-client":"kurento-client"}],29:[function(require,module,exports){
function PassThrough(){PassThrough.super_.call(this)}function checkPassThrough(e,r){if(!(r instanceof PassThrough))throw ChecktypeError(e,PassThrough,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,MediaElement=require("./abstracts/MediaElement");inherits(PassThrough,MediaElement),PassThrough.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},PassThrough.events=MediaElement.events,module.exports=PassThrough,PassThrough.check=checkPassThrough;
},{"./abstracts/MediaElement":34,"inherits":"inherits","kurento-client":"kurento-client"}],30:[function(require,module,exports){
function noop(t,n){return t&&console.trace(t),n}function BaseRtpEndpoint(){BaseRtpEndpoint.super_.call(this)}function checkBaseRtpEndpoint(t,n){if(!(n instanceof BaseRtpEndpoint))throw ChecktypeError(t,BaseRtpEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,SdpEndpoint=require("./SdpEndpoint");inherits(BaseRtpEndpoint,SdpEndpoint),BaseRtpEndpoint.prototype.getConnectionState=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getConnectionState",t),this)},BaseRtpEndpoint.prototype.getMaxVideoSendBandwidth=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getMaxVideoSendBandwidth",t),this)},BaseRtpEndpoint.prototype.setMaxVideoSendBandwidth=function(t,n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,e={maxVideoSendBandwidth:t};return n=(n||noop).bind(this),disguise(this._invoke(i,"setMaxVideoSendBandwidth",e,n),this)},BaseRtpEndpoint.prototype.getMediaState=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getMediaState",t),this)},BaseRtpEndpoint.prototype.getMinVideoRecvBandwidth=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getMinVideoRecvBandwidth",t),this)},BaseRtpEndpoint.prototype.setMinVideoRecvBandwidth=function(t,n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,e={minVideoRecvBandwidth:t};return n=(n||noop).bind(this),disguise(this._invoke(i,"setMinVideoRecvBandwidth",e,n),this)},BaseRtpEndpoint.prototype.getMinVideoSendBandwidth=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getMinVideoSendBandwidth",t),this)},BaseRtpEndpoint.prototype.setMinVideoSendBandwidth=function(t,n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,e={minVideoSendBandwidth:t};return n=(n||noop).bind(this),disguise(this._invoke(i,"setMinVideoSendBandwidth",e,n),this)},BaseRtpEndpoint.prototype.getRembParams=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getRembParams",t),this)},BaseRtpEndpoint.prototype.setRembParams=function(t,n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,e={rembParams:t};return n=(n||noop).bind(this),disguise(this._invoke(i,"setRembParams",e,n),this)},BaseRtpEndpoint.constructorParams={},BaseRtpEndpoint.events=SdpEndpoint.events.concat(["ConnectionStateChanged","MediaStateChanged"]),module.exports=BaseRtpEndpoint,BaseRtpEndpoint.check=checkBaseRtpEndpoint;
},{"./SdpEndpoint":36,"inherits":"inherits","kurento-client":"kurento-client"}],31:[function(require,module,exports){
function Endpoint(){Endpoint.super_.call(this)}function checkEndpoint(e,n){if(!(n instanceof Endpoint))throw ChecktypeError(e,Endpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,MediaElement=require("./MediaElement");inherits(Endpoint,MediaElement),Endpoint.constructorParams={},Endpoint.events=MediaElement.events,module.exports=Endpoint,Endpoint.check=checkEndpoint;
},{"./MediaElement":34,"inherits":"inherits","kurento-client":"kurento-client"}],32:[function(require,module,exports){
function Filter(){Filter.super_.call(this)}function checkFilter(e,r){if(!(r instanceof Filter))throw ChecktypeError(e,Filter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,MediaElement=require("./MediaElement");inherits(Filter,MediaElement),Filter.constructorParams={},Filter.events=MediaElement.events,module.exports=Filter,Filter.check=checkFilter;
},{"./MediaElement":34,"inherits":"inherits","kurento-client":"kurento-client"}],33:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function Hub(){Hub.super_.call(this)}function checkHub(e,t){if(!(t instanceof Hub))throw ChecktypeError(e,Hub,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,HubPort=require("../HubPort"),MediaObject=require("./MediaObject");inherits(Hub,MediaObject),Hub.prototype.getGstreamerDot=function(e,t){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(t=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;break;case 1:break;default:var n=new RangeError("Number of params ("+arguments.length+") not in range [0-1]");throw n.length=arguments.length,n.min=0,n.max=1,n}var o={details:e};return t=(t||noop).bind(this),disguise(this._invoke(r,"getGstreamerDot",o,t),this)},Hub.prototype.createHubPort=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;arguments.length||(e=void 0),e=(e||noop).bind(this);var r=new HubPort;r.on("_rpc",this.emit.bind(this,"_rpc"));var n={type:"HubPort",constructorParams:{hub:this}};return Object.defineProperty(n,"object",{value:r}),this.emit("_create",t,n,e),r},Hub.constructorParams={},Hub.events=MediaObject.events,module.exports=Hub,Hub.check=checkHub;
},{"../HubPort":27,"./MediaObject":35,"inherits":"inherits","kurento-client":"kurento-client"}],34:[function(require,module,exports){
function noop(t,e){return t&&console.trace(t),e}function MediaElement(){MediaElement.super_.call(this)}function checkMediaElement(t,e){if(!(e instanceof MediaElement))throw ChecktypeError(t,MediaElement,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,checkArray=checkType.checkArray,Transaction=kurentoClient.TransactionsManager.Transaction,each=require("async").each,promiseCallback=require("promisecallback"),MediaObject=require("./MediaObject");inherits(MediaElement,MediaObject),MediaElement.prototype.getMaxOuputBitrate=function(t){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(e,"getMaxOuputBitrate",t),this)},MediaElement.prototype.setMaxOuputBitrate=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={maxOuputBitrate:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"setMaxOuputBitrate",n,e),this)},MediaElement.prototype.getMaxOutputBitrate=function(t){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(e,"getMaxOutputBitrate",t),this)},MediaElement.prototype.setMaxOutputBitrate=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={maxOutputBitrate:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"setMaxOutputBitrate",n,e),this)},MediaElement.prototype.getMinOuputBitrate=function(t){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(e,"getMinOuputBitrate",t),this)},MediaElement.prototype.setMinOuputBitrate=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={minOuputBitrate:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"setMinOuputBitrate",n,e),this)},MediaElement.prototype.getMinOutputBitrate=function(t){var e=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(e,"getMinOutputBitrate",t),this)},MediaElement.prototype.setMinOutputBitrate=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={minOutputBitrate:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"setMinOutputBitrate",n,e),this)},MediaElement.prototype.connect=function(t,e,i,n,o){var a,r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;if(t instanceof Array){o=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0;var s=t,p=this;if(t=s[s.length-1],!s.length)throw new SyntaxError("Need at least one media element to connect");checkArray("MediaElement","media",s),a=new Promise(function(t,e){function i(i,n){if(i)return e(i);t(n)}each(s,function(t,e){p=p.connect(t,e)},i)}),a=promiseCallback(a,o)}else{var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(o=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 1:e=void 0;case 2:i=void 0;case 3:n=void 0;break;case 4:break;default:var c=new RangeError("Number of params ("+arguments.length+") not in range [1-4]");throw c.length=arguments.length,c.min=1,c.max=4,c}var d={sink:t,mediaType:e,sourceMediaDescription:i,sinkMediaDescription:n};o=(o||noop).bind(this),a=this._invoke(r,"connect",d,o)}return disguise(a,t)},MediaElement.prototype.disconnect=function(t,e,i,n,o){var a=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(o=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 1:e=void 0;case 2:i=void 0;case 3:n=void 0;break;case 4:break;default:var r=new RangeError("Number of params ("+arguments.length+") not in range [1-4]");throw r.length=arguments.length,r.min=1,r.max=4,r}var s={sink:t,mediaType:e,sourceMediaDescription:i,sinkMediaDescription:n};return o=(o||noop).bind(this),disguise(this._invoke(a,"disconnect",s,o),this)},MediaElement.prototype.getGstreamerDot=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(e=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:t=void 0;break;case 1:break;default:var n=new RangeError("Number of params ("+arguments.length+") not in range [0-1]");throw n.length=arguments.length,n.min=0,n.max=1,n}var o={details:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"getGstreamerDot",o,e),this)},MediaElement.prototype.getSinkConnections=function(t,e,i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(i=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:t=void 0;case 1:e=void 0;break;case 2:break;default:var o=new RangeError("Number of params ("+arguments.length+") not in range [0-2]");throw o.length=arguments.length,o.min=0,o.max=2,o}var a={mediaType:t,description:e};return i=(i||noop).bind(this),disguise(this._invoke(n,"getSinkConnections",a,i),this)},MediaElement.prototype.getSourceConnections=function(t,e,i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(i=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:t=void 0;case 1:e=void 0;break;case 2:break;default:var o=new RangeError("Number of params ("+arguments.length+") not in range [0-2]");throw o.length=arguments.length,o.min=0,o.max=2,o}var a={mediaType:t,description:e};return i=(i||noop).bind(this),disguise(this._invoke(n,"getSourceConnections",a,i),this)},MediaElement.prototype.getStats=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(e=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:t=void 0;break;case 1:break;default:var n=new RangeError("Number of params ("+arguments.length+") not in range [0-1]");throw n.length=arguments.length,n.min=0,n.max=1,n}var o={mediaType:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"getStats",o,e),this)},MediaElement.prototype.isMediaFlowingIn=function(t,e,i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(i=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 1:e=void 0;break;case 2:break;default:var o=new RangeError("Number of params ("+arguments.length+") not in range [1-2]");throw o.length=arguments.length,o.min=1,o.max=2,o}var a={mediaType:t,sinkMediaDescription:e};return i=(i||noop).bind(this),disguise(this._invoke(n,"isMediaFlowingIn",a,i),this)},MediaElement.prototype.isMediaFlowingOut=function(t,e,i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(i=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 1:e=void 0;break;case 2:break;default:var o=new RangeError("Number of params ("+arguments.length+") not in range [1-2]");throw o.length=arguments.length,o.min=1,o.max=2,o}var a={mediaType:t,sourceMediaDescription:e};return i=(i||noop).bind(this),disguise(this._invoke(n,"isMediaFlowingOut",a,i),this)},MediaElement.prototype.isMediaTranscoding=function(t,e,i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(i=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 1:e=void 0;break;case 2:break;default:var o=new RangeError("Number of params ("+arguments.length+") not in range [1-2]");throw o.length=arguments.length,o.min=1,o.max=2,o}var a={mediaType:t,binName:e};return i=(i||noop).bind(this),disguise(this._invoke(n,"isMediaTranscoding",a,i),this)},MediaElement.prototype.setAudioFormat=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={caps:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"setAudioFormat",n,e),this)},MediaElement.prototype.setOutputBitrate=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={bitrate:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"setOutputBitrate",n,e),this)},MediaElement.prototype.setVideoFormat=function(t,e){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={caps:t};return e=(e||noop).bind(this),disguise(this._invoke(i,"setVideoFormat",n,e),this)},MediaElement.constructorParams={},MediaElement.events=MediaObject.events.concat(["ElementConnected","ElementDisconnected","MediaFlowInStateChange","MediaFlowOutStateChange","MediaTranscodingStateChange"]),module.exports=MediaElement,MediaElement.check=checkMediaElement;
},{"./MediaObject":35,"async":"async","inherits":"inherits","kurento-client":"kurento-client","promisecallback":"promisecallback"}],35:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function MediaObject(){MediaObject.super_.call(this);var e=this;this.once("_id",function(e,t){if(e)return Object.defineProperties(this,{_createError:{value:e},id:{value:null,enumerable:!0}});Object.defineProperty(this,"id",{configurable:!0,enumerable:!0,value:t})});var t={};this.on("removeListener",function(i,n){if("_"!=i[0]&&"release"!=i&&"newListener"!=i){if(!EventEmitter.listenerCount(this,i)){var r=t[i],o={object:this,subscription:r.value,sessionId:r.sessionId};this.emit("_rpc",void 0,"unsubscribe",o,function(n){if(n)return e.emit("error",n);delete t[i]})}}}),this.on("newListener",function(i,n){if("_"!=i[0]&&"release"!=i){var r=this.constructor;if(r.events.indexOf(i)<0)throw new SyntaxError(r.name+" doesn't accept events of type '"+i+"'");if(!EventEmitter.listenerCount(this,i)){var o={object:this,type:i};this.emit("_rpc",void 0,"subscribe",o,function(n,r){if(n)return e.emit("error",n);t[i]=r})}}})}function throwRpcNotReady(){throw new SyntaxError("RPC result is not ready, use .then() method instead")}function checkMediaObject(e,t){if(!(t instanceof MediaObject))throw ChecktypeError(e,MediaObject,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,promiseCallback=require("promisecallback"),EventEmitter=require("events").EventEmitter;inherits(MediaObject,EventEmitter),MediaObject.prototype.getChildren=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,i=!1;if(void 0==e&&(i=!0),arguments.length||(e=void 0),e=(e||noop).bind(this),i){var n=this;return new Promise(function(i,r){function o(e,t){i(t)}n._invoke(t,"getChildren",function(t,i){if(t)return e(t);n.emit("_describe",i,o)})})}return disguise(this._invoke(t,"getChildren",function(t,i){if(t)return e(t);this.emit("_describe",i,e)}),this)},MediaObject.prototype.getChilds=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,i=!1;if(void 0==e&&(i=!0),arguments.length||(e=void 0),e=(e||noop).bind(this),i){var n=this;return new Promise(function(i,r){function o(e,t){i(t)}n._invoke(t,"getChilds",function(t,i){if(t)return e(t);n.emit("_describe",i,o)})})}return disguise(this._invoke(t,"getChilds",function(t,i){if(t)return e(t);this.emit("_describe",i,e)}),this)},MediaObject.prototype.getCreationTime=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getCreationTime",e),this)},MediaObject.prototype.getMediaPipeline=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,i=!1;if(void 0==e&&(i=!0),arguments.length||(e=void 0),e=(e||noop).bind(this),i){var n=this;return new Promise(function(i,r){function o(e,t){i(t)}n._invoke(t,"getMediaPipeline",function(t,i){if(t)return e(t);n.emit("_describe",i,o)})})}return disguise(this._invoke(t,"getMediaPipeline",function(t,i){if(t)return e(t);this.emit("_describe",i,e)}),this)},MediaObject.prototype.getName=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getName",e),this)},MediaObject.prototype.setName=function(e,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={name:e};return t=(t||noop).bind(this),disguise(this._invoke(i,"setName",n,t),this)},MediaObject.prototype.getParent=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,i=!1;if(void 0==e&&(i=!0),arguments.length||(e=void 0),e=(e||noop).bind(this),i){var n=this;return new Promise(function(i,r){function o(e,t){i(t)}n._invoke(t,"getParent",function(t,i){if(t)return e(t);n.emit("_describe",i,o)})})}return disguise(this._invoke(t,"getParent",function(t,i){if(t)return e(t);this.emit("_describe",i,e)}),this)},MediaObject.prototype.getSendTagsInEvents=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getSendTagsInEvents",e),this)},MediaObject.prototype.setSendTagsInEvents=function(e,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={sendTagsInEvents:e};return t=(t||noop).bind(this),disguise(this._invoke(i,"setSendTagsInEvents",n,t),this)},MediaObject.prototype.addTag=function(e,t,i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,r={key:e,value:t};return i=(i||noop).bind(this),disguise(this._invoke(n,"addTag",r,i),this)},MediaObject.prototype.getTag=function(e,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={key:e};return t=(t||noop).bind(this),disguise(this._invoke(i,"getTag",n,t),this)},MediaObject.prototype.getTags=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getTags",e),this)},MediaObject.prototype.removeTag=function(e,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={key:e};return t=(t||noop).bind(this),disguise(this._invoke(i,"removeTag",n,t),this)},Object.defineProperty(MediaObject.prototype,"_invoke",{enumerable:!0,value:function(e,t,i,n){var r=this;if(i instanceof Function){if(n)throw new SyntaxError("Nothing can be defined after the callback");n=i,i=void 0}var o,s=this._createError;return o=s?Promise.reject(s):new Promise(function(n,o){function s(e,t){if(e)return o(e);var i=t.value;void 0===i&&(i=r),n(i)}var a={object:r,operation:t};i&&(a.operationParams=i),r.emit("_rpc",e,"invoke",a,s)}),promiseCallback(o,n,this)}}),MediaObject.prototype.release=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;arguments.length||(e=void 0),e=(e||noop).bind(this);var i,n=this,r=this._createError;return i=r?Promise.reject(r):new Promise(function(e,i){function r(t){if(t)return i(t);Object.keys(n._events).forEach(function(e){"_"!=e[0]&&"newListener"!=e&&"removeListener"!=e&&n.removeAllListeners(e)}),n.emit("release"),e()}var o={object:n};n.emit("_rpc",t,"release",o,r)}),disguise(promiseCallback(i,e),this)},MediaObject.prototype.then=function(e,t){if(null!=this.id)var i=Promise.resolve(disguise.unthenable(this));else if(null===this.id)var i=Promise.reject();else var n=this,i=new Promise(function(e,t){return n.once("_id",function(i,r){if(i)return t(i);e(disguise.unthenable(n))})});return i=i.then(e?e.bind(this):function(e){return Promise.resolve(e)},t?t.bind(this):function(e){return Promise.reject(e)}),disguise(i,this)},MediaObject.prototype.catch=function(e){this.then(null,e)},Object.defineProperty(MediaObject.prototype,"commited",{get:function(){return void 0!==this.id}}),MediaObject.constructorParams={},MediaObject.events=["Error"],module.exports=MediaObject,MediaObject.check=checkMediaObject;
},{"events":21,"inherits":"inherits","kurento-client":"kurento-client","promisecallback":"promisecallback"}],36:[function(require,module,exports){
function noop(i,n){return i&&console.trace(i),n}function SdpEndpoint(){SdpEndpoint.super_.call(this)}function checkSdpEndpoint(i,n){if(!(n instanceof SdpEndpoint))throw ChecktypeError(i,SdpEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,SessionEndpoint=require("./SessionEndpoint");inherits(SdpEndpoint,SessionEndpoint),SdpEndpoint.prototype.getMaxAudioRecvBandwidth=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"getMaxAudioRecvBandwidth",i),this)},SdpEndpoint.prototype.setMaxAudioRecvBandwidth=function(i,n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,o={maxAudioRecvBandwidth:i};return n=(n||noop).bind(this),disguise(this._invoke(t,"setMaxAudioRecvBandwidth",o,n),this)},SdpEndpoint.prototype.getMaxVideoRecvBandwidth=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"getMaxVideoRecvBandwidth",i),this)},SdpEndpoint.prototype.setMaxVideoRecvBandwidth=function(i,n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,o={maxVideoRecvBandwidth:i};return n=(n||noop).bind(this),disguise(this._invoke(t,"setMaxVideoRecvBandwidth",o,n),this)},SdpEndpoint.prototype.generateOffer=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"generateOffer",i),this)},SdpEndpoint.prototype.getLocalSessionDescriptor=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"getLocalSessionDescriptor",i),this)},SdpEndpoint.prototype.getRemoteSessionDescriptor=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"getRemoteSessionDescriptor",i),this)},SdpEndpoint.prototype.processAnswer=function(i,n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,o={answer:i};return n=(n||noop).bind(this),disguise(this._invoke(t,"processAnswer",o,n),this)},SdpEndpoint.prototype.processOffer=function(i,n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,o={offer:i};return n=(n||noop).bind(this),disguise(this._invoke(t,"processOffer",o,n),this)},SdpEndpoint.constructorParams={},SdpEndpoint.events=SessionEndpoint.events,module.exports=SdpEndpoint,SdpEndpoint.check=checkSdpEndpoint;
},{"./SessionEndpoint":38,"inherits":"inherits","kurento-client":"kurento-client"}],37:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function ServerManager(){ServerManager.super_.call(this)}function checkServerManager(e,r){if(!(r instanceof ServerManager))throw ChecktypeError(e,ServerManager,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,MediaObject=require("./MediaObject");inherits(ServerManager,MediaObject),ServerManager.prototype.getInfo=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getInfo",e),this)},ServerManager.prototype.getMetadata=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getMetadata",e),this)},ServerManager.prototype.getPipelines=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,t=!1;if(void 0==e&&(t=!0),arguments.length||(e=void 0),e=(e||noop).bind(this),t){var n=this;return new Promise(function(t,i){function o(e,r){t(r)}n._invoke(r,"getPipelines",function(r,t){if(r)return e(r);n.emit("_describe",t,o)})})}return disguise(this._invoke(r,"getPipelines",function(r,t){if(r)return e(r);this.emit("_describe",t,e)}),this)},ServerManager.prototype.getSessions=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getSessions",e),this)},ServerManager.prototype.getKmd=function(e,r){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0,n={moduleName:e};return r=(r||noop).bind(this),disguise(this._invoke(t,"getKmd",n,r),this)},ServerManager.prototype.getUsedMemory=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getUsedMemory",e),this)},ServerManager.constructorParams={},ServerManager.events=MediaObject.events.concat(["ObjectCreated","ObjectDestroyed"]),module.exports=ServerManager,ServerManager.check=checkServerManager;
},{"./MediaObject":35,"inherits":"inherits","kurento-client":"kurento-client"}],38:[function(require,module,exports){
function SessionEndpoint(){SessionEndpoint.super_.call(this)}function checkSessionEndpoint(n,e){if(!(e instanceof SessionEndpoint))throw ChecktypeError(n,SessionEndpoint,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Endpoint=require("./Endpoint");inherits(SessionEndpoint,Endpoint),SessionEndpoint.constructorParams={},SessionEndpoint.events=Endpoint.events.concat(["MediaSessionStarted","MediaSessionTerminated"]),module.exports=SessionEndpoint,SessionEndpoint.check=checkSessionEndpoint;
},{"./Endpoint":31,"inherits":"inherits","kurento-client":"kurento-client"}],39:[function(require,module,exports){
function noop(i,n){return i&&console.trace(i),n}function UriEndpoint(){UriEndpoint.super_.call(this)}function checkUriEndpoint(i,n){if(!(n instanceof UriEndpoint))throw ChecktypeError(i,UriEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Endpoint=require("./Endpoint");inherits(UriEndpoint,Endpoint),UriEndpoint.prototype.getState=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"getState",i),this)},UriEndpoint.prototype.getUri=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"getUri",i),this)},UriEndpoint.prototype.pause=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"pause",i),this)},UriEndpoint.prototype.stop=function(i){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==i&&!0,arguments.length||(i=void 0),i=(i||noop).bind(this),disguise(this._invoke(n,"stop",i),this)},UriEndpoint.constructorParams={},UriEndpoint.events=Endpoint.events.concat(["UriEndpointStateChanged"]),module.exports=UriEndpoint,UriEndpoint.check=checkUriEndpoint;
},{"./Endpoint":31,"inherits":"inherits","kurento-client":"kurento-client"}],40:[function(require,module,exports){
var BaseRtpEndpoint=require("./BaseRtpEndpoint"),Endpoint=require("./Endpoint"),Filter=require("./Filter"),Hub=require("./Hub"),MediaElement=require("./MediaElement"),MediaObject=require("./MediaObject"),SdpEndpoint=require("./SdpEndpoint"),ServerManager=require("./ServerManager"),SessionEndpoint=require("./SessionEndpoint"),UriEndpoint=require("./UriEndpoint");exports.BaseRtpEndpoint=BaseRtpEndpoint,exports.Endpoint=Endpoint,exports.Filter=Filter,exports.Hub=Hub,exports.MediaElement=MediaElement,exports.MediaObject=MediaObject,exports.SdpEndpoint=SdpEndpoint,exports.ServerManager=ServerManager,exports.SessionEndpoint=SessionEndpoint,exports.UriEndpoint=UriEndpoint;
},{"./BaseRtpEndpoint":30,"./Endpoint":31,"./Filter":32,"./Hub":33,"./MediaElement":34,"./MediaObject":35,"./SdpEndpoint":36,"./ServerManager":37,"./SessionEndpoint":38,"./UriEndpoint":39}],41:[function(require,module,exports){
function AudioCaps(e){if(!(this instanceof AudioCaps))return new AudioCaps(e);e=e||{},AudioCaps.super_.call(this,e),Object.defineProperties(this,{codec:{writable:!0,enumerable:!0,value:e.codec},bitrate:{writable:!0,enumerable:!0,value:e.bitrate}})}function checkAudioCaps(e,i){if(!(i instanceof AudioCaps))throw ChecktypeError(e,AudioCaps,i)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(AudioCaps,ComplexType),Object.defineProperties(AudioCaps.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"AudioCaps"}}),module.exports=AudioCaps,AudioCaps.check=checkAudioCaps;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],42:[function(require,module,exports){
function checkAudioCodec(o,r){if("string"!=typeof r)throw SyntaxError(o+" param should be a String, not "+typeof r);if(!r.match("OPUS|PCMU|RAW"))throw SyntaxError(o+" param is not one of [OPUS|PCMU|RAW] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkAudioCodec;
},{"kurento-client":"kurento-client"}],43:[function(require,module,exports){
function CodecConfiguration(e){if(!(this instanceof CodecConfiguration))return new CodecConfiguration(e);e=e||{},CodecConfiguration.super_.call(this,e),Object.defineProperties(this,{name:{writable:!0,enumerable:!0,value:e.name},properties:{writable:!0,enumerable:!0,value:e.properties}})}function checkCodecConfiguration(e,o){if(!(o instanceof CodecConfiguration))throw ChecktypeError(e,CodecConfiguration,o)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(CodecConfiguration,ComplexType),Object.defineProperties(CodecConfiguration.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"CodecConfiguration"}}),module.exports=CodecConfiguration,CodecConfiguration.check=checkCodecConfiguration;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],44:[function(require,module,exports){
function ComplexType(){}function checkComplexType(e,o){if(!(o instanceof ComplexType))throw ChecktypeError(e,ComplexType,o)}var ChecktypeError=require("kurento-client").checkType.ChecktypeError;ComplexType.prototype.toJSON=function(){var e={};for(var o in this){var p=this[o];"function"!=typeof p&&(e[o]=p)}return e},module.exports=ComplexType,ComplexType.check=checkComplexType;
},{"kurento-client":"kurento-client"}],45:[function(require,module,exports){
function checkConnectionState(t,o){if("string"!=typeof o)throw SyntaxError(t+" param should be a String, not "+typeof o);if(!o.match("DISCONNECTED|CONNECTED"))throw SyntaxError(t+" param is not one of [DISCONNECTED|CONNECTED] ("+o+")")}var kurentoClient=require("kurento-client");module.exports=checkConnectionState;
},{"kurento-client":"kurento-client"}],46:[function(require,module,exports){
function ElementConnectionData(e){if(!(this instanceof ElementConnectionData))return new ElementConnectionData(e);e=e||{},ElementConnectionData.super_.call(this,e),Object.defineProperties(this,{source:{writable:!0,enumerable:!0,value:e.source},sink:{writable:!0,enumerable:!0,value:e.sink},type:{writable:!0,enumerable:!0,value:e.type},sourceDescription:{writable:!0,enumerable:!0,value:e.sourceDescription},sinkDescription:{writable:!0,enumerable:!0,value:e.sinkDescription}})}function checkElementConnectionData(e,n){if(!(n instanceof ElementConnectionData))throw ChecktypeError(e,ElementConnectionData,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(ElementConnectionData,ComplexType),Object.defineProperties(ElementConnectionData.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"ElementConnectionData"}}),module.exports=ElementConnectionData,ElementConnectionData.check=checkElementConnectionData;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],47:[function(require,module,exports){
function ElementStats(e){if(!(this instanceof ElementStats))return new ElementStats(e);e=e||{},ElementStats.super_.call(this,e),Object.defineProperties(this,{inputAudioLatency:{writable:!0,enumerable:!0,value:e.inputAudioLatency},inputVideoLatency:{writable:!0,enumerable:!0,value:e.inputVideoLatency},inputLatency:{writable:!0,enumerable:!0,value:e.inputLatency}})}function checkElementStats(e,t){if(!(t instanceof ElementStats))throw ChecktypeError(e,ElementStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Stats=require("./Stats");inherits(ElementStats,Stats),Object.defineProperties(ElementStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"ElementStats"}}),module.exports=ElementStats,ElementStats.check=checkElementStats;
},{"./Stats":77,"inherits":"inherits","kurento-client":"kurento-client"}],48:[function(require,module,exports){
function EndpointStats(e){if(!(this instanceof EndpointStats))return new EndpointStats(e);e=e||{},EndpointStats.super_.call(this,e),Object.defineProperties(this,{audioE2ELatency:{writable:!0,enumerable:!0,value:e.audioE2ELatency},videoE2ELatency:{writable:!0,enumerable:!0,value:e.videoE2ELatency},E2ELatency:{writable:!0,enumerable:!0,value:e.E2ELatency}})}function checkEndpointStats(e,t){if(!(t instanceof EndpointStats))throw ChecktypeError(e,EndpointStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ElementStats=require("./ElementStats");inherits(EndpointStats,ElementStats),Object.defineProperties(EndpointStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"EndpointStats"}}),module.exports=EndpointStats,EndpointStats.check=checkEndpointStats;
},{"./ElementStats":47,"inherits":"inherits","kurento-client":"kurento-client"}],49:[function(require,module,exports){
function checkFilterType(r,t){if("string"!=typeof t)throw SyntaxError(r+" param should be a String, not "+typeof t);if(!t.match("AUDIO|AUTODETECT|VIDEO"))throw SyntaxError(r+" param is not one of [AUDIO|AUTODETECT|VIDEO] ("+t+")")}var kurentoClient=require("kurento-client");module.exports=checkFilterType;
},{"kurento-client":"kurento-client"}],50:[function(require,module,exports){
function Fraction(e){if(!(this instanceof Fraction))return new Fraction(e);e=e||{},Fraction.super_.call(this,e),Object.defineProperties(this,{numerator:{writable:!0,enumerable:!0,value:e.numerator},denominator:{writable:!0,enumerable:!0,value:e.denominator}})}function checkFraction(e,r){if(!(r instanceof Fraction))throw ChecktypeError(e,Fraction,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(Fraction,ComplexType),Object.defineProperties(Fraction.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"Fraction"}}),module.exports=Fraction,Fraction.check=checkFraction;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],51:[function(require,module,exports){
function checkGstreamerDotDetails(S,_){if("string"!=typeof _)throw SyntaxError(S+" param should be a String, not "+typeof _);if(!_.match("SHOW_MEDIA_TYPE|SHOW_CAPS_DETAILS|SHOW_NON_DEFAULT_PARAMS|SHOW_STATES|SHOW_FULL_PARAMS|SHOW_ALL|SHOW_VERBOSE"))throw SyntaxError(S+" param is not one of [SHOW_MEDIA_TYPE|SHOW_CAPS_DETAILS|SHOW_NON_DEFAULT_PARAMS|SHOW_STATES|SHOW_FULL_PARAMS|SHOW_ALL|SHOW_VERBOSE] ("+_+")")}var kurentoClient=require("kurento-client");module.exports=checkGstreamerDotDetails;
},{"kurento-client":"kurento-client"}],52:[function(require,module,exports){
function checkMediaFlowState(t,e){if("string"!=typeof e)throw SyntaxError(t+" param should be a String, not "+typeof e);if(!e.match("FLOWING|NOT_FLOWING"))throw SyntaxError(t+" param is not one of [FLOWING|NOT_FLOWING] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkMediaFlowState;
},{"kurento-client":"kurento-client"}],53:[function(require,module,exports){
function MediaLatencyStat(e){if(!(this instanceof MediaLatencyStat))return new MediaLatencyStat(e);e=e||{},MediaLatencyStat.super_.call(this,e),Object.defineProperties(this,{name:{writable:!0,enumerable:!0,value:e.name},type:{writable:!0,enumerable:!0,value:e.type},avg:{writable:!0,enumerable:!0,value:e.avg}})}function checkMediaLatencyStat(e,t){if(!(t instanceof MediaLatencyStat))throw ChecktypeError(e,MediaLatencyStat,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(MediaLatencyStat,ComplexType),Object.defineProperties(MediaLatencyStat.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"MediaLatencyStat"}}),module.exports=MediaLatencyStat,MediaLatencyStat.check=checkMediaLatencyStat;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],54:[function(require,module,exports){
function checkMediaState(t,e){if("string"!=typeof e)throw SyntaxError(t+" param should be a String, not "+typeof e);if(!e.match("DISCONNECTED|CONNECTED"))throw SyntaxError(t+" param is not one of [DISCONNECTED|CONNECTED] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkMediaState;
},{"kurento-client":"kurento-client"}],55:[function(require,module,exports){
function checkMediaTranscodingState(t,r){if("string"!=typeof r)throw SyntaxError(t+" param should be a String, not "+typeof r);if(!r.match("TRANSCODING|NOT_TRANSCODING"))throw SyntaxError(t+" param is not one of [TRANSCODING|NOT_TRANSCODING] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkMediaTranscodingState;
},{"kurento-client":"kurento-client"}],56:[function(require,module,exports){
function checkMediaType(e,r){if("string"!=typeof r)throw SyntaxError(e+" param should be a String, not "+typeof r);if(!r.match("AUDIO|DATA|VIDEO"))throw SyntaxError(e+" param is not one of [AUDIO|DATA|VIDEO] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkMediaType;
},{"kurento-client":"kurento-client"}],57:[function(require,module,exports){
function ModuleInfo(e){if(!(this instanceof ModuleInfo))return new ModuleInfo(e);e=e||{},ModuleInfo.super_.call(this,e),Object.defineProperties(this,{version:{writable:!0,enumerable:!0,value:e.version},name:{writable:!0,enumerable:!0,value:e.name},generationTime:{writable:!0,enumerable:!0,value:e.generationTime},factories:{writable:!0,enumerable:!0,value:e.factories}})}function checkModuleInfo(e,o){if(!(o instanceof ModuleInfo))throw ChecktypeError(e,ModuleInfo,o)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(ModuleInfo,ComplexType),Object.defineProperties(ModuleInfo.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"ModuleInfo"}}),module.exports=ModuleInfo,ModuleInfo.check=checkModuleInfo;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],58:[function(require,module,exports){
function RTCCertificateStats(e){if(!(this instanceof RTCCertificateStats))return new RTCCertificateStats(e);e=e||{},RTCCertificateStats.super_.call(this,e),Object.defineProperties(this,{fingerprint:{writable:!0,enumerable:!0,value:e.fingerprint},fingerprintAlgorithm:{writable:!0,enumerable:!0,value:e.fingerprintAlgorithm},base64Certificate:{writable:!0,enumerable:!0,value:e.base64Certificate},issuerCertificateId:{writable:!0,enumerable:!0,value:e.issuerCertificateId}})}function checkRTCCertificateStats(e,t){if(!(t instanceof RTCCertificateStats))throw ChecktypeError(e,RTCCertificateStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCCertificateStats,RTCStats),Object.defineProperties(RTCCertificateStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCCertificateStats"}}),module.exports=RTCCertificateStats,RTCCertificateStats.check=checkRTCCertificateStats;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],59:[function(require,module,exports){
function RTCCodec(e){if(!(this instanceof RTCCodec))return new RTCCodec(e);e=e||{},RTCCodec.super_.call(this,e),Object.defineProperties(this,{payloadType:{writable:!0,enumerable:!0,value:e.payloadType},codec:{writable:!0,enumerable:!0,value:e.codec},clockRate:{writable:!0,enumerable:!0,value:e.clockRate},channels:{writable:!0,enumerable:!0,value:e.channels},parameters:{writable:!0,enumerable:!0,value:e.parameters}})}function checkRTCCodec(e,r){if(!(r instanceof RTCCodec))throw ChecktypeError(e,RTCCodec,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCCodec,RTCStats),Object.defineProperties(RTCCodec.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCCodec"}}),module.exports=RTCCodec,RTCCodec.check=checkRTCCodec;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],60:[function(require,module,exports){
function checkRTCDataChannelState(n,t){if("string"!=typeof t)throw SyntaxError(n+" param should be a String, not "+typeof t);if(!t.match("connecting|open|closing|closed"))throw SyntaxError(n+" param is not one of [connecting|open|closing|closed] ("+t+")")}var kurentoClient=require("kurento-client");module.exports=checkRTCDataChannelState;
},{"kurento-client":"kurento-client"}],61:[function(require,module,exports){
function RTCDataChannelStats(e){if(!(this instanceof RTCDataChannelStats))return new RTCDataChannelStats(e);e=e||{},RTCDataChannelStats.super_.call(this,e),Object.defineProperties(this,{label:{writable:!0,enumerable:!0,value:e.label},protocol:{writable:!0,enumerable:!0,value:e.protocol},datachannelid:{writable:!0,enumerable:!0,value:e.datachannelid},state:{writable:!0,enumerable:!0,value:e.state},messagesSent:{writable:!0,enumerable:!0,value:e.messagesSent},bytesSent:{writable:!0,enumerable:!0,value:e.bytesSent},messagesReceived:{writable:!0,enumerable:!0,value:e.messagesReceived},bytesReceived:{writable:!0,enumerable:!0,value:e.bytesReceived}})}function checkRTCDataChannelStats(e,a){if(!(a instanceof RTCDataChannelStats))throw ChecktypeError(e,RTCDataChannelStats,a)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCDataChannelStats,RTCStats),Object.defineProperties(RTCDataChannelStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCDataChannelStats"}}),module.exports=RTCDataChannelStats,RTCDataChannelStats.check=checkRTCDataChannelStats;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],62:[function(require,module,exports){
function RTCIceCandidateAttributes(e){if(!(this instanceof RTCIceCandidateAttributes))return new RTCIceCandidateAttributes(e);e=e||{},RTCIceCandidateAttributes.super_.call(this,e),Object.defineProperties(this,{ipAddress:{writable:!0,enumerable:!0,value:e.ipAddress},portNumber:{writable:!0,enumerable:!0,value:e.portNumber},transport:{writable:!0,enumerable:!0,value:e.transport},candidateType:{writable:!0,enumerable:!0,value:e.candidateType},priority:{writable:!0,enumerable:!0,value:e.priority},addressSourceUrl:{writable:!0,enumerable:!0,value:e.addressSourceUrl}})}function checkRTCIceCandidateAttributes(e,t){if(!(t instanceof RTCIceCandidateAttributes))throw ChecktypeError(e,RTCIceCandidateAttributes,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCIceCandidateAttributes,RTCStats),Object.defineProperties(RTCIceCandidateAttributes.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCIceCandidateAttributes"}}),module.exports=RTCIceCandidateAttributes,RTCIceCandidateAttributes.check=checkRTCIceCandidateAttributes;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],63:[function(require,module,exports){
function RTCIceCandidatePairStats(e){if(!(this instanceof RTCIceCandidatePairStats))return new RTCIceCandidatePairStats(e);e=e||{},RTCIceCandidatePairStats.super_.call(this,e),Object.defineProperties(this,{transportId:{writable:!0,enumerable:!0,value:e.transportId},localCandidateId:{writable:!0,enumerable:!0,value:e.localCandidateId},remoteCandidateId:{writable:!0,enumerable:!0,value:e.remoteCandidateId},state:{writable:!0,enumerable:!0,value:e.state},priority:{writable:!0,enumerable:!0,value:e.priority},nominated:{writable:!0,enumerable:!0,value:e.nominated},writable:{writable:!0,enumerable:!0,value:e.writable},readable:{writable:!0,enumerable:!0,value:e.readable},bytesSent:{writable:!0,enumerable:!0,value:e.bytesSent},bytesReceived:{writable:!0,enumerable:!0,value:e.bytesReceived},roundTripTime:{writable:!0,enumerable:!0,value:e.roundTripTime},availableOutgoingBitrate:{writable:!0,enumerable:!0,value:e.availableOutgoingBitrate},availableIncomingBitrate:{writable:!0,enumerable:!0,value:e.availableIncomingBitrate}})}function checkRTCIceCandidatePairStats(e,a){if(!(a instanceof RTCIceCandidatePairStats))throw ChecktypeError(e,RTCIceCandidatePairStats,a)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCIceCandidatePairStats,RTCStats),Object.defineProperties(RTCIceCandidatePairStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCIceCandidatePairStats"}}),module.exports=RTCIceCandidatePairStats,RTCIceCandidatePairStats.check=checkRTCIceCandidatePairStats;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],64:[function(require,module,exports){
function RTCInboundRTPStreamStats(e){if(!(this instanceof RTCInboundRTPStreamStats))return new RTCInboundRTPStreamStats(e);e=e||{},RTCInboundRTPStreamStats.super_.call(this,e),Object.defineProperties(this,{packetsReceived:{writable:!0,enumerable:!0,value:e.packetsReceived},bytesReceived:{writable:!0,enumerable:!0,value:e.bytesReceived},jitter:{writable:!0,enumerable:!0,value:e.jitter}})}function checkRTCInboundRTPStreamStats(e,t){if(!(t instanceof RTCInboundRTPStreamStats))throw ChecktypeError(e,RTCInboundRTPStreamStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCRTPStreamStats=require("./RTCRTPStreamStats");inherits(RTCInboundRTPStreamStats,RTCRTPStreamStats),Object.defineProperties(RTCInboundRTPStreamStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCInboundRTPStreamStats"}}),module.exports=RTCInboundRTPStreamStats,RTCInboundRTPStreamStats.check=checkRTCInboundRTPStreamStats;
},{"./RTCRTPStreamStats":69,"inherits":"inherits","kurento-client":"kurento-client"}],65:[function(require,module,exports){
function RTCMediaStreamStats(e){if(!(this instanceof RTCMediaStreamStats))return new RTCMediaStreamStats(e);e=e||{},RTCMediaStreamStats.super_.call(this,e),Object.defineProperties(this,{streamIdentifier:{writable:!0,enumerable:!0,value:e.streamIdentifier},trackIds:{writable:!0,enumerable:!0,value:e.trackIds}})}function checkRTCMediaStreamStats(e,t){if(!(t instanceof RTCMediaStreamStats))throw ChecktypeError(e,RTCMediaStreamStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCMediaStreamStats,RTCStats),Object.defineProperties(RTCMediaStreamStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCMediaStreamStats"}}),module.exports=RTCMediaStreamStats,RTCMediaStreamStats.check=checkRTCMediaStreamStats;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],66:[function(require,module,exports){
function RTCMediaStreamTrackStats(e){if(!(this instanceof RTCMediaStreamTrackStats))return new RTCMediaStreamTrackStats(e);e=e||{},RTCMediaStreamTrackStats.super_.call(this,e),Object.defineProperties(this,{trackIdentifier:{writable:!0,enumerable:!0,value:e.trackIdentifier},remoteSource:{writable:!0,enumerable:!0,value:e.remoteSource},ssrcIds:{writable:!0,enumerable:!0,value:e.ssrcIds},frameWidth:{writable:!0,enumerable:!0,value:e.frameWidth},frameHeight:{writable:!0,enumerable:!0,value:e.frameHeight},framesPerSecond:{writable:!0,enumerable:!0,value:e.framesPerSecond},framesSent:{writable:!0,enumerable:!0,value:e.framesSent},framesReceived:{writable:!0,enumerable:!0,value:e.framesReceived},framesDecoded:{writable:!0,enumerable:!0,value:e.framesDecoded},framesDropped:{writable:!0,enumerable:!0,value:e.framesDropped},framesCorrupted:{writable:!0,enumerable:!0,value:e.framesCorrupted},audioLevel:{writable:!0,enumerable:!0,value:e.audioLevel},echoReturnLoss:{writable:!0,enumerable:!0,value:e.echoReturnLoss},echoReturnLossEnhancement:{writable:!0,enumerable:!0,value:e.echoReturnLossEnhancement}})}function checkRTCMediaStreamTrackStats(e,a){if(!(a instanceof RTCMediaStreamTrackStats))throw ChecktypeError(e,RTCMediaStreamTrackStats,a)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCMediaStreamTrackStats,RTCStats),Object.defineProperties(RTCMediaStreamTrackStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCMediaStreamTrackStats"}}),module.exports=RTCMediaStreamTrackStats,RTCMediaStreamTrackStats.check=checkRTCMediaStreamTrackStats;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],67:[function(require,module,exports){
function RTCOutboundRTPStreamStats(t){if(!(this instanceof RTCOutboundRTPStreamStats))return new RTCOutboundRTPStreamStats(t);t=t||{},RTCOutboundRTPStreamStats.super_.call(this,t),Object.defineProperties(this,{packetsSent:{writable:!0,enumerable:!0,value:t.packetsSent},bytesSent:{writable:!0,enumerable:!0,value:t.bytesSent},targetBitrate:{writable:!0,enumerable:!0,value:t.targetBitrate},roundTripTime:{writable:!0,enumerable:!0,value:t.roundTripTime}})}function checkRTCOutboundRTPStreamStats(t,e){if(!(e instanceof RTCOutboundRTPStreamStats))throw ChecktypeError(t,RTCOutboundRTPStreamStats,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCRTPStreamStats=require("./RTCRTPStreamStats");inherits(RTCOutboundRTPStreamStats,RTCRTPStreamStats),Object.defineProperties(RTCOutboundRTPStreamStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCOutboundRTPStreamStats"}}),module.exports=RTCOutboundRTPStreamStats,RTCOutboundRTPStreamStats.check=checkRTCOutboundRTPStreamStats;
},{"./RTCRTPStreamStats":69,"inherits":"inherits","kurento-client":"kurento-client"}],68:[function(require,module,exports){
function RTCPeerConnectionStats(e){if(!(this instanceof RTCPeerConnectionStats))return new RTCPeerConnectionStats(e);e=e||{},RTCPeerConnectionStats.super_.call(this,e),Object.defineProperties(this,{dataChannelsOpened:{writable:!0,enumerable:!0,value:e.dataChannelsOpened},dataChannelsClosed:{writable:!0,enumerable:!0,value:e.dataChannelsClosed}})}function checkRTCPeerConnectionStats(e,t){if(!(t instanceof RTCPeerConnectionStats))throw ChecktypeError(e,RTCPeerConnectionStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCPeerConnectionStats,RTCStats),Object.defineProperties(RTCPeerConnectionStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCPeerConnectionStats"}}),module.exports=RTCPeerConnectionStats,RTCPeerConnectionStats.check=checkRTCPeerConnectionStats;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],69:[function(require,module,exports){
function RTCRTPStreamStats(e){if(!(this instanceof RTCRTPStreamStats))return new RTCRTPStreamStats(e);e=e||{},RTCRTPStreamStats.super_.call(this,e),Object.defineProperties(this,{ssrc:{writable:!0,enumerable:!0,value:e.ssrc},associateStatsId:{writable:!0,enumerable:!0,value:e.associateStatsId},isRemote:{writable:!0,enumerable:!0,value:e.isRemote},mediaTrackId:{writable:!0,enumerable:!0,value:e.mediaTrackId},transportId:{writable:!0,enumerable:!0,value:e.transportId},codecId:{writable:!0,enumerable:!0,value:e.codecId},firCount:{writable:!0,enumerable:!0,value:e.firCount},pliCount:{writable:!0,enumerable:!0,value:e.pliCount},nackCount:{writable:!0,enumerable:!0,value:e.nackCount},sliCount:{writable:!0,enumerable:!0,value:e.sliCount},remb:{writable:!0,enumerable:!0,value:e.remb},packetsLost:{writable:!0,enumerable:!0,value:e.packetsLost},fractionLost:{writable:!0,enumerable:!0,value:e.fractionLost}})}function checkRTCRTPStreamStats(e,t){if(!(t instanceof RTCRTPStreamStats))throw ChecktypeError(e,RTCRTPStreamStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCRTPStreamStats,RTCStats),Object.defineProperties(RTCRTPStreamStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCRTPStreamStats"}}),module.exports=RTCRTPStreamStats,RTCRTPStreamStats.check=checkRTCRTPStreamStats;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],70:[function(require,module,exports){
function RTCStats(t){if(!(this instanceof RTCStats))return new RTCStats(t);t=t||{},RTCStats.super_.call(this,t),Object.defineProperties(this,{})}function checkRTCStats(t,e){if(!(e instanceof RTCStats))throw ChecktypeError(t,RTCStats,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Stats=require("./Stats");inherits(RTCStats,Stats),Object.defineProperties(RTCStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCStats"}}),module.exports=RTCStats,RTCStats.check=checkRTCStats;
},{"./Stats":77,"inherits":"inherits","kurento-client":"kurento-client"}],71:[function(require,module,exports){
function checkRTCStatsIceCandidatePairState(e,t){if("string"!=typeof t)throw SyntaxError(e+" param should be a String, not "+typeof t);if(!t.match("frozen|waiting|inprogress|failed|succeeded|cancelled"))throw SyntaxError(e+" param is not one of [frozen|waiting|inprogress|failed|succeeded|cancelled] ("+t+")")}var kurentoClient=require("kurento-client");module.exports=checkRTCStatsIceCandidatePairState;
},{"kurento-client":"kurento-client"}],72:[function(require,module,exports){
function checkRTCStatsIceCandidateType(e,r){if("string"!=typeof r)throw SyntaxError(e+" param should be a String, not "+typeof r);if(!r.match("host|serverreflexive|peerreflexive|relayed"))throw SyntaxError(e+" param is not one of [host|serverreflexive|peerreflexive|relayed] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkRTCStatsIceCandidateType;
},{"kurento-client":"kurento-client"}],73:[function(require,module,exports){
function RTCTransportStats(e){if(!(this instanceof RTCTransportStats))return new RTCTransportStats(e);e=e||{},RTCTransportStats.super_.call(this,e),Object.defineProperties(this,{bytesSent:{writable:!0,enumerable:!0,value:e.bytesSent},bytesReceived:{writable:!0,enumerable:!0,value:e.bytesReceived},rtcpTransportStatsId:{writable:!0,enumerable:!0,value:e.rtcpTransportStatsId},activeConnection:{writable:!0,enumerable:!0,value:e.activeConnection},selectedCandidatePairId:{writable:!0,enumerable:!0,value:e.selectedCandidatePairId},localCertificateId:{writable:!0,enumerable:!0,value:e.localCertificateId},remoteCertificateId:{writable:!0,enumerable:!0,value:e.remoteCertificateId}})}function checkRTCTransportStats(e,t){if(!(t instanceof RTCTransportStats))throw ChecktypeError(e,RTCTransportStats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,RTCStats=require("./RTCStats");inherits(RTCTransportStats,RTCStats),Object.defineProperties(RTCTransportStats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RTCTransportStats"}}),module.exports=RTCTransportStats,RTCTransportStats.check=checkRTCTransportStats;
},{"./RTCStats":70,"inherits":"inherits","kurento-client":"kurento-client"}],74:[function(require,module,exports){
function RembParams(e){if(!(this instanceof RembParams))return new RembParams(e);e=e||{},RembParams.super_.call(this,e),Object.defineProperties(this,{packetsRecvIntervalTop:{writable:!0,enumerable:!0,value:e.packetsRecvIntervalTop},exponentialFactor:{writable:!0,enumerable:!0,value:e.exponentialFactor},linealFactorMin:{writable:!0,enumerable:!0,value:e.linealFactorMin},linealFactorGrade:{writable:!0,enumerable:!0,value:e.linealFactorGrade},decrementFactor:{writable:!0,enumerable:!0,value:e.decrementFactor},thresholdFactor:{writable:!0,enumerable:!0,value:e.thresholdFactor},upLosses:{writable:!0,enumerable:!0,value:e.upLosses},rembOnConnect:{writable:!0,enumerable:!0,value:e.rembOnConnect}})}function checkRembParams(e,r){if(!(r instanceof RembParams))throw ChecktypeError(e,RembParams,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(RembParams,ComplexType),Object.defineProperties(RembParams.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"RembParams"}}),module.exports=RembParams,RembParams.check=checkRembParams;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],75:[function(require,module,exports){
function ServerInfo(e){if(!(this instanceof ServerInfo))return new ServerInfo(e);e=e||{},ServerInfo.super_.call(this,e),Object.defineProperties(this,{version:{writable:!0,enumerable:!0,value:e.version},modules:{writable:!0,enumerable:!0,value:e.modules},type:{writable:!0,enumerable:!0,value:e.type},capabilities:{writable:!0,enumerable:!0,value:e.capabilities}})}function checkServerInfo(e,r){if(!(r instanceof ServerInfo))throw ChecktypeError(e,ServerInfo,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(ServerInfo,ComplexType),Object.defineProperties(ServerInfo.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"ServerInfo"}}),module.exports=ServerInfo,ServerInfo.check=checkServerInfo;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],76:[function(require,module,exports){
function checkServerType(r,e){if("string"!=typeof e)throw SyntaxError(r+" param should be a String, not "+typeof e);if(!e.match("KMS|KCS"))throw SyntaxError(r+" param is not one of [KMS|KCS] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkServerType;
},{"kurento-client":"kurento-client"}],77:[function(require,module,exports){
function Stats(e){if(!(this instanceof Stats))return new Stats(e);e=e||{},Stats.super_.call(this,e),Object.defineProperties(this,{id:{writable:!0,enumerable:!0,value:e.id},type:{writable:!0,enumerable:!0,value:e.type},timestamp:{writable:!0,enumerable:!0,value:e.timestamp},timestampMillis:{writable:!0,enumerable:!0,value:e.timestampMillis}})}function checkStats(e,t){if(!(t instanceof Stats))throw ChecktypeError(e,Stats,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(Stats,ComplexType),Object.defineProperties(Stats.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"Stats"}}),module.exports=Stats,Stats.check=checkStats;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],78:[function(require,module,exports){
function checkStatsType(t,n){if("string"!=typeof n)throw SyntaxError(t+" param should be a String, not "+typeof n);if(!n.match("inboundrtp|outboundrtp|session|datachannel|track|transport|candidatepair|localcandidate|remotecandidate|element|endpoint"))throw SyntaxError(t+" param is not one of [inboundrtp|outboundrtp|session|datachannel|track|transport|candidatepair|localcandidate|remotecandidate|element|endpoint] ("+n+")")}var kurentoClient=require("kurento-client");module.exports=checkStatsType;
},{"kurento-client":"kurento-client"}],79:[function(require,module,exports){
function Tag(e){if(!(this instanceof Tag))return new Tag(e);e=e||{},Tag.super_.call(this,e),Object.defineProperties(this,{key:{writable:!0,enumerable:!0,value:e.key},value:{writable:!0,enumerable:!0,value:e.value}})}function checkTag(e,r){if(!(r instanceof Tag))throw ChecktypeError(e,Tag,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(Tag,ComplexType),Object.defineProperties(Tag.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"Tag"}}),module.exports=Tag,Tag.check=checkTag;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],80:[function(require,module,exports){
function checkUriEndpointState(t,r){if("string"!=typeof r)throw SyntaxError(t+" param should be a String, not "+typeof r);if(!r.match("STOP|START|PAUSE"))throw SyntaxError(t+" param is not one of [STOP|START|PAUSE] ("+r+")")}var kurentoClient=require("kurento-client");module.exports=checkUriEndpointState;
},{"kurento-client":"kurento-client"}],81:[function(require,module,exports){
function VideoCaps(e){if(!(this instanceof VideoCaps))return new VideoCaps(e);e=e||{},VideoCaps.super_.call(this,e),Object.defineProperties(this,{codec:{writable:!0,enumerable:!0,value:e.codec},framerate:{writable:!0,enumerable:!0,value:e.framerate}})}function checkVideoCaps(e,r){if(!(r instanceof VideoCaps))throw ChecktypeError(e,VideoCaps,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("./ComplexType");inherits(VideoCaps,ComplexType),Object.defineProperties(VideoCaps.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"VideoCaps"}}),module.exports=VideoCaps,VideoCaps.check=checkVideoCaps;
},{"./ComplexType":44,"inherits":"inherits","kurento-client":"kurento-client"}],82:[function(require,module,exports){
function checkVideoCodec(o,e){if("string"!=typeof e)throw SyntaxError(o+" param should be a String, not "+typeof e);if(!e.match("VP8|H264|RAW"))throw SyntaxError(o+" param is not one of [VP8|H264|RAW] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkVideoCodec;
},{"kurento-client":"kurento-client"}],83:[function(require,module,exports){
var ComplexType=require("./ComplexType"),AudioCaps=require("./AudioCaps"),AudioCodec=require("./AudioCodec"),CodecConfiguration=require("./CodecConfiguration"),ConnectionState=require("./ConnectionState"),ElementConnectionData=require("./ElementConnectionData"),ElementStats=require("./ElementStats"),EndpointStats=require("./EndpointStats"),FilterType=require("./FilterType"),Fraction=require("./Fraction"),GstreamerDotDetails=require("./GstreamerDotDetails"),MediaFlowState=require("./MediaFlowState"),MediaLatencyStat=require("./MediaLatencyStat"),MediaState=require("./MediaState"),MediaTranscodingState=require("./MediaTranscodingState"),MediaType=require("./MediaType"),ModuleInfo=require("./ModuleInfo"),RembParams=require("./RembParams"),RTCCertificateStats=require("./RTCCertificateStats"),RTCCodec=require("./RTCCodec"),RTCDataChannelState=require("./RTCDataChannelState"),RTCDataChannelStats=require("./RTCDataChannelStats"),RTCIceCandidateAttributes=require("./RTCIceCandidateAttributes"),RTCIceCandidatePairStats=require("./RTCIceCandidatePairStats"),RTCInboundRTPStreamStats=require("./RTCInboundRTPStreamStats"),RTCMediaStreamStats=require("./RTCMediaStreamStats"),RTCMediaStreamTrackStats=require("./RTCMediaStreamTrackStats"),RTCOutboundRTPStreamStats=require("./RTCOutboundRTPStreamStats"),RTCPeerConnectionStats=require("./RTCPeerConnectionStats"),RTCRTPStreamStats=require("./RTCRTPStreamStats"),RTCStats=require("./RTCStats"),RTCStatsIceCandidatePairState=require("./RTCStatsIceCandidatePairState"),RTCStatsIceCandidateType=require("./RTCStatsIceCandidateType"),RTCTransportStats=require("./RTCTransportStats"),ServerInfo=require("./ServerInfo"),ServerType=require("./ServerType"),Stats=require("./Stats"),StatsType=require("./StatsType"),Tag=require("./Tag"),UriEndpointState=require("./UriEndpointState"),VideoCaps=require("./VideoCaps"),VideoCodec=require("./VideoCodec");exports.ComplexType=ComplexType,exports.AudioCaps=AudioCaps,exports.AudioCodec=AudioCodec,exports.CodecConfiguration=CodecConfiguration,exports.ConnectionState=ConnectionState,exports.ElementConnectionData=ElementConnectionData,exports.ElementStats=ElementStats,exports.EndpointStats=EndpointStats,exports.FilterType=FilterType,exports.Fraction=Fraction,exports.GstreamerDotDetails=GstreamerDotDetails,exports.MediaFlowState=MediaFlowState,exports.MediaLatencyStat=MediaLatencyStat,exports.MediaState=MediaState,exports.MediaTranscodingState=MediaTranscodingState,exports.MediaType=MediaType,exports.ModuleInfo=ModuleInfo,exports.RembParams=RembParams,exports.RTCCertificateStats=RTCCertificateStats,exports.RTCCodec=RTCCodec,exports.RTCDataChannelState=RTCDataChannelState,exports.RTCDataChannelStats=RTCDataChannelStats,exports.RTCIceCandidateAttributes=RTCIceCandidateAttributes,exports.RTCIceCandidatePairStats=RTCIceCandidatePairStats,exports.RTCInboundRTPStreamStats=RTCInboundRTPStreamStats,exports.RTCMediaStreamStats=RTCMediaStreamStats,exports.RTCMediaStreamTrackStats=RTCMediaStreamTrackStats,exports.RTCOutboundRTPStreamStats=RTCOutboundRTPStreamStats,exports.RTCPeerConnectionStats=RTCPeerConnectionStats,exports.RTCRTPStreamStats=RTCRTPStreamStats,exports.RTCStats=RTCStats,exports.RTCStatsIceCandidatePairState=RTCStatsIceCandidatePairState,exports.RTCStatsIceCandidateType=RTCStatsIceCandidateType,exports.RTCTransportStats=RTCTransportStats,exports.ServerInfo=ServerInfo,exports.ServerType=ServerType,exports.Stats=Stats,exports.StatsType=StatsType,exports.Tag=Tag,exports.UriEndpointState=UriEndpointState,exports.VideoCaps=VideoCaps,exports.VideoCodec=VideoCodec;
},{"./AudioCaps":41,"./AudioCodec":42,"./CodecConfiguration":43,"./ComplexType":44,"./ConnectionState":45,"./ElementConnectionData":46,"./ElementStats":47,"./EndpointStats":48,"./FilterType":49,"./Fraction":50,"./GstreamerDotDetails":51,"./MediaFlowState":52,"./MediaLatencyStat":53,"./MediaState":54,"./MediaTranscodingState":55,"./MediaType":56,"./ModuleInfo":57,"./RTCCertificateStats":58,"./RTCCodec":59,"./RTCDataChannelState":60,"./RTCDataChannelStats":61,"./RTCIceCandidateAttributes":62,"./RTCIceCandidatePairStats":63,"./RTCInboundRTPStreamStats":64,"./RTCMediaStreamStats":65,"./RTCMediaStreamTrackStats":66,"./RTCOutboundRTPStreamStats":67,"./RTCPeerConnectionStats":68,"./RTCRTPStreamStats":69,"./RTCStats":70,"./RTCStatsIceCandidatePairState":71,"./RTCStatsIceCandidateType":72,"./RTCTransportStats":73,"./RembParams":74,"./ServerInfo":75,"./ServerType":76,"./Stats":77,"./StatsType":78,"./Tag":79,"./UriEndpointState":80,"./VideoCaps":81,"./VideoCodec":82}],84:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function AlphaBlending(){AlphaBlending.super_.call(this)}function checkAlphaBlending(e,r){if(!(r instanceof AlphaBlending))throw ChecktypeError(e,AlphaBlending,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Hub=require("kurento-client-core").abstracts.Hub;inherits(AlphaBlending,Hub),AlphaBlending.prototype.setMaster=function(e,r,i){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("HubPort","source",e,{required:!0}),checkType("int","zOrder",r,{required:!0});var n={source:e,zOrder:r};return i=(i||noop).bind(this),disguise(this._invoke(t,"setMaster",n,i),this)},AlphaBlending.prototype.setPortProperties=function(e,r,i,t,n,o,a){var c=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("float","relativeX",e,{required:!0}),checkType("float","relativeY",r,{required:!0}),checkType("int","zOrder",i,{required:!0}),checkType("float","relativeWidth",t,{required:!0}),checkType("float","relativeHeight",n,{required:!0}),checkType("HubPort","port",o,{required:!0});var l={relativeX:e,relativeY:r,zOrder:i,relativeWidth:t,relativeHeight:n,port:o};return a=(a||noop).bind(this),disguise(this._invoke(c,"setPortProperties",l,a),this)},AlphaBlending.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},AlphaBlending.events=Hub.events,module.exports=AlphaBlending,AlphaBlending.check=checkAlphaBlending;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],85:[function(require,module,exports){
function Composite(){Composite.super_.call(this)}function checkComposite(e,i){if(!(i instanceof Composite))throw ChecktypeError(e,Composite,i)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Hub=require("kurento-client-core").abstracts.Hub;inherits(Composite,Hub),Composite.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},Composite.events=Hub.events,module.exports=Composite,Composite.check=checkComposite;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],86:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function Dispatcher(){Dispatcher.super_.call(this)}function checkDispatcher(e,r){if(!(r instanceof Dispatcher))throw ChecktypeError(e,Dispatcher,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Hub=require("kurento-client-core").abstracts.Hub;inherits(Dispatcher,Hub),Dispatcher.prototype.connect=function(e,r,t){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("HubPort","source",e,{required:!0}),checkType("HubPort","sink",r,{required:!0});var c={source:e,sink:r};return t=(t||noop).bind(this),disguise(this._invoke(i,"connect",c,t),this)},Dispatcher.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},Dispatcher.events=Hub.events,module.exports=Dispatcher,Dispatcher.check=checkDispatcher;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],87:[function(require,module,exports){
function noop(e,n){return e&&console.trace(e),n}function DispatcherOneToMany(){DispatcherOneToMany.super_.call(this)}function checkDispatcherOneToMany(e,n){if(!(n instanceof DispatcherOneToMany))throw ChecktypeError(e,DispatcherOneToMany,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Hub=require("kurento-client-core").abstracts.Hub;inherits(DispatcherOneToMany,Hub),DispatcherOneToMany.prototype.removeSource=function(e){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(n,"removeSource",e),this)},DispatcherOneToMany.prototype.setSource=function(e,n){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("HubPort","source",e,{required:!0});var t={source:e};return n=(n||noop).bind(this),disguise(this._invoke(r,"setSource",t,n),this)},DispatcherOneToMany.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},DispatcherOneToMany.events=Hub.events,module.exports=DispatcherOneToMany,DispatcherOneToMany.check=checkDispatcherOneToMany;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],88:[function(require,module,exports){
function HttpPostEndpoint(){HttpPostEndpoint.super_.call(this)}function checkHttpPostEndpoint(t,n){if(!(n instanceof HttpPostEndpoint))throw ChecktypeError(t,HttpPostEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,HttpEndpoint=require("./abstracts/HttpEndpoint");inherits(HttpPostEndpoint,HttpEndpoint),HttpPostEndpoint.constructorParams={disconnectionTimeout:{type:"int"},mediaPipeline:{type:"kurento.MediaPipeline",required:!0},useEncodedMedia:{type:"boolean"}},HttpPostEndpoint.events=HttpEndpoint.events.concat(["EndOfStream"]),module.exports=HttpPostEndpoint,HttpPostEndpoint.check=checkHttpPostEndpoint;
},{"./abstracts/HttpEndpoint":94,"inherits":"inherits","kurento-client":"kurento-client"}],89:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function Mixer(){Mixer.super_.call(this)}function checkMixer(e,r){if(!(r instanceof Mixer))throw ChecktypeError(e,Mixer,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Hub=require("kurento-client-core").abstracts.Hub;inherits(Mixer,Hub),Mixer.prototype.connect=function(e,r,i,n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("MediaType","media",e,{required:!0}),checkType("HubPort","source",r,{required:!0}),checkType("HubPort","sink",i,{required:!0});var c={media:e,source:r,sink:i};return n=(n||noop).bind(this),disguise(this._invoke(t,"connect",c,n),this)},Mixer.prototype.disconnect=function(e,r,i,n){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("MediaType","media",e,{required:!0}),checkType("HubPort","source",r,{required:!0}),checkType("HubPort","sink",i,{required:!0});var c={media:e,source:r,sink:i};return n=(n||noop).bind(this),disguise(this._invoke(t,"disconnect",c,n),this)},Mixer.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},Mixer.events=Hub.events,module.exports=Mixer,Mixer.check=checkMixer;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],90:[function(require,module,exports){
function noop(n,i){return n&&console.trace(n),i}function PlayerEndpoint(){PlayerEndpoint.super_.call(this)}function checkPlayerEndpoint(n,i){if(!(i instanceof PlayerEndpoint))throw ChecktypeError(n,PlayerEndpoint,i)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,UriEndpoint=require("kurento-client-core").abstracts.UriEndpoint;inherits(PlayerEndpoint,UriEndpoint),PlayerEndpoint.prototype.getPosition=function(n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==n&&!0,arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(i,"getPosition",n),this)},PlayerEndpoint.prototype.setPosition=function(n,i){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int64","position",n,{required:!0});var e={position:n};return i=(i||noop).bind(this),disguise(this._invoke(t,"setPosition",e,i),this)},PlayerEndpoint.prototype.getVideoInfo=function(n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==n&&!0,arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(i,"getVideoInfo",n),this)},PlayerEndpoint.prototype.play=function(n){var i=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==n&&!0,arguments.length||(n=void 0),n=(n||noop).bind(this),disguise(this._invoke(i,"play",n),this)},PlayerEndpoint.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0},networkCache:{type:"int"},uri:{type:"String",required:!0},useEncodedMedia:{type:"boolean"}},PlayerEndpoint.events=UriEndpoint.events.concat(["EndOfStream"]),module.exports=PlayerEndpoint,PlayerEndpoint.check=checkPlayerEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],91:[function(require,module,exports){
function noop(e,n){return e&&console.trace(e),n}function RecorderEndpoint(){RecorderEndpoint.super_.call(this)}function checkRecorderEndpoint(e,n){if(!(n instanceof RecorderEndpoint))throw ChecktypeError(e,RecorderEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,UriEndpoint=require("kurento-client-core").abstracts.UriEndpoint;inherits(RecorderEndpoint,UriEndpoint),RecorderEndpoint.prototype.record=function(e){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(n,"record",e),this)},RecorderEndpoint.prototype.stopAndWait=function(e){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(n,"stopAndWait",e),this)},RecorderEndpoint.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0},mediaProfile:{type:"kurento.MediaProfileSpecType"},stopOnEndOfStream:{type:"boolean"},uri:{type:"String",required:!0}},RecorderEndpoint.events=UriEndpoint.events.concat(["Paused","Recording","Stopped"]),module.exports=RecorderEndpoint,RecorderEndpoint.check=checkRecorderEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],92:[function(require,module,exports){
function RtpEndpoint(){RtpEndpoint.super_.call(this)}function checkRtpEndpoint(t,e){if(!(e instanceof RtpEndpoint))throw ChecktypeError(t,RtpEndpoint,e)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,BaseRtpEndpoint=require("kurento-client-core").abstracts.BaseRtpEndpoint;inherits(RtpEndpoint,BaseRtpEndpoint),RtpEndpoint.constructorParams={crypto:{type:"kurento.SDES"},mediaPipeline:{type:"kurento.MediaPipeline",required:!0},useIpv6:{type:"boolean"}},RtpEndpoint.events=BaseRtpEndpoint.events.concat(["OnKeySoftLimit"]),module.exports=RtpEndpoint,RtpEndpoint.check=checkRtpEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],93:[function(require,module,exports){
function noop(e,t){return e&&console.trace(e),t}function WebRtcEndpoint(){WebRtcEndpoint.super_.call(this)}function checkWebRtcEndpoint(e,t){if(!(t instanceof WebRtcEndpoint))throw ChecktypeError(e,WebRtcEndpoint,t)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,BaseRtpEndpoint=require("kurento-client-core").abstracts.BaseRtpEndpoint;inherits(WebRtcEndpoint,BaseRtpEndpoint),WebRtcEndpoint.prototype.getICECandidatePairs=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getICECandidatePairs",e),this)},WebRtcEndpoint.prototype.getIceConnectionState=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getIceConnectionState",e),this)},WebRtcEndpoint.prototype.getStunServerAddress=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getStunServerAddress",e),this)},WebRtcEndpoint.prototype.setStunServerAddress=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","stunServerAddress",e,{required:!0});var i={stunServerAddress:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setStunServerAddress",i,t),this)},WebRtcEndpoint.prototype.getStunServerPort=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getStunServerPort",e),this)},WebRtcEndpoint.prototype.setStunServerPort=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","stunServerPort",e,{required:!0});var i={stunServerPort:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setStunServerPort",i,t),this)},WebRtcEndpoint.prototype.getTurnUrl=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"getTurnUrl",e),this)},WebRtcEndpoint.prototype.setTurnUrl=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","turnUrl",e,{required:!0});var i={turnUrl:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"setTurnUrl",i,t),this)},WebRtcEndpoint.prototype.addIceCandidate=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("IceCandidate","candidate",e,{required:!0});var i={candidate:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"addIceCandidate",i,t),this)},WebRtcEndpoint.prototype.closeDataChannel=function(e,t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("int","channelId",e,{required:!0});var i={channelId:e};return t=(t||noop).bind(this),disguise(this._invoke(n,"closeDataChannel",i,t),this)},WebRtcEndpoint.prototype.createDataChannel=function(e,t,n,i,o,r){var a=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;switch(r=arguments[arguments.length-1]instanceof Function?Array.prototype.pop.call(arguments):void 0,arguments.length){case 0:e=void 0;case 1:t=void 0;case 2:n=void 0;case 3:i=void 0;case 4:o=void 0;break;case 5:break;default:var s=new RangeError("Number of params ("+arguments.length+") not in range [0-5]");throw s.length=arguments.length,s.min=0,s.max=5,s}checkType("String","label",e),checkType("boolean","ordered",t),checkType("int","maxPacketLifeTime",n),checkType("int","maxRetransmits",i),checkType("String","protocol",o);var p={label:e,ordered:t,maxPacketLifeTime:n,maxRetransmits:i,protocol:o};return r=(r||noop).bind(this),disguise(this._invoke(a,"createDataChannel",p,r),this)},WebRtcEndpoint.prototype.gatherCandidates=function(e){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(t,"gatherCandidates",e),this)},WebRtcEndpoint.constructorParams={certificateKeyType:{type:"kurento.CertificateKeyType"},mediaPipeline:{type:"kurento.MediaPipeline",required:!0},useDataChannels:{type:"boolean"}},WebRtcEndpoint.events=BaseRtpEndpoint.events.concat(["DataChannelClose","DataChannelOpen","IceCandidateFound","IceComponentStateChange","IceGatheringDone","NewCandidatePairSelected","OnDataChannelClosed","OnDataChannelOpened","OnIceCandidate","OnIceComponentStateChanged","OnIceGatheringDone"]),module.exports=WebRtcEndpoint,WebRtcEndpoint.check=checkWebRtcEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],94:[function(require,module,exports){
function noop(t,n){return t&&console.trace(t),n}function HttpEndpoint(){HttpEndpoint.super_.call(this)}function checkHttpEndpoint(t,n){if(!(n instanceof HttpEndpoint))throw ChecktypeError(t,HttpEndpoint,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,SessionEndpoint=require("kurento-client-core").abstracts.SessionEndpoint;inherits(HttpEndpoint,SessionEndpoint),HttpEndpoint.prototype.getUrl=function(t){var n=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==t&&!0,arguments.length||(t=void 0),t=(t||noop).bind(this),disguise(this._invoke(n,"getUrl",t),this)},HttpEndpoint.constructorParams={},HttpEndpoint.events=SessionEndpoint.events,module.exports=HttpEndpoint,HttpEndpoint.check=checkHttpEndpoint;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],95:[function(require,module,exports){
var HttpEndpoint=require("./HttpEndpoint");exports.HttpEndpoint=HttpEndpoint;
},{"./HttpEndpoint":94}],96:[function(require,module,exports){
function checkCertificateKeyType(e,t){if("string"!=typeof t)throw SyntaxError(e+" param should be a String, not "+typeof t);if(!t.match("RSA|ECDSA"))throw SyntaxError(e+" param is not one of [RSA|ECDSA] ("+t+")")}var kurentoClient=require("kurento-client");module.exports=checkCertificateKeyType;
},{"kurento-client":"kurento-client"}],97:[function(require,module,exports){
function checkCryptoSuite(_,A){if("string"!=typeof A)throw SyntaxError(_+" param should be a String, not "+typeof A);if(!A.match("AES_128_CM_HMAC_SHA1_32|AES_128_CM_HMAC_SHA1_80|AES_256_CM_HMAC_SHA1_32|AES_256_CM_HMAC_SHA1_80"))throw SyntaxError(_+" param is not one of [AES_128_CM_HMAC_SHA1_32|AES_128_CM_HMAC_SHA1_80|AES_256_CM_HMAC_SHA1_32|AES_256_CM_HMAC_SHA1_80] ("+A+")")}var kurentoClient=require("kurento-client");module.exports=checkCryptoSuite;
},{"kurento-client":"kurento-client"}],98:[function(require,module,exports){
function IceCandidate(e){if(!(this instanceof IceCandidate))return new IceCandidate(e);e=e||{},checkType("String","iceCandidateDict.candidate",e.candidate,{required:!0}),checkType("String","iceCandidateDict.sdpMid",e.sdpMid,{required:!0}),checkType("int","iceCandidateDict.sdpMLineIndex",e.sdpMLineIndex,{required:!0}),IceCandidate.super_.call(this,e),Object.defineProperties(this,{candidate:{writable:!0,enumerable:!0,value:e.candidate},sdpMid:{writable:!0,enumerable:!0,value:e.sdpMid},sdpMLineIndex:{writable:!0,enumerable:!0,value:e.sdpMLineIndex}})}function checkIceCandidate(e,i){if(!(i instanceof IceCandidate))throw ChecktypeError(e,IceCandidate,i)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("kurento-client-core").complexTypes.ComplexType;inherits(IceCandidate,ComplexType),Object.defineProperties(IceCandidate.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"IceCandidate"}}),module.exports=IceCandidate,IceCandidate.check=checkIceCandidate;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],99:[function(require,module,exports){
function IceCandidatePair(e){if(!(this instanceof IceCandidatePair))return new IceCandidatePair(e);e=e||{},checkType("String","iceCandidatePairDict.streamID",e.streamID,{required:!0}),checkType("int","iceCandidatePairDict.componentID",e.componentID,{required:!0}),checkType("String","iceCandidatePairDict.localCandidate",e.localCandidate,{required:!0}),checkType("String","iceCandidatePairDict.remoteCandidate",e.remoteCandidate,{required:!0}),IceCandidatePair.super_.call(this,e),Object.defineProperties(this,{streamID:{writable:!0,enumerable:!0,value:e.streamID},componentID:{writable:!0,enumerable:!0,value:e.componentID},localCandidate:{writable:!0,enumerable:!0,value:e.localCandidate},remoteCandidate:{writable:!0,enumerable:!0,value:e.remoteCandidate}})}function checkIceCandidatePair(e,a){if(!(a instanceof IceCandidatePair))throw ChecktypeError(e,IceCandidatePair,a)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("kurento-client-core").complexTypes.ComplexType;inherits(IceCandidatePair,ComplexType),Object.defineProperties(IceCandidatePair.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"IceCandidatePair"}}),module.exports=IceCandidatePair,IceCandidatePair.check=checkIceCandidatePair;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],100:[function(require,module,exports){
function checkIceComponentState(t,e){if("string"!=typeof e)throw SyntaxError(t+" param should be a String, not "+typeof e);if(!e.match("DISCONNECTED|GATHERING|CONNECTING|CONNECTED|READY|FAILED"))throw SyntaxError(t+" param is not one of [DISCONNECTED|GATHERING|CONNECTING|CONNECTED|READY|FAILED] ("+e+")")}var kurentoClient=require("kurento-client");module.exports=checkIceComponentState;
},{"kurento-client":"kurento-client"}],101:[function(require,module,exports){
function IceConnection(e){if(!(this instanceof IceConnection))return new IceConnection(e);e=e||{},checkType("String","iceConnectionDict.streamId",e.streamId,{required:!0}),checkType("int","iceConnectionDict.componentId",e.componentId,{required:!0}),checkType("IceComponentState","iceConnectionDict.state",e.state,{required:!0}),IceConnection.super_.call(this,e),Object.defineProperties(this,{streamId:{writable:!0,enumerable:!0,value:e.streamId},componentId:{writable:!0,enumerable:!0,value:e.componentId},state:{writable:!0,enumerable:!0,value:e.state}})}function checkIceConnection(e,n){if(!(n instanceof IceConnection))throw ChecktypeError(e,IceConnection,n)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("kurento-client-core").complexTypes.ComplexType;inherits(IceConnection,ComplexType),Object.defineProperties(IceConnection.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"IceConnection"}}),module.exports=IceConnection,IceConnection.check=checkIceConnection;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],102:[function(require,module,exports){
function checkMediaProfileSpecType(O,_){if("string"!=typeof _)throw SyntaxError(O+" param should be a String, not "+typeof _);if(!_.match("WEBM|MP4|WEBM_VIDEO_ONLY|WEBM_AUDIO_ONLY|MP4_VIDEO_ONLY|MP4_AUDIO_ONLY|JPEG_VIDEO_ONLY|KURENTO_SPLIT_RECORDER"))throw SyntaxError(O+" param is not one of [WEBM|MP4|WEBM_VIDEO_ONLY|WEBM_AUDIO_ONLY|MP4_VIDEO_ONLY|MP4_AUDIO_ONLY|JPEG_VIDEO_ONLY|KURENTO_SPLIT_RECORDER] ("+_+")")}var kurentoClient=require("kurento-client");module.exports=checkMediaProfileSpecType;
},{"kurento-client":"kurento-client"}],103:[function(require,module,exports){
function SDES(e){if(!(this instanceof SDES))return new SDES(e);e=e||{},checkType("String","sDESDict.key",e.key),checkType("CryptoSuite","sDESDict.crypto",e.crypto),SDES.super_.call(this,e),Object.defineProperties(this,{key:{writable:!0,enumerable:!0,value:e.key},crypto:{writable:!0,enumerable:!0,value:e.crypto}})}function checkSDES(e,r){if(!(r instanceof SDES))throw ChecktypeError(e,SDES,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("kurento-client-core").complexTypes.ComplexType;inherits(SDES,ComplexType),Object.defineProperties(SDES.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"SDES"}}),module.exports=SDES,SDES.check=checkSDES;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],104:[function(require,module,exports){
function VideoInfo(e){if(!(this instanceof VideoInfo))return new VideoInfo(e);e=e||{},checkType("boolean","videoInfoDict.isSeekable",e.isSeekable,{required:!0}),checkType("int64","videoInfoDict.seekableInit",e.seekableInit,{required:!0}),checkType("int64","videoInfoDict.seekableEnd",e.seekableEnd,{required:!0}),checkType("int64","videoInfoDict.duration",e.duration,{required:!0}),VideoInfo.super_.call(this,e),Object.defineProperties(this,{isSeekable:{writable:!0,enumerable:!0,value:e.isSeekable},seekableInit:{writable:!0,enumerable:!0,value:e.seekableInit},seekableEnd:{writable:!0,enumerable:!0,value:e.seekableEnd},duration:{writable:!0,enumerable:!0,value:e.duration}})}function checkVideoInfo(e,i){if(!(i instanceof VideoInfo))throw ChecktypeError(e,VideoInfo,i)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,ComplexType=require("kurento-client-core").complexTypes.ComplexType;inherits(VideoInfo,ComplexType),Object.defineProperties(VideoInfo.prototype,{__module__:{enumerable:!0,value:"kurento"},__type__:{enumerable:!0,value:"VideoInfo"}}),module.exports=VideoInfo,VideoInfo.check=checkVideoInfo;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],105:[function(require,module,exports){
var CertificateKeyType=require("./CertificateKeyType"),CryptoSuite=require("./CryptoSuite"),IceCandidate=require("./IceCandidate"),IceCandidatePair=require("./IceCandidatePair"),IceComponentState=require("./IceComponentState"),IceConnection=require("./IceConnection"),MediaProfileSpecType=require("./MediaProfileSpecType"),SDES=require("./SDES"),VideoInfo=require("./VideoInfo");exports.CertificateKeyType=CertificateKeyType,exports.CryptoSuite=CryptoSuite,exports.IceCandidate=IceCandidate,exports.IceCandidatePair=IceCandidatePair,exports.IceComponentState=IceComponentState,exports.IceConnection=IceConnection,exports.MediaProfileSpecType=MediaProfileSpecType,exports.SDES=SDES,exports.VideoInfo=VideoInfo;
},{"./CertificateKeyType":96,"./CryptoSuite":97,"./IceCandidate":98,"./IceCandidatePair":99,"./IceComponentState":100,"./IceConnection":101,"./MediaProfileSpecType":102,"./SDES":103,"./VideoInfo":104}],106:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function FaceOverlayFilter(){FaceOverlayFilter.super_.call(this)}function checkFaceOverlayFilter(e,r){if(!(r instanceof FaceOverlayFilter))throw ChecktypeError(e,FaceOverlayFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Filter=require("kurento-client-core").abstracts.Filter;inherits(FaceOverlayFilter,Filter),FaceOverlayFilter.prototype.setOverlayedImage=function(e,r,t,i,n,a){var c=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","uri",e,{required:!0}),checkType("float","offsetXPercent",r,{required:!0}),checkType("float","offsetYPercent",t,{required:!0}),checkType("float","widthPercent",i,{required:!0}),checkType("float","heightPercent",n,{required:!0});var o={uri:e,offsetXPercent:r,offsetYPercent:t,widthPercent:i,heightPercent:n};return a=(a||noop).bind(this),disguise(this._invoke(c,"setOverlayedImage",o,a),this)},FaceOverlayFilter.prototype.unsetOverlayedImage=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"unsetOverlayedImage",e),this)},FaceOverlayFilter.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},FaceOverlayFilter.events=Filter.events,module.exports=FaceOverlayFilter,FaceOverlayFilter.check=checkFaceOverlayFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],107:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function GStreamerFilter(){GStreamerFilter.super_.call(this)}function checkGStreamerFilter(e,r){if(!(r instanceof GStreamerFilter))throw ChecktypeError(e,GStreamerFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Filter=require("kurento-client-core").abstracts.Filter;inherits(GStreamerFilter,Filter),GStreamerFilter.prototype.getCommand=function(e){var r=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;return void 0==e&&!0,arguments.length||(e=void 0),e=(e||noop).bind(this),disguise(this._invoke(r,"getCommand",e),this)},GStreamerFilter.constructorParams={command:{type:"String",required:!0},filterType:{type:"kurento.FilterType"},mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},GStreamerFilter.events=Filter.events,module.exports=GStreamerFilter,GStreamerFilter.check=checkGStreamerFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],108:[function(require,module,exports){
function noop(e,r){return e&&console.trace(e),r}function ImageOverlayFilter(){ImageOverlayFilter.super_.call(this)}function checkImageOverlayFilter(e,r){if(!(r instanceof ImageOverlayFilter))throw ChecktypeError(e,ImageOverlayFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,checkType=kurentoClient.checkType,ChecktypeError=checkType.ChecktypeError,Transaction=kurentoClient.TransactionsManager.Transaction,Filter=require("kurento-client-core").abstracts.Filter;inherits(ImageOverlayFilter,Filter),ImageOverlayFilter.prototype.addImage=function(e,r,t,i,n,a,c,o,l){var s=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","id",e,{required:!0}),checkType("String","uri",r,{required:!0}),checkType("float","offsetXPercent",t,{required:!0}),checkType("float","offsetYPercent",i,{required:!0}),checkType("float","widthPercent",n,{required:!0}),checkType("float","heightPercent",a,{required:!0}),checkType("boolean","keepAspectRatio",c,{required:!0}),checkType("boolean","center",o,{required:!0});var p={id:e,uri:r,offsetXPercent:t,offsetYPercent:i,widthPercent:n,heightPercent:a,keepAspectRatio:c,center:o};return l=(l||noop).bind(this),disguise(this._invoke(s,"addImage",p,l),this)},ImageOverlayFilter.prototype.removeImage=function(e,r){var t=arguments[0]instanceof Transaction?Array.prototype.shift.apply(arguments):void 0;checkType("String","id",e,{required:!0});var i={id:e};return r=(r||noop).bind(this),disguise(this._invoke(t,"removeImage",i,r),this)},ImageOverlayFilter.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},ImageOverlayFilter.events=Filter.events,module.exports=ImageOverlayFilter,ImageOverlayFilter.check=checkImageOverlayFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],109:[function(require,module,exports){
function ZBarFilter(){ZBarFilter.super_.call(this)}function checkZBarFilter(e,r){if(!(r instanceof ZBarFilter))throw ChecktypeError(e,ZBarFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Filter=require("kurento-client-core").abstracts.Filter;inherits(ZBarFilter,Filter),ZBarFilter.constructorParams={mediaPipeline:{type:"kurento.MediaPipeline",required:!0}},ZBarFilter.events=Filter.events.concat(["CodeFound"]),module.exports=ZBarFilter,ZBarFilter.check=checkZBarFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],110:[function(require,module,exports){
function OpenCVFilter(){OpenCVFilter.super_.call(this)}function checkOpenCVFilter(e,r){if(!(r instanceof OpenCVFilter))throw ChecktypeError(e,OpenCVFilter,r)}var inherits=require("inherits"),kurentoClient=require("kurento-client"),disguise=kurentoClient.disguise,ChecktypeError=kurentoClient.checkType.ChecktypeError,Filter=require("kurento-client-core").abstracts.Filter;inherits(OpenCVFilter,Filter),OpenCVFilter.constructorParams={},OpenCVFilter.events=Filter.events,module.exports=OpenCVFilter,OpenCVFilter.check=checkOpenCVFilter;
},{"inherits":"inherits","kurento-client":"kurento-client","kurento-client-core":"kurento-client-core"}],111:[function(require,module,exports){
var OpenCVFilter=require("./OpenCVFilter");exports.OpenCVFilter=OpenCVFilter;
},{"./OpenCVFilter":110}],112:[function(require,module,exports){
function Mapper(){var r={};this.forEach=function(e){for(var i in r){var t=r[i];for(var o in t)e(t[o])}},this.get=function(e,i){var t=r[i];if(void 0!=t)return t[e]},this.remove=function(e,i){var t=r[i];if(void 0!=t){delete t[e];for(var o in t)return!1;delete r[i]}},this.set=function(e,i,t){if(void 0==e)return this.remove(i,t);var o=r[t];void 0==o&&(r[t]=o={}),o[i]=e}}Mapper.prototype.pop=function(r,e){var i=this.get(r,e);if(void 0!=i)return this.remove(r,e),i},module.exports=Mapper;
},{}],113:[function(require,module,exports){
var JsonRpcClient=require("./jsonrpcclient");exports.JsonRpcClient=JsonRpcClient;
},{"./jsonrpcclient":114}],114:[function(require,module,exports){
function JsonRpcClient(e){function n(){Logger.debug("notReconnectIfNumLessThan = "+c+" (old="+s+")"),s=c}function r(){if(u){var r=null;0!=c&&c!=s||(r={interval:e.heartbeat||PING_INTERVAL}),c++,i.send("ping",r,function(e){return function(r,o){r&&(Logger.debug("Error in ping request #"+e+" ("+r.message+")"),e>s&&(u=!1,n(),Logger.debug("Server did not respond to ping message #"+e+". Reconnecting... "),O.reconnectWs()))}}(c))}else Logger.debug("Trying to send ping, but ping is not enabled")}function o(){N||(Logger.debug("Starting ping (if configured)"),N=!0,void 0!=e.heartbeat&&(t=setInterval(r,e.heartbeat),r()))}var t,i=this,g=e.ws,s=-1,c=0,u=!0,N=!1,a=DISCONNECTED,d=g.onreconnecting,C=g.onreconnected,E=g.onconnected,l=g.onerror;e.rpc.pull=function(e,n){n.reply(null,"push")},g.onreconnecting=function(){if(Logger.debug("--------- ONRECONNECTING -----------"),a===RECONNECTING)return void Logger.error("Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it");a=RECONNECTING,d&&d()},g.onreconnected=function(){if(Logger.debug("--------- ONRECONNECTED -----------"),a===CONNECTED)return void Logger.error("Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it");a=CONNECTED,u=!0,n(),o(),C&&C()},g.onconnected=function(){if(Logger.debug("--------- ONCONNECTED -----------"),a===CONNECTED)return void Logger.error("Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it");a=CONNECTED,u=!0,o(),E&&E()},g.onerror=function(e){Logger.debug("--------- ONERROR -----------"),a=DISCONNECTED,l&&l(e)};var O=new WebSocketWithReconnection(g);Logger.debug("Connecting websocket to URI: "+g.uri);var R={request_timeout:e.rpc.requestTimeout,ping_request_timeout:e.rpc.heartbeatRequestTimeout},f=new RpcBuilder(RpcBuilder.packers.JsonRPC,R,O,function(n){Logger.debug("Received request: "+JSON.stringify(n));try{var r=e.rpc[n.method];void 0===r?Logger.error("Method "+n.method+" not registered in client"):r(n.params,n)}catch(e){Logger.error("Exception processing request: "+JSON.stringify(n)),Logger.error(e)}});this.send=function(e,n,r){"ping"!==e&&Logger.debug("Request: method:"+e+" params:"+JSON.stringify(n));var o=Date.now();f.encode(e,n,function(t,i){if(t){try{Logger.error("ERROR:"+t.message+" in Request: method:"+e+" params:"+JSON.stringify(n)+" request:"+t.request),t.data&&Logger.error("ERROR DATA:"+JSON.stringify(t.data))}catch(e){}t.requestTime=o}r&&(void 0!=i&&"pong"!==i.value&&Logger.debug("Response: "+JSON.stringify(i)),r(t,i))})},this.close=function(){Logger.debug("Closing jsonRpcClient explicitly by client"),void 0!=t&&(Logger.debug("Clearing ping interval"),clearInterval(t)),N=!1,u=!1,e.sendCloseMessage?(Logger.debug("Sending close message"),this.send("closeSession",null,function(e,n){e&&Logger.error("Error sending close message: "+JSON.stringify(e)),O.close()})):O.close()},this.forceClose=function(e){O.forceClose(e)},this.reconnect=function(){O.reconnectWs()}}var RpcBuilder=require("../.."),WebSocketWithReconnection=require("./transports/webSocketWithReconnection");Date.now=Date.now||function(){return+new Date};var PING_INTERVAL=5e3,RECONNECTING="RECONNECTING",CONNECTED="CONNECTED",DISCONNECTED="DISCONNECTED",Logger=console;module.exports=JsonRpcClient;
},{"../..":117,"./transports/webSocketWithReconnection":116}],115:[function(require,module,exports){
var WebSocketWithReconnection=require("./webSocketWithReconnection");exports.WebSocketWithReconnection=WebSocketWithReconnection;
},{"./webSocketWithReconnection":116}],116:[function(require,module,exports){
(function (global){
"use strict";function WebSocketWithReconnection(e){function o(e,o){try{Logger.debug("WebSocket connected to "+o)}catch(e){Logger.error(e)}}function n(o,c){if(Logger.debug("reconnectToSameUri (attempt #"+c+", max="+o+")"),1===c){if(u)return void Logger.warn("Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.");u=!0,e.onreconnecting&&e.onreconnecting()}d?t(o,c,g):e.newWsUriOnReconnection?e.newWsUriOnReconnection(function(e,r){e?(Logger.debug(e),setTimeout(function(){n(o,c+1)},RETRY_TIME_MS)):t(o,c,r)}):t(o,c,g)}function t(t,i,d){Logger.debug("Reconnection attempt #"+i),r.close(),g=d||g;var b;b=s?new SockJS(g):new WebSocket(g),b.onopen=function(){Logger.debug("Reconnected after "+i+" attempts..."),o(b,g),u=!1,c(),e.onreconnected()&&e.onreconnected(),b.onclose=f};var S=function(o){Logger.warn("Reconnection error: ",o),i===t?e.ondisconnect&&e.ondisconnect():setTimeout(function(){n(t,i+1)},RETRY_TIME_MS)};b.onerror=S,r=b}var c,r,i=!1,g=e.uri,s=e.useSockJS,u=!1,d=!1;r=s?new SockJS(g):new WebSocket(g),r.onopen=function(){o(r,g),e.onconnected&&e.onconnected()},r.onerror=function(o){Logger.error("Could not connect to "+g+" (invoking onerror if defined)",o),e.onerror&&e.onerror(o)};var f=function(){r.readyState===CLOSED?i?Logger.debug("Connection closed by user"):(Logger.debug("Connection closed unexpectecly. Reconnecting..."),n(MAX_RETRIES,1)):Logger.debug("Close callback from previous websocket. Ignoring it")};r.onclose=f,this.close=function(){i=!0,r.close()},this.forceClose=function(e){if(Logger.debug("Testing: Force WebSocket close"),e){Logger.debug("Testing: Change wsUri for "+e+" millis to simulate net failure");var o=g;g="wss://21.234.12.34.4:443/",d=!0,setTimeout(function(){Logger.debug("Testing: Recover good wsUri "+o),g=o,d=!1},e)}r.close()},this.reconnectWs=function(){Logger.debug("reconnectWs"),n(MAX_RETRIES,1,g)},this.send=function(e){r.send(e)},this.addEventListener=function(e,o){(c=function(){r.addEventListener(e,o)})()}}var BrowserWebSocket=global.WebSocket||global.MozWebSocket,Logger=console,WebSocket=BrowserWebSocket;if(!WebSocket&&"undefined"==typeof window)try{WebSocket=require("ws")}catch(e){}var MAX_RETRIES=2e3,RETRY_TIME_MS=3e3,CONNECTING=0,OPEN=1,CLOSING=2,CLOSED=3;module.exports=WebSocketWithReconnection;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{"ws":154}],117:[function(require,module,exports){
function unifyResponseMethods(e){if(!e)return{};for(var t in e){var r=e[t];"string"==typeof r&&(e[t]={response:r})}return e}function unifyTransport(e){if(e){if(e instanceof Function)return{send:e};if(e.send instanceof Function)return e;if(e.postMessage instanceof Function)return e.send=e.postMessage,e;if(e.write instanceof Function)return e.send=e.write,e;if(void 0===e.onmessage&&!(e.pause instanceof Function))throw new SyntaxError("Transport is not a function nor a valid object")}}function RpcNotification(e,t){defineProperty_IE8?(this.method=e,this.params=t):(Object.defineProperty(this,"method",{value:e,enumerable:!0}),Object.defineProperty(this,"params",{value:t,enumerable:!0}))}function RpcBuilder(e,t,r,n){function i(e){p.decode(e.data||e)}function o(e,t,r){var n={message:e,timeout:setTimeout(function(){T.remove(t,r)},v)};T.set(n,t,r)}function s(e,t){var r=setTimeout(function(){E.remove(e,t)},h);E.set(r,e,t)}function a(t,r,n,i,s){RpcNotification.call(this,t,r),this.getTransport=function(){return s},this.setTransport=function(e){s=unifyTransport(e)},defineProperty_IE8||Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)});var a=T.get(n,i);s||p.getTransport()||(defineProperty_IE8?this.duplicated=Boolean(a):Object.defineProperty(this,"duplicated",{value:Boolean(a)}));var c=f[t];this.pack=e.pack.bind(e,this,n),this.reply=function(t,r,s){if(t instanceof Function||t&&t.send instanceof Function){if(void 0!=r)throw new SyntaxError("There can't be parameters after callback");s=t,r=null,t=void 0}else if(r instanceof Function||r&&r.send instanceof Function){if(void 0!=s)throw new SyntaxError("There can't be parameters after callback");s=r,r=null}s=unifyTransport(s),a&&clearTimeout(a.timeout),void 0!=i&&(t&&(t.dest=i),r&&(r.dest=i));var f;if(t||void 0!=r){if(void 0!=p.peerID&&(t?t.from=p.peerID:r.from=p.peerID),c)if(void 0==c.error&&t)f={error:t};else{var u=t?c.error:c.response;f={method:u,params:t||r}}else f={error:t,result:r};f=e.pack(f,n)}else f=a?a.message:e.pack({result:null},n);return o(f,n,i),s=s||this.getTransport()||p.getTransport(),s?s.send(f):f}}function c(e){var t=w[e];if(t){delete w[e];var r=y.pop(t.id,t.dest);r&&(clearTimeout(r.timeout),s(t.id,t.dest))}}var p=this;if(!e)throw new SyntaxError("Packer is not defined");if(!e.pack||!e.unpack)throw new SyntaxError("Packer is invalid");var f=unifyResponseMethods(e.responseMethods);if(t instanceof Function){if(void 0!=r)throw new SyntaxError("There can't be parameters after onRequest");n=t,r=void 0,t=void 0}if(t&&t.send instanceof Function){if(r&&!(r instanceof Function))throw new SyntaxError("Only a function can be after transport");n=r,r=t,t=void 0}if(r instanceof Function){if(void 0!=n)throw new SyntaxError("There can't be parameters after onRequest");n=r,r=void 0}if(r&&r.send instanceof Function&&n&&!(n instanceof Function))throw new SyntaxError("Only a function can be after transport");t=t||{},EventEmitter.call(this),n&&this.on("request",n),defineProperty_IE8?this.peerID=t.peerID:Object.defineProperty(this,"peerID",{value:t.peerID});var u=t.max_retries||0;this.getTransport=function(){return r},this.setTransport=function(e){r&&(r.removeEventListener?r.removeEventListener("message",i):r.removeListener&&r.removeListener("data",i)),e&&(e.addEventListener?e.addEventListener("message",i):e.addListener&&e.addListener("data",i)),r=unifyTransport(e)},defineProperty_IE8||Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)}),this.setTransport(r);var d=t.request_timeout||BASE_TIMEOUT,l=t.ping_request_timeout||d,v=t.response_timeout||BASE_TIMEOUT,h=t.duplicates_timeout||BASE_TIMEOUT,m=0,y=new Mapper,T=new Mapper,E=new Mapper,w={};inherits(a,RpcNotification),this.cancel=function(e){if(e)return c(e);for(var e in w)c(e)},this.close=function(){var e=this.getTransport();e&&e.close&&e.close(),this.cancel(),E.forEach(clearTimeout),T.forEach(function(e){clearTimeout(e.timeout)})},this.encode=function(t,r,n,i,o){function s(e,t){p.cancel(h),o(e,t)}function a(e){var r="ping"===t?l:d;return g.timeout=setTimeout(v,r*Math.pow(2,b++)),w[h]={id:T,dest:n},y.set(g,T,n),e=e||I||p.getTransport(),e?e.send(h):h}function c(e){e=unifyTransport(e),console.warn(b+" retry for request message:",h);var t=E.pop(T,n);return clearTimeout(t),a(e)}function v(){if(b1)for(var r=1;r1&&(r=t[0]+"@",e=t[1]),e=e.replace(S,"."),r+n(e.split("."),o).join(".")}function r(e){for(var o,n,t=[],r=0,u=e.length;r=55296&&o<=56319&&r65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:b}function f(e,o){return e+22+75*(e<26)-((0!=o)<<5)}function c(e,o,n){var t=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;t+=b)e=M(e/L);return M(t+(L+1)*e/(e+m))}function l(e){var n,t,r,f,l,s,d,p,a,h,v=[],g=e.length,w=0,m=I,j=A;for(t=e.lastIndexOf(E),t<0&&(t=0),r=0;r=128&&o("not-basic"),v.push(e.charCodeAt(r));for(f=t>0?t+1:0;f=g&&o("invalid-input"),p=i(e.charCodeAt(f++)),(p>=b||p>M((x-w)/s))&&o("overflow"),w+=p*s,a=d<=j?y:d>=j+C?C:d-j,!(pM(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,t,u,i,l,s,d,p,a,h,v,g,w,m,j,F=[];for(e=r(e),g=e.length,n=I,t=0,l=A,s=0;s=n&&vM((x-t)/w)&&o("overflow"),t+=(d-n)*w,n=d,s=0;sx&&o("overflow"),v==n){for(p=t,a=b;h=a<=l?y:a>=l+C?C:a-l,!(p= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:r,encode:u},decode:l,encode:s,toASCII:p,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(a&&h)if(module.exports==a)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(a[w]=g[w]);else e.punycode=g}(this);
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{}],124:[function(require,module,exports){
"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;y=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
},{}],125:[function(require,module,exports){
"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n0?("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===Buffer.prototype||(t=_uint8ArrayToBuffer(t)),n?i.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):addChunk(e,i,t,!0):i.ended?e.emit("error",new Error("stream.push() after EOF")):(i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?addChunk(e,i,t,!1):maybeReadMore(e,i)):addChunk(e,i,t,!1))):n||(i.reading=!1)}return needMoreData(i)}function addChunk(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&emitReadable(e)),maybeReadMore(e,t)}function chunkInvalid(e,t){var r;return _isUint8Array(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=MAX_HWM?e=MAX_HWM:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function howMuchToRead(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=computeNewHighWaterMark(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function onEofChunk(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,emitReadable(e)}}function emitReadable(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(debug("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?pna.nextTick(emitReadable_,e):emitReadable_(e))}function emitReadable_(e){debug("emit readable"),e.emit("readable"),flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,pna.nextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=fromListPartial(e,t.buffer,t.decoder),r}function fromListPartial(e,t,r){var n;return ei.length?i.length:e;if(d===i.length?a+=i:a+=i.slice(0,e),0===(e-=d)){d===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(d));break}++n}return t.length-=n,a}function copyFromBuffer(e,t){var r=Buffer.allocUnsafe(e),n=t.head,a=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var i=n.data,d=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,d),0===(e-=d)){d===i.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(d));break}++a}return t.length-=a,r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,pna.nextTick(endReadableNT,t,e))}function endReadableNT(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function indexOf(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return debug("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(0===(e=howMuchToRead(e,t))&&t.ended)return 0===t.length&&endReadable(this),null;var n=t.needReadable;debug("need readable",n),(0===t.length||t.length-e0?fromList(e,t):null,null===a?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&endReadable(this)),null!==a&&this.emit("data",a),a},Readable.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(e,t){function r(e,t){debug("onunpipe"),e===s&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,a())}function n(){debug("onend"),e.end()}function a(){debug("cleanup"),e.removeListener("close",o),e.removeListener("finish",u),e.removeListener("drain",b),e.removeListener("error",d),e.removeListener("unpipe",r),s.removeListener("end",n),s.removeListener("end",l),s.removeListener("data",i),c=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||b()}function i(t){debug("ondata"),g=!1,!1!==e.write(t)||g||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&-1!==indexOf(h.pipes,e))&&!c&&(debug("false write response, pause",s._readableState.awaitDrain),s._readableState.awaitDrain++,g=!0),s.pause())}function d(t){debug("onerror",t),l(),e.removeListener("error",d),0===EElistenerCount(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",u),l()}function u(){debug("onfinish"),e.removeListener("close",o),l()}function l(){debug("unpipe"),s.unpipe(e)}var s=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,debug("pipe count=%d opts=%j",h.pipesCount,t);var f=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr,p=f?n:l;h.endEmitted?pna.nextTick(p):s.once("end",p),e.on("unpipe",r);var b=pipeOnDrain(s);e.on("drain",b);var c=!1,g=!1;return s.on("data",i),prependListener(e,"error",d),e.once("close",o),e.once("finish",u),e.emit("pipe",s),h.flowing||(debug("pipe resume"),s.resume()),e},Readable.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?setImmediate:pna.nextTick,Duplex;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")},Stream=require("./internal/streams/stream"),Buffer=require("safe-buffer").Buffer,OurUint8Array=global.Uint8Array||function(){},destroyImpl=require("./internal/streams/destroy");util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){return!!realHasInstance.call(this,e)||this===Writable&&(e&&e._writableState instanceof WritableState)}})):realHasInstance=function(e){return e instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&_isUint8Array(e);return o&&!Buffer.isBuffer(e)&&(e=_uint8ArrayToBuffer(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=nop),i.ended?writeAfterEnd(this,r):(o||validChunk(this,i,e,r))&&(i.pendingcb++,n=writeOrBuffer(this,i,o,e,t,r)),n},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||endWritable(this,i,r)},Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(e,t){this.end(),t(e)};
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],require("timers").setImmediate)

},{"./_stream_duplex":128,"./internal/streams/destroy":134,"./internal/streams/stream":135,"_process":122,"buffer":17,"core-util-is":18,"inherits":"inherits","process-nextick-args":121,"safe-buffer":136,"timers":146,"util-deprecate":149}],133:[function(require,module,exports){
"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function copyBuffer(t,e,i){t.copy(e,i)}var Buffer=require("safe-buffer").Buffer,util=require("util");module.exports=function(){function t(){_classCallCheck(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i},t.prototype.concat=function(t){if(0===this.length)return Buffer.alloc(0);if(1===this.length)return this.head.data;for(var e=Buffer.allocUnsafe(t>>>0),i=this.head,n=0;i;)copyBuffer(i.data,e,n),n+=i.data.length,i=i.next;return e},t}(),util&&util.inspect&&util.inspect.custom&&(module.exports.prototype[util.inspect.custom]=function(){var t=util.inspect({length:this.length});return this.constructor.name+" "+t});
},{"safe-buffer":136,"util":16}],134:[function(require,module,exports){
"use strict";function destroy(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return a||i?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||pna.nextTick(emitErrorNT,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(pna.nextTick(emitErrorNT,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}),this)}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(t,e){t.emit("error",e)}var pna=require("process-nextick-args");module.exports={destroy:destroy,undestroy:undestroy};
},{"process-nextick-args":121}],135:[function(require,module,exports){
module.exports=require("events").EventEmitter;
},{"events":21}],136:[function(require,module,exports){
(function (Buffer){
function copyProps(f,r){for(var e in f)r[e]=f[e]}function SafeBuffer(f,r,e){return Buffer(f,r,e)}var buffer=require("buffer"),Buffer=buffer.Buffer;Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(f,r,e){if("number"==typeof f)throw new TypeError("Argument must not be a number");return Buffer(f,r,e)},SafeBuffer.alloc=function(f,r,e){if("number"!=typeof f)throw new TypeError("Argument must be a number");var u=Buffer(f);return void 0!==r?"string"==typeof e?u.fill(r,e):u.fill(r):u.fill(0),u},SafeBuffer.allocUnsafe=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return Buffer(f)},SafeBuffer.allocUnsafeSlow=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(f)};
}).call(this,require("buffer").Buffer)

},{"buffer":17}],137:[function(require,module,exports){
(function (Buffer){
"use strict";function _normalizeEncoding(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function normalizeEncoding(t){var e=_normalizeEncoding(t);if("string"!=typeof e&&(Buffer.isEncoding===isEncoding||!isEncoding(t)))throw new Error("Unknown encoding: "+t);return e||t}function StringDecoder(t){this.encoding=normalizeEncoding(t);var e;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,e=4;break;case"utf8":this.fillLast=utf8FillLast,e=4;break;case"base64":this.text=base64Text,this.end=base64End,e=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(e)}function utf8CheckByte(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function utf8CheckIncomplete(t,e,s){var i=e.length-1;if(i=0?(n>0&&(t.lastNeed=n-1),n):--i=0?(n>0&&(t.lastNeed=n-2),n):--i=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0)}function utf8CheckExtraBytes(t,e,s){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}function utf8FillLast(t){var e=this.lastTotal-this.lastNeed,s=utf8CheckExtraBytes(this,t,e);return void 0!==s?s:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function utf8Text(t,e){var s=utf8CheckIncomplete(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=s;var i=t.length-(s-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function utf8End(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function utf16Text(t,e){if((t.length-e)%2==0){var s=t.toString("utf16le",e);if(s){var i=s.charCodeAt(s.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function utf16End(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,s)}return e}function base64Text(t,e){var s=(t.length-e)%3;return 0===s?t.toString("base64",e):(this.lastNeed=3-s,this.lastTotal=3,1===s?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-s))}function base64End(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function simpleWrite(t){return t.toString(this.encoding)}function simpleEnd(t){return t&&t.length?this.write(t):""}var Buffer=require("safe-buffer").Buffer,isEncoding=Buffer.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(t){if(0===t.length)return"";var e,s;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},exports.setImmediate="function"==typeof setImmediate?setImmediate:function(e){var t=nextImmediateId++,i=!(arguments.length<2)&&slice.call(arguments,1);return immediateIds[t]=!0,nextTick(function(){immediateIds[t]&&(i?e.apply(null,i):e.call(null),exports.clearImmediate(t))}),t},exports.clearImmediate="function"==typeof clearImmediate?clearImmediate:function(e){delete immediateIds[e]};
}).call(this,require("timers").setImmediate,require("timers").clearImmediate)

},{"process/browser.js":122,"timers":146}],147:[function(require,module,exports){
"use strict";function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&util.isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return util.isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}var punycode=require("punycode"),util=require("./util");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!util.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t.indexOf("?"),r=-1!==h&&h127?q+="x":q+=b[O];if(!q.match(hostnamePartPattern)){var x=P.slice(0,f),U=P.slice(f+1),C=b.match(hostnamePartStart);C&&(x.push(C[1]),U.unshift(C[2])),U.length&&(n="/"+U.join(".")+n),this.hostname=x.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=punycode.toASCII(this.hostname));var A=this.port?":"+this.port:"",w=this.hostname||"";this.host=w+A,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!unsafeProtocol[u])for(var f=0,d=autoEscape.length;f0)&&e.host.split("@");q&&(e.auth=q.shift(),e.host=e.hostname=q.shift())}return e.search=t.search,e.query=t.query,util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!d.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var O=d.slice(-1)[0],j=(e.host||t.host||d.length>1)&&("."===O||".."===O)||""===O,x=0,U=d.length;U>=0;U--)O=d[U],"."===O?d.splice(U,1):".."===O?(d.splice(U,1),x++):x&&(d.splice(U,1),x--);if(!y&&!P)for(;x--;x)d.unshift("..");!y||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),j&&"/"!==d.join("/").substr(-1)&&d.push("");var C=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(b){e.hostname=e.host=C?"":d.length?d.shift():"";var q=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@");q&&(e.auth=q.shift(),e.host=e.hostname=q.shift())}return y=y||e.host&&d.length,y&&!C&&d.unshift(""),d.length?e.pathname=d.join("/"):(e.pathname=null,e.path=null),util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
},{"./util":148,"punycode":123,"querystring":126}],148:[function(require,module,exports){
"use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}};
},{}],149:[function(require,module,exports){
(function (global){
function deprecate(r,e){function o(){if(!t){if(config("throwDeprecation"))throw new Error(e);config("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}if(config("noDeprecation"))return r;var t=!1;return o}function config(r){try{if(!global.localStorage)return!1}catch(r){return!1}var e=global.localStorage[r];return null!=e&&"true"===String(e).toLowerCase()}module.exports=deprecate;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{}],150:[function(require,module,exports){
module.exports=function(o){return o&&"object"==typeof o&&"function"==typeof o.copy&&"function"==typeof o.fill&&"function"==typeof o.readUInt8};
},{}],151:[function(require,module,exports){
(function (process,global){
function inspect(e,r){var t={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var c="",a=!1,l=["{","}"];if(isArray(r)&&(a=!0,l=["[","]"]),isFunction(r)){c=" [Function"+(r.name?": "+r.name:"")+"]"}if(isRegExp(r)&&(c=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(c=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(c=" "+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var p;return p=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(p,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s-1&&(u=o?u.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return"   "+e}).join("\n"))):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function reduceToSingleString(e,r,t){var n=0;return e.reduce(function(e,r){return n++,r.indexOf("\n")>=0&&n++,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n  ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(e){return"[Circular]"}default:return e}}),s=n[t];t-1&&n%1==0&&n<=xt}function d(n){return null!=n&&v(n.length)&&!y(n)}function m(){}function g(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function b(n,t){for(var e=-1,r=Array(n);++e-1&&n%1==0&&nu?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var i=Array(u);++r=r?n:K(n,t,e)}function Y(n,t){for(var e=n.length;e--&&Q(t,n[e],0)>-1;);return e}function Z(n,t){for(var e=-1,r=n.length;++e-1;);return e}function nn(n){return n.split("")}function tn(n){return me.test(n)}function en(n){return n.match(xe)||[]}function rn(n){return tn(n)?en(n):nn(n)}function un(n){return null==n?"":J(n)}function on(n,t,e){if((n=un(n))&&(e||void 0===t))return n.replace(Ee,"");if(!n||!(t=J(t)))return n;var r=rn(n),u=rn(t);return X(r,Z(r,u),Y(r,u)+1).join("")}function cn(n){return n=n.toString().replace(Fe,""),n=n.match(Ae)[2].replace(" ",""),n=n?n.split(Te):[],n=n.map(function(n){return on(n.replace(Be,""))})}function fn(n,t){var e={};C(n,function(n,t){function r(t,e){var r=G(u,function(n){return t[n]});r.push(e),a(n).apply(null,r)}var u,i=f(n),o=!i&&1===n.length||i&&0===n.length;if(Ut(n))u=n.slice(0,-1),n=n[n.length-1],e[t]=u.concat(u.length>0?r:n);else if(o)e[t]=n;else{if(u=cn(n),0===n.length&&!i&&0===u.length)throw new Error("autoInject task functions require explicit parameters.");i||u.pop(),e[t]=u.concat(r)}}),pe(e,t)}function an(){this.head=this.tail=null,this.length=0}function ln(n,t){n.length=1,n.head=n.tail=t}function sn(n,t,e){function r(n,t,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");if(s.started=!0,Ut(n)||(n=[n]),0===n.length&&s.idle())return ct(function(){s.drain()});for(var r=0,u=n.length;r0&&c.splice(i,1),u.callback.apply(u,arguments),null!=t&&s.error(t,u.data)}o<=s.concurrency-s.buffer&&s.unsaturated(),s.idle()&&s.drain(),s.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var i=a(n),o=0,c=[],f=!1,l=!1,s={_tasks:new an,concurrency:t,payload:e,saturated:m,unsaturated:m,buffer:t/4,empty:m,drain:m,error:m,started:!1,paused:!1,push:function(n,t){r(n,!1,t)},kill:function(){s.drain=m,s._tasks.empty()},unshift:function(n,t){r(n,!0,t)},remove:function(n){s._tasks.remove(n)},process:function(){if(!l){for(l=!0;!s.paused&&o2&&(i=t(arguments,1)),u[e]=i,r(n)})},function(n){r(n,u)})}function zn(n,t){qn(ie,n,t)}function Pn(n,t,e){qn(M(t),n,e)}function Vn(n,t){if(t=g(t||m),!Ut(n))return t(new TypeError("First argument to race must be an array of functions"));if(!n.length)return t();for(var e=0,r=n.length;er?1:0}var u=a(t);oe(n,function(n,t){u(n,function(e,r){if(e)return t(e);t(null,{value:n,criteria:r})})},function(n,t){if(n)return e(n);e(null,G(t.sort(r),An("value")))})}function Hn(n,t,e){var r=a(n);return ut(function(u,i){function o(){var t=n.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",e&&(r.info=e),f=!0,i(r)}var c,f=!1;u.push(function(){f||(i.apply(null,arguments),clearTimeout(c))}),c=setTimeout(o,t),r.apply(null,u)})}function Jn(n,t,e,r){for(var u=-1,i=yr(hr((t-n)/(e||1)),0),o=Array(i);i--;)o[r?i:++u]=n,n+=e;return o}function Kn(n,t,e,r){var u=a(e);fe(Jn(0,n,1),t,u,r)}function Xn(n,t,e,r){arguments.length<=3&&(r=e,e=t,t=Ut(n)?[]:{}),r=g(r||m);var u=a(e);ie(n,function(n,e,r){u(t,n,e,r)},function(n){r(n,t)})}function Yn(n,e){var r,u=null;e=e||m,We(n,function(n,e){a(n)(function(n,i){r=arguments.length>2?t(arguments,1):i,u=n,e(!n)})},function(){e(u,r)})}function Zn(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function nt(n,e,r){r=_(r||m);var u=a(e);if(!n())return r(null);var i=function(e){if(e)return r(e);if(n())return u(i);var o=t(arguments,1);r.apply(null,[null].concat(o))};u(i)}function tt(n,t,e){nt(function(){return!n.apply(this,arguments)},t,e)}var et,rt=function(n){var e=t(arguments,1);return function(){var r=t(arguments);return n.apply(null,e.concat(r))}},ut=function(n){return function(){var e=t(arguments),r=e.pop();n.call(this,e,r)}},it="function"==typeof setImmediate&&setImmediate,ot="object"==typeof process&&"function"==typeof process.nextTick;et=it?setImmediate:ot?process.nextTick:r;var ct=u(et),ft="function"==typeof Symbol,at="object"==typeof global&&global&&global.Object===Object&&global,lt="object"==typeof self&&self&&self.Object===Object&&self,st=at||lt||Function("return this")(),pt=st.Symbol,ht=Object.prototype,yt=ht.hasOwnProperty,vt=ht.toString,dt=pt?pt.toStringTag:void 0,mt=Object.prototype,gt=mt.toString,bt="[object Null]",jt="[object Undefined]",St=pt?pt.toStringTag:void 0,kt="[object AsyncFunction]",Lt="[object Function]",Ot="[object GeneratorFunction]",wt="[object Proxy]",xt=9007199254740991,Et={},At="function"==typeof Symbol&&Symbol.iterator,Tt=function(n){return At&&n[At]&&n[At]()},Bt="[object Arguments]",Ft=Object.prototype,It=Ft.hasOwnProperty,_t=Ft.propertyIsEnumerable,Mt=S(function(){return arguments}())?S:function(n){return j(n)&&It.call(n,"callee")&&!_t.call(n,"callee")},Ut=Array.isArray,qt="object"==typeof n&&n&&!n.nodeType&&n,zt=qt&&"object"==typeof module&&module&&!module.nodeType&&module,Pt=zt&&zt.exports===qt,Vt=Pt?st.Buffer:void 0,Dt=Vt?Vt.isBuffer:void 0,Rt=Dt||k,Ct=9007199254740991,$t=/^(?:0|[1-9]\d*)$/,Wt={};Wt["[object Float32Array]"]=Wt["[object Float64Array]"]=Wt["[object Int8Array]"]=Wt["[object Int16Array]"]=Wt["[object Int32Array]"]=Wt["[object Uint8Array]"]=Wt["[object Uint8ClampedArray]"]=Wt["[object Uint16Array]"]=Wt["[object Uint32Array]"]=!0,Wt["[object Arguments]"]=Wt["[object Array]"]=Wt["[object ArrayBuffer]"]=Wt["[object Boolean]"]=Wt["[object DataView]"]=Wt["[object Date]"]=Wt["[object Error]"]=Wt["[object Function]"]=Wt["[object Map]"]=Wt["[object Number]"]=Wt["[object Object]"]=Wt["[object RegExp]"]=Wt["[object Set]"]=Wt["[object String]"]=Wt["[object WeakMap]"]=!1;var Nt="object"==typeof n&&n&&!n.nodeType&&n,Qt=Nt&&"object"==typeof module&&module&&!module.nodeType&&module,Gt=Qt&&Qt.exports===Nt,Ht=Gt&&at.process,Jt=function(){try{var n=Qt&&Qt.require&&Qt.require("util").types;return n||Ht&&Ht.binding&&Ht.binding("util")}catch(n){}}(),Kt=Jt&&Jt.isTypedArray,Xt=Kt?function(n){return function(t){return n(t)}}(Kt):O,Yt=Object.prototype,Zt=Yt.hasOwnProperty,ne=Object.prototype,te=function(n,t){return function(e){return n(t(e))}}(Object.keys,Object),ee=Object.prototype,re=ee.hasOwnProperty,ue=q(U,1/0),ie=function(n,t,e){(d(n)?z:ue)(n,a(t),e)},oe=P(V),ce=l(oe),fe=D(V),ae=q(fe,1),le=l(ae),se=function(n){return function(t,e,r){for(var u=-1,i=Object(t),o=r(t),c=o.length;c--;){var f=o[n?c:++u];if(!1===e(i[f],f,i))break}return t}}(),pe=function(n,e,r){function u(n,t){b.push(function(){f(n,t)})}function i(){if(0===b.length&&0===y)return r(null,h);for(;b.length&&y2&&(u=t(arguments,1)),e){var i={};C(h,function(n,t){i[t]=n}),i[n]=u,v=!0,d=Object.create(null),r(e,i)}else h[n]=u,c(n)});y++;var i=a(e[e.length-1]);e.length>1?i(h,u):i(u)}}function l(t){var e=[];return C(n,function(n,r){Ut(n)&&Q(n,t,0)>=0&&e.push(r)}),e}"function"==typeof e&&(r=e,e=null),r=g(r||m);var s=A(n),p=s.length;if(!p)return r(null);e||(e=p);var h={},y=0,v=!1,d=Object.create(null),b=[],j=[],S={};C(n,function(t,e){if(!Ut(t))return u(e,[t]),void j.push(e);var r=t.slice(0,t.length-1),i=r.length;if(0===i)return u(e,t),void j.push(e);S[e]=i,R(r,function(c){if(!n[c])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+c+"` in "+r.join(", "));o(c,function(){0===--i&&u(e,t)})})}),function(){for(var n,t=0;j.length;)n=j.pop(),t++,R(l(n),function(n){0==--S[n]&&j.push(n)});if(t!==p)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),i()},he="[object Symbol]",ye=1/0,ve=pt?pt.prototype:void 0,de=ve?ve.toString:void 0,me=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),ge="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",be="\\ud83c[\\udffb-\\udfff]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",ke="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Le="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",je,Se].join("|")+")[\\ufe0e\\ufe0f]?"+ke+")*",Oe="[\\ufe0e\\ufe0f]?"+ke+Le,we="(?:"+["[^\\ud800-\\udfff]"+ge+"?",ge,je,Se,"[\\ud800-\\udfff]"].join("|")+")",xe=RegExp(be+"(?="+be+")|"+we+Oe,"g"),Ee=/^\s+|\s+$/g,Ae=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,Te=/,/,Be=/(=.+)?(\s*)$/,Fe=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;an.prototype.removeLink=function(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n},an.prototype.empty=function(){for(;this.head;)this.shift();return this},an.prototype.insertAfter=function(n,t){t.prev=n,t.next=n.next,n.next?n.next.prev=t:this.tail=t,n.next=t,this.length+=1},an.prototype.insertBefore=function(n,t){t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:this.head=t,n.prev=t,this.length+=1},an.prototype.unshift=function(n){this.head?this.insertBefore(this.head,n):ln(this,n)},an.prototype.push=function(n){this.tail?this.insertAfter(this.tail,n):ln(this,n)},an.prototype.shift=function(){return this.head&&this.removeLink(this.head)},an.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},an.prototype.toArray=function(){for(var n=Array(this.length),t=this.head,e=0;e=u.priority;)u=u.next;for(var i=0,o=n.length;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy