text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["react-socket"]=t():e["react-socket"]=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(31),e.exports=n(34)},function(e,t,n){"use strict";var r=n(6),o=r;e.exports=o},function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i="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},u=n(4),s=n(11),a=(n(1),n(14),Object.prototype.hasOwnProperty),c=n(12),l={key:!0,ref:!0,__self:!0,__source:!0},f=function(e,t,n,r,o,i,u){var s={$$typeof:c,type:e,key:t,ref:n,props:u,_owner:i};return s};f.createElement=function(e,t,n){var i,u={},c=null,p=null,d=null,y=null;if(null!=t){r(t)&&(p=t.ref),o(t)&&(c=""+t.key),d=void 0===t.__self?null:t.__self,y=void 0===t.__source?null:t.__source;for(i in t)a.call(t,i)&&!l.hasOwnProperty(i)&&(u[i]=t[i])}var h=arguments.length-2;if(1===h)u.children=n;else if(h>1){for(var v=Array(h),b=0;b<h;b++)v[b]=arguments[b+2];u.children=v}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)void 0===u[i]&&(u[i]=m[i])}return f(e,c,p,d,y,s.current,u)},f.createFactory=function(e){var t=f.createElement.bind(null,e);return t.type=e,t},f.cloneAndReplaceKey=function(e,t){var n=f(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},f.cloneElement=function(e,t,n){var i,c=u({},e.props),p=e.key,d=e.ref,y=e._self,h=e._source,v=e._owner;if(null!=t){r(t)&&(d=t.ref,v=s.current),o(t)&&(p=""+t.key);var b;e.type&&e.type.defaultProps&&(b=e.type.defaultProps);for(i in t)a.call(t,i)&&!l.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==b?c[i]=b[i]:c[i]=t[i])}var m=arguments.length-2;if(1===m)c.children=n;else if(m>1){for(var g=Array(m),E=0;E<m;E++)g[E]=arguments[E+2];c.children=g}return f(e.type,p,d,y,h,v,c)},f.isValidElement=function(e){return"object"===("undefined"==typeof e?"undefined":i(e))&&null!==e&&e.$$typeof===c},e.exports=f},function(e,t,n){"use strict";function r(e,t,n,r,i,u,s,a){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,u,s,a],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};e.exports=r},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,s,a=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var l in r)i.call(r,l)&&(a[l]=r[l]);if(o){s=o(r);for(var f=0;f<s.length;f++)u.call(r,s[f])&&(a[s[f]]=r[s[f]])}}return a}},function(e,t){"use strict";function n(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=n},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=s,this.updater=n||u}var o="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},i=n(5),u=n(9),s=(n(14),n(7));n(3),n(1);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!==("undefined"==typeof e?"undefined":o(e))&&"function"!=typeof e&&null!=e?i("85"):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";function r(e,t){}var o=(n(1),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")}});e.exports=o},function(e,t,n){"use strict";e.exports=n(21)},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,u,s){if(!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,u,s],l=0;a=new Error(t.replace(/%s/g,function(){return c[l++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}};e.exports=r},function(e,t){"use strict";e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){for(var n,r=[],o=0,i=0,u="",s=t&&t.delimiter||"/";null!=(n=g.exec(e));){var l=n[0],f=n[1],p=n.index;if(u+=e.slice(i,p),i=p+l.length,f)u+=f[1];else{var d=e[i],y=n[2],h=n[3],v=n[4],b=n[5],m=n[6],E=n[7];u&&(r.push(u),u="");var x=null!=y&&null!=d&&d!==y,_="+"===m||"*"===m,k="?"===m||"*"===m,P=n[2]||s,w=v||b;r.push({name:h||o++,prefix:y||"",delimiter:P,optional:k,repeat:_,partial:x,asterisk:!!E,pattern:w?c(w):E?".*":"[^"+a(P)+"]+?"})}}return i<e.length&&(u+=e.substr(i)),u&&r.push(u),r}function o(e,t){return s(r(e,t))}function i(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function u(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){for(var t=new Array(e.length),n=0;n<e.length;n++)"object"===b(e[n])&&(t[n]=new RegExp("^(?:"+e[n].pattern+")$"));return function(n,r){for(var o="",s=n||{},a=r||{},c=a.pretty?i:encodeURIComponent,l=0;l<e.length;l++){var f=e[l];if("string"!=typeof f){var p,d=s[f.name];if(null==d){if(f.optional){f.partial&&(o+=f.prefix);continue}throw new TypeError('Expected "'+f.name+'" to be defined')}if(m(d)){if(!f.repeat)throw new TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(d)+"`");if(0===d.length){if(f.optional)continue;throw new TypeError('Expected "'+f.name+'" to not be empty')}for(var y=0;y<d.length;y++){if(p=c(d[y]),!t[l].test(p))throw new TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===y?f.prefix:f.delimiter)+p}}else{if(p=f.asterisk?u(d):c(d),!t[l].test(p))throw new TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+p+'"');o+=f.prefix+p}}else o+=f}return o}}function a(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function f(e){return e.sensitive?"":"i"}function p(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}function d(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(v(e[o],t,n).source);var i=new RegExp("(?:"+r.join("|")+")",f(n));return l(i,t)}function y(e,t,n){return h(r(e,n),t,n)}function h(e,t,n){m(t)||(n=t||n,t=[]),n=n||{};for(var r=n.strict,o=n.end!==!1,i="",u=0;u<e.length;u++){var s=e[u];if("string"==typeof s)i+=a(s);else{var c=a(s.prefix),p="(?:"+s.pattern+")";t.push(s),s.repeat&&(p+="(?:"+c+p+")*"),p=s.optional?s.partial?c+"("+p+")?":"(?:"+c+"("+p+"))?":c+"("+p+")",i+=p}}var d=a(n.delimiter||"/"),y=i.slice(-d.length)===d;return r||(i=(y?i.slice(0,-d.length):i)+"(?:"+d+"(?=$))?"),i+=o?"$":r&&y?"":"(?="+d+"|$)",l(new RegExp("^"+i,f(n)),t)}function v(e,t,n){return m(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?p(e,t):m(e)?d(e,t,n):y(e,t,n)}var b="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},m=n(17);e.exports=v,e.exports.parse=r,e.exports.compile=o,e.exports.tokensToFunction=s,e.exports.tokensToRegExp=h;var g=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function r(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var o={escape:n,unescape:r};e.exports=o},function(e,t,n){"use strict";var r=n(5),o=(n(3),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},u=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},a=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,l=o,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=c),n.release=a,n},p={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:u,fourArgumentPooler:s};e.exports=p},function(e,t,n){"use strict";var r=n(4),o=n(22),i=n(8),u=n(27),s=n(23),a=n(24),c=n(2),l=n(25),f=n(28),p=n(29),d=(n(1),c.createElement),y=c.createFactory,h=c.cloneElement,v=r,b={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:p},Component:i,PureComponent:u,createElement:d,cloneElement:h,isValidElement:c.isValidElement,PropTypes:l,createClass:s.createClass,createFactory:y,createMixin:function(e){return e},DOM:a,version:f,__spread:v};e.exports=b},function(e,t,n){"use strict";function r(e){return(""+e).replace(E,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function u(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);b(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function a(e,t,n){var o=e.result,i=e.keyPrefix,u=e.func,s=e.context,a=u.call(s,t,e.count++);Array.isArray(a)?c(a,o,n,v.thatReturnsArgument):null!=a&&(h.isValidElement(a)&&(a=h.cloneAndReplaceKey(a,i+(!a.key||t&&t.key===a.key?"":r(a.key)+"/")+n)),o.push(a))}function c(e,t,n,o,i){var u="";null!=n&&(u=r(n)+"/");var c=s.getPooled(t,u,o,i);b(e,a,c),s.release(c)}function l(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function f(e,t,n){return null}function p(e,t){return b(e,f,null)}function d(e){var t=[];return c(e,t,null,v.thatReturnsArgument),t}var y=n(20),h=n(2),v=n(6),b=n(30),m=y.twoArgumentPooler,g=y.fourArgumentPooler,E=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},y.addPoolingTo(o,m),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},y.addPoolingTo(s,g);var x={forEach:u,map:l,mapIntoWithKeyPrefixInternal:c,count:p,toArray:d};e.exports=x},function(e,t,n){"use strict";function r(e){return e}function o(e,t){var n=x.hasOwnProperty(t)?x[t]:null;k.hasOwnProperty(t)&&("OVERRIDE_BASE"!==n?d("73",t):void 0),e&&("DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n?d("74",t):void 0)}function i(e,t){if(t){"function"==typeof t?d("75"):void 0,v.isValidElement(t)?d("76"):void 0;var n=e.prototype,r=n.__reactAutoBindPairs;t.hasOwnProperty(g)&&_.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==g){var u=t[i],s=n.hasOwnProperty(i);if(o(s,i),_.hasOwnProperty(i))_[i](e,u);else{var l=x.hasOwnProperty(i),f="function"==typeof u,p=f&&!l&&!s&&t.autobind!==!1;if(p)r.push(i,u),n[i]=u;else if(s){var y=x[i];!l||"DEFINE_MANY_MERGED"!==y&&"DEFINE_MANY"!==y?d("77",y,i):void 0,"DEFINE_MANY_MERGED"===y?n[i]=a(n[i],u):"DEFINE_MANY"===y&&(n[i]=c(n[i],u))}else n[i]=u}}}else;}function u(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in _;o?d("78",n):void 0;var i=n in e;i?d("79",n):void 0,e[n]=r}}}function s(e,t){e&&t&&"object"===("undefined"==typeof e?"undefined":p(e))&&"object"===("undefined"==typeof t?"undefined":p(t))?void 0:d("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?d("81",n):void 0,e[n]=t[n]);return e}function a(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return s(o,n),s(o,r),o}}function c(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function f(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=l(e,o)}}var p="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},d=n(5),y=n(4),h=n(8),v=n(2),b=(n(13),n(9)),m=n(7),g=(n(3),n(1),"mixins"),E=[],x={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},_={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=y({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=y({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=a(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=y({},e.propTypes,t)},statics:function(e,t){u(e,t)},autobind:function(){}},k={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},P=function(){};y(P.prototype,h.prototype,k);var w={createClass:function(e){var t=r(function(e,n,r){this.__reactAutoBindPairs.length&&f(this),this.props=e,this.context=n,this.refs=m,this.updater=r||b,this.state=null;var o=this.getInitialState?this.getInitialState():null;"object"!==("undefined"==typeof o?"undefined":p(o))||Array.isArray(o)?d("82",t.displayName||"ReactCompositeComponent"):void 0,this.state=o});t.prototype=new P,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],E.forEach(i.bind(null,t)),i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:d("83");for(var n in x)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){E.push(e)}}};e.exports=w},function(e,t,n){"use strict";var r=n(2),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=i},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function i(e){function t(t,n,r,i,u,s,a){i=i||O,s=s||r;if(null==n[r]){var c=k[u];return t?new o(null===n[r]?"The "+c+" `"+s+"` is marked as required "+("in `"+i+"`, but its value is `null`."):"The "+c+" `"+s+"` is marked as required in "+("`"+i+"`, but its value is `undefined`.")):null}return e(n,r,i,u,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function u(e){function t(t,n,r,i,u,s){var a=t[n],c=m(a);if(c!==e){var l=k[i],f=g(a);return new o("Invalid "+l+" `"+u+"` of type "+("`"+f+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return i(t)}function s(){return i(w.thatReturns(null))}function a(e){function t(t,n,r,i,u){if("function"!=typeof e)return new o("Property `"+u+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var a=k[i],c=m(s);return new o("Invalid "+a+" `"+u+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var f=e(s,l,r,i,u+"["+l+"]",P);if(f instanceof Error)return f}return null}return i(t)}function c(){function e(e,t,n,r,i){var u=e[t];if(!_.isValidElement(u)){var s=k[r],a=m(u);return new o("Invalid "+s+" `"+i+"` of type "+("`"+a+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return i(e)}function l(e){function t(t,n,r,i,u){if(!(t[n]instanceof e)){var s=k[i],a=e.name||O,c=E(t[n]);return new o("Invalid "+s+" `"+u+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return i(t)}function f(e){function t(t,n,i,u,s){for(var a=t[n],c=0;c<e.length;c++)if(r(a,e[c]))return null;var l=k[u],f=JSON.stringify(e);return new o("Invalid "+l+" `"+s+"` of value `"+a+"` "+("supplied to `"+i+"`, expected one of "+f+"."))}return Array.isArray(e)?i(t):w.thatReturnsNull}function p(e){function t(t,n,r,i,u){if("function"!=typeof e)return new o("Property `"+u+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],a=m(s);if("object"!==a){var c=k[i];return new o("Invalid "+c+" `"+u+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var l in s)if(s.hasOwnProperty(l)){var f=e(s,l,r,i,u+"."+l,P);if(f instanceof Error)return f}return null}return i(t)}function d(e){function t(t,n,r,i,u){for(var s=0;s<e.length;s++){var a=e[s];if(null==a(t,n,r,i,u,P))return null}var c=k[i];return new o("Invalid "+c+" `"+u+"` supplied to "+("`"+r+"`."))}return Array.isArray(e)?i(t):w.thatReturnsNull}function y(){function e(e,t,n,r,i){if(!v(e[t])){var u=k[r];return new o("Invalid "+u+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return i(e)}function h(e){function t(t,n,r,i,u){var s=t[n],a=m(s);if("object"!==a){var c=k[i];return new o("Invalid "+c+" `"+u+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var f=e[l];if(f){var p=f(s,l,r,i,u+"."+l,P);if(p)return p}}return null}return i(t)}function v(e){switch("undefined"==typeof e?"undefined":x(e)){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||_.isValidElement(e))return!0;var t=S(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function b(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function m(e){var t="undefined"==typeof e?"undefined":x(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":b(t,e)?"symbol":t}function g(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function E(e){return e.constructor&&e.constructor.name?e.constructor.name:O}var x="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},_=n(2),k=n(13),P=n(26),w=n(6),S=n(15),O=(n(1),"<<anonymous>>"),j={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:s(),arrayOf:a,element:c(),instanceOf:l,node:y(),objectOf:p,oneOf:f,oneOfType:d,shape:h};o.prototype=Error.prototype,e.exports=j},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||s}function o(){}var i=n(4),u=n(8),s=n(9),a=n(7);o.prototype=u.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,u.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},function(e,t){"use strict";e.exports="15.4.2"},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o("143"),e}var o=n(5),i=n(2);n(3);e.exports=r},function(e,t,n){"use strict";function r(e,t){return e&&"object"===("undefined"==typeof e?"undefined":u(e))&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var d="undefined"==typeof e?"undefined":u(e);if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||"object"===d&&e.$$typeof===a)return n(i,e,""===t?f+r(e,0):t),1;var y,h,v=0,b=""===t?f:t+p;if(Array.isArray(e))for(var m=0;m<e.length;m++)y=e[m],h=b+r(y,m),v+=o(y,h,n,i);else{var g=c(e);if(g){var E,x=g.call(e);if(g!==e.entries)for(var _=0;!(E=x.next()).done;)y=E.value,h=b+r(y,_++),v+=o(y,h,n,i);else for(;!(E=x.next()).done;){var k=E.value;k&&(y=k[1],h=b+l.escape(k[0])+p+r(y,0),v+=o(y,h,n,i))}}else if("object"===d){var P="",w=String(e);s("31","[object Object]"===w?"object with keys {"+Object.keys(e).join(", ")+"}":w,P)}}return v}function i(e,t,n){return null==e?0:o(e,"",t,n)}var u="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},s=n(5),a=(n(11),n(12)),c=n(15),l=(n(3),n(19)),f=(n(1),"."),p=":";e.exports=i},function(e,t,n){"use strict";Object.assign=n(4)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(10),c=r(a),l=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,[{key:"componentWillMount",value:function(){var e=this,t=this.context.socket,n=this.props.route;this.unsub=t.subscribe(n,function(t){e.executeAction(t)})}},{key:"componentWillReceiveProps",value:function(){var e=this;this.actions&&this.actions.length&&this.actions.forEach(function(t){return e.executeAction(e.actions.shift())})}},{key:"executeAction",value:function(e){var t="condition"in this.props,n=this.props,r=n.action,o=n.once,i=n.condition;this.firedOnce&&o||(o&&this.unsub&&(this.unsub(),this.unsub=null),t&&Boolean(i)||!t?(r(e),this.firedOnce=!0):this.actions=this.actions?this.actions.concat([e]):[e])}},{key:"componentWillUnmount",value:function(){this.unsub&&this.unsub()}},{key:"render",value:function(){return null}}]),t}(c.default.Component);l.displayName="SocketAction",l.contextTypes={socket:a.PropTypes.shape({subscribe:a.PropTypes.func.isRequired,send:a.PropTypes.func.isRequired}).isRequired},l.propTypes={route:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.array]).isRequired,condition:a.PropTypes.any,once:a.PropTypes.any,action:a.PropTypes.func.isRequired},t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(16),c=r(a),l=n(10),f=r(l),p=n(36),d=n(35),y=r(d),h=function(e){function t(e,n){o(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.socket=e.socket,r.sendQueue=[],r.receiveQueue=[],r.subs={},r.totalSubs=0,r.send=r.send.bind(r),r.subscribe=r.subscribe.bind(r),r.handleMessage=r.handleMessage.bind(r),r}return u(t,e),s(t,[{key:"getChildContext",value:function(){var e=this.subscribe,t=this.send;return{socket:{subscribe:e,send:t}}}},{key:"componentWillMount",value:function(){var e=this,t=this.props,n=t.children,r=t.socket;(0,c.default)(null===n||1===f.default.Children.count(n),"A <Source> may have only one child element"),(0,c.default)(r,"A <Source> must have a socket constructor"),this.socket=r,this.socket&&(this.socket.onmessage=this.handleMessage,this.socket.open(function(){e.flushSendQueue(),e.flushReceiveQueue()}))}},{key:"componentWillUnmount",value:function(){this.socket&&this.socket.onmessage&&(this.flushSendQueue(),this.flushReceiveQueue(),this.socket.onmessage=null,this.socket=null)}},{key:"handleMessage",value:function(e){var t=this;if(this.socket&&this.socket.readyState===this.socket.OPEN&&!this.receiveQueue.length){if(!e.url||!this.totalSubs)return null;var n=e.url,r=Object.keys(this.subs),o=r.filter(function(e){return(0,y.default)(n,e)});o.forEach(function(n){var r=t.subs[n];r&&r.length&&r.forEach(function(t){t.callBack&&t.callBack(e)})})}else this.receiveQueue=this.receiveQueue.concat([e])}},{key:"subscribe",value:function(e,t){var n=this;if(Array.isArray(e)){var r=e.map(function(e){return n.subscribe(e,t)});return function(){r.forEach(function(e){return e()})}}var o=(0,p.uuid)();return this.routeExists(e)?this.subs[e]=this.subs[e].concat([{sub_id:o,callBack:t,route:e}]):this.subs[e]=[{sub_id:o,callBack:t,route:e}],this.totalSubs++,function(){return n.totalSubs--,n.subs[e]&&!n.subs[e].length?void delete n.subs[e]:void(n.subs[e]=n.subs[e].filter(function(e){return e.sub_id!==o}))}}},{key:"routeExists",value:function(e){return Boolean(this.subs[e])}},{key:"send",value:function(e){this.socket&&this.socket.readyState===this.socket.OPEN&&!this.sendQueue.length?this.socket.send(e):this.sendQueue=this.sendQueue.concat([e])}},{key:"flushSendQueue",value:function(){if(this.sendQueue&&this.sendQueue.length&&this.socket&&this.socket.readyState===this.socket.OPEN)for(var e=0;e<this.sendQueue.length;e++){var t=this.sendQueue.shift();this.send(t)}}},{key:"flushReceiveQueue",value:function(){if(this.sendQueue&&this.receiveQueue.length&&this.socket&&this.socket.readyState===this.socket.OPEN)for(var e=0;e<this.receiveQueue.length;e++){var t=this.receiveQueue.shift();this.send(t)}}},{key:"render",value:function(){var e=this.props.children;return e?f.default.Children.only(e):null}}]),t}(l.Component);h.propTypes={socket:f.default.PropTypes.any.isRequired,children:l.PropTypes.node},h.childContextTypes={socket:l.PropTypes.object.isRequired},t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.withSocket=t.Action=t.Source=void 0;var o=n(33),i=r(o),u=n(32),s=r(u),a=n(37),c=r(a);t.Source=i.default,t.Action=s.default,t.withSocket=c.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return Array.isArray(e)?e:Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),u=r(i),s={},a=1e4,c=0,l=function(e,t){var n=""+t.end+t.strict,r=s[n]||(s[n]={});if(r[e])return r[e];var o=[],i=(0,u.default)(e,o,t),l={re:i,keys:o};return c<a&&(r[e]=l,c++),l},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof t&&(t={
  path:t});var n=t,r=n.exact,i=void 0!==r&&r,u=n.strict,s=void 0!==u&&u,a=t.path||t.from;if(!a)return{url:e,isExact:!0,params:{}};var c=l(a,{end:i,strict:s}),f=c.re,p=c.keys,d=f.exec(e);if(!d)return null;var y=o(d),h=y[0],v=y.slice(1),b=e===h;return i&&!b?null:{path:a,url:"/"===a&&""===h?"/":h,isExact:b,params:p.reduce(function(e,t,n){return e[t.name]=v[n],e},{})}};t.default=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.uuid=function(){function e(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t}return e()+e(!0)+e(!0)+e()}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(10),c=r(a),l=function(e){var t,n;return n=t=function(t){function n(){return o(this,n),i(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return u(n,t),s(n,[{key:"render",value:function(){return c.default.createElement(e,Object.assign({},this.props,{socket:this.context.socket}))}}]),n}(c.default.Component),t.displayName="withSocket("+(e.displayName||e.name)+")",t.contextTypes={socket:a.PropTypes.shape({subscribe:a.PropTypes.func.isRequired,send:a.PropTypes.func.isRequired}).isRequired},n};t.default=l}])});
  //# sourceMappingURL=react-socket.js.map