19.c696d7a0d8bcd1bb3bc8.js 40 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[19],{DbIP:function(e,n,t){var o,r;void 0===(r="function"==typeof(o=function(){"use strict";var e,n,t={},o=!1,r=[],a=[],i=0,s=Object.prototype.hasOwnProperty;return(t={version:"2.3.3-javascript",onError:function(e){},onClose:function(e){},onOpen:function(e){},onReopen:function(e){},onMessage:function(e){},onReconnect:function(e,n){},onMessagePublished:function(e){},onTransportFailure:function(e,n){},onLocalMessage:function(e){},onFailureToReconnect:function(e,n){},onClientTimeout:function(e){},onOpenAfterResume:function(e){},WebsocketApiAdapter:function(e){var n,o;return e.onMessage=function(e){o.onmessage({data:e.responseBody})},e.onMessagePublished=function(e){o.onmessage({data:e.responseBody})},e.onOpen=function(e){o.onopen(e)},o={close:function(){n.close()},send:function(e){n.push(e)},onmessage:function(e){},onopen:function(e){},onclose:function(e){},onerror:function(e){}},n=new t.subscribe(e),o},AtmosphereRequest:function(e){var n,r,s,l={timeout:3e5,method:"GET",headers:{},contentType:"",callback:null,url:"",data:"",suspend:!0,maxRequest:-1,reconnect:!0,maxStreamingLength:1e7,lastIndex:0,logLevel:"info",requestCount:0,fallbackMethod:"GET",fallbackTransport:"streaming",transport:"long-polling",webSocketImpl:null,webSocketBinaryType:null,dispatchUrl:null,webSocketPathDelimiter:"@@",enableXDR:!1,rewriteURL:!1,attachHeadersAsQueryString:!0,executeCallbackBeforeReconnect:!1,readyState:0,withCredentials:!1,trackMessageLength:!1,messageDelimiter:"|",connectTimeout:-1,reconnectInterval:0,dropHeaders:!0,uuid:0,async:!0,shared:!1,readResponsesHeaders:!1,maxReconnectOnClose:5,enableProtocol:!0,disableDisconnect:!1,pollingInterval:0,heartbeat:{client:null,server:null},ackInterval:0,closeAsync:!1,reconnectOnServerError:!0,handleOnlineOffline:!0,onError:function(e){},onClose:function(e){},onOpen:function(e){},onMessage:function(e){},onReopen:function(e,n){},onReconnect:function(e,n){},onMessagePublished:function(e){},onTransportFailure:function(e,n){},onLocalMessage:function(e){},onFailureToReconnect:function(e,n){},onClientTimeout:function(e){},onOpenAfterResume:function(e){}},c={status:200,reasonPhrase:"OK",responseBody:"",messages:[],headers:[],state:"messageReceived",transport:"polling",error:null,request:null,partialMessage:"",errorHandled:!1,closedByClientTimeout:!1,ffTryingReconnect:!1},u=null,d=null,f=null,p=null,g=null,m=!0,b=0,h=0,v="X",w=!1,y=null,T=null,S=t.util.now();function k(){m=!0,w=!1,b=0,u=null,d=null,f=null,p=null}function R(e){return"debug"==e?"debug"===l.logLevel:"info"==e?"info"===l.logLevel||"debug"===l.logLevel:"warn"==e?"warn"===l.logLevel||"info"===l.logLevel||"debug"===l.logLevel:"error"==e&&("error"===l.logLevel||"warn"===l.logLevel||"info"===l.logLevel||"debug"===l.logLevel)}function C(e){R("debug")&&t.util.debug(new Date+" Atmosphere: "+e)}function x(e,n){return""===c.partialMessage&&"streaming"===n.transport&&e.responseText.length>n.maxStreamingLength}function I(){if(l.enableProtocol&&!l.disableDisconnect&&!l.firstMessage){var e="X-Atmosphere-Transport=close&X-Atmosphere-tracking-id="+l.uuid;t.util.each(l.headers,(function(n,o){var r=t.util.isFunction(o)?o.call(this,l,l,c):o;null!=r&&(e+="&"+encodeURIComponent(n)+"="+encodeURIComponent(r))}));var n=l.url.replace(/([?&])_=[^&]*/,e);n+=n===l.url?(/\?/.test(l.url)?"&":"?")+e:"";var o=new t.AtmosphereRequest({connected:!1});o.connectTimeout=l.connectTimeout,o.attachHeadersAsQueryString=!1,o.dropHeaders=!0,o.url=n,o.contentType="text/plain",o.transport="polling",o.method="GET",o.data="",o.heartbeat=null,l.enableXDR&&(o.enableXDR=l.enableXDR),o.async=l.closeAsync,function(e,n){n||(n=V(e)),n.transport="polling",n.method="GET",n.withCredentials=!1,n.reconnect=!1,n.force=!0,n.suspend=!1,n.timeout=1e3,X(n)}("",o)}}function O(){C("Closing (AtmosphereRequest._close() called)"),w=!0,l.reconnectId&&(clearTimeout(l.reconnectId),delete l.reconnectId),l.heartbeatTimer&&clearTimeout(l.heartbeatTimer),l.reconnect=!1,c.request=l,c.state="unsubscribe",c.responseBody="",c.status=408,c.partialMessage="",oe(),I(),A()}function A(){c.partialMessage="",l.id&&clearTimeout(l.id),l.heartbeatTimer&&clearTimeout(l.heartbeatTimer),l.reconnectId&&(clearTimeout(l.reconnectId),delete l.reconnectId),null!=p&&(p.close(),p=null),null!=g&&(g.abort(),g=null),null!=f&&(f.abort(),f=null),null!=u&&(u.canSendMessage&&(C("invoking .close() on WebSocket object"),u.close()),u=null),null!=d&&(d.close(),d=null),null!=n&&(clearInterval(r),document.cookie=s+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",n.signal("close",{reason:"",heir:w?(n.get("children")||[])[0]:S}),n.close()),null!=T&&T.close()}function L(e){A(),k(),(l=t.util.extend(l,e)).mrequest=l.reconnect,l.reconnect||(l.reconnect=!0)}function U(){if(l.shared){if(null!=(T=function(e){var n,o,a,i="atmosphere-"+e.url,s={storage:function(){function n(e){e.key===i&&e.newValue&&u(e.newValue)}if(t.util.storage){var o=window.localStorage,r=function(e){var n=o.getItem(i+"-"+e);return null===n?[]:t.util.parseJSON(n)},a=function(e,n){o.setItem(i+"-"+e,t.util.stringifyJSON(n))};return{init:function(){return a("children",r("children").concat([S])),t.util.on(window,"storage",n),r("opened")},signal:function(e,n){o.setItem(i,t.util.stringifyJSON({target:"p",type:e,data:n}))},close:function(){var o=r("children");t.util.off(window,"storage",n),o&&c(o,e.id)&&a("children",o)}}}},windowref:function(){var e=window.open("",i.replace(/\W/g,""));if(e&&!e.closed&&e.callbacks)return{init:function(){return e.callbacks.push(u),e.children.push(S),e.opened},signal:function(n,o){!e.closed&&e.fire&&e.fire(t.util.stringifyJSON({target:"p",type:n,data:o}))},close:function(){a||(c(e.callbacks,u),c(e.children,S))}}}};function c(e,n){var t,o=e.length;for(t=0;t<o;t++)e[t]===n&&e.splice(t,1);return o!==e.length}function u(n){var o=t.util.parseJSON(n),r=o.data;if("c"===o.target)switch(o.type){case"open":B("opening","local",l);break;case"close":a||(a=!0,"aborted"===r.reason?O():r.heir===S?U():setTimeout((function(){U()}),100));break;case"message":Y(r,"messageReceived",200,e.transport);break;case"localMessage":Q(r)}}function d(){var e=new RegExp("(?:^|; )("+encodeURIComponent(i)+")=([^;]*)").exec(document.cookie);if(e)return t.util.parseJSON(decodeURIComponent(e[2]))}if((n=d())&&!(t.util.now()-n.ts>1e3)&&(o=s.storage()||s.windowref()))return{open:function(){var a;return r=setInterval((function(){var e=n;(n=d())&&e.ts!==n.ts||u(t.util.stringifyJSON({target:"c",type:"close",data:{reason:"error",heir:e.heir}}))}),1e3),(a=o.init())&&setTimeout((function(){B("opening","local",e)}),50),a},send:function(e){o.signal("send",e)},localSend:function(e){o.signal("localSend",t.util.stringifyJSON({id:S,event:e}))},close:function(){w||(clearInterval(r),o.signal("close"),o.close())}}}(l))&&(R("debug")&&t.util.debug("Storage service available. All communication will be local"),T.open(l)))return;R("debug")&&t.util.debug("No Storage service available."),T=null}var e,n,a;l.firstMessage=0==i,l.isOpen=!1,l.ctime=t.util.now(),0===l.uuid&&(l.uuid=i),c.closedByClientTimeout=!1,"websocket"!==l.transport&&"sse"!==l.transport?X(l):"websocket"===l.transport?null!=l.webSocketImpl||window.WebSocket||window.MozWebSocket?function e(n){c.transport="websocket";var r=(l.url,j(l,t.util.getAbsoluteURL(l.webSocketUrl||l.url)).replace(/^http/,"ws"));R("debug")&&t.util.debug("Invoking executeWebSocket, using URL: "+r),!n||l.reconnect?(u=function(e){return null!=l.webSocketImpl?l.webSocketImpl:window.WebSocket?new WebSocket(e):new MozWebSocket(e)}(r),null!=l.webSocketBinaryType&&(u.binaryType=l.webSocketBinaryType),l.connectTimeout>0&&(l.id=setTimeout((function(){if(n);else{u.onclose({code:1002,reason:"",wasClean:!1});try{A()}catch(e){}}}),l.connectTimeout)),u.onopen=function(e){C("websocket.onopen"),E(l),o=!1,R("debug")&&t.util.debug("Websocket successfully opened");var r=n;null!=u&&(u.canSendMessage=!0),l.enableProtocol||(n=!0,B(r?"re-opening":"opening","websocket",l)),null!=u&&"POST"===l.method&&(c.state="messageReceived",u.send(l.data))},u.onmessage=function(e){if(C("websocket.onmessage"),E(l),l.enableProtocol&&(n=!0),c.state="messageReceived",c.status=200,"string"==typeof(e=e.data))P(e,l,c)||(oe(),c.responseBody="",c.messages=[]);else{if(""===(e=D(l,e)))return;c.responseBody=e,oe(),c.responseBody=null}},u.onerror=function(e){C("websocket.onerror"),clearTimeout(l.id),l.heartbeatTimer&&clearTimeout(l.heartbeatTimer)},u.onclose=function(r){if(C("websocket.onclose"),clearTimeout(l.id),"closed"!==c.state){var a=r.reason;if(""===a)switch(r.code){case 1e3:a="Normal closure; the connection successfully completed whatever purpose for which it was created.";break;case 1001:a="The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.";break;case 1002:a="The endpoint is terminating the connection due to a protocol error.";break;case 1003:a="The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).";break;case 1004:a="The endpoint is terminating the connection because a data frame was received that is too large.";break;case 1005:a="Unknown: no status code was provided even though one was expected.";break;case 1006:a="Connection was closed abnormally (that is, with no close frame being sent)."}R("warn")&&t.util.warn("Websocket closed, reason: "+a+" - wasClean: "+r.wasClean),c.closedByClientTimeout||l.handleOnlineOffline&&o?l.reconnectId&&(clearTimeout(l.reconnectId),delete l.reconnectId):(te(n),c.state="closed",w?t.util.log(l.logLevel,["Websocket closed normally"]):n?l.reconnect&&"websocket"===c.transport&&(A(),b++<l.maxReconnectOnClose?(B("re-connecting",l.transport,l),l.reconnectInterval>0?l.reconnectId=setTimeout((function(){c.responseBody="",c.messages=[],e(!0)}),l.reconnectInterval):(c.responseBody="",c.messages=[],e(!0))):(t.util.log(l.logLevel,["Websocket reconnect maximum try reached "+b]),R("warn")&&t.util.warn("Websocket error, reason: "+r.reason),q(0,"maxReconnectOnClose reached"))):N("Websocket failed on first connection attempt. Downgrading to "+l.fallbackTransport+" and resending"))}},navigator.userAgent.toLowerCase().indexOf("android")>-1&&void 0===u.url&&u.onclose({reason:"Android 4.1 does not support websockets.",wasClean:!1})):null!=u&&A()}(!1):N("Websocket is not supported, using request.fallbackTransport ("+l.fallbackTransport+")"):"sse"===l.transport&&(e=t.util.getAbsoluteURL(l.url.toLowerCase()),n=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/.exec(e),a=!(!n||n[1]==window.location.protocol&&n[2]==window.location.hostname&&(n[3]||("http:"===n[1]?80:443))==(window.location.port||("http:"===window.location.protocol?80:443))),!window.EventSource||a&&t.util.browser.safari&&!(t.util.browser.vmajor>=7)?N("Server Side Events(SSE) is not supported, using request.fallbackTransport ("+l.fallbackTransport+")"):function e(n){c.transport="sse";var o=j(l);if(R("debug")&&(t.util.debug("Invoking executeSSE"),t.util.debug("Using URL: "+o)),!n||l.reconnect){try{d=new EventSource(o,{withCredentials:l.withCredentials})}catch(r){return q(0,r),void N("SSE failed. Downgrading to fallback transport and resending")}l.connectTimeout>0&&(l.id=setTimeout((function(){n||A()}),l.connectTimeout)),d.onopen=function(e){C("sse.onopen"),E(l),R("debug")&&t.util.debug("SSE successfully opened"),l.enableProtocol?l.isReopen&&(l.isReopen=!1,B("re-opening",l.transport,l)):B(n?"re-opening":"opening","sse",l),n=!0,"POST"===l.method&&(c.state="messageReceived",d.send(l.data))},d.onmessage=function(e){C("sse.onmessage"),E(l),!l.enableXDR&&window.location.host&&e.origin&&e.origin!==window.location.protocol+"//"+window.location.host?t.util.log(l.logLevel,["Origin was not "+window.location.protocol+"//"+window.location.host]):(c.state="messageReceived",c.status=200,P(e=e.data,l,c)||(oe(),c.responseBody="",c.messages=[]))},d.onerror=function(o){C("sse.onerror"),clearTimeout(l.id),l.heartbeatTimer&&clearTimeout(l.heartbeatTimer),c.closedByClientTimeout||(te(n),A(),w?t.util.log(l.logLevel,["SSE closed normally"]):n?l.reconnect&&"sse"===c.transport&&(b++<l.maxReconnectOnClose?(B("re-connecting",l.transport,l),l.reconnectInterval>0?l.reconnectId=setTimeout((function(){e(!0)}),l.reconnectInterval):e(!0),c.responseBody="",c.messages=[]):(t.util.log(l.logLevel,["SSE reconnect maximum try reached "+b]),q(0,"maxReconnectOnClose reached"))):N("SSE failed. Downgrading to fallback transport and resending"))}}else null!=d&&A()}(!1))}function B(e,o,a){if(l.shared&&"local"!==o&&function(){var e,o="atmosphere-"+l.url,a=function(){var e,n=o.replace(/\W/g,""),r=document.getElementById(n);return r||((r=document.createElement("div")).id=n,r.style.display="none",r.innerHTML='<iframe name="'+n+'" />',document.body.appendChild(r)),e=r.firstChild.contentWindow,{init:function(){e.callbacks=[i],e.fire=function(n){var t;for(t=0;t<e.callbacks.length;t++)e.callbacks[t](n)}},signal:function(n,o){!e.closed&&e.fire&&e.fire(t.util.stringifyJSON({target:"c",type:n,data:o}))},get:function(n){return e.closed?null:e[n]},set:function(n,t){e.closed||(e[n]=t)},close:function(){}}};function i(e){var n=t.util.parseJSON(e),o=n.data;if("p"===n.target)switch(n.type){case"send":$(o);break;case"localSend":Q(o);break;case"close":O()}}function c(){document.cookie=s+"="+encodeURIComponent(t.util.stringifyJSON({ts:t.util.now()+1,heir:(e.get("children")||[])[0]}))+"; path=/"}y=function(n){e.signal("message",n)},(e=function(){function e(e){e.key===o&&e.newValue&&i(e.newValue)}if(t.util.storage){var n=window.localStorage;return{init:function(){t.util.on(window,"storage",e)},signal:function(e,r){n.setItem(o,t.util.stringifyJSON({target:"c",type:e,data:r}))},get:function(e){return t.util.parseJSON(n.getItem(o+"-"+e))},set:function(e,r){n.setItem(o+"-"+e,t.util.stringifyJSON(r))},close:function(){t.util.off(window,"storage",e),n.removeItem(o),n.removeItem(o+"-opened"),n.removeItem(o+"-children")}}}}()||a()).init(),R("debug")&&t.util.debug("Installed StorageService "+e),e.set("children",[]),null==e.get("opened")||e.get("opened")||e.set("opened",!1),s=encodeURIComponent(o),c(),r=setInterval(c,1e3),n=e}(),null!=n&&n.set("opened",!0),a.close=function(){O()},b>0&&"re-connecting"===e)a.isReopen=!0,(f=c).state="re-connecting",ee(f);else if(null==c.error){c.request=a;var i=c.state;c.state=e;var u=c.transport;c.transport=o;var d=c.responseBody;oe(),c.responseBody=d,c.state=i,c.transport=u}var f}function M(e){e.transport="jsonp";var n,o=l;null!=e&&void 0!==e&&(o=e),(g={open:function(){var r="atmosphere"+ ++S;function a(){var t=o.url;null!=o.dispatchUrl&&(t+=o.dispatchUrl);var a=o.data;o.attachHeadersAsQueryString&&(t=j(o),""!==a&&(t+="&X-Atmosphere-Post-Body="+encodeURIComponent(a)),a="");var i=document.head||document.getElementsByTagName("head")[0]||document.documentElement;(n=document.createElement("script")).src=t+"&jsonpTransport="+r,n.clean=function(){n.clean=n.onerror=n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),2==++e.scriptCount&&(e.scriptCount=1,o.lastIndex=0,o.openId&&clearTimeout(o.openId),o.heartbeatTimer&&clearTimeout(o.heartbeatTimer),o.reconnect&&b++<o.maxReconnectOnClose?(B("re-connecting",o.transport,o),J(g,o,e.reconnectInterval),o.openId=setTimeout((function(){H(o)}),o.reconnectInterval+1e3)):q(0,"maxReconnectOnClose reached"))},n.onload=n.onreadystatechange=function(){C("jsonp.onload"),n.readyState&&!/loaded|complete/.test(n.readyState)||n.clean()},n.onerror=function(){C("jsonp.onerror"),e.scriptCount=1,n.clean()},i.insertBefore(n,i.firstChild)}window[r]=function(n){if(C("jsonp.window"),e.scriptCount=0,o.reconnect&&-1===o.maxRequest||o.requestCount++<o.maxRequest){if(o.executeCallbackBeforeReconnect||J(g,o,o.pollingInterval),null!=n&&"string"!=typeof n)try{n=n.message}catch(r){}P(n,o,c)||Y(c.responseBody,"messageReceived",200,o.transport),o.executeCallbackBeforeReconnect&&J(g,o,o.pollingInterval),E(o)}else t.util.log(l.logLevel,["JSONP reconnect maximum try reached "+l.requestCount]),q(0,"maxRequest reached")},setTimeout((function(){a()}),50)},abort:function(){n&&n.clean&&n.clean()}}).open()}function D(e,n){var o=n;if("polling"===e.transport)return o;if(e.enableProtocol&&e.firstMessage&&0!==t.util.trim(n).length){var r=e.trackMessageLength?1:0,a=n.split(e.messageDelimiter);if(a.length<=r+1)return o;if(e.firstMessage=!1,e.uuid=t.util.trim(a[r]),a.length<=r+2&&t.util.log("error",["Protocol data not sent by the server. If you enable protocol on client side, be sure to install JavascriptProtocol interceptor on server side.Also note that atmosphere-runtime 2.2+ should be used."]),h=parseInt(t.util.trim(a[r+1]),10),v=a[r+2],"long-polling"!==e.transport&&H(e),i=e.uuid,o="",r=e.trackMessageLength?4:3,a.length>r+1)for(var s=r;s<a.length;s++)o+=a[s],s+1!==a.length&&(o+=e.messageDelimiter);0!==e.ackInterval&&setTimeout((function(){$("...ACK...")}),e.ackInterval)}else e.enableProtocol&&e.firstMessage&&t.util.browser.msie&&+t.util.browser.version.split(".")[0]<10?t.util.log(l.logLevel,["Receiving unexpected data from IE"]):H(e);return o}function E(e){clearTimeout(e.id),e.timeout>0&&"polling"!==e.transport&&(e.id=setTimeout((function(){c.closedByClientTimeout=!0,c.state="closedByClient",c.responseBody="",c.status=408,c.messages=[],oe(),I(),A()}),e.timeout))}function q(e,n){A(),clearTimeout(l.id),c.state="error",c.reasonPhrase=n,c.responseBody="",c.status=e,c.messages=[],oe()}function P(e,n,t){if(0===(e=D(n,e)).length)return!0;if(t.responseBody=e,n.trackMessageLength){var o=[],r=(e=t.partialMessage+e).indexOf(n.messageDelimiter);if(-1!=r){for(;-1!==r;){var a=e.substring(0,r),i=+a;if(isNaN(i))throw t.partialMessage="",new Error('message length "'+a+'" is not a number');(r+=n.messageDelimiter.length)+i>e.length?r=-1:(o.push(e.substring(r,r+i)),r=(e=e.substring(r+i,e.length)).indexOf(n.messageDelimiter))}return t.partialMessage=e,0!==o.length?(t.responseBody=o.join(n.messageDelimiter),t.messages=o,!1):(t.responseBody="",t.messages=[],!0)}}return t.responseBody=e,t.messages=[e],!1}function N(e){t.util.log(l.logLevel,[e]),void 0!==l.onTransportFailure?l.onTransportFailure(e,l):void 0!==t.util.onTransportFailure&&t.util.onTransportFailure(e,l),l.transport=l.fallbackTransport;var n=-1===l.connectTimeout?0:l.connectTimeout;l.reconnect&&"none"!==l.transport||null==l.transport?(l.method=l.fallbackMethod,c.transport=l.fallbackTransport,l.fallbackTransport="none",n>0?l.reconnectId=setTimeout((function(){U()}),n):U()):q(500,"Unable to reconnect with fallback transport")}function j(e,n){var o=l;return null!=e&&void 0!==e&&(o=e),null==n&&(n=o.url),o.attachHeadersAsQueryString?(-1!==n.indexOf("X-Atmosphere-Framework")||(n+=-1!==n.indexOf("?")?"&":"?",n+="X-Atmosphere-tracking-id="+o.uuid,n+="&X-Atmosphere-Framework="+t.version,n+="&X-Atmosphere-Transport="+o.transport,o.trackMessageLength&&(n+="&X-Atmosphere-TrackMessageSize=true"),null!==o.heartbeat&&null!==o.heartbeat.server&&(n+="&X-Heartbeat-Server="+o.heartbeat.server),""!==o.contentType&&(n+="&Content-Type="+("websocket"===o.transport?o.contentType:encodeURIComponent(o.contentType))),o.enableProtocol&&(n+="&X-atmo-protocol=true"),t.util.each(o.headers,(function(r,a){var i=t.util.isFunction(a)?a.call(this,o,e,c):a;null!=i&&(n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(i))}))),n):n}function H(e){if(e.isOpen)if(e.isReopen)e.isReopen=!1,B("re-opening",e.transport,e);else{if("messageReceived"!==c.state||"jsonp"!==e.transport&&"long-polling"!==e.transport)return;(n=c).state="openAfterResume",ee(n),n.state="messageReceived"}else e.isOpen=!0,B("opening",e.transport,e);var n;!function(e){if(null!=e.heartbeatTimer&&clearTimeout(e.heartbeatTimer),!isNaN(h)&&h>0){var n=function(){R("debug")&&t.util.debug("Sending heartbeat"),$(v),e.heartbeatTimer=setTimeout(n,h)};e.heartbeatTimer=setTimeout(n,h)}}(e)}function X(e){var n=l;if(null==e&&void 0===e||(n=e),n.lastIndex=0,n.readyState=0,"jsonp"===n.transport||n.enableXDR&&t.util.checkCORSSupport())M(n);else{if(t.util.browser.msie&&+t.util.browser.version.split(".")[0]<10){if("streaming"===n.transport)return void(n.enableXDR&&window.XDomainRequest?W(n):z(n));if(n.enableXDR&&window.XDomainRequest)return void W(n)}var o=function(t){if(n.lastIndex=0,b++,t||n.reconnect&&b<=n.maxReconnectOnClose){var o=t?0:e.reconnectInterval;c.ffTryingReconnect=!0,B("re-connecting",e.transport,e),J(a,n,o)}else q(0,"maxReconnectOnClose reached")},r=function(e){t._beforeUnloadState?(t.util.debug(new Date+" Atmosphere: reconnectF: execution delayed due to _beforeUnloadState flag"),setTimeout((function(){o(e)}),5e3)):o(e)};if(n.force||n.reconnect&&(-1===n.maxRequest||n.requestCount++<n.maxRequest)){n.force=!1;var a=t.util.xhr();a.hasData=!1,function(e,n,o){var r=n.url;null!=n.dispatchUrl&&"POST"===n.method&&(r+=n.dispatchUrl),r=j(n,r),r=t.util.prepareURL(r),o&&(e.open(n.method,r,n.async),n.connectTimeout>0&&(n.id=setTimeout((function(){0===n.requestCount&&(A(),Y("Connect timeout","closed",200,n.transport))}),n.connectTimeout))),l.withCredentials&&"websocket"!==l.transport&&"withCredentials"in e&&(e.withCredentials=!0),l.dropHeaders||(e.setRequestHeader("X-Atmosphere-Framework",t.version),e.setRequestHeader("X-Atmosphere-Transport",n.transport),null!==n.heartbeat&&null!==n.heartbeat.server&&e.setRequestHeader("X-Heartbeat-Server",e.heartbeat.server),n.trackMessageLength&&e.setRequestHeader("X-Atmosphere-TrackMessageSize","true"),e.setRequestHeader("X-Atmosphere-tracking-id",n.uuid),t.util.each(n.headers,(function(r,a){var i=t.util.isFunction(a)?a.call(this,e,n,o,c):a;null!=i&&e.setRequestHeader(r,i)}))),""!==n.contentType&&e.setRequestHeader("Content-Type",n.contentType)}(a,n,!0),n.suspend&&(f=a),"polling"!==n.transport&&(c.transport=n.transport,a.onabort=function(){C("ajaxrequest.onabort"),te(!0)},a.onerror=function(){C("ajaxrequest.onerror"),c.error=!0,c.ffTryingReconnect=!0;try{c.status=XMLHttpRequest.status}catch(e){c.status=500}c.status||(c.status=500),c.errorHandled||(A(),r(!1))}),a.onreadystatechange=function(){if(C("ajaxRequest.onreadystatechange, new state: "+a.readyState),w)C("onreadystatechange has been ignored due to _abortingConnection flag");else{c.error=null;var o=!1,i=!1;if("streaming"===n.transport&&n.readyState>2&&4===a.readyState)return A(),void r(!1);if(n.readyState=a.readyState,("streaming"===n.transport&&a.readyState>=3||"long-polling"===n.transport&&4===a.readyState)&&(i=!0),E(l),"polling"!==n.transport){var s=200;if(4===a.readyState&&(s=a.status>1e3?0:a.status),!n.reconnectOnServerError&&s>=300&&s<600)return void q(s,a.statusText);if(s>=300||0===s)return c.errorHandled=!0,A(),void r(!1);n.enableProtocol&&e.firstMessage||2!==a.readyState||(t.util.browser.mozilla&&c.ffTryingReconnect?(c.ffTryingReconnect=!1,setTimeout((function(){c.ffTryingReconnect||H(n)}),500)):H(n))}else 4===a.readyState&&(i=!0);if(i){var u=a.responseText;if(c.errorHandled=!1,"long-polling"===n.transport&&0===t.util.trim(u).length)return void(a.hasData?a.hasData=!1:r(!0));if(a.hasData=!0,Z(a,l),"streaming"===n.transport)if(t.util.browser.opera)t.util.iterate((function(){if(500!==c.status&&a.responseText.length>n.lastIndex){try{c.status=a.status,c.headers=t.util.parseHeaders(a.getAllResponseHeaders()),Z(a,l)}catch(r){c.status=404}E(l),c.state="messageReceived";var e=a.responseText.substring(n.lastIndex);if(n.lastIndex=a.responseText.length,(o=P(e,n,c))||oe(),x(a,n))return void F(a,n)}else if(c.status>400)return n.lastIndex=a.responseText.length,!1}),0);else{var d=u.substring(n.lastIndex,u.length);if(o=P(d,n,c),n.lastIndex=u.length,o)return}else o=P(u,n,c);var f=x(a,n);try{c.status=a.status,c.headers=t.util.parseHeaders(a.getAllResponseHeaders()),Z(a,n)}catch(g){c.status=404}n.suspend?c.state=0===c.status?"closed":"messageReceived":c.state="messagePublished";var p=!f&&"streaming"!==e.transport&&"polling"!==e.transport;p&&!n.executeCallbackBeforeReconnect&&J(a,n,n.pollingInterval),0===c.responseBody.length||o||oe(),p&&n.executeCallbackBeforeReconnect&&J(a,n,n.pollingInterval),f&&F(a,n)}}};try{a.send(n.data),m=!0}catch(i){t.util.log(n.logLevel,["Unable to connect to "+n.url]),q(0,i)}}else"debug"===n.logLevel&&t.util.log(n.logLevel,["Max re-connection reached."]),q(0,"maxRequest reached")}}function F(e,n){c.messages=[],n.isReopen=!0,O(),w=!1,J(e,n,500)}function J(e,n,t){if(!c.closedByClientTimeout&&(n.reconnect||n.suspend&&m)){var o=0;e&&e.readyState>1&&(o=e.status>1e3?0:e.status),c.status=0===o?204:o,c.reason=0===o?"Server resumed the connection or down.":"OK",clearTimeout(n.id),n.reconnectId&&(clearTimeout(n.reconnectId),delete n.reconnectId),t>0?l.reconnectId=setTimeout((function(){X(n)}),t):X(n)}}function W(e){"polling"!==e.transport?(p=_(e)).open():_(e).open()}function _(e){var n=l;null!=e&&void 0!==e&&(n=e);var o=n.transport,r=0,a=new window.XDomainRequest,i=function(){"long-polling"===n.transport&&n.reconnect&&(-1===n.maxRequest||n.requestCount++<n.maxRequest)&&(a.status=200,W(n))},s=n.rewriteURL||function(e){var n=/(?:^|;\s*)(JSESSIONID|PHPSESSID)=([^;]*)/.exec(document.cookie);switch(n&&n[1]){case"JSESSIONID":return e.replace(/;jsessionid=[^\?]*|(\?)|$/,";jsessionid="+n[2]+"$1");case"PHPSESSID":return e.replace(/\?PHPSESSID=[^&]*&?|\?|$/,"?PHPSESSID="+n[2]+"&").replace(/&$/,"")}return e};a.onprogress=function(){u(a)},a.onerror=function(){"polling"!==n.transport&&(A(),b++<n.maxReconnectOnClose?n.reconnectInterval>0?n.reconnectId=setTimeout((function(){B("re-connecting",e.transport,e),W(n)}),n.reconnectInterval):(B("re-connecting",e.transport,e),W(n)):q(0,"maxReconnectOnClose reached"))},a.onload=function(){};var u=function(e){clearTimeout(n.id);var a=e.responseText;if(a=a.substring(r),r+=a.length,"polling"!==o){E(n);var s=P(a,n,c);if("long-polling"===o&&0===t.util.trim(a).length)return;n.executeCallbackBeforeReconnect&&i(),s||Y(c.responseBody,"messageReceived",200,o),n.executeCallbackBeforeReconnect||i()}};return{open:function(){var e=n.url;null!=n.dispatchUrl&&(e+=n.dispatchUrl),e=j(n,e),a.open(n.method,s(e)),"GET"===n.method?a.send():a.send(n.data),n.connectTimeout>0&&(n.id=setTimeout((function(){0===n.requestCount&&(A(),Y("Connect timeout","closed",200,n.transport))}),n.connectTimeout))},close:function(){a.abort()}}}function z(e){(p=function(e){var n,o=l;null!=e&&void 0!==e&&(o=e);var r=new window.ActiveXObject("htmlfile");r.open(),r.close();var a=o.url;return null!=o.dispatchUrl&&(a+=o.dispatchUrl),"polling"!==o.transport&&(c.transport=o.transport),{open:function(){var e=r.createElement("iframe");a=j(o),""!==o.data&&(a+="&X-Atmosphere-Post-Body="+encodeURIComponent(o.data)),a=t.util.prepareURL(a),e.src=a,r.body.appendChild(e);var i=e.contentDocument||e.contentWindow.document;n=t.util.iterate((function(){try{if(!i.firstChild)return;var e=i.body?i.body.lastChild:i;if(e.omgThisIsBroken,!i.body||!i.body.firstChild||"pre"!==i.body.firstChild.nodeName.toLowerCase()){var a=i.head||i.getElementsByTagName("head")[0]||i.documentElement||i,s=i.createElement("script");s.text="document.write('<plaintext>')",a.insertBefore(s,a.firstChild),a.removeChild(s),e=i.body.lastChild}return o.closed&&(o.isReopen=!0),n=t.util.iterate((function(){var n=function(){var n=e.cloneNode(!0);n.appendChild(i.createTextNode("."));var t=n.innerText;return t=t.substring(0,t.length-1)}();if(n.length>o.lastIndex){if(E(l),c.status=200,c.error=null,e.innerText="",P(n,o,c))return"";Y(c.responseBody,"messageReceived",200,o.transport)}if(o.lastIndex=0,"complete"===i.readyState)return te(!0),B("re-connecting",o.transport,o),o.reconnectInterval>0?o.reconnectId=setTimeout((function(){z(o)}),o.reconnectInterval):z(o),!1}),null),!1}catch(u){return c.error=!0,B("re-connecting",o.transport,o),b++<o.maxReconnectOnClose?o.reconnectInterval>0?o.reconnectId=setTimeout((function(){z(o)}),o.reconnectInterval):z(o):q(0,"maxReconnectOnClose reached"),r.execCommand("Stop"),r.close(),!1}}))},close:function(){n&&n(),r.execCommand("Stop"),te(!0)}}}(e)).open()}function $(e){null!=T?function(e){T.send(e)}(e):null!=f||null!=d?G(e):null!=p?function(e){if(l.enableXDR&&t.util.checkCORSSupport()){var n=V(e);n.reconnect=!1,M(n)}else G(e)}(e):null!=g?function(e){G(e)}(e):null!=u?function(e){var n,o=t.util.isBinary(e)?e:K(e);try{if(n=null!=l.dispatchUrl?l.webSocketPathDelimiter+l.dispatchUrl+l.webSocketPathDelimiter+o:o,!u.canSendMessage)return void t.util.error("WebSocket not connected.");u.send(n)}catch(r){u.onclose=function(e){},A(),N("Websocket failed. Downgrading to "+l.fallbackTransport+" and resending "+e),G(e)}}(e):(q(0,"No suspended connection available"),t.util.error("No suspended connection available. Make sure atmosphere.subscribe has been called and request.onOpen invoked before trying to push data"))}function G(e){X(V(e))}function K(e){var n=e;return"object"==typeof n&&(n=e.data),n}function V(e){var n=K(e),o={connected:!1,timeout:6e4,method:"POST",url:l.url,contentType:l.contentType,headers:l.headers,reconnect:!0,callback:null,data:n,suspend:!1,maxRequest:-1,logLevel:"info",requestCount:0,withCredentials:l.withCredentials,async:l.async,transport:"polling",isOpen:!0,attachHeadersAsQueryString:!0,enableXDR:l.enableXDR,uuid:l.uuid,dispatchUrl:l.dispatchUrl,enableProtocol:!1,messageDelimiter:"|",trackMessageLength:l.trackMessageLength,maxReconnectOnClose:l.maxReconnectOnClose,heartbeatTimer:l.heartbeatTimer,heartbeat:l.heartbeat};return"object"==typeof e&&(o=t.util.extend(o,e)),o}function Q(e){var n=t.util.parseJSON(e);n.id!==S&&(void 0!==l.onLocalMessage?l.onLocalMessage(n.event):void 0!==t.util.onLocalMessage&&t.util.onLocalMessage(n.event))}function Y(e,n,t,o){c.responseBody=e,c.transport=o,c.status=t,c.state=n,oe()}function Z(e,n){if(n.readResponsesHeaders)try{var t=e.getResponseHeader("X-Atmosphere-tracking-id");t&&null!=t&&(n.uuid=t.split(" ").pop())}catch(o){}else n.enableProtocol||(n.uuid=S)}function ee(e){ne(e,l),ne(e,t.util)}function ne(e,n){switch(e.state){case"messageReceived":C("Firing onMessage"),b=0,void 0!==n.onMessage&&n.onMessage(e),void 0!==n.onmessage&&n.onmessage(e);break;case"error":C("Firing onError, reasonPhrase: "+(void 0!==e.reasonPhrase?e.reasonPhrase:"n/a")),void 0!==n.onError&&n.onError(e),void 0!==n.onerror&&n.onerror(e);break;case"opening":delete l.closed,C("Firing onOpen"),void 0!==n.onOpen&&n.onOpen(e),void 0!==n.onopen&&n.onopen(e);break;case"messagePublished":C("Firing messagePublished"),void 0!==n.onMessagePublished&&n.onMessagePublished(e);break;case"re-connecting":C("Firing onReconnect"),void 0!==n.onReconnect&&n.onReconnect(l,e);break;case"closedByClient":C("Firing closedByClient"),void 0!==n.onClientTimeout&&n.onClientTimeout(l);break;case"re-opening":delete l.closed,C("Firing onReopen"),void 0!==n.onReopen&&n.onReopen(l,e);break;case"fail-to-reconnect":C("Firing onFailureToReconnect"),void 0!==n.onFailureToReconnect&&n.onFailureToReconnect(l,e);break;case"unsubscribe":case"closed":void 0!==l.closed&&l.closed?C("Request already closed, not firing onClose ("+e.state+" case)"):(C("Firing onClose ("+e.state+" case)"),void 0!==n.onClose&&n.onClose(e),void 0!==n.onclose&&n.onclose(e)),l.closed=!0;break;case"openAfterResume":void 0!==n.onOpenAfterResume&&n.onOpenAfterResume(l)}}function te(e){"closed"!==c.state&&(c.state="closed",c.responseBody="",c.messages=[],c.status=e?200:501,oe())}function oe(){var e=function(e,n){n(c)};null==T&&null!=y&&y(c.responseBody),l.reconnect=l.mrequest;for(var n="string"==typeof c.responseBody,o=n&&l.trackMessageLength?c.messages.length>0?c.messages:[""]:new Array(c.responseBody),r=0;r<o.length;r++)if(!(o.length>1&&0===o[r].length||(c.responseBody=n?t.util.trim(o[r]):o[r],null==T&&null!=y&&y(c.responseBody),(0===c.responseBody.length||n&&v===c.responseBody)&&"messageReceived"===c.state))){if(ee(c),a.length>0){R("debug")&&t.util.debug("Invoking "+a.length+" global callbacks: "+c.state);try{t.util.each(a,e)}catch(i){t.util.log(l.logLevel,["Callback exception"+i])}}if("function"==typeof l.callback){R("debug")&&t.util.debug("Invoking request callbacks");try{l.callback(c)}catch(i){t.util.log(l.logLevel,["Callback exception"+i])}}}}L(e),this.subscribe=function(e){L(e),U()},this.execute=function(){U()},this.close=function(){O()},this.disconnect=function(){I()},this.getUrl=function(){return l.url},this.push=function(e,n){if(null!=n){var t=l.dispatchUrl;l.dispatchUrl=n,$(e),l.dispatchUrl=t}else $(e)},this.getUUID=function(){return l.uuid},this.pushLocal=function(e){!function(e){if(0!==e.length)try{T?T.localSend(e):n&&n.signal("localMessage",t.util.stringifyJSON({id:S,event:e}))}catch(o){t.util.error(o)}}(e)},this.enableProtocol=function(e){return l.enableProtocol},this.init=function(){k()},this.request=l,this.response=c}}).subscribe=function(e,n,o){"function"==typeof n&&t.addCallback(n),"string"!=typeof e?o=e:o.url=e,i=void 0!==o&&void 0!==o.uuid?o.uuid:0;var a=new t.AtmosphereRequest(o);return a.execute(),r[r.length]=a,a},t.unsubscribe=function(){if(r.length>0)for(var e=[].concat(r),n=0;n<e.length;n++){var t=e[n];t.close(),clearTimeout(t.response.request.id),t.heartbeatTimer&&clearTimeout(t.heartbeatTimer)}r=[],a=[]},t.unsubscribeUrl=function(e){var n=-1;if(r.length>0)for(var t=0;t<r.length;t++){var o=r[t];if(o.getUrl()===e){o.close(),clearTimeout(o.response.request.id),o.heartbeatTimer&&clearTimeout(o.heartbeatTimer),n=t;break}}n>=0&&r.splice(n,1)},t.addCallback=function(e){-1===t.util.inArray(e,a)&&a.push(e)},t.removeCallback=function(e){var n=t.util.inArray(e,a);-1!==n&&a.splice(n,1)},t.util={browser:{},parseHeaders:function(e){for(var n,t=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,o={};n=t.exec(e);)o[n[1]]=n[2];return o},now:function(){return(new Date).getTime()},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},inArray:function(e,n){if(!Array.prototype.indexOf){for(var t=n.length,o=0;o<t;++o)if(n[o]===e)return o;return-1}return n.indexOf(e)},isBinary:function(e){return/^\[object\s(?:Blob|ArrayBuffer|.+Array)\]$/.test(Object.prototype.toString.call(e))},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},getAbsoluteURL:function(e){if(void 0===document.createElement)return e;var n=document.createElement("div");return n.innerHTML='<a href="'+e+'"/>',encodeURI(decodeURI(n.firstChild.href))},prepareURL:function(e){var n=t.util.now(),o=e.replace(/([?&])_=[^&]*/,"$1_="+n);return o+(o===e?(/\?/.test(e)?"&":"?")+"_="+n:"")},trim:function(e){return String.prototype.trim?e.toString().trim():e.toString().replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,"").replace(/\s+/g," ")},param:function(e){var n,o=[];function r(e,n){n=t.util.isFunction(n)?n():null==n?"":n,o.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}function a(e,n){var o;if(t.util.isArray(n))t.util.each(n,(function(n,t){/\[\]$/.test(e)?r(e,t):a(e+"["+("object"==typeof t?n:"")+"]",t)}));else if("[object Object]"===Object.prototype.toString.call(n))for(o in n)a(e+"["+o+"]",n[o]);else r(e,n)}for(n in e)a(n,e[n]);return o.join("&").replace(/%20/g,"+")},storage:function(){try{return!(!window.localStorage||!window.StorageEvent)}catch(e){return!1}},iterate:function(e,n){var t;return n=n||0,function o(){t=setTimeout((function(){!1!==e()&&o()}),n)}(),function(){clearTimeout(t)}},each:function(e,n,o){if(e){var r=0,a=e.length,i=t.util.isArray(e);if(o){if(i)for(;r<a&&!1!==n.apply(e[r],o);r++);else for(r in e)if(!1===n.apply(e[r],o))break}else if(i)for(;r<a&&!1!==n.call(e[r],r,e[r]);r++);else for(r in e)if(!1===n.call(e[r],r,e[r]))break;return e}},extend:function(e){var n,t,o;for(n=1;n<arguments.length;n++)if(null!=(t=arguments[n]))for(o in t)e[o]=t[o];return e},on:function(e,n,t){e.addEventListener?e.addEventListener(n,t,!1):e.attachEvent&&e.attachEvent("on"+n,t)},off:function(e,n,t){e.removeEventListener?e.removeEventListener(n,t,!1):e.detachEvent&&e.detachEvent("on"+n,t)},log:function(e,n){if(window.console){var t=window.console[e];"function"==typeof t&&t.apply(window.console,n)}},warn:function(){t.util.log("warn",arguments)},info:function(){t.util.log("info",arguments)},debug:function(){t.util.log("debug",arguments)},error:function(){t.util.log("error",arguments)},xhr:function(){try{return new window.XMLHttpRequest}catch(e){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(n){}}},parseJSON:function(e){return e?window.JSON&&window.JSON.parse?window.JSON.parse(e):new Function("return "+e)():null},stringifyJSON:function(e){var n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return'"'+e.replace(n,(function(e){var n=t[e];return"string"==typeof n?n:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"'}function r(e){return e<10?"0"+e:e}return window.JSON&&window.JSON.stringify?window.JSON.stringify(e):function e(n,t){var a,i,l,c,u=t[n],d=typeof u;switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(d=typeof(u=u.toJSON(n))),d){case"string":return o(u);case"number":return isFinite(u)?String(u):"null";case"boolean":return String(u);case"object":if(!u)return"null";switch(Object.prototype.toString.call(u)){case"[object Date]":return isFinite(u.valueOf())?'"'+u.getUTCFullYear()+"-"+r(u.getUTCMonth()+1)+"-"+r(u.getUTCDate())+"T"+r(u.getUTCHours())+":"+r(u.getUTCMinutes())+":"+r(u.getUTCSeconds())+'Z"':"null";case"[object Array]":for(l=u.length,c=[],a=0;a<l;a++)c.push(e(a,u)||"null");return"["+c.join(",")+"]";default:for(a in c=[],u)s.call(u,a)&&(i=e(a,u))&&c.push(o(a)+":"+i);return"{"+c.join(",")+"}"}}}("",{"":e})},checkCORSSupport:function(){if(t.util.browser.msie&&!window.XDomainRequest&&+t.util.browser.version.split(".")[0]<11)return!0;if(t.util.browser.opera&&+t.util.browser.version.split(".")<12)return!0;if("KreaTVWebKit/531"===t.util.trim(navigator.userAgent).slice(0,16))return!0;if("kreatel"===t.util.trim(navigator.userAgent).slice(-7).toLowerCase())return!0;var e=navigator.userAgent.toLowerCase().match(/.+android ([0-9]{1,2})/i),n=parseInt(e&&e[0]||-1,10);return!isNaN(n)&&n>-1&&n<3}},t.util.now(),e=navigator.userAgent.toLowerCase(),"safari"===(n=/(chrome)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(e)||e.indexOf("android")<0&&/version\/(.+) (safari)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[])[2]&&(n[2]=n[1],n[1]="safari"),t.util.browser[n[1]||""]=!0,t.util.browser.version=n[2]||"0",t.util.browser.vmajor=t.util.browser.version.split(".")[0],t.util.browser.trident&&(t.util.browser.msie=!0),(t.util.browser.msie||t.util.browser.mozilla&&1==+t.util.browser.version.split(".")[0])&&(t.util.storage=!1),t.callbacks={unload:function(){t.util.debug(new Date+" Atmosphere: unload event"),t.unsubscribe()},beforeUnload:function(){t.util.debug(new Date+" Atmosphere: beforeunload event"),t._beforeUnloadState=!0,setTimeout((function(){t.util.debug(new Date+" Atmosphere: beforeunload event timeout reached. Reset _beforeUnloadState flag"),t._beforeUnloadState=!1}),5e3)},offline:function(){if(t.util.debug(new Date+" Atmosphere: offline event"),o=!0,r.length>0)for(var e=[].concat(r),n=0;n<e.length;n++){var a=e[n];a.request.handleOnlineOffline&&(a.close(),clearTimeout(a.response.request.id),a.heartbeatTimer&&clearTimeout(a.heartbeatTimer))}},online:function(){if(t.util.debug(new Date+" Atmosphere: online event"),r.length>0)for(var e=0;e<r.length;e++)r[e].request.handleOnlineOffline&&(r[e].init(),r[e].execute());o=!1}},t.bindEvents=function(){t.util.on(window,"unload",t.callbacks.unload),t.util.on(window,"beforeunload",t.callbacks.beforeUnload),t.util.on(window,"offline",t.callbacks.offline),t.util.on(window,"online",t.callbacks.online)},t.unbindEvents=function(){t.util.off(window,"unload",t.callbacks.unload),t.util.off(window,"beforeunload",t.callbacks.beforeUnload),t.util.off(window,"offline",t.callbacks.offline),t.util.off(window,"online",t.callbacks.online)},t.bindEvents(),t})?o.call(n,t,n,e):o)||(e.exports=r)},DtzN:function(e,n,t){e.exports=t("DbIP")},R2EW:function(e,n,t){"use strict";t.d(n,"a",(function(){return a})),t.d(n,"b",(function(){return i}));var o=t("CcnG"),r=t("YBEz"),a=(o.Jb(r.b,[],(function(e){return o.Vb([o.Wb(512,o.m,o.sb,[[8,[]],[3,o.m],o.I]),o.Wb(1073742336,r.b,r.b,[])])})),o.Kb({encapsulation:0,styles:["[_nghost-%COMP%] { display: block; }"],data:{}}));function i(e){return o.ic(0,[o.Xb(null,0)],null,null)}o.Ib("overlay-scrollbars",r.a,(function(e){return o.ic(0,[(e()(),o.Mb(0,0,null,null,1,"overlay-scrollbars",[],null,null,null,i,a)),o.Lb(1,4898816,null,0,r.a,[o.q],null,null)],null,null)}),{_options:"options",_extensions:"extensions"},{},["*"])}}]);