window.LiveAgentTrackerXD=function(){var e,r,t="LA_POSTMESSAGE",n=1,a=this;return{postMessage:function(e,r,s){if(r){"string"==typeof e&&(e=[e]);var o=t+JSON.stringify(e);s=s||parent,a.postMessage?s.postMessage(o,"*"):s.location=r.replace(/#.*$/,"")+"#"+ +new Date+n+++"&"+o}},receiveMessage:function(n){var s=function(e){try{if(e.data.toString().substr(0,14)!==t)return;var r=e.data.slice(14),a=function(e){var r=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=r&&r.length>2&&"string"==typeof r[2]&&r[2].length>0?r[2]:null},s=new Array;void 0!==n.serverUrl&&null!==n.serverUrl&&""!==n.serverUrl&&s.push(a(n.serverUrl)),void 0!==n.tracker&&null!==n.tracker&&void 0!==n.tracker.url&&null!==n.tracker.url&&""!==n.tracker.url&&s.push(a(n.tracker.url));try{var o=JSON.parse(r,(function(e,r){if("string"!=typeof r&&"number"!=typeof r&&!Array.isArray(r))throw new TypeError("Unsupported type");return r}))}catch(e){return}(Array.isArray(o)&&0==s.length||-1!=s.indexOf(a(e.origin)))&&n.action.apply(n,o)}catch(e){console.log(e)}};a.postMessage?a.addEventListener?a[s?"addEventListener":"removeEventListener"]("message",s,!1):a[s?"attachEvent":"detachEvent"]("onmessage",s):(e&&clearInterval(e),e=null,s&&(e=setInterval((function(){var e=document.location.hash;e!==r&&(re=/^#?\d+&/,re.test(e)&&(s({data:e.replace(re,"")}),document.location.hash=""),r=document.location.hash)}),100)))},receiveMessageFun:function(n){var s=function(e){try{if(e.data.toString().substr(0,14)!==t)return;var r=e.data.slice(14);try{var a=JSON.parse(r,(function(e,r){if("string"!=typeof r&&"number"!=typeof r&&!Array.isArray(r))throw new TypeError("Unsupported type");return r}))}catch(e){return}n.apply(n,a)}catch(e){console.log(e)}};a.postMessage?a.addEventListener?a[s?"addEventListener":"removeEventListener"]("message",s,!1):a[s?"attachEvent":"detachEvent"]("onmessage",s):(e&&clearInterval(e),e=null,s&&(e=setInterval((function(){var e=document.location.hash;e!==r&&(re=/^#?\d+&/,re.test(e)&&(s({data:e.replace(re,"")}),document.location.hash=""),r=document.location.hash)}),100)))}}}();