@jp-web/ts-sdk
Version:
视频客服,视频会议Web端及微信小程序端SDK
14 lines • 190 kB
JavaScript
/*!
* version: 2.3.0.4 2293764
* git-hash: 4749a257aeace42a51ebfe80ba7f253423b191f2 [4749a25]
* build time: 2020-09-18T08:30:16.691Z
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JuphoonRTCGuestSDK=t():e.JuphoonRTCGuestSDK=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./index.ts")}({"../../../lib/format.js":
/*!*********************************************************************!*\
!*** D:/Projects/WebstormProjects/videobu-sdk/ts-sdk/lib/format.js ***!
\*********************************************************************/
/*! no static exports found */function(e,t,n){!function(){var t;function n(e){for(var t,n,r,o,i=1,s=[].slice.call(arguments),a=0,c=e.length,u="",l=!1,d=!1,p=function(){return s[i++]},f=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<c;++a)if(t=e[a],l)switch(l=!1,"."==t?(d=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(d=!0,t=e[a+=2]):d=!0,o=f(),t){case"b":u+=parseInt(p(),10).toString(2);break;case"c":u+="string"==typeof(n=p())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":u+=parseInt(p(),10);break;case"f":r=String(parseFloat(p()).toFixed(o||6)),u+=d?r:r.replace(/^0/,"");break;case"j":u+=JSON.stringify(p());break;case"o":u+="0"+parseInt(p(),10).toString(8);break;case"s":u+=p();break;case"x":u+="0x"+parseInt(p(),10).toString(16);break;case"X":u+="0x"+parseInt(p(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()},"../../../lib/sockjs/sockjs.js":
/*!****************************************************************************!*\
!*** D:/Projects/WebstormProjects/videobu-sdk/ts-sdk/lib/sockjs/sockjs.js ***!
\****************************************************************************/
/*! no static exports found */function(e,t,n){(function(n){var r,o,i,s;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}s=function(){return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return o(t[s][1][e]||e)}),u,u.exports,e,t,n,r)}return n[s].exports}for(var i=!1,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,r){(function(n){"use strict";var r=e("./transport-list");t.exports=e("./main")(r),"_sockjs_onload"in n&&setTimeout(n._sockjs_onload,1)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./main":14,"./transport-list":16}],2:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./event");function i(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}r(i,o),t.exports=i},{"./event":4,inherits:57}],3:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./eventtarget");function i(){o.call(this)}r(i,o),i.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},i.prototype.once=function(e,t){var n=this,r=!1;this.on(e,(function o(){n.removeListener(e,o),r||(r=!0,t.apply(this,arguments))}))},i.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var n=arguments.length,r=new Array(n-1),o=1;o<n;o++)r[o-1]=arguments[o];for(var i=0;i<t.length;i++)t[i].apply(this,r)}},i.prototype.on=i.prototype.addListener=o.prototype.addEventListener,i.prototype.removeListener=o.prototype.removeEventListener,t.exports.EventEmitter=i},{"./eventtarget":5,inherits:57}],4:[function(e,t,n){"use strict";function r(e){this.type=e}r.prototype.initEvent=function(e,t,n){return this.type=e,this.bubbles=t,this.cancelable=n,this.timeStamp=+new Date,this},r.prototype.stopPropagation=function(){},r.prototype.preventDefault=function(){},r.CAPTURING_PHASE=1,r.AT_TARGET=2,r.BUBBLING_PHASE=3,t.exports=r},{}],5:[function(e,t,n){"use strict";function r(){this._listeners={}}r.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var n=this._listeners[e];-1===n.indexOf(t)&&(n=n.concat([t])),this._listeners[e]=n},r.prototype.removeEventListener=function(e,t){var n=this._listeners[e];if(n){var r=n.indexOf(t);-1===r||(n.length>1?this._listeners[e]=n.slice(0,r).concat(n.slice(r+1)):delete this._listeners[e])}},r.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,n=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,n),t in this._listeners)for(var r=this._listeners[t],o=0;o<r.length;o++)r[o].apply(this,n)},t.exports=r},{}],6:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./event");function i(e){o.call(this),this.initEvent("message",!1,!1),this.data=e}r(i,o),t.exports=i},{"./event":4,inherits:57}],7:[function(e,t,n){"use strict";var r=e("json3"),o=e("./utils/iframe");function i(e){this._transport=e,e.on("message",this._transportMessage.bind(this)),e.on("close",this._transportClose.bind(this))}i.prototype._transportClose=function(e,t){o.postMessage("c",r.stringify([e,t]))},i.prototype._transportMessage=function(e){o.postMessage("t",e)},i.prototype._send=function(e){this._transport.send(e)},i.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=i},{"./utils/iframe":47,json3:58}],8:[function(e,t,n){(function(n){"use strict";var r=e("./utils/url"),o=e("./utils/event"),i=e("json3"),s=e("./facade"),a=e("./info-iframe-receiver"),c=e("./utils/iframe"),u=e("./location"),l=function(){};"production"!==n.env.NODE_ENV&&(l=e("debug")("sockjs-client:iframe-bootstrap")),t.exports=function(e,t){var n,d={};t.forEach((function(e){e.facadeTransport&&(d[e.facadeTransport.transportName]=e.facadeTransport)})),d[a.transportName]=a,e.bootstrap_iframe=function(){var t;c.currentWindowId=u.hash.slice(1),o.attachEvent("message",(function(o){if(o.source===parent&&(void 0===n&&(n=o.origin),o.origin===n)){var a;try{a=i.parse(o.data)}catch(e){return void l("bad json",o.data)}if(a.windowId===c.currentWindowId)switch(a.type){case"s":var p;try{p=i.parse(a.data)}catch(e){l("bad json",a.data);break}var f=p[0],h=p[1],v=p[2],E=p[3];if(l(f,h,v,E),f!==e.version)throw new Error('Incompatible SockJS! Main site uses: "'+f+'", the iframe: "'+e.version+'".');if(!r.isOriginEqual(v,u.href)||!r.isOriginEqual(E,u.href))throw new Error("Can't connect to different domain from within an iframe. ("+u.href+", "+v+", "+E+")");t=new s(new d[h](v,E));break;case"m":t._send(a.data);break;case"c":t&&t._close(),t=null}}})),c.postMessage("s")}}}).call(this,{env:{}})},{"./facade":7,"./info-iframe-receiver":10,"./location":13,"./utils/event":46,"./utils/iframe":47,"./utils/url":52,debug:55,json3:58}],9:[function(e,t,n){(function(n){"use strict";var r=e("events").EventEmitter,o=e("inherits"),i=e("json3"),s=e("./utils/object"),a=function(){};function c(e,t){r.call(this);var n=this,o=+new Date;this.xo=new t("GET",e),this.xo.once("finish",(function(e,t){var r,c;if(200===e){if(c=+new Date-o,t)try{r=i.parse(t)}catch(e){a("bad json",t)}s.isObject(r)||(r={})}n.emit("finish",r,c),n.removeAllListeners()}))}"production"!==n.env.NODE_ENV&&(a=e("debug")("sockjs-client:info-ajax")),o(c,r),c.prototype.close=function(){this.removeAllListeners(),this.xo.close()},t.exports=c}).call(this,{env:{}})},{"./utils/object":49,debug:55,events:3,inherits:57,json3:58}],10:[function(e,t,n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=e("json3"),s=e("./transport/sender/xhr-local"),a=e("./info-ajax");function c(e){var t=this;o.call(this),this.ir=new a(e,s),this.ir.once("finish",(function(e,n){t.ir=null,t.emit("message",i.stringify([e,n]))}))}r(c,o),c.transportName="iframe-info-receiver",c.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},t.exports=c},{"./info-ajax":9,"./transport/sender/xhr-local":37,events:3,inherits:57,json3:58}],11:[function(e,t,r){(function(n,r){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("json3"),a=e("./utils/event"),c=e("./transport/iframe"),u=e("./info-iframe-receiver"),l=function(){};function d(e,t){var n=this;o.call(this);var i=function(){var r=n.ifr=new c(u.transportName,t,e);r.once("message",(function(e){if(e){var t;try{t=s.parse(e)}catch(t){return l("bad json",e),n.emit("finish"),void n.close()}var r=t[0],o=t[1];n.emit("finish",r,o)}n.close()})),r.once("close",(function(){n.emit("finish"),n.close()}))};r.document.body?i():a.attachEvent("load",i)}"production"!==n.env.NODE_ENV&&(l=e("debug")("sockjs-client:info-iframe")),i(d,o),d.enabled=function(){return c.enabled()},d.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},t.exports=d}).call(this,{env:{}},void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./info-iframe-receiver":10,"./transport/iframe":22,"./utils/event":46,debug:55,events:3,inherits:57,json3:58}],12:[function(e,t,n){(function(n){"use strict";var r=e("events").EventEmitter,o=e("inherits"),i=e("./utils/url"),s=e("./transport/sender/xdr"),a=e("./transport/sender/xhr-cors"),c=e("./transport/sender/xhr-local"),u=e("./transport/sender/xhr-fake"),l=e("./info-iframe"),d=e("./info-ajax"),p=function(){};function f(e,t){p(e);var n=this;r.call(this),setTimeout((function(){n.doXhr(e,t)}),0)}"production"!==n.env.NODE_ENV&&(p=e("debug")("sockjs-client:info-receiver")),o(f,r),f._getReceiver=function(e,t,n){return n.sameOrigin?new d(t,c):a.enabled?new d(t,a):s.enabled&&n.sameScheme?new d(t,s):l.enabled()?new l(e,t):new d(t,u)},f.prototype.doXhr=function(e,t){var n=this,r=i.addPath(e,"/info");p("doXhr",r),this.xo=f._getReceiver(e,r,t),this.timeoutRef=setTimeout((function(){p("timeout"),n._cleanup(!1),n.emit("finish")}),f.timeout),this.xo.once("finish",(function(e,t){p("finish",e,t),n._cleanup(!0),n.emit("finish",e,t)}))},f.prototype._cleanup=function(e){p("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},f.prototype.close=function(){p("close"),this.removeAllListeners(),this._cleanup(!1)},f.timeout=8e3,t.exports=f}).call(this,{env:{}})},{"./info-ajax":9,"./info-iframe":11,"./transport/sender/xdr":34,"./transport/sender/xhr-cors":35,"./transport/sender/xhr-fake":36,"./transport/sender/xhr-local":37,"./utils/url":52,debug:55,events:3,inherits:57}],13:[function(e,t,r){(function(e){"use strict";t.exports=e.location||{origin:"http://localhost:80",protocol:"http:",host:"localhost",port:80,href:"http://localhost/",hash:""}}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(e,t,r){(function(n,r){"use strict";e("./shims");var o,i=e("url-parse"),s=e("inherits"),a=e("json3"),c=e("./utils/random"),u=e("./utils/escape"),l=e("./utils/url"),d=e("./utils/event"),p=e("./utils/transport"),f=e("./utils/object"),h=e("./utils/browser"),v=e("./utils/log"),E=e("./event/event"),m=e("./event/eventtarget"),y=e("./location"),_=e("./event/close"),g=e("./event/trans-message"),S=e("./info-receiver"),T=function(){};function b(e,t,n){if(!(this instanceof b))return new b(e,t,n);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");m.call(this),this.readyState=b.CONNECTING,this.extensions="",this.protocol="",(n=n||{}).protocols_whitelist&&v.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=n.transports,this._transportOptions=n.transportOptions||{},this._timeout=n.timeout||0;var r=n.sessionId||8;if("function"==typeof r)this._generateSessionId=r;else{if("number"!=typeof r)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return c.string(r)}}this._server=n.server||c.numberString(1e3);var o=new i(e);if(!o.host||!o.protocol)throw new SyntaxError("The URL '"+e+"' is invalid");if(o.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==o.protocol&&"https:"!==o.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+o.protocol+"' is not allowed.");var s="https:"===o.protocol;if("https:"===y.protocol&&!s)throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");t?Array.isArray(t)||(t=[t]):t=[];var a=t.sort();a.forEach((function(e,t){if(!e)throw new SyntaxError("The protocols entry '"+e+"' is invalid.");if(t<a.length-1&&e===a[t+1])throw new SyntaxError("The protocols entry '"+e+"' is duplicated.")}));var u=l.getOrigin(y.href);this._origin=u?u.toLowerCase():null,o.set("pathname",o.pathname.replace(/\/+$/,"")),this.url=o.href,T("using url",this.url),this._urlInfo={nullOrigin:!h.hasDomain(),sameOrigin:l.isOriginEqual(this.url,y.href),sameScheme:l.isSchemeEqual(this.url,y.href)},this._ir=new S(this.url,this._urlInfo),this._ir.once("finish",this._receiveInfo.bind(this))}function C(e){return 1e3===e||e>=3e3&&e<=4999}"production"!==n.env.NODE_ENV&&(T=e("debug")("sockjs-client:main")),s(b,m),b.prototype.close=function(e,t){if(e&&!C(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==b.CLOSING&&this.readyState!==b.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},b.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===b.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===b.OPEN&&this._transport.send(u.quote(e))},b.version=e("./version"),b.CONNECTING=0,b.OPEN=1,b.CLOSING=2,b.CLOSED=3,b.prototype._receiveInfo=function(e,t){if(T("_receiveInfo",t),this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=f.extend(e,this._urlInfo),T("info",e);var n=o.filterToEnabled(this._transportsWhitelist,e);this._transports=n.main,T(this._transports.length+" enabled transports"),this._connect()}else this._close(1002,"Cannot connect to server")},b.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(T("attempt",e.transportName),e.needBody&&(!r.document.body||void 0!==r.document.readyState&&"complete"!==r.document.readyState&&"interactive"!==r.document.readyState))return T("waiting for body"),this._transports.unshift(e),void d.attachEvent("load",this._connect.bind(this));var t=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t),T("using timeout",t);var n=l.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),o=this._transportOptions[e.transportName];T("transport url",n);var i=new e(n,this._transUrl,o);return i.on("message",this._transportMessage.bind(this)),i.once("close",this._transportClose.bind(this)),i.transportName=e.transportName,void(this._transport=i)}this._close(2e3,"All transports failed",!1)},b.prototype._transportTimeout=function(){T("_transportTimeout"),this.readyState===b.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))},b.prototype._transportMessage=function(e){T("_transportMessage",e);var t,n=this,r=e.slice(0,1),o=e.slice(1);switch(r){case"o":return void this._open();case"h":return this.dispatchEvent(new E("heartbeat")),void T("heartbeat",this.transport)}if(o)try{t=a.parse(o)}catch(e){T("bad json",o)}if(void 0!==t)switch(r){case"a":Array.isArray(t)&&t.forEach((function(e){T("message",n.transport,e),n.dispatchEvent(new g(e))}));break;case"m":T("message",this.transport,t),this.dispatchEvent(new g(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}else T("empty payload",o)},b.prototype._transportClose=function(e,t){T("_transportClose",this.transport,e,t),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),C(e)||2e3===e||this.readyState!==b.CONNECTING?this._close(e,t):this._connect()},b.prototype._open=function(){T("_open",this._transport&&this._transport.transportName,this.readyState),this.readyState===b.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=b.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new E("open")),T("connected",this.transport)):this._close(1006,"Server lost session")},b.prototype._close=function(e,t,n){T("_close",this.transport,e,t,n,this.readyState);var r=!1;if(this._ir&&(r=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===b.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=b.CLOSING,setTimeout(function(){this.readyState=b.CLOSED,r&&this.dispatchEvent(new E("error"));var o=new _("close");o.wasClean=n||!1,o.code=e||1e3,o.reason=t,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null,T("disconnected")}.bind(this),0)},b.prototype.countRTO=function(e){return e>100?4*e:300+e},t.exports=function(t){return o=p(t),e("./iframe-bootstrap")(b,t),b}}).call(this,{env:{}},void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./event/close":2,"./event/event":4,"./event/eventtarget":5,"./event/trans-message":6,"./iframe-bootstrap":8,"./info-receiver":12,"./location":13,"./shims":15,"./utils/browser":44,"./utils/escape":45,"./utils/event":46,"./utils/log":48,"./utils/object":49,"./utils/random":50,"./utils/transport":51,"./utils/url":52,"./version":53,debug:55,inherits:57,json3:58,"url-parse":61}],15:[function(e,t,n){"use strict";var r,o=Array.prototype,i=Object.prototype,s=Function.prototype,c=String.prototype,u=o.slice,l=i.toString,d=function(e){return"[object Function]"===i.toString.call(e)},p=function(e){return"[object String]"===l.call(e)},f=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();r=f?function(e,t,n,r){!r&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)};var h=function(e,t,n){for(var o in t)i.hasOwnProperty.call(t,o)&&r(e,o,t[o],n)},v=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};function E(e){var t=+e;return t!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function m(){}h(s,{bind:function(e){var t=this;if(!d(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n=u.call(arguments,1),r=function(){if(this instanceof a){var r=t.apply(this,n.concat(u.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(u.call(arguments)))},o=Math.max(0,t.length-n.length),i=[],s=0;s<o;s++)i.push("$"+s);var a=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this, arguments); }")(r);return t.prototype&&(m.prototype=t.prototype,a.prototype=new m,m.prototype=null),a}}),h(Array,{isArray:function(e){return"[object Array]"===l.call(e)}});var y,_,g,S=Object("a"),T="a"!==S[0]||!(0 in S);h(o,{forEach:function(e){var t=v(this),n=T&&p(this)?this.split(""):t,r=arguments[1],o=-1,i=n.length>>>0;if(!d(e))throw new TypeError;for(;++o<i;)o in n&&e.call(r,n[o],o,t)}},(y=o.forEach,_=!0,g=!0,y&&(y.call("foo",(function(e,t,n){"object"!==a(n)&&(_=!1)})),y.call([1],(function(){g="string"==typeof this}),"x")),!(y&&_&&g)));var b=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);h(o,{indexOf:function(e){var t=T&&p(this)?this.split(""):v(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=E(arguments[1])),r=r>=0?r:Math.max(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}},b);var C,O=c.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?(C=void 0===/()??/.exec("")[1],c.split=function(e,t){var n=this;if(void 0===e&&0===t)return[];if("[object RegExp]"!==l.call(e))return O.call(this,e,t);var r,i,s,a,c=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),d=0;for(e=new RegExp(e.source,u+"g"),n+="",C||(r=new RegExp("^"+e.source+"$(?!\\s)",u)),t=void 0===t?-1>>>0:t>>>0;(i=e.exec(n))&&!((s=i.index+i[0].length)>d&&(c.push(n.slice(d,i.index)),!C&&i.length>1&&i[0].replace(r,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(i[e]=void 0)})),i.length>1&&i.index<n.length&&o.push.apply(c,i.slice(1)),a=i[0].length,d=s,c.length>=t));)e.lastIndex===i.index&&e.lastIndex++;return d===n.length?!a&&e.test("")||c.push(""):c.push(n.slice(d)),c.length>t?c.slice(0,t):c}):"0".split(void 0,0).length&&(c.split=function(e,t){return void 0===e&&0===t?[]:O.call(this,e,t)});var R=c.substr,I="".substr&&"b"!=="0b".substr(-1);h(c,{substr:function(e,t){return R.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},I)},{}],16:[function(e,t,n){"use strict";t.exports=[e("./transport/websocket"),e("./transport/xhr-streaming"),e("./transport/xdr-streaming"),e("./transport/eventsource"),e("./transport/lib/iframe-wrap")(e("./transport/eventsource")),e("./transport/htmlfile"),e("./transport/lib/iframe-wrap")(e("./transport/htmlfile")),e("./transport/xhr-polling"),e("./transport/xdr-polling"),e("./transport/lib/iframe-wrap")(e("./transport/xhr-polling")),e("./transport/jsonp-polling")]},{"./transport/eventsource":20,"./transport/htmlfile":21,"./transport/jsonp-polling":23,"./transport/lib/iframe-wrap":26,"./transport/websocket":38,"./transport/xdr-polling":39,"./transport/xdr-streaming":40,"./transport/xhr-polling":41,"./transport/xhr-streaming":42}],17:[function(e,t,r){(function(n,r){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("../../utils/event"),a=e("../../utils/url"),c=r.XMLHttpRequest,u=function(){};function l(e,t,n,r){u(e,t);var i=this;o.call(this),setTimeout((function(){i._start(e,t,n,r)}),0)}"production"!==n.env.NODE_ENV&&(u=e("debug")("sockjs-client:browser:xhr")),i(l,o),l.prototype._start=function(e,t,n,r){var o=this;try{this.xhr=new c}catch(e){}if(!this.xhr)return u("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();t=a.addQuery(t,"t="+ +new Date),this.unloadRef=s.unloadAdd((function(){u("unload cleanup"),o._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){u("xhr timeout"),o.emit("finish",0,""),o._cleanup(!1)})}catch(e){return u("exception",e),this.emit("finish",0,""),void this._cleanup(!1)}if(r&&r.noCredentials||!l.supportsCORS||(u("withCredentials"),this.xhr.withCredentials=!0),r&&r.headers)for(var i in r.headers)this.xhr.setRequestHeader(i,r.headers[i]);this.xhr.onreadystatechange=function(){if(o.xhr){var e,t,n=o.xhr;switch(u("readyState",n.readyState),n.readyState){case 3:try{t=n.status,e=n.responseText}catch(e){}u("status",t),1223===t&&(t=204),200===t&&e&&e.length>0&&(u("chunk"),o.emit("chunk",t,e));break;case 4:t=n.status,u("status",t),1223===t&&(t=204),12005!==t&&12029!==t||(t=0),u("finish",t,n.responseText),o.emit("finish",t,n.responseText),o._cleanup(!1)}}};try{o.xhr.send(n)}catch(e){o.emit("finish",0,""),o._cleanup(!1)}},l.prototype._cleanup=function(e){if(u("cleanup"),this.xhr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},l.prototype.close=function(){u("close"),this._cleanup(!0)},l.enabled=!!c;var d=["Active"].concat("Object").join("X");!l.enabled&&d in r&&(u("overriding xmlhttprequest"),c=function(){try{return new r[d]("Microsoft.XMLHTTP")}catch(e){return null}},l.enabled=!!new c);var p=!1;try{p="withCredentials"in new c}catch(e){}l.supportsCORS=p,t.exports=l}).call(this,{env:{}},void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/event":46,"../../utils/url":52,debug:55,events:3,inherits:57}],18:[function(e,t,r){(function(e){t.exports=e.EventSource}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,t,r){(function(e){"use strict";var n=e.WebSocket||e.MozWebSocket;t.exports=n?function(e){return new n(e)}:void 0}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/eventsource"),s=e("./sender/xhr-cors"),a=e("eventsource");function c(e){if(!c.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/eventsource",i,s)}r(c,o),c.enabled=function(){return!!a},c.transportName="eventsource",c.roundTrips=2,t.exports=c},{"./lib/ajax-based":24,"./receiver/eventsource":29,"./sender/xhr-cors":35,eventsource:18,inherits:57}],21:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./receiver/htmlfile"),i=e("./sender/xhr-local"),s=e("./lib/ajax-based");function a(e){if(!o.enabled)throw new Error("Transport created when disabled");s.call(this,e,"/htmlfile",o,i)}r(a,s),a.enabled=function(e){return o.enabled&&e.sameOrigin},a.transportName="htmlfile",a.roundTrips=2,t.exports=a},{"./lib/ajax-based":24,"./receiver/htmlfile":30,"./sender/xhr-local":37,inherits:57}],22:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("json3"),i=e("events").EventEmitter,s=e("../version"),a=e("../utils/url"),c=e("../utils/iframe"),u=e("../utils/event"),l=e("../utils/random"),d=function(){};function p(e,t,n){if(!p.enabled())throw new Error("Transport created when disabled");i.call(this);var r=this;this.origin=a.getOrigin(n),this.baseUrl=n,this.transUrl=t,this.transport=e,this.windowId=l.string(8);var o=a.addPath(n,"/iframe.html")+"#"+this.windowId;d(e,t,o),this.iframeObj=c.createIframe(o,(function(e){d("err callback"),r.emit("close",1006,"Unable to load an iframe ("+e+")"),r.close()})),this.onmessageCallback=this._message.bind(this),u.attachEvent("message",this.onmessageCallback)}"production"!==n.env.NODE_ENV&&(d=e("debug")("sockjs-client:transport:iframe")),r(p,i),p.prototype.close=function(){if(d("close"),this.removeAllListeners(),this.iframeObj){u.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},p.prototype._message=function(e){if(d("message",e.data),a.isOriginEqual(e.origin,this.origin)){var t;try{t=o.parse(e.data)}catch(t){return void d("bad json",e.data)}if(t.windowId===this.windowId)switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",o.stringify([s,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var n;try{n=o.parse(t.data)}catch(e){return void d("bad json",t.data)}this.emit("close",n[0],n[1]),this.close()}else d("mismatched window id",t.windowId,this.windowId)}else d("not same origin",e.origin,this.origin)},p.prototype.postMessage=function(e,t){d("postMessage",e,t),this.iframeObj.post(o.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},p.prototype.send=function(e){d("send",e),this.postMessage("m",e)},p.enabled=function(){return c.iframeEnabled},p.transportName="iframe",p.roundTrips=2,t.exports=p}).call(this,{env:{}})},{"../utils/event":46,"../utils/iframe":47,"../utils/random":50,"../utils/url":52,"../version":53,debug:55,events:3,inherits:57,json3:58}],23:[function(e,t,r){(function(n){"use strict";var r=e("inherits"),o=e("./lib/sender-receiver"),i=e("./receiver/jsonp"),s=e("./sender/jsonp");function a(e){if(!a.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/jsonp",s,i)}r(a,o),a.enabled=function(){return!!n.document},a.transportName="jsonp-polling",a.roundTrips=1,a.needBody=!0,t.exports=a}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/sender-receiver":28,"./receiver/jsonp":31,"./sender/jsonp":33,inherits:57}],24:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("../../utils/url"),i=e("./sender-receiver"),s=function(){};function a(e,t,n,r){i.call(this,e,t,function(e){return function(t,n,r){s("create ajax sender",t,n);var i={};"string"==typeof n&&(i.headers={"Content-type":"text/plain"});var a=o.addPath(t,"/xhr_send"),c=new e("POST",a,n,i);return c.once("finish",(function(e){if(s("finish",e),c=null,200!==e&&204!==e)return r(new Error("http status "+e));r()})),function(){s("abort"),c.close(),c=null;var e=new Error("Aborted");e.code=1e3,r(e)}}}(r),n,r)}"production"!==n.env.NODE_ENV&&(s=e("debug")("sockjs-client:ajax-based")),r(a,i),t.exports=a}).call(this,{env:{}})},{"../../utils/url":52,"./sender-receiver":28,debug:55,inherits:57}],25:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t){i(e),o.call(this),this.sendBuffer=[],this.sender=t,this.url=e}"production"!==n.env.NODE_ENV&&(i=e("debug")("sockjs-client:buffered-sender")),r(s,o),s.prototype.send=function(e){i("send",e),this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},s.prototype.sendScheduleWait=function(){i("sendScheduleWait");var e,t=this;this.sendStop=function(){i("sendStop"),t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){i("timeout"),t.sendStop=null,t.sendSchedule()}),25)},s.prototype.sendSchedule=function(){i("sendSchedule",this.sendBuffer.length);var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(i("error",t),e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},s.prototype._cleanup=function(){i("_cleanup"),this.removeAllListeners()},s.prototype.close=function(){i("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],26:[function(e,t,r){(function(n){"use strict";var r=e("inherits"),o=e("../iframe"),i=e("../../utils/object");t.exports=function(e){function t(t,n){o.call(this,e.transportName,t,n)}return r(t,o),t.enabled=function(t,r){if(!n.document)return!1;var s=i.extend({},r);return s.sameOrigin=!0,e.enabled(s)&&o.enabled()},t.transportName="iframe-"+e.transportName,t.needBody=!0,t.roundTrips=o.roundTrips+e.roundTrips-1,t.facadeTransport=e,t}}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/object":49,"../iframe":22,inherits:57}],27:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t,n){i(t),o.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=n,this._scheduleReceiver()}"production"!==n.env.NODE_ENV&&(i=e("debug")("sockjs-client:polling")),r(s,o),s.prototype._scheduleReceiver=function(){i("_scheduleReceiver");var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",(function(t){i("message",t),e.emit("message",t)})),t.once("close",(function(n,r){i("close",n,r,e.pollIsClosing),e.poll=t=null,e.pollIsClosing||("network"===r?e._scheduleReceiver():(e.emit("close",n||1006,r),e.removeAllListeners()))}))},s.prototype.abort=function(){i("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],28:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("../../utils/url"),i=e("./buffered-sender"),s=e("./polling"),a=function(){};function c(e,t,n,r,c){var u=o.addPath(e,t);a(u);var l=this;i.call(this,e,n),this.poll=new s(r,u,c),this.poll.on("message",(function(e){a("poll message",e),l.emit("message",e)})),this.poll.once("close",(function(e,t){a("poll close",e,t),l.poll=null,l.emit("close",e,t),l.close()}))}"production"!==n.env.NODE_ENV&&(a=e("debug")("sockjs-client:sender-receiver")),r(c,i),c.prototype.close=function(){i.prototype.close.call(this),a("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},t.exports=c}).call(this,{env:{}})},{"../../utils/url":52,"./buffered-sender":25,"./polling":27,debug:55,inherits:57}],29:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=e("eventsource"),s=function(){};function a(e){s(e),o.call(this);var t=this,n=this.es=new i(e);n.onmessage=function(e){s("message",e.data),t.emit("message",decodeURI(e.data))},n.onerror=function(e){s("error",n.readyState,e);var r=2!==n.readyState?"network":"permanent";t._cleanup(),t._close(r)}}"production"!==n.env.NODE_ENV&&(s=e("debug")("sockjs-client:receiver:eventsource")),r(a,o),a.prototype.abort=function(){s("abort"),this._cleanup(),this._close("user")},a.prototype._cleanup=function(){s("cleanup");var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){s("close",e);var t=this;setTimeout((function(){t.emit("close",null,e),t.removeAllListeners()}),200)},t.exports=a}).call(this,{env:{}})},{debug:55,events:3,eventsource:18,inherits:57}],30:[function(e,t,r){(function(n,r){"use strict";var o=e("inherits"),i=e("../../utils/iframe"),s=e("../../utils/url"),a=e("events").EventEmitter,c=e("../../utils/random"),u=function(){};function l(e){u(e),a.call(this);var t=this;i.polluteGlobalNamespace(),this.id="a"+c.string(6),e=s.addQuery(e,"c="+decodeURIComponent(i.WPrefix+"."+this.id)),u("using htmlfile",l.htmlfileEnabled);var n=l.htmlfileEnabled?i.createHtmlfile:i.createIframe;r[i.WPrefix][this.id]={start:function(){u("start"),t.iframeObj.loaded()},message:function(e){u("message",e),t.emit("message",e)},stop:function(){u("stop"),t._cleanup(),t._close("network")}},this.iframeObj=n(e,(function(){u("callback"),t._cleanup(),t._close("permanent")}))}"production"!==n.env.NODE_ENV&&(u=e("debug")("sockjs-client:receiver:htmlfile")),o(l,a),l.prototype.abort=function(){u("abort"),this._cleanup(),this._close("user")},l.prototype._cleanup=function(){u("_cleanup"),this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete r[i.WPrefix][this.id]},l.prototype._close=function(e){u("_close",e),this.emit("close",null,e),this.removeAllListeners()},l.htmlfileEnabled=!1;var d=["Active"].concat("Object").join("X");if(d in r)try{l.htmlfileEnabled=!!new r[d]("htmlfile")}catch(e){}l.enabled=l.htmlfileEnabled||i.iframeEnabled,t.exports=l}).call(this,{env:{}},void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:55,events:3,inherits:57}],31:[function(e,t,r){(function(n,r){"use strict";var o=e("../../utils/iframe"),i=e("../../utils/random"),s=e("../../utils/browser"),a=e("../../utils/url"),c=e("inherits"),u=e("events").EventEmitter,l=function(){};function d(e){l(e);var t=this;u.call(this),o.polluteGlobalNamespace(),this.id="a"+i.string(6);var n=a.addQuery(e,"c="+encodeURIComponent(o.WPrefix+"."+this.id));r[o.WPrefix][this.id]=this._callback.bind(this),this._createScript(n),this.timeoutId=setTimeout((function(){l("timeout"),t._abort(new Error("JSONP script loaded abnormally (timeout)"))}),d.timeout)}"production"!==n.env.NODE_ENV&&(l=e("debug")("sockjs-client:receiver:jsonp")),c(d,u),d.prototype.abort=function(){if(l("abort"),r[o.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},d.timeout=35e3,d.scriptErrorTimeout=1e3,d.prototype._callback=function(e){l("_callback",e),this._cleanup(),this.aborting||(e&&(l("message",e),this.emit("message",e)),this.emit("close",null,"network"),this.removeAllListeners())},d.prototype._abort=function(e){l("_abort",e),this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},d.prototype._cleanup=function(){if(l("_cleanup"),clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete r[o.WPrefix][this.id]},d.prototype._scriptError=function(){l("_scriptError");var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))}),d.scriptErrorTimeout))},d.prototype._createScript=function(e){l("_createScript",e);var t,n=this,o=this.script=r.document.createElement("script");if(o.id="a"+i.string(8),o.src=e,o.type="text/javascript",o.charset="UTF-8",o.onerror=this._scriptError.bind(this),o.onload=function(){l("onload"),n._abort(new Error("JSONP script loaded abnormally (onload)"))},o.onreadystatechange=function(){if(l("onreadystatechange",o.readyState),/loaded|closed/.test(o.readyState)){if(o&&o.htmlFor&&o.onclick){n.loadedOkay=!0;try{o.onclick()}catch(e){}}o&&n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===o.async&&r.document.attachEvent)if(s.isOpera())(t=this.script2=r.document.createElement("script")).text="try{var a = document.getElementById('"+o.id+"'); if(a)a.onerror();}catch(x){};",o.async=t.async=!1;else{try{o.htmlFor=o.id,o.event="onclick"}catch(e){}o.async=!0}void 0!==o.async&&(o.async=!0);var a=r.document.getElementsByTagName("head")[0];a.insertBefore(o,a.firstChild),t&&a.insertBefore(t,a.firstChild)},t.exports=d}).call(this,{env:{}},void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:55,events:3,inherits:57}],32:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t){i(e),o.call(this);var n=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){i("finish",e,t),n._chunkHandler(e,t),n.xo=null;var r=200===e?"network":"permanent";i("close",r),n.emit("close",null,r),n._cleanup()}))}"production"!==n.env.NODE_ENV&&(i=e("debug")("sockjs-client:receiver:xhr")),r(s,o),s.prototype._chunkHandler=function(e,t){if(i("_chunkHandler",e),200===e&&t)for(var n=-1;;this.bufferPosition+=n+1){var r=t.slice(this.bufferPosition);if(-1===(n=r.indexOf("\n")))break;var o=r.slice(0,n);o&&(i("message",o),this.emit("message",o))}},s.prototype._cleanup=function(){i("_cleanup"),this.removeAllListeners()},s.prototype.abort=function(){i("abort"),this.xo&&(this.xo.close(),i("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],33:[function(e,t,r){(function(n,r){"use strict";var o,i,s=e("../../utils/random"),a=e("../../utils/url"),c=function(){};"production"!==n.env.NODE_ENV&&(c=e("debug")("sockjs-client:sender:jsonp")),t.exports=function(e,t,n){c(e,t),o||(c("createForm"),(o=r.document.createElement("form")).style.display="none",o.style.position="absolute",o.method="POST",o.enctype="application/x-www-form-urlencoded",o.acceptCharset="UTF-8",(i=r.document.createElement("textarea")).name="d",o.appendChild(i),r.document.body.appendChild(o));var u="a"+s.string(8);o.target=u,o.action=a.addQuery(a.addPath(e,"/jsonp_send"),"i="+u);var l=function(e){c("createIframe",e);try{return r.document.createElement('<iframe name="'+e+'">')}catch(n){var t=r.document.createElement("iframe");return t.name=e,t}}(u);l.id=u,l.style.display="none",o.appendChild(l);try{i.value=t}catch(e){}o.submit();var d=function(e){c("completed",u,e),l.onerror&&(l.onreadystatechange=l.onerror=l.onload=null,setTimeout((function(){c("cleaning up",u),l.parentNode.removeChild(l),l=null}),500),i.value="",n(e))};return l.onerror=function(){c("onerror",u),d()},l.onload=function(){c("onload",u),d()},l.onreadystatechange=function(e){c("onreadystatechange",u,l.readyState,e),"complete"===l.readyState&&d()},function(){c("aborted",u),d(new Error("Aborted"))}}}).call(this,{env:{}},void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/random":50,"../../utils/url":52,debug:55}],34:[function(e,t,r){(function(n,r){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("../../utils/event"),a=e("../../utils/browser"),c=e("../../utils/url"),u=function(){};function l(e,t,n){u(e,t);var r=this;o.call(this),setTimeout((function(){r._start(e,t,n)}),0)}"production"!==n.env.NODE_ENV&&(u=e("debug")("sockjs-client:sender:xdr")),i(l,o),l.prototype._start=function(e,t,n){u("_start");var o=this,i=new r.XDomainRequest;t=c.addQuery(t,"t="+ +new Date),i.onerror=function(){u("onerror"),o._error()},i.ontimeout=function(){u("ontimeout"),o._error()},i.onprogress=function(){u("progress",i.responseText),o.emit("chunk",200,i.responseText)},i.onload=function(){u("load"),o.emit("finish",200,i.responseText),o._cleanup(!1)},this.xdr=i,this.unloadRef=s.unloadAdd((function(){o._cleanup(!0)}));try{this.xdr.open(e,t),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(n)}catch(e){this._error()}},l.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},l.prototype._cleanup=function(e){if(u("cleanup",e),this.xdr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},l.prototype.close=function(){u("close"),this._cleanup(!0)},l.enabled=!(!r.XDomainRequest||!a.hasDomain()),t.exports=l}).call(this,{env:{}},void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/event":46,"../../utils/url":52,debug:55,events:3,inherits:57}],35:[function(e,t,n){"use strict";var r=e("inherits"),o=e("../driver/xhr");function i(e,t,n,r){o.call(this,e,t,n,r)}r(i,o),i.enabled=o.enabled&&o.supportsCORS,t.exports=i},{"../driver/xhr":17,inherits:57}],36:[function(e,t,n){"use strict";var r=e("events").EventEmitter;function o(){var e=this;r.call(this),this.to=setTimeout((function(){e.emit("finish",200,"{}")}),o.timeout)}e("inherits")(o,r),o.prototype.close=function(){clearTimeout(this.to)},o.timeout=2e3,t.exports=o},{events:3,inherits:57}],37:[function(e,t,n){"use strict";var r=e("inherits"),o=e("../driver/xhr");function i(e,t,n){o.call(this,e,t,n,{noCredentials:!0})}r(i,o),i.enabled=o.enabled,t.exports=i},{"../driver/xhr":17,inherits:57}],38:[function(e,t,n){(function(n){"use strict";var r=e("../utils/event"),o=e("../utils/url"),i=e("inherits"),s=e("events").EventEmitter,a=e("./driver/websocket"),c=function(){};function u(e,t,n){if(!u.enabled())throw new Error("Transport created when disabled");s.call(this),c("constructor",e);var i=this,l=o.addPath(e,"/websocket");l="https"===l.slice(0,5)?"wss"+l.slice(5):"ws"+l.slice(4),this.url=l,this.ws=new a(this.url,[],n),this.ws.onmessage=function(e){c("message event",e.data),i.emit("message",e.data)},this.unloadRef=r.unloadAdd((function(){c("unload"),i.ws.close()})),this.ws.onclose=function(e){c("close event",e.code,e.reason),i.emit("close",e.code,e.reason),i._cleanup()},this.ws.onerror=function(e){c("error event",e),i.emit("close",1006,"WebSocket connection broken"),i._cleanup()}}"production"!==n.env.NODE_ENV&&(c=e("debug")("sockjs-client:websocket")),i(u,s),u.prototype.send=function(e){var t="["+e+"]";c("send",t),this.ws.send(t)},u.prototype.close=function(){c("close");var e=this.ws;this._cleanup(),e&&e.close()},u.prototype._cleanup=function(){c("_cleanup");var e=this.ws;e&&(e.onmessage=e.onclose=e.onerror=null),r.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},u.enabled=function(){return c("enabled"),!!a},u.transportName="websocket",u.roundTrips=2,t.exports=u}).call(this,{env:{}})},{"../utils/event":46,"../utils/url":52,"./driver/websocket":19,debug:55,events:3,inherits:57}],39:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./lib/ajax-based"),i=e("./xdr-streaming"),s=e("./receiver/xhr"),a=e("./sender/xdr");function c(e){if(!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",s,a)}r(c,o),c.enabled=i.enabled,c.transportName="xdr-polling",c.roundTrips=2,t.exports=c},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,"./xdr-streaming":40,inherits:57}],40:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/xhr"),s=e("./sender/xdr");function a(e){if(!s.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",i,s)}r(a,o),a.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&s.enabled&&e.sameScheme},a.transportName="xdr-streaming",a.roundTrips=2,t.exports=a},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,inherits:57}],41:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/xhr"),s=e("./sender/xhr-cors"),a=e("./sender/xhr-local");function c(e){if(!a.enabled&&!s.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",i,s)}r(c,o),c.enabled=function(e){return!e.nullOrigin&&(!(!a.enabled||!e.sameOrigin)||s.enabled)},c.transportName="xhr-polling",c.roundTrips=2,t.exports=c},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xhr-cors":35,"./sender/xhr-local":37,inherits:57}],42:[function(e,t,r){(function(n){"use strict";var r=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/xhr"),s=e("./sender/xhr-cors"),a=e("./sender/xhr-local"),c=e("../utils/browser");function u(e){if(!a.enabled&&!s.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",i,s)}r(u,o),u.enabled=function(e){return!e.nullOrigin&&!c.isOpera()&&s.enabled},u.transportName="xhr-streaming",u.roundTrips=2,u.needBody=!!n.document,t.exports=u}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/browser":44,"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xhr-cors":35,"./sender/xhr-local":37,inherits:57}],43:[function(e,t,r){(function(e){"use strict";e.crypto&&e.crypto.getRandomValues?t.exports.randomBytes=function(t){var n=new Uint8Array(t);return e.crypto.getRandomValues(n),n}:t.exports.randomBytes=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],44:[function(e,t,r){(function(e){"use strict";t.exports={isOpera:function(){return e.navigator&&/opera/i.test(e.navigator.userAgent)},isKonqueror:function(){return e.navigator&&/konqueror/i.test(e.navigator.userAgent)},hasDomain:function(){if(!e.document)return!0;try{return!!e.document.domain}catch(e){return!1}}}}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(e,t,n){"use strict";var r,o=e("json3"),i=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g;t.exports={quote:function(e){var t=o.stringify(e);return i.lastIndex=0,i.test(t)?(r||(r=function(e){var t,n={},r=[];for(t=0;t<65536;t++)r.push(String.fromCharCode(t));return e.lastIndex=0,r.join("").replace(e,(function(e){return n[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4),""})),e.lastIndex=0,n}(i)),t.replace(i,(function(e){return r[e]}))):t}}},{json3:58}],46:[function(e,t,r){(function(n){"use strict";var r=e("./random"),o={},i=!1,s=n.chrome&&n.chrome.app&&n.chrome.app.runtime;t.exports={attachEvent:function(e,t){void 0!==n.addEventListener?n.addEventListener(e,t,!1):n.document&&n.attachEvent&&(n.document.attachEvent("on"+e,t),n.attachEvent("on"+e,t))},detachEvent:function(e,t){void 0!==n.addEventListener?n.removeEventListener(e,t,!1):n.document&&n.detachEvent&&(n.document.detachEvent("on"+e,t),n.detachEvent("on"+e,t))},unloadAdd:function(e){if(s)return null;var t=r.string(8);return o[t]=e,i&&setTimeout(this.triggerUnloadCallbacks,0),t},unloadDel:function(e){e in o&&delete o[e]},triggerUnloadCallbacks:function(){for(var e in o)o[e](),delete o[e]}},s||t.exports.attachEvent("unload",(fu