!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SockJS=e():t.SockJS=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=32)}([function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(){i.call(this)}var o=n(0),i=n(18);o(r,i),r.prototype.removeAllListeners=function(t){t?delete this._listeners[t]:this._listeners={}},r.prototype.once=function(t,e){function n(){r.removeListener(t,n),o||(o=!0,e.apply(this,arguments))}var r=this,o=!1;this.on(t,n)},r.prototype.emit=function(){var t=arguments[0],e=this._listeners[t];if(e){for(var n=arguments.length,r=new Array(n-1),o=1;o1)))/4)-_((t-1901+e)/100)+_((t-1601+e)/400)};if((d=y.hasOwnProperty)||(d=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=b?d=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,d=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,d.call(this,t)}),m=function(t,e){var n,r,o,i=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)d.call(r,o)&&i++;return n=r=null,i?m=2==i?function(t,e){var n,r={},o="[object Function]"==b.call(t);for(n in t)o&&"prototype"==n||d.call(r,n)||!(r[n]=1)||!d.call(t,n)||e(n)}:function(t,e){var n,r,o="[object Function]"==b.call(t);for(n in t)o&&"prototype"==n||!d.call(t,n)||(r="constructor"===n)||e(n);(r||d.call(t,n="constructor"))&&e(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(t,e){var n,o,i="[object Function]"==b.call(t),s=!i&&"function"!=typeof t.constructor&&a[typeof t.hasOwnProperty]&&t.hasOwnProperty||d;for(n in t)i&&"prototype"==n||!s.call(t,n)||e(n);for(o=r.length;n=r[--o];s.call(t,n)&&e(n));}),m(t,e)},!n("json-stringify")){var S={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},T=function(t,e){return("000000"+(e||0)).slice(-t)},O=function(t){for(var e='"',n=0,r=t.length,o=!w||r>10,i=o&&(w?t.split(""):t);n-1/0&&a<1/0){if(E){for(h=_(a/864e5),u=_(h/365.2425)+1970-1;E(u+1,0)<=h;u++);for(l=_((h-E(u,0))/30.42);E(u,l+1)<=h;l++);h=1+h-E(u,l),p=(a%864e5+864e5)%864e5,y=_(p/36e5)%24,g=_(p/6e4)%60,w=_(p/1e3)%60,x=p%1e3}else u=a.getUTCFullYear(),l=a.getUTCMonth(),h=a.getUTCDate(),y=a.getUTCHours(),g=a.getUTCMinutes(),w=a.getUTCSeconds(),x=a.getUTCMilliseconds();a=(u<=0||u>=1e4?(u<0?"-":"+")+T(6,u<0?-u:u):T(4,u))+"-"+T(2,l+1)+"-"+T(2,h)+"T"+T(2,y)+":"+T(2,g)+":"+T(2,w)+"."+T(3,x)+"Z"}else a=null;if(n&&(a=n.call(e,t,a)),null===a)return"null";if("[object Boolean]"==(c=b.call(a)))return""+a;if("[object Number]"==c)return a>-1/0&&a<1/0?""+a:"null";if("[object String]"==c)return O(""+a);if("object"==typeof a){for(N=s.length;N--;)if(s[N]===a)throw f();if(s.push(a),S=[],k=i,i+=o,"[object Array]"==c){for(A=0,N=a.length;A0)for(r="",n>10&&(n=10);r.length=48&&o<=57||o>=97&&o<=102||o>=65&&o<=70||I();t+=N("0x"+i.slice(e,C));break;default:I()}else{if(34==o)break;for(o=i.charCodeAt(C),e=C;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++C);t+=i.slice(e,C)}if(34==i.charCodeAt(C))return C++,t;I();default:if(e=C,45==o&&(r=!0,o=i.charCodeAt(++C)),o>=48&&o<=57){for(48==o&&(o=i.charCodeAt(C+1))>=48&&o<=57&&I(),r=!1;C=48&&o<=57;C++);if(46==i.charCodeAt(C)){for(n=++C;n=48&&o<=57;n++);n==C&&I(),C=n}if(101==(o=i.charCodeAt(C))||69==o){for(o=i.charCodeAt(++C),43!=o&&45!=o||C++,n=C;n=48&&o<=57;n++);n==C&&I(),C=n}return+i.slice(e,C)}if(r&&I(),"true"==i.slice(C,C+4))return C+=4,!0;if("false"==i.slice(C,C+5))return C+=5,!1;if("null"==i.slice(C,C+4))return C+=4,null;I()}return"$"},L=function(t){var e,n;if("$"==t&&I(),"string"==typeof t){if("@"==(w?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];"]"!=(t=P());n||(n=!0))n&&(","==t?"]"==(t=P())&&I():I()),","==t&&I(),e.push(L(t));return e}if("{"==t){for(e={};"}"!=(t=P());n||(n=!0))n&&(","==t?"}"==(t=P())&&I():I()),","!=t&&"string"==typeof t&&"@"==(w?t.charAt(0):t[0])&&":"==P()||I(),e[t.slice(1)]=L(P());return e}I()}return t},R=function(t,e,n){var r=U(t,e,n);r===v?delete t[e]:t[e]=r},U=function(t,e,n){var r,o=t[e];if("object"==typeof o&&o)if("[object Array]"==b.call(o))for(r=o.length;r--;)R(o,r,n);else m(o,function(t){R(o,t,n)});return n.call(t,e,o)};e.parse=function(t,e){var n,r;return C=0,A=""+t,n=L(P()),"$"!=P()&&I(),C=A=null,e&&"[object Function]"==b.call(e)?U((r={},r[""]=n,r),"",e):n}}}return e.runInContext=i,e}var s=n(61),a={function:!0,object:!0},c=a[typeof e]&&e&&!e.nodeType&&e,u=a[typeof window]&&window||this,l=c&&a[typeof t]&&t&&!t.nodeType&&"object"==typeof r&&r;if(!l||l.global!==l&&l.window!==l&&l.self!==l||(u=l),c&&!s)i(u,c);else{var f=u.JSON,h=u.JSON3,p=!1,d=i(u,u.JSON3={noConflict:function(){return p||(p=!0,u.JSON=f,u.JSON3=h,f=h=null),d}});u.JSON={parse:d.parse,stringify:d.stringify}}s&&void 0!==(o=function(){return d}.call(e,n,e,t))&&(t.exports=o)}).call(this)}).call(e,n(62)(t),n(1))},function(t,e,n){"use strict";(function(e){var r=n(7),o={},i=!1,s=e.chrome&&e.chrome.app&&e.chrome.app.runtime;t.exports={attachEvent:function(t,n){void 0!==e.addEventListener?e.addEventListener(t,n,!1):e.document&&e.attachEvent&&(e.document.attachEvent("on"+t,n),e.attachEvent("on"+t,n))},detachEvent:function(t,n){void 0!==e.addEventListener?e.removeEventListener(t,n,!1):e.document&&e.detachEvent&&(e.document.detachEvent("on"+t,n),e.detachEvent("on"+t,n))},unloadAdd:function(t){if(s)return null;var e=r.string(8);return o[e]=t,i&&setTimeout(this.triggerUnloadCallbacks,0),e},unloadDel:function(t){t in o&&delete o[t]},triggerUnloadCallbacks:function(){for(var t in o)o[t](),delete o[t]}};var a=function(){i||(i=!0,t.exports.triggerUnloadCallbacks())};s||t.exports.attachEvent("unload",a)}).call(e,n(1))},function(t,e,n){"use strict";function r(t){return function(e,n,r){c("create ajax sender",e,n);var o={};"string"==typeof n&&(o.headers={"Content-type":"text/plain"});var i=s.addPath(e,"/xhr_send"),a=new t("POST",i,n,o);return a.once("finish",function(t){if(c("finish",t),a=null,200!==t&&204!==t)return r(new Error("http status "+t));r()}),function(){c("abort"),a.close(),a=null;var t=new Error("Aborted");t.code=1e3,r(t)}}}function o(t,e,n,o){a.call(this,t,e,r(o),n,o)}var i=n(0),s=n(3),a=n(27),c=function(){};i(o,a),t.exports=o},function(t,e,n){"use strict";var r=n(56),o="abcdefghijklmnopqrstuvwxyz012345";t.exports={string:function(t){for(var e=o.length,n=r.randomBytes(t),i=[],s=0;s'),l.close(),l.parentWindow[t.exports.WPrefix]=e[t.exports.WPrefix];var m=l.createElement("div");return l.body.appendChild(m),c=l.createElement("iframe"),m.appendChild(c),c.src=n,c.onerror=function(){p("onerror")},i=setTimeout(function(){p("timeout")},15e3),a=r.unloadAdd(h),{post:d,cleanup:h,loaded:f}}},t.exports.iframeEnabled=!1,e.document&&(t.exports.iframeEnabled=("function"==typeof e.postMessage||"object"==typeof e.postMessage)&&!i.isKonqueror())}).call(e,n(1))},function(t,e,n){"use strict";function r(t,e){s(t),i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){s("finish",t,e),n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";s("close",r),n.emit("close",null,r),n._cleanup()})}var o=n(0),i=n(2).EventEmitter,s=function(){};o(r,i),r.prototype._chunkHandler=function(t,e){if(s("_chunkHandler",t),200===t&&e)for(var n=-1;;this.bufferPosition+=n+1){var r=e.slice(this.bufferPosition);if(-1===(n=r.indexOf("\n")))break;var o=r.slice(0,n);o&&(s("message",o),this.emit("message",o))}},r.prototype._cleanup=function(){s("_cleanup"),this.removeAllListeners()},r.prototype.abort=function(){s("abort"),this.xo&&(this.xo.close(),s("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var o=n(0),i=n(22);o(r,i),r.enabled=i.enabled&&i.supportsCORS,t.exports=r},function(t,e,n){"use strict";function r(t){this.type=t}r.prototype.initEvent=function(t,e,n){return this.type=t,this.bubbles=e,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},function(t,e,n){"use strict";(function(e){var r=n(0),o=n(26),i=n(16);t.exports=function(t){function n(e,n){o.call(this,t.transportName,e,n)}return r(n,o),n.enabled=function(n,r){if(!e.document)return!1;var s=i.extend({},r);return s.sameOrigin=!0,t.enabled(s)&&o.enabled()},n.transportName="iframe-"+t.transportName,n.needBody=!0,n.roundTrips=o.roundTrips+t.roundTrips-1,n.facadeTransport=t,n}}).call(e,n(1))},function(t,e,n){"use strict";(function(e){function r(t,e,n){u(t,e);var r=this;o.call(this),setTimeout(function(){r._start(t,e,n)},0)}var o=n(2).EventEmitter,i=n(0),s=n(5),a=n(9),c=n(3),u=function(){};i(r,o),r.prototype._start=function(t,n,r){u("_start");var o=this,i=new e.XDomainRequest;n=c.addQuery(n,"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(t,n),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(r)}catch(t){this._error()}},r.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},r.prototype._cleanup=function(t){if(u("cleanup",t),this.xdr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,t)try{this.xdr.abort()}catch(t){}this.unloadRef=this.xdr=null}},r.prototype.close=function(){u("close"),this._cleanup(!0)},r.enabled=!(!e.XDomainRequest||!a.hasDomain()),t.exports=r}).call(e,n(1))},function(t,e,n){"use strict";t.exports={isObject:function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},extend:function(t){if(!this.isObject(t))return t;for(var e,n,r=1,o=arguments.length;r1?this._listeners[t]=n.slice(0,r).concat(n.slice(r+1)):delete this._listeners[t]):void 0}},r.prototype.dispatchEvent=function(){var t=arguments[0],e=t.type,n=1===arguments.length?[t]:Array.apply(null,arguments);if(this["on"+e]&&this["on"+e].apply(this,n),e in this._listeners)for(var r=this._listeners[e],o=0;o0&&(u("chunk"),i.emit("chunk",e,t));break;case 4:e=n.status,u("status",e),1223===e&&(e=204),12005!==e&&12029!==e||(e=0),u("finish",e,n.responseText),i.emit("finish",e,n.responseText),i._cleanup(!1)}}};try{i.xhr.send(n)}catch(t){i.emit("finish",0,""),i._cleanup(!1)}},r.prototype._cleanup=function(t){if(u("cleanup"),this.xhr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),t)try{this.xhr.abort()}catch(t){}this.unloadRef=this.xhr=null}},r.prototype.close=function(){u("close"),this._cleanup(!0)},r.enabled=!!c;var l=["Active"].concat("Object").join("X");!r.enabled&&l in e&&(u("overriding xmlhttprequest"),c=function(){try{return new e[l]("Microsoft.XMLHTTP")}catch(t){return null}},r.enabled=!!new c);var f=!1;try{f="withCredentials"in new c}catch(t){}r.supportsCORS=f,t.exports=r}).call(e,n(1))},function(t,e,n){(function(e){t.exports=e.EventSource}).call(e,n(1))},function(t,e,n){"use strict";function r(t){if(!r.enabled())throw new Error("Transport created when disabled");i.call(this,t,"/eventsource",s,a)}var o=n(0),i=n(6),s=n(48),a=n(12),c=n(23);o(r,i),r.enabled=function(){return!!c},r.transportName="eventsource",r.roundTrips=2,t.exports=r},function(t,e,n){"use strict";function r(t){if(!i.enabled)throw new Error("Transport created when disabled");a.call(this,t,"/htmlfile",i,s)}var o=n(0),i=n(49),s=n(8),a=n(6);o(r,a),r.enabled=function(t){return i.enabled&&t.sameOrigin},r.transportName="htmlfile",r.roundTrips=2,t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(!r.enabled())throw new Error("Transport created when disabled");s.call(this);var o=this;this.origin=c.getOrigin(n),this.baseUrl=n,this.transUrl=e,this.transport=t,this.windowId=f.string(8);var i=c.addPath(n,"/iframe.html")+"#"+this.windowId;h(t,e,i),this.iframeObj=u.createIframe(i,function(t){h("err callback"),o.emit("close",1006,"Unable to load an iframe ("+t+")"),o.close()}),this.onmessageCallback=this._message.bind(this),l.attachEvent("message",this.onmessageCallback)}var o=n(0),i=n(4),s=n(2).EventEmitter,a=n(30),c=n(3),u=n(10),l=n(5),f=n(7),h=function(){};o(r,s),r.prototype.close=function(){if(h("close"),this.removeAllListeners(),this.iframeObj){l.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(t){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},r.prototype._message=function(t){if(h("message",t.data),!c.isOriginEqual(t.origin,this.origin))return void h("not same origin",t.origin,this.origin);var e;try{e=i.parse(t.data)}catch(e){return void h("bad json",t.data)}if(e.windowId!==this.windowId)return void h("mismatched window id",e.windowId,this.windowId);switch(e.type){case"s":this.iframeObj.loaded(),this.postMessage("s",i.stringify([a,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",e.data);break;case"c":var n;try{n=i.parse(e.data)}catch(t){return void h("bad json",e.data)}this.emit("close",n[0],n[1]),this.close()}},r.prototype.postMessage=function(t,e){h("postMessage",t,e),this.iframeObj.post(i.stringify({windowId:this.windowId,type:t,data:e||""}),this.origin)},r.prototype.send=function(t){h("send",t),this.postMessage("m",t)},r.enabled=function(){return u.iframeEnabled},r.transportName="iframe",r.roundTrips=2,t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,o){var u=i.addPath(t,e);c(u);var l=this;s.call(this,t,n),this.poll=new a(r,u,o),this.poll.on("message",function(t){c("poll message",t),l.emit("message",t)}),this.poll.once("close",function(t,e){c("poll close",t,e),l.poll=null,l.emit("close",t,e),l.close()})}var o=n(0),i=n(3),s=n(46),a=n(47),c=function(){};o(r,s),r.prototype.close=function(){s.prototype.close.call(this),c("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},t.exports=r},function(t,e,n){"use strict";function r(t){if(!a.enabled)throw new Error("Transport created when disabled");i.call(this,t,"/xhr_streaming",s,a)}var o=n(0),i=n(6),s=n(11),a=n(15);o(r,i),r.enabled=function(t){return!t.cookie_needed&&!t.nullOrigin&&(a.enabled&&t.sameScheme)},r.transportName="xdr-streaming",r.roundTrips=2,t.exports=r},function(t,e,n){"use strict";function r(t){if(!c.enabled&&!a.enabled)throw new Error("Transport created when disabled");i.call(this,t,"/xhr",s,a)}var o=n(0),i=n(6),s=n(11),a=n(12),c=n(8);o(r,i),r.enabled=function(t){return!t.nullOrigin&&(!(!c.enabled||!t.sameOrigin)||a.enabled)},r.transportName="xhr-polling",r.roundTrips=2,t.exports=r},function(t,e){t.exports="1.1.2"},function(t,e,n){"use strict";(function(e){var r=n(43);t.exports=n(41)(r),"_sockjs_onload"in e&&setTimeout(e._sockjs_onload,1)}).call(e,n(1))},function(t,e,n){t.exports=n(31)},function(t,e,n){"use strict";function r(t){for(var e,n=/([^=?&]+)=?([^&]*)/g,r={};e=n.exec(t);r[decodeURIComponent(e[1])]=decodeURIComponent(e[2]));return r}function o(t,e){e=e||"";var n=[];"string"!=typeof e&&(e="?");for(var r in t)i.call(t,r)&&n.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return n.length?e+n.join("&"):""}var i=Object.prototype.hasOwnProperty;e.stringify=o,e.parse=r},function(t,e,n){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,n){"use strict";function r(){i.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}var o=n(0),i=n(13);o(r,i),t.exports=r},function(t,e,n){"use strict";function r(t){i.call(this),this.initEvent("message",!1,!1),this.data=t}var o=n(0),i=n(13);o(r,i),t.exports=r},function(t,e,n){"use strict";function r(t){this._transport=t,t.on("message",this._transportMessage.bind(this)),t.on("close",this._transportClose.bind(this))}var o=n(4),i=n(10);r.prototype._transportClose=function(t,e){i.postMessage("c",o.stringify([t,e]))},r.prototype._transportMessage=function(t){i.postMessage("t",t)},r.prototype._send=function(t){this._transport.send(t)},r.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=r},function(t,e,n){"use strict";var r=n(3),o=n(5),i=n(4),s=n(37),a=n(20),c=n(10),u=n(21),l=function(){};t.exports=function(t,e){var n={};e.forEach(function(t){t.facadeTransport&&(n[t.facadeTransport.transportName]=t.facadeTransport)}),n[a.transportName]=a;var f;t.bootstrap_iframe=function(){var e;c.currentWindowId=u.hash.slice(1);var a=function(o){if(o.source===parent&&(void 0===f&&(f=o.origin),o.origin===f)){var a;try{a=i.parse(o.data)}catch(t){return void l("bad json",o.data)}if(a.windowId===c.currentWindowId)switch(a.type){case"s":var h;try{h=i.parse(a.data)}catch(t){l("bad json",a.data);break}var p=h[0],d=h[1],m=h[2],v=h[3];if(l(p,d,m,v),p!==t.version)throw new Error('Incompatible SockJS! Main site uses: "'+p+'", the iframe: "'+t.version+'".');if(!r.isOriginEqual(m,u.href)||!r.isOriginEqual(v,u.href))throw new Error("Can't connect to different domain from within an iframe. ("+u.href+", "+m+", "+v+")");e=new s(new n[d](m,v));break;case"m":e._send(a.data);break;case"c":e&&e._close(),e=null}}};o.attachEvent("message",a),c.postMessage("s")}}},function(t,e,n){"use strict";(function(e){function r(t,n){var r=this;o.call(this);var i=function(){var e=r.ifr=new c(u.transportName,n,t);e.once("message",function(t){if(t){var e;try{e=s.parse(t)}catch(e){return l("bad json",t),r.emit("finish"),void r.close()}var n=e[0],o=e[1];r.emit("finish",n,o)}r.close()}),e.once("close",function(){r.emit("finish"),r.close()})};e.document.body?i():a.attachEvent("load",i)}var o=n(2).EventEmitter,i=n(0),s=n(4),a=n(5),c=n(26),u=n(20),l=function(){};i(r,o),r.enabled=function(){return c.enabled()},r.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},t.exports=r}).call(e,n(1))},function(t,e,n){"use strict";function r(t,e){p(t);var n=this;o.call(this),setTimeout(function(){n.doXhr(t,e)},0)}var o=n(2).EventEmitter,i=n(0),s=n(3),a=n(15),c=n(12),u=n(8),l=n(52),f=n(39),h=n(19),p=function(){};i(r,o),r._getReceiver=function(t,e,n){return n.sameOrigin?new h(e,u):c.enabled?new h(e,c):a.enabled&&n.sameScheme?new h(e,a):f.enabled()?new f(t,e):new h(e,l)},r.prototype.doXhr=function(t,e){var n=this,o=s.addPath(t,"/info");p("doXhr",o),this.xo=r._getReceiver(t,o,e),this.timeoutRef=setTimeout(function(){p("timeout"),n._cleanup(!1),n.emit("finish")},r.timeout),this.xo.once("finish",function(t,e){p("finish",t,e),n._cleanup(!0),n.emit("finish",t,e)})},r.prototype._cleanup=function(t){p("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!t&&this.xo&&this.xo.close(),this.xo=null},r.prototype.close=function(){p("close"),this.removeAllListeners(),this._cleanup(!1)},r.timeout=8e3,t.exports=r},function(t,e,n){"use strict";(function(e){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");b.call(this),this.readyState=r.CONNECTING,this.extensions="",this.protocol="",n=n||{},n.protocols_whitelist&&v.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=n.transports,this._transportOptions=n.transportOptions||{};var o=n.sessionId||8;if("function"==typeof o)this._generateSessionId=o;else{if("number"!=typeof o)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return u.string(o)}}this._server=n.server||u.numberString(1e3);var i=new s(t);if(!i.host||!i.protocol)throw new SyntaxError("The URL '"+t+"' is invalid");if(i.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==i.protocol&&"https:"!==i.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+i.protocol+"' is not allowed.");var a="https:"===i.protocol;if("https"===g.protocol&&!a)throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");e?Array.isArray(e)||(e=[e]):e=[];var c=e.sort();c.forEach(function(t,e){if(!t)throw new SyntaxError("The protocols entry '"+t+"' is invalid.");if(e=3e3&&t<=4999}n(42);var i,s=n(17),a=n(0),c=n(4),u=n(7),l=n(57),f=n(3),h=n(5),p=n(59),d=n(16),m=n(9),v=n(58),y=n(13),b=n(18),g=n(21),w=n(35),_=n(36),x=n(40),E=function(){};a(r,b),r.prototype.close=function(t,e){if(t&&!o(t))throw new Error("InvalidAccessError: Invalid code");if(e&&e.length>123)throw new SyntaxError("reason argument has an invalid length");if(this.readyState!==r.CLOSING&&this.readyState!==r.CLOSED){this._close(t||1e3,e||"Normal closure",!0)}},r.prototype.send=function(t){if("string"!=typeof t&&(t=""+t),this.readyState===r.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===r.OPEN&&this._transport.send(l.quote(t))},r.version=n(30),r.CONNECTING=0,r.OPEN=1,r.CLOSING=2,r.CLOSED=3,r.prototype._receiveInfo=function(t,e){if(E("_receiveInfo",e),this._ir=null,!t)return void this._close(1002,"Cannot connect to server");this._rto=this.countRTO(e),this._transUrl=t.base_url?t.base_url:this.url,t=d.extend(t,this._urlInfo),E("info",t);var n=i.filterToEnabled(this._transportsWhitelist,t);this._transports=n.main,E(this._transports.length+" enabled transports"),this._connect()},r.prototype._connect=function(){for(var t=this._transports.shift();t;t=this._transports.shift()){if(E("attempt",t.transportName),t.needBody&&(!e.document.body||void 0!==e.document.readyState&&"complete"!==e.document.readyState&&"interactive"!==e.document.readyState))return E("waiting for body"),this._transports.unshift(t),void h.attachEvent("load",this._connect.bind(this));var n=this._rto*t.roundTrips||5e3;this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),n),E("using timeout",n);var r=f.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),o=this._transportOptions[t.transportName];E("transport url",r);var i=new t(r,this._transUrl,o);return i.on("message",this._transportMessage.bind(this)),i.once("close",this._transportClose.bind(this)),i.transportName=t.transportName,void(this._transport=i)}this._close(2e3,"All transports failed",!1)},r.prototype._transportTimeout=function(){E("_transportTimeout"),this.readyState===r.CONNECTING&&this._transportClose(2007,"Transport timed out")},r.prototype._transportMessage=function(t){E("_transportMessage",t);var e,n=this,r=t.slice(0,1),o=t.slice(1);switch(r){case"o":return void this._open();case"h":return this.dispatchEvent(new y("heartbeat")),void E("heartbeat",this.transport)}if(o)try{e=c.parse(o)}catch(t){E("bad json",o)}if(void 0===e)return void E("empty payload",o);switch(r){case"a":Array.isArray(e)&&e.forEach(function(t){E("message",n.transport,t),n.dispatchEvent(new _(t))});break;case"m":E("message",this.transport,e),this.dispatchEvent(new _(e));break;case"c":Array.isArray(e)&&2===e.length&&this._close(e[0],e[1],!0)}},r.prototype._transportClose=function(t,e){if(E("_transportClose",this.transport,t,e),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),!o(t)&&2e3!==t&&this.readyState===r.CONNECTING)return void this._connect();this._close(t,e)},r.prototype._open=function(){E("_open",this._transport.transportName,this.readyState),this.readyState===r.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=r.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new y("open")),E("connected",this.transport)):this._close(1006,"Server lost session")},r.prototype._close=function(t,e,n){E("_close",this.transport,t,e,n,this.readyState);var o=!1;if(this._ir&&(o=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===r.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=r.CLOSING,setTimeout(function(){this.readyState=r.CLOSED,o&&this.dispatchEvent(new y("error"));var i=new w("close");i.wasClean=n||!1,i.code=t||1e3,i.reason=e,this.dispatchEvent(i),this.onmessage=this.onclose=this.onerror=null,E("disconnected")}.bind(this),0)},r.prototype.countRTO=function(t){return t>100?4*t:300+t},t.exports=function(t){return i=p(t),n(38)(r,t),r}}).call(e,n(1))},function(t,e,n){"use strict";function r(t){var e=+t;return e!==e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(t){return t>>>0}function i(){}var s,a=Array.prototype,c=Object.prototype,u=Function.prototype,l=String.prototype,f=a.slice,h=c.toString,p=function(t){return"[object Function]"===c.toString.call(t)},d=function(t){return"[object Array]"===h.call(t)},m=function(t){return"[object String]"===h.call(t)},v=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}();s=v?function(t,e,n,r){!r&&e in t||Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(t,e,n,r){!r&&e in t||(t[e]=n)};var y=function(t,e,n){for(var r in e)c.hasOwnProperty.call(e,r)&&s(t,r,e[r],n)},b=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)};y(u,{bind:function(t){var e=this;if(!p(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n=f.call(arguments,1),r=function(){if(this instanceof c){var r=e.apply(this,n.concat(f.call(arguments)));return Object(r)===r?r:this}return e.apply(t,n.concat(f.call(arguments)))},o=Math.max(0,e.length-n.length),s=[],a=0;a>>0;if(!p(t))throw new TypeError;for(;++o>>0;if(!n)return-1;var o=0;for(arguments.length>1&&(o=r(arguments[1])),o=o>=0?o:Math.max(0,n+o);o1?function(){var t=void 0===/()??/.exec("")[1];l.split=function(e,n){var r=this;if(void 0===e&&0===n)return[];if("[object RegExp]"!==h.call(e))return x.call(this,e,n);var i,s,c,u,l=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),p=0;for(e=new RegExp(e.source,f+"g"),r+="",t||(i=new RegExp("^"+e.source+"$(?!\\s)",f)),n=void 0===n?-1>>>0:o(n);(s=e.exec(r))&&!((c=s.index+s[0].length)>p&&(l.push(r.slice(p,s.index)),!t&&s.length>1&&s[0].replace(i,function(){for(var t=1;t1&&s.index=n));)e.lastIndex===s.index&&e.lastIndex++;return p===r.length?!u&&e.test("")||l.push(""):l.push(r.slice(p)),l.length>n?l.slice(0,n):l}}():"0".split(void 0,0).length&&(l.split=function(t,e){return void 0===t&&0===e?[]:x.call(this,t,e)});var E=l.substr,S="".substr&&"b"!=="0b".substr(-1);y(l,{substr:function(t,e){return E.call(this,t<0&&(t=this.length+t)<0?0:t,e)}},S)},function(t,e,n){"use strict";t.exports=[n(53),n(55),n(28),n(24),n(14)(n(24)),n(25),n(14)(n(25)),n(29),n(54),n(14)(n(29)),n(45)]},function(t,e,n){"use strict";(function(e){var n=e.WebSocket||e.MozWebSocket;t.exports=n?function(t){return new n(t)}:void 0}).call(e,n(1))},function(t,e,n){"use strict";(function(e){function r(t){if(!r.enabled())throw new Error("Transport created when disabled");i.call(this,t,"/jsonp",a,s)}var o=n(0),i=n(27),s=n(50),a=n(51);o(r,i),r.enabled=function(){return!!e.document},r.transportName="jsonp-polling",r.roundTrips=1,r.needBody=!0,t.exports=r}).call(e,n(1))},function(t,e,n){"use strict";function r(t,e){s(t),i.call(this),this.sendBuffer=[],this.sender=e,this.url=t}var o=n(0),i=n(2).EventEmitter,s=function(){};o(r,i),r.prototype.send=function(t){s("send",t),this.sendBuffer.push(t),this.sendStop||this.sendSchedule()},r.prototype.sendScheduleWait=function(){s("sendScheduleWait");var t,e=this;this.sendStop=function(){s("sendStop"),e.sendStop=null,clearTimeout(t)},t=setTimeout(function(){s("timeout"),e.sendStop=null,e.sendSchedule()},25)},r.prototype.sendSchedule=function(){s("sendSchedule",this.sendBuffer.length);var t=this;if(this.sendBuffer.length>0){var e="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,e,function(e){t.sendStop=null,e?(s("error",e),t.emit("close",e.code||1006,"Sending error: "+e),t.close()):t.sendScheduleWait()}),this.sendBuffer=[]}},r.prototype._cleanup=function(){s("_cleanup"),this.removeAllListeners()},r.prototype.close=function(){s("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){s(e),i.call(this),this.Receiver=t,this.receiveUrl=e,this.AjaxObject=n,this._scheduleReceiver()}var o=n(0),i=n(2).EventEmitter,s=function(){};o(r,i),r.prototype._scheduleReceiver=function(){s("_scheduleReceiver");var t=this,e=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);e.on("message",function(e){s("message",e),t.emit("message",e)}),e.once("close",function(n,r){s("close",n,r,t.pollIsClosing),t.poll=e=null,t.pollIsClosing||("network"===r?t._scheduleReceiver():(t.emit("close",n||1006,r),t.removeAllListeners()))})},r.prototype.abort=function(){s("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=r},function(t,e,n){"use strict";function r(t){a(t),i.call(this);var e=this,n=this.es=new s(t);n.onmessage=function(t){a("message",t.data),e.emit("message",decodeURI(t.data))},n.onerror=function(t){a("error",n.readyState,t);var r=2!==n.readyState?"network":"permanent";e._cleanup(),e._close(r)}}var o=n(0),i=n(2).EventEmitter,s=n(23),a=function(){};o(r,i),r.prototype.abort=function(){a("abort"),this._cleanup(),this._close("user")},r.prototype._cleanup=function(){a("cleanup");var t=this.es;t&&(t.onmessage=t.onerror=null,t.close(),this.es=null)},r.prototype._close=function(t){a("close",t);var e=this;setTimeout(function(){e.emit("close",null,t),e.removeAllListeners()},200)},t.exports=r},function(t,e,n){"use strict";(function(e){function r(t){u(t),a.call(this);var n=this;i.polluteGlobalNamespace(),this.id="a"+c.string(6),t=s.addQuery(t,"c="+decodeURIComponent(i.WPrefix+"."+this.id)),u("using htmlfile",r.htmlfileEnabled);var o=r.htmlfileEnabled?i.createHtmlfile:i.createIframe;e[i.WPrefix][this.id]={start:function(){u("start"),n.iframeObj.loaded()},message:function(t){u("message",t),n.emit("message",t)},stop:function(){u("stop"),n._cleanup(),n._close("network")}},this.iframeObj=o(t,function(){u("callback"),n._cleanup(),n._close("permanent")})}var o=n(0),i=n(10),s=n(3),a=n(2).EventEmitter,c=n(7),u=function(){};o(r,a),r.prototype.abort=function(){u("abort"),this._cleanup(),this._close("user")},r.prototype._cleanup=function(){u("_cleanup"),this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete e[i.WPrefix][this.id]},r.prototype._close=function(t){u("_close",t),this.emit("close",null,t),this.removeAllListeners()},r.htmlfileEnabled=!1;var l=["Active"].concat("Object").join("X");if(l in e)try{r.htmlfileEnabled=!!new e[l]("htmlfile")}catch(t){}r.enabled=r.htmlfileEnabled||i.iframeEnabled,t.exports=r}).call(e,n(1))},function(t,e,n){"use strict";(function(e){function r(t){l(t);var n=this;u.call(this),o.polluteGlobalNamespace(),this.id="a"+i.string(6);var s=a.addQuery(t,"c="+encodeURIComponent(o.WPrefix+"."+this.id));e[o.WPrefix][this.id]=this._callback.bind(this),this._createScript(s),this.timeoutId=setTimeout(function(){l("timeout"),n._abort(new Error("JSONP script loaded abnormally (timeout)"))},r.timeout)}var o=n(10),i=n(7),s=n(9),a=n(3),c=n(0),u=n(2).EventEmitter,l=function(){};c(r,u),r.prototype.abort=function(){if(l("abort"),e[o.WPrefix][this.id]){var t=new Error("JSONP user aborted read");t.code=1e3,this._abort(t)}},r.timeout=35e3,r.scriptErrorTimeout=1e3,r.prototype._callback=function(t){l("_callback",t),this._cleanup(),this.aborting||(t&&(l("message",t),this.emit("message",t)),this.emit("close",null,"network"),this.removeAllListeners())},r.prototype._abort=function(t){l("_abort",t),this._cleanup(),this.aborting=!0,this.emit("close",t.code,t.message),this.removeAllListeners()},r.prototype._cleanup=function(){if(l("_cleanup"),clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var t=this.script;t.parentNode.removeChild(t),t.onreadystatechange=t.onerror=t.onload=t.onclick=null,this.script=null}delete e[o.WPrefix][this.id]},r.prototype._scriptError=function(){l("_scriptError");var t=this;this.errorTimer||(this.errorTimer=setTimeout(function(){t.loadedOkay||t._abort(new Error("JSONP script loaded abnormally (onerror)"))},r.scriptErrorTimeout))},r.prototype._createScript=function(t){l("_createScript",t);var n,r=this,o=this.script=e.document.createElement("script");if(o.id="a"+i.string(8),o.src=t,o.type="text/javascript",o.charset="UTF-8",o.onerror=this._scriptError.bind(this),o.onload=function(){l("onload"),r._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){r.loadedOkay=!0;try{o.onclick()}catch(t){}}o&&r._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===o.async&&e.document.attachEvent)if(s.isOpera())n=this.script2=e.document.createElement("script"),n.text="try{var a = document.getElementById('"+o.id+"'); if(a)a.onerror();}catch(x){};",o.async=n.async=!1;else{try{o.htmlFor=o.id,o.event="onclick"}catch(t){}o.async=!0}void 0!==o.async&&(o.async=!0);var a=e.document.getElementsByTagName("head")[0];a.insertBefore(o,a.firstChild),n&&a.insertBefore(n,a.firstChild)},t.exports=r}).call(e,n(1))},function(t,e,n){"use strict";(function(e){function r(t){u("createIframe",t);try{return e.document.createElement('