/* Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations. */ (function(){function e(){this.parentOrigin=void 0;this.messageHandlers={};this.featureScripts={};this.sessionLoaded=!1;this.pendingMessages={};this.availableFeatures=["script"];try{window.localStorage}catch(a){this.noLocalStorageAvailable=!0,this.log("localStorage is not available. User chat sessions continue only in a single-page view and not across multiple pages.",!0)}try{window.sessionStorage}catch(a){this.noSessionStorageAvailable=!0,this.log("sessionStorage is not available. User chat sessions end after a web page refresh or across browser tabs and windows.", !0)}window.location.search.replace(/([a-zA-Z0-9]+)=([\S]+)/g,function(a,b,c){"parent"===b&&(this.parentOrigin=c)}.bind(this));this.parentOrigin?(this.addEventListeners(),this.loadFeatureScript("Session"),this.loadFeatureScript("Broadcast"),this.addMessageHandler("script.load",function(a,b){this.loadFeatureScript(b)}.bind(this)),this.addMessageHandler("session.updateStorage",function(a,b){var c=b.deploymentId,d=JSON.parse(esw.sessionAPI.getSessionData(a,["ACTIVE_CHAT_SESSIONS"],!0).ACTIVE_CHAT_SESSIONS|| "{}"),g=!1,k=!1,m=(this.isInternetExplorer()||this.isEdge())&&1===history.length&&!b.isRefresh;esw.sessionAPI.getSessionData(a,["MASTER_DEPLOYMENT_ID"]).MASTER_DEPLOYMENT_ID===c&&(b.isSamePageNavigation&&!m?g=!0:esw.sessionAPI.deleteSessionData(a,["CHASITOR_SERIALIZED_KEY","MASTER_DEPLOYMENT_ID"]));esw.broadcastAPI.on("sessionStorageData",function(f){var l=JSON.parse(f.sessionStorage);this.sessionLoaded||f.domain!==a||(k=!0,Object.getOwnPropertyNames(l).forEach(function(h){-1===h.indexOf("MASTER_DEPLOYMENT_ID")&& sessionStorage.setItem(h,l[h])}),this.sessionLoaded=!0,parent.postMessage({method:"session.onLoad"},this.parentOrigin))}.bind(this));esw.broadcastAPI.on("getSessionStorageData",function(f){f.domain===a&&(g||esw.sessionAPI.getSessionData(a,["MASTER_DEPLOYMENT_ID"]).MASTER_DEPLOYMENT_ID===f.deploymentId)&&esw.broadcastAPI.send("sessionStorageData",{sessionStorage:JSON.stringify(sessionStorage),domain:a})});d[b.deploymentId]&&!g?(esw.broadcastAPI.send("getSessionStorageData",{deploymentId:b.deploymentId, domain:a}),setTimeout(function(){k||(this.sessionLoaded=!0,delete d[b.deploymentId],esw.sessionAPI.setSessionData(a,{ACTIVE_CHAT_SESSIONS:JSON.stringify(d)},!0),parent.postMessage({method:"session.onLoad"},this.parentOrigin))}.bind(this),500)):parent.postMessage({method:"session.onLoad"},this.parentOrigin)}.bind(this)),parent.postMessage({method:"session.frameReady"},this.parentOrigin)):console.error("No domain set!")}String.prototype.endsWith||(String.prototype.endsWith=function(a,b){if(void 0=== b||b>this.length)b=this.length;return this.substring(b-a.length,b)===a});var n=["broadcast","chasitor","filetransfer","session"];e.prototype.isInternetExplorer=function(){return"ActiveXObject"in window};e.prototype.isEdge=function(){return window.navigator&&window.navigator.userAgent&&"string"===typeof window.navigator.userAgent?-1