(function(){var fw={};(function(fw,$){if($){window.freshsales=window.freshsales||{};window.freshsales.$=window.freshsales.$||jQuery}var chatSelector=document.querySelector("[chat]");window.hideChatWidget=chatSelector&&chatSelector.hasAttribute("chat")&&chatSelector.getAttribute("chat")==="false";var widgetSelector=document.querySelector("script[widgetId]");window.custWidgetId=widgetSelector&&widgetSelector.hasAttribute("widgetId")?widgetSelector.getAttribute("widgetId"):"";var FreshworksCRM=(function(){let eventListeners={};function FreshworksCRM(){}FreshworksCRM.prototype.identify=function(){let event={name:"identify",args:arguments,origin:window.location.origin,created_by:"fwcrm"};let customEvent=new CustomEvent("fwcrm_event",{detail:event});window.dispatchEvent(customEvent)};FreshworksCRM.prototype.trackCustomEvent=function(){let event={name:"trackCustomEvent",args:arguments,origin:window.location.origin,created_by:"fwcrm"};let customEvent=new CustomEvent("fwcrm_event",{detail:event});window.dispatchEvent(customEvent)};FreshworksCRM.prototype.set=function(){let event={name:"set",args:arguments,origin:window.location.origin,created_by:"fwcrm"};let customEvent=new CustomEvent("fwcrm_event",{detail:event});window.dispatchEvent(customEvent)};FreshworksCRM.prototype.on=function(event_name,callback){eventListeners[event_name]=eventListeners[event_name]||[];eventListeners[event_name].push(callback)};window.addEventListener("fwcrm_event_consume",function(e){let event_name=e.detail.name;let callbacks=eventListeners[event_name];if(callbacks&&callbacks.length){callbacks.forEach(function(c){try{c.apply(this)}catch(e){console.log("Error while calling callback function of seeder products",e)}})}});return FreshworksCRM})();fw.FreshworksCRM=FreshworksCRM})(fw,window.jQuery);(function(a){function bind(fn,$this){var a=function(){return fn.apply($this,arguments)};return a}a.start=function(){try{this.FreshworksCRM=new a.FreshworksCRM();window.fwcrm={};window.fwcrm.identify=bind(this.FreshworksCRM.identify,this.FreshworksCRM);window.fwcrm.trackCustomEvent=bind(this.FreshworksCRM.trackCustomEvent,this.FreshworksCRM);window.fwcrm.set=bind(this.FreshworksCRM.set,this.FreshworksCRM);window.fwcrm.on=bind(this.FreshworksCRM.on,this.FreshworksCRM)}catch(err){}}})(fw);fw.start();var zargetMain;zargetMain=zargetMain||(function(){ /*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ ;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document){throw new Error("jQuery requires a window with a document")}return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t){for(r in c){(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i)}}n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length" in e&&e.length,n=w(e);return !m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return !0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]){}e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p){return n}if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t))){if(i=u[1]){if(9===p){if(!(a=e.getElementById(i))){return n}if(a.id===i){return n.push(a),n}}else{if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i){return n.push(a),n}}}else{if(u[2]){return H.apply(n,e.getElementsByTagName(t)),n}if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName){return H.apply(n,e.getElementsByClassName(i)),n}}}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--){l[o]=(s?"#"+s:":scope")+" "+xe(l[o])}c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return !!e(t)}catch(e){return !1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--){b.attrHandle[n[r]]=t}}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r){return r}if(n){while(n=n.nextSibling){if(n===t){return -1}}}return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form" in e?e.parentNode&&!1===e.disabled?"label" in e?"label" in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label" in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--){e[n=r[i]]&&(e[n]=!(t[n]=e[n]))}})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return !Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e){return[o]}i=t.getElementsByName(e),r=0;while(o=i[r++]){if((n=o.getAttributeNode("id"))&&n.value===e){return[o]}}}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++]){1===n.nodeType&&r.push(n)}return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E){return t.getElementsByClassName(e)}},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t){while(t=t.parentNode){if(t===e){return !0}}}return !1},j=t?function(e,t){if(e===t){return l=!0,0}var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t){return l=!0,0}var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o){return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0}if(i===o){return pe(e,t)}n=e;while(n=n.parentNode){a.unshift(n)}n=t;while(n=n.parentNode){s.unshift(n)}while(a[r]===s[r]){r++}return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t))){try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType){return n}}catch(e){N(t,!0)}}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return !0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return !!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return -1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e){return this}if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t){return !t||t.jquery?(t||n).find(e):this.constructor(t).find(e)}if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t)){for(r in t){m(this[r])?this[r](t[r]):this.attr(r,t[r])}}return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType){}return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events)){for(i in Y.remove(t,"handle events"),s){for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0]){return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return -1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using" in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length){return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)})}var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position")){t=r.getBoundingClientRect()}else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position")){e=e.parentNode}e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position")){e=e.offsetParent}return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n){return r?r[i]:e[t]}r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t){return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t}})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 ")},cssPathStep:function(node,optimized,isTargetNode,excludes){if(node.nodeType!==Node.ELEMENT_NODE){return null}function prefixedElementClassNames(node){var classAttribute=getClassName(node,excludes);if(!classAttribute){return[]}return classAttribute.split(/\s+/g).filter(Boolean).map(function(name){return"$"+name})}function isCSSIdentChar(c){if(/[a-zA-Z0-9_\-]/.test(c)){return true}return c.charCodeAt(0)>=160}function isCSSIdentifier(value){return(/^-?[a-zA-Z_][a-zA-Z0-9_\-]*$/).test(value)}function toHexByte(c){var hexByte=c.charCodeAt(0).toString(16);if(hexByte.length===1){hexByte="0"+hexByte}return hexByte}function escapeAsciiChar(c,isLast){return"\\"+toHexByte(c)+(isLast?"":" ")}function escapeIdentifierIfNeeded(ident){if(isCSSIdentifier(ident)){return ident}var shouldEscapeFirst=/^(?:[0-9]|-[0-9\-]?)/.test(ident),lastIndex=ident.length-1;return ident.replace(/./g,function(c,i){return((shouldEscapeFirst&&i===0)||!isCSSIdentChar(c))?escapeAsciiChar(c,i===lastIndex):c})}function idSelector(id){return"#"+escapeIdentifierIfNeeded(id)}var id=getId(node,excludes),nodeNameLower,nodeName,parent,prefixedOwnClassNamesArray,needsClassNames,needsNthChild,ownIndex,elementIndex,siblings,i,sibling,ownClassNames,ownClassNameCount,name,siblingClassNamesArray,j,siblingClass,result,prefixedName;if(optimized){if(id){return new CssSelector.DOMNodePathStep(idSelector(id),true)}nodeNameLower=node.nodeName.toLowerCase();if(nodeNameLower==="body"||nodeNameLower==="head"||nodeNameLower==="html"){return new CssSelector.DOMNodePathStep(CssSelector.nodeNameInCorrectCase(node),true)}}nodeName=CssSelector.nodeNameInCorrectCase(node);if(id){return new CssSelector.DOMNodePathStep(nodeName+idSelector(id),true)}parent=node.parentNode;if(!parent||parent.nodeType===Node.DOCUMENT_NODE){return new CssSelector.DOMNodePathStep(nodeName,true)}prefixedOwnClassNamesArray=prefixedElementClassNames(node);needsClassNames=false;needsNthChild=false;ownIndex=-1;elementIndex=-1;siblings=parent.children;for(i=0;(ownIndex===-1||!needsNthChild)&&i0){r=(d+r)%16|0;d=Math.floor(d/16)}else{r=(d2+r)%16|0;d2=Math.floor(d2/16)}return(c=="x"?r:(r&7|8)).toString(16)});return uuid};zarget.setUserID=function(){var age,c=document.cookie||"";if(c.indexOf(zarget.visitorCookie+"=")===-1){age=365*24*60*60*1000;zarget.setCookie(zarget.visitorCookie,zarget.generateUserID(),age)}};zarget.checkPingBack=function(hash){var msg=new Zarget.Message(Zarget.MessageType.PINGBACK);msg.setParam({id:hash});Zarget.Messenger.send(msg)};zarget.generatePageID=function(){return +new Date()+"p"+Math.random()};zarget.generateSessionID=function(){return +new Date()+"f"+Math.random()};zarget.isNewSession=function(expid){var c=document.cookie||"";return c.indexOf(zarget.sessionCookie+"_"+expid+"=")===-1?true:false};zarget.setSessionID=function(expid){if(zarget.isNewSession()){var age=1*24*60*60*1000;zarget.setCookie(zarget.sessionCookie+"_"+expid,zarget.generateSessionID(),age)}return zarget.getCookie(zarget.sessionCookie)};zarget.setSessionStopped=function(expid){var age=30*24*60*60*1000;zarget.setCookie(zarget.sessionCookie+"_"+expid,"-1",age)};zarget.getSessionID=function(expid){return zarget.getCookie(zarget.sessionCookie+"_"+expid)};zarget.checkSamplePercentage=function(){var randomPercentage=Math.floor(Math.random()*100);var samplePercentage=ZargetData.samplePercentage;return randomPercentage<=samplePercentage};zarget.SAMPLE_VISITED_USER=1;zarget.SAMPLE_ABANDONED_USER=2;zarget.notAllowSampledVisitor=function(){var uid=zarget.getUidAndSetIfNotExists();var info=zarget.getCookie(uid);var sampledUser=info?parseInt(info):info;if(sampledUser===zarget.SAMPLE_ABANDONED_USER){return true}if(sampledUser!==zarget.SAMPLE_VISITED_USER){if(!zarget.checkSamplePercentage()){zarget.setCookie(uid,zarget.SAMPLE_ABANDONED_USER);console.log("####### Visitor is not bucketed ########");return true}}return false};zarget.getUidAndSetIfNotExists=function(){var userid;if(ZargetData.IS_BUNDLE_ACCOUNT){userid=zarget.getCookie(zarget.freshworks360Cookie);if(!userid){var age,c=document.cookie||"";if(c.indexOf(zarget.freshworks360Cookie+"=")===-1){age=365*24*60*60*1000;zarget.setCookie(zarget.freshworks360Cookie,zarget.generateUserID(),age)}userid=zarget.getCookie(zarget.freshworks360Cookie)}}else{userid=zarget.getCookie(zarget.visitorCookie);if(!userid){zarget.setUserID();userid=zarget.getCookie(zarget.visitorCookie)}}return userid};zarget.getVisitorInfo=function(){var info=zarget.getCookie(zarget.visitorInfoCookie);if(!info){return}try{return zarget.parseJSON(decodeURIComponent(info))}catch(e){zarget.log("Cookie visitor_info value tampered cannot parse it.")}};zarget.getGoalInfo=function(){var info=zarget.getCookie(zarget.goalInfoCookie);if(!info){return}try{return zarget.parseJSON(decodeURIComponent(info))}catch(e){zarget.log("Cookie goals_info value tampered cannot parse it.")}};zarget.getPollsInfo=function(){var info=zarget.getStorage(zarget.pollData);if(!info){return}try{return zarget.parseJSON(decodeURIComponent(info))}catch(e){zarget.log("Cookie polls_info value tampered cannot parse it.")}};zarget.selector=function(node,excludes){return node?CssSelector.cssPath(node,false,excludes):""};zarget.getReferrer=function(){return document.referrer};zarget.getURL=function(url){url=url||document.URL;return url.split("?")[0]};zarget.getSimpleURL=function(url){var parser=document.createElement("a");parser.href=url;var hostname=parser.hostname;var pathname=parser.pathname;if(hostname){hostname=hostname.replace(/^www./i,"")}if(pathname){pathname=pathname.replace(/\/$/,"")}return hostname+pathname};zarget.isAlreadyVisitedUser=function(){return !!(zarget.getCookie(zarget.visitorCookie)&&zarget.getCookie(zarget.visitorInfoCookie))};zarget.isNewVisitor=function(){return !zarget.getCookie(zarget.visitorCookie)};zarget.isURLMatches=function(url){var cururl=zarget.parseURL(document.URL);function lc(a){return(a||"").toLowerCase()}var expurl=zarget.parseURL(experiment.url);if(lc(expurl.authority)===lc(cururl.authority)&&lc(expurl.path)===lc(cururl.path)){return true}return false};zarget.Message=function(type){this.type=type;this.params={}};zarget.migrateExistingCookies=function(exps,cookies,excludes){var runningCookies={},exp;for(var cookieKey in cookies){if(exps.hasOwnProperty(cookieKey)||zarget.isLidExists(exps,cookieKey)){exp=exps[cookieKey]||zarget.isLidExists(exps,cookieKey);if(exp.hasOwnProperty("lid")){runningCookies[exp.lid]=cookies[cookieKey]}}if(excludes.hasOwnProperty(cookieKey)||zarget.isLidExists(excludes,cookieKey)){exp=excludes[cookieKey]||zarget.isLidExists(excludes,cookieKey);if(exp.hasOwnProperty("lid")){runningCookies[exp.lid]=cookies[cookieKey]}}}return runningCookies};zarget.isLidExists=function(exps,lid){if(Array.isArray(exps)){for(var i=0,exp,len;exp=exps[i];i++){if(exp.hasOwnProperty("experiment")){if(exp.experiment.hasOwnProperty("lid")){if(exp.experiment.lid==lid){return exp.experiment}}}}}else{for(var exp in exps){if(exps[exp].hasOwnProperty("lid")){if(exps[exp]["lid"]==lid){return exps[exp]}}}}return false};zarget.removePausedExpCookies=function(){var exps=ZargetData.experiments,viCookies=Zarget.getVisitorInfo(),age=365*24*60*60*1000,excludes=ZargetData.excludes||{}};zarget.findExperiment=function(exps,Experiment){if(!ZargetData||!ZargetData.experiments||zarget.isOptedOut()){return}var visitorinfo=Zarget.getVisitorInfo();for(var exp in visitorinfo){var expDet=zarget.isLidExists(ZargetData.experiments,exp);if(!expDet||(expDet&&(expDet.type===7||expDet.type===8))){continue}if(zarget.isExperimentURLMatches(expDet)||matchVariationURL(expDet,null,true)){if(!exps.isExists(expDet)){exps.push(Experiment(expDet))}}}for(var e in ZargetData.experiments){var expDet=ZargetData.experiments[e];if(expDet.type===5||expDet.type===7||expDet.type===8){continue}if(zarget.isExperimentURLMatches(expDet)&&canRunScheduled(expDet)){if(expDet.type===1||expDet.type===4){var traffic=Math.random()*100;if(traffic>expDet.traffic){continue}}if(!exps.isExists(expDet)){exps.push(Experiment(expDet))}}}var split=filterExps(exps,4);var ab=filterExps(exps,1);var heatmap=filterExps(exps,3);exps.splice(0);split.length&&exps.push(split[0]);window.zarget$.each(ab,function(idx,abExp){exps.push(abExp)});heatmap.length&&exps.push(heatmap[0]);return exps};zarget.getProjectProps=function(){if(!ZargetData||!ZargetData.project){return}return ZargetData.project};function filterExps(exps,type){return window.zarget$.grep(exps,function(expObj){if(expObj.experiment.type===type){return true}})}zarget.rememberGoal=function(exp,goalid){if(!goalid){return}var age=365*24*60*60*1000,goalInfo=Zarget.getGoalInfo(),gobj;gobj=typeof goalInfo==="object"?goalInfo:{};if(!gobj.hasOwnProperty(exp.id)){gobj[exp.id]=[goalid];Zarget.setCookie(Zarget.goalInfoCookie,encodeURIComponent(Zarget.stringifyJSON(gobj)),age)}else{var goals=gobj[exp.id];if(goals.indexOf(goalid)<0){goals.push(goalid);Zarget.setCookie(Zarget.goalInfoCookie,encodeURIComponent(Zarget.stringifyJSON(gobj)),age)}}};zarget.processOptOut=function(){var optOutCookie,queryParams;optOutCookie=zarget.getCookie(zarget.trackingOptOut);if(optOutCookie){zarget.optOut=true;zarget.removeCookie(zarget.visitorCookie);zarget.removeCookie(zarget.visitorInfoCookie)}else{queryParams=zarget.parseURL(document.URL).query;if(queryParams&&queryParams[zarget.trackingOptOut]==="true"){zarget.setTrackingOptOutCookie();zarget.optOut=true;zarget.removeCookie(zarget.visitorCookie);zarget.removeCookie(zarget.visitorInfoCookie)}}};zarget.isOptedOut=function(){return zarget.optOut};zarget.setTrackingOptOutCookie=function(){var c=document.cookie||"";if(c.indexOf(zarget.trackingOptOut+"=")===-1){zarget.setCookie(zarget.trackingOptOut,"1",zarget.trackingOptOutAge);alert("You have successfully opted out of FreshMarketer tracking for this website.")}};function canRunScheduled(exp){if(exp.schedule&&exp.time){var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);return exp.time>nowUTC?true:false}return true}zarget.canRunScheduled=canRunScheduled;function trimURL(url){if(!url){return url}return url.charAt(url.length-1)==="/"?url.substring(0,url.length-1):url}function matchVariationURL(experiment,variationArr,findExp){if(!experiment||!experiment.variations){return false}if(experiment.type!==4){return false}if(experiment.type===4&&experiment.regex){return fnCheckMatchURL(experiment,variationArr||experiment.variations)}var cururl=zarget.parseURL(document.URL);var variations=variationArr||experiment.variations;for(var i=0,url,variation,l=variations.length;i-1){var queryStr=variation.url.substring(queryIdx);varQueryUrl=queryStr}if(experiment.queryparam){varQueryUrl=window.location.search}if(findExp){if(simpleMatchHost(url.authority,cururl.authority)&&trimURL(url.path)===trimURL(cururl.path)){return true}}else{if(simpleMatchHost(url.authority,cururl.authority)&&trimURL(url.path)===trimURL(cururl.path)&&window.location.search===varQueryUrl){return true}}}return false}zarget.matchSplitFunc=matchVariationURL;function fnCheckMatchURL(experiment,variationArr){var cururl,locHref,checkURL,orig,regexs,k,matches,match,re,regex,i,len,variations,j,variation,varUrl,groupPatt,grpMatch,match1,orig1,d,lastInd,strEx,expurl,parseUrl,docURL;docURL=document.URL;cururl=Zarget.parseURL(docURL);expurl=Zarget.parseURL(experiment.url);locHref=cururl.authority.replace(/^www./,"")+cururl.path;var queryIdx=docURL.indexOf("?");if(queryIdx>-1){var queryStr=docURL.substring(queryIdx);locHref+=queryStr}checkURL=expurl.authority.replace(/^www./,"")+expurl.path;var queryIdx=experiment.url.indexOf("?");if(queryIdx>-1){var queryStr=experiment.url.substring(queryIdx);checkURL+=queryStr}orig=checkURL;regexs=orig.split("/");k=1;matches={};re=/(\([^\)\/]*\)|\*+)/g;for(i=0,len=regexs.length;i-1){var queryStr=variation.url.substring(queryIdx);varUrl+=queryStr}varUrl=supplant(varUrl);varUrl=varUrl.replace(/([\[\]\*\^\$\.\?\/\\])/g,"\\$1");groupPatt=/(\\\(([^\)\/]*)\))/g;match1=varUrl.match(groupPatt);orig1="";if(orig.match(groupPatt)!==null){d=0;lastInd=0;while((grpMatch=groupPatt.exec(orig))!==null){firstSub=orig.substring(lastInd,grpMatch.index).replace(/\\\*+/g,"(.*)");matchReg="("+grpMatch[2].substring(0,grpMatch[2].length-1)+")";matchReg=matchReg.replace(/\\\|/g,"|");orig1+=firstSub+matchReg;lastInd=grpMatch.index+grpMatch[0].length;d++}orig1+=orig.substring(lastInd,orig.length);varUrl=orig1}else{varUrl=varUrl.replace(/\\\*+/g,"(.*)")}strEx=new RegExp(varUrl);match=locHref.match(strEx);if(match!==null&&match.index===0&&match[0].length==locHref.length){return true}}}}zarget.findHeatMapExperiment=function(){if(!ZargetData||!ZargetData.experiments){return}var visitorinfo=Zarget.getVisitorInfo();for(var exp in visitorinfo){var expDet=zarget.isLidExists(ZargetData.experiments,exp);if(!expDet||(expDet&&expDet.type!==3)){continue}if(zarget.isExperimentURLMatches(expDet)){return expDet}}for(var e in ZargetData.experiments){if(ZargetData.experiments[e].type===3&&zarget.isExperimentURLMatches(ZargetData.experiments[e])&&canRunScheduled(ZargetData.experiments[e])){return ZargetData.experiments[e]}}};zarget.importScript=function(url,id,success,failure){var scriptTag=document.createElement("script"),head=document.head;scriptTag.type="text/javascript";scriptTag.setAttribute("id",id);scriptTag.setAttribute("src",url);if(failure&&typeof failure==="function"){scriptTag.onerror=failure}if(success&&typeof success==="function"){scriptTag.onload=success}head.appendChild(scriptTag)};zarget.importStyle=function(url,id,success,failure){var linkTag=document.createElement("link"),head=document.head;linkTag.type="text/css";linkTag.setAttribute("rel","stylesheet");linkTag.setAttribute("id",id);linkTag.setAttribute("href",url);if(failure&&typeof failure==="function"){linkTag.onerror=failure}if(success&&typeof success==="function"){linkTag.onload=success}head.appendChild(linkTag)};zarget.getPageLoadTime=function(){if(window.performance&&window.performance.timing){return window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart}else{return window.zargetLoadEnded-window.zargetLoadStart}};zarget.getUserLanguage=function(){return navigator.language||navigator.userLanguage};zarget.getScreenResolution=function(){return screen.width+"x"+screen.height};zarget.hasLocalStorage=function(){return !!window.localStorage};zarget.getCurrentPath=function(){return window.location.pathname};zarget.getObjectLength=function(obj){var count=0;for(var k in obj){if(obj.hasOwnProperty(k)){++count}}return count};zarget.mergeTwoObject=function(obj1,obj2){if(Object.assign){return Object.assign(obj1,obj2)}for(var attrname in obj2){obj1[attrname]=obj2[attrname]}return obj1};zarget.findPoll=function(deviceTarget){if(!ZargetData||!ZargetData.polls){return}var pollsInfo=Zarget.getPollsInfo();for(var poll in pollsInfo){if(!ZargetData.polls.hasOwnProperty(poll)){continue}ZargetData.polls[poll].type=6;if(zarget.isExperimentURLMatches(ZargetData.polls[poll])){return ZargetData.polls[poll]}}for(var p in ZargetData.polls){ZargetData.polls[p].type=6;if(zarget.isExperimentURLMatches(ZargetData.polls[p])&&deviceTarget(ZargetData.polls[p].deviceTarget)){return ZargetData.polls[p]}}};zarget.getIntegrations=function(){if(!ZargetData||!ZargetData.integrations){return{}}return ZargetData.integrations};zarget.isExperimentURLMatches=function(e){if(!e){return}function lc(a){return(a||"").toLowerCase()}function simple(u,isSplit){var cururl=zarget.parseURL(lc(document.URL));var expurl=zarget.parseURL(lc(u));if(isSplit){return simpleMatchHost(cururl.authority,expurl.authority)&&trimURL(cururl.path)===trimURL(expurl.path)&&(cururl.fragement===expurl.fragement)}else{return simpleMatchHost(cururl.authority,expurl.authority)&&trimURL(cururl.path)===trimURL(expurl.path)}}function regex(u){var rgx=new RegExp(u);return rgx.test(document.URL)}function trimWwwAndTrailingSlash(u){if(u){u=u.lastIndexOf("/")===u.length-1?u.substring(0,u.length-1):u;u=u.replace(/^https?\:\/\//,"").replace(/^www./,"")}return u}function equal(u){if(trimWwwAndTrailingSlash(lc(document.URL))===trimWwwAndTrailingSlash(lc(u))){return true}}function substr(u){var domain=u.domain;var cururl=zarget.parseURL(document.URL);if(domain.type==="contains"){if(cururl.authority&&lc(cururl.authority).indexOf(lc(domain.domain))>-1){if((lc(cururl.path+window.location.search+window.location.hash)).indexOf(lc(u.url))>-1){return true}}}else{if(domain.type==="is"){var incParse=zarget.parseURL(zarget.matcher(domain.domain,"http",8)?domain.domain:cururl.scheme+"://"+domain.domain);if(lc(cururl.scheme)===lc(incParse.scheme)&&trimWwwAndTrailingSlash(lc(cururl.authority))===trimWwwAndTrailingSlash(lc(incParse.authority))){if((lc(cururl.path+window.location.search+window.location.hash)).indexOf(lc(u.url))>-1){return true}}}}}var EXPERIMENT={AB:1,MULTIVARIANT:2,HEATMAP:3,SPLIT:4,POLLS:6,FORMS:7,SESSIONREPLAY:8},urls=e.urls,excludes=e.excludeUrls,i,j,l,jl,url,u,v,variations=e.variations;if(!urls){return}var exp=false;if(e.type==EXPERIMENT.SPLIT){for(i=1,l=variations.length;i0&&!_this.reqInProcess){var data=_this.processEvents();_this.dispatchData(data)}},this.timeOut);window.beforeunload=function(){}};HttpTransport.prototype.processEvents=function(){var time=+new Date();var today=new Date();var timeZone=today.getTime()+(today.getTimezoneOffset()*60000);var url=encodeURIComponent(document.URL);var lang=Zarget.getUserLanguage(),loadTime=Zarget.getPageLoadTime(),res=Zarget.getScreenResolution(),referrer=document.referrer;var projProps=zarget.getProjectProps();var eventsToSend;if(this.events.length>50){eventsToSend=this.events.slice(0,50)}else{eventsToSend=this.events.slice(0)}var data={url:url,res:res,segref:referrer,data:eventsToSend,dispatched_time:time};if(projProps&&projProps.anonymize_ip===1){data.ip="no"}return data};HttpTransport.prototype.dispatchData=function(data){if(!navigator.onLine){return}var _this=this;var url=zarget.Messenger._getApiURL(Zarget.MessageType.CRO_DATA_SEND);try{var xhr=zarget.Messenger.createCORS(url,"POST");xhr.onload=function(e){if(xhr.readyState===4){if(xhr.status===200){_this.events.splice(0,data.data.length);_this.timeOut=5000;_this.retries=0}else{_this.retries++;if(_this.retries>20){_this.timeOut*=2}}_this.reqInProcess=false}};if(xhr){xhr.withCredentials=true;this.reqInProcess=true;xhr.send(JSON.stringify(data));return}}catch(e){}};HttpTransport.prototype.stop=function(){window.clearInterval(this.intervalId)};HttpTransport.prototype.send=function(e){if(!e){return}try{this.events.push(e.params)}catch(e){console.log(e)}};HttpTransport.prototype.sendBeacon=function(){};HttpTransport.prototype.sendImmediate=function(e){if(!e){return}try{this.events.push(e.params)}catch(e){console.log(e)}this.reqInProcess=true;let data=this.processEvents();this.dispatchData(data)};var transport=(function(){return new HttpTransport()})();zarget.xhrService=transport;zarget.Messenger={_getApiURL:function(type){var serverurl=zarget.serverinfo.serverurl,apiurl;switch(type){case zarget.MessageType.ADDVISITOR:apiurl=zarget.serverinfo.visitorUrl;break;case zarget.MessageType.UPDATEVISITOR:apiurl=zarget.serverinfo.returningVisitorUrl;break;case zarget.MessageType.ADDGOAL:apiurl=zarget.serverinfo.goalUrl;break;case zarget.MessageType.ADDSELECTOR:apiurl=zarget.serverinfo.heatmapUrl;break;case zarget.MessageType.ADDPOLL:apiurl=zarget.serverinfo.pollUrl;break;case zarget.MessageType.CHECKSESSION:apiurl=zarget.serverinfo.sessionCheckUrl;break;case zarget.MessageType.PINGBACK:apiurl=zarget.serverinfo.pingBackUrl;break;case zarget.MessageType.GET_SESSIONURL:apiurl=zarget.serverinfo.sessionDecodeUrl;break;case zarget.MessageType.SESSION_DATA_SEND:apiurl=zarget.serverinfo.sessionDataSendUrl;return apiurl;case zarget.MessageType.CRO_DATA_SEND:apiurl=zarget.serverinfo.croDataSendUrl;return apiurl;break;case zarget.MessageType.EVENT_DATA_SEND:apiurl=zarget.serverinfo.eventDataSendUrl;return apiurl;case zarget.MessageType.FCHAT_WIDGET_URL:apiurl=zarget.serverinfo.chatWidgetUrl;return apiurl;case zarget.MessageType.CHAT_HISTORY_STATUS:apiurl=zarget.serverinfo.secureServerURL+zarget.serverinfo.chatHistoryUpdateStatusUrl;return apiurl;case zarget.MessageType.PENDING_CHAT_TRIGGER:apiurl=zarget.serverinfo.secureServerURL+zarget.serverinfo.chatHistoryUpdateStatusUrl+"/trigger";return apiurl}return serverurl+apiurl},createCORS:function(url,requestMethod){requestMethod=requestMethod||"GET";var xhr=new XMLHttpRequest();if("withCredentials" in xhr){xhr.open(requestMethod,url,true)}else{if(typeof XDomainRequest!="undefined"){xhr=new XDomainRequest();xhr.open(requestMethod,url)}else{xhr=null}}return xhr},send:function(message){if(!message||!message instanceof zarget.Message){return}var url=zarget.Messenger._getApiURL(message.type);var params=message.serializeForm();if(params&¶ms.length){url=url+"?"+params;var projProps=zarget.getProjectProps();if(projProps&&projProps.anonymize_ip===1){url+="&ip=no"}}try{var xhr=zarget.Messenger.createCORS(url);if(xhr){xhr.withCredentials=true;xhr.send();return}}catch(e){}var img=new Image();img.src=url}};zarget.isSecureField=function(node){if(!node){return}var name=node.getAttribute("name")||node.getAttribute("id");var autocomplete=node.getAttribute("autocomplete");var form=window.zarget$(node).parents("form"),labels,fieldlabel,c;if(form&&form.length>0){var selector=Zarget.selector(form.get(0));if(!_cachedformlabels[selector]){labels=zarget.getLabelMappings(selector);_cachedformlabels[selector]=labels}labels=_cachedformlabels[selector]}for(var f in SECUREFIELDS){fieldlabel=labels?labels[name]?labels[name].text:void 0:void 0;c=SECUREFIELDS[f];if((c.rgx.test(name)||(c.label&&c.label.test(fieldlabel)))&&!c.negative.test(name)){return true}}return false};zarget.getLabelMappings=function(e){var n,i={},t=window.zarget$;return t(e).find("label").each(function(e,a){if(n=a.getAttribute("for")){i[n]||(i[n]={element:a,text:t(a).text()||a.name||a.id})}else{var r=a.nextSibling;for(r||(r=a.parentNode.nextSibling);r&&1!=r.nodeType;){r=r.nextSibling}if(r&&!r.form&&r.firstChild){for(r=r.firstChild;r&&1!=r.nodeType;){r=r.nextSibling}}r&&r.form&&(r.id||r.name)&&(i[r.id||r.name]={element:a,text:t(a).text()||a.name||a.id})}}),i};window.zg_is_new_visitor=zarget.isNewVisitor();zarget.processOptOut();window.zargetCookie=window.zarget||{};window.zargetCookie.getCookies=zarget.getCookies;window.zargetCookie.setCookie=zarget.setCookie;window.zargetCookie.generateUserID=zarget.generateUserID;window.zargetCookie.removeCookie=zarget.removeCookie;window.zg_selector=zarget.selector;window.integrations=zarget.getIntegrations;window.zg_projectProps=zarget.getProjectProps;return zarget})();(function(Zarget){if(Zarget.isOptedOut()){return}var searchEngines,socialnetworks,browsers,devices,headers={"X-Osm-CSRF":"9390uasldkhf8"},mobiledevices,CONDITIONTYPE={AND:0,OR:1};searchEngines=[{d:"search.daum.net",u:"/search",q:"q",s:"Daum"},{d:"search.naver.com",u:"/search.naver",q:"query",s:"Naver"},{d:"www.google.",q:"q",s:"Google"},{d:"r.search.yahoo.com",q:"p",s:"Yahoo"},{d:"www.bing.com",u:"/search",q:"q",s:"Bing"},{d:"search.aol.com",u:"/aol/search",q:"q",s:"AOL"},{d:"www.aolsearch.com",u:"/search",q:"query",s:"AOL"},{d:"search.lycos.com",u:"/web/",q:"q",s:"Lycos"},{d:"www.ask.com",u:"/web",q:"q",s:"Ask"},{d:"search.about.com",q:"q",s:"About"},{d:"websearch.about.com",q:"q",s:"About"},{d:"ricerca.virgilio.it",u:"/ricerca",q:"qs",s:"Virgilio"},{d:"www.baidu.com",q:"wd",s:"Baidu"},{d:"www.yandex.",u:"/clck/jsredir",s:"Yandex"},{d:"yandex.",u:"/clck/jsredir",s:"Yandex"},{d:"search.seznam.cz",q:"q",s:"Seznam"},{d:"szukaj.wp.pl",u:"/szukaj.html",q:"q",s:"Wirtulana Polska"},{d:"search.yam.com",u:"/Search/Web/GSearch.aspx",q:"q",s:"Yam"},{d:"www.kvasir.no",q:"q",s:"Kvasir"},{d:"arama.mynet.com",q:"q",s:"Mynet"},{d:"nova.rambler.ru",u:"/search",q:"query",s:"Rambler"}];browsers=[{c:"UCBrowser/",b:"ucbrowser"},{c:"Edge",b:"edge"},{c:" OPR/",or:window.opera,b:"opera"},{c:"Chrome",b:"chrome"},{c:"Netscape",b:"netscape"},{c:"Firefox",b:"firefox"},{c:"Apple",b:"safari"},{c:"MSIE",b:"ie"},{c:"Konqueror",b:"konqueror"}];devices=[{c:"ipod",d:"ios"},{c:"ipad",d:"ios",and:navigator.userAgent.toLowerCase().indexOf("webkit")!==-1},{c:"iphone",d:"ios"},{c:"windows phone",d:"winphone"},{c:"SymbianOS",d:"symbian"},{c:"googletv",d:"googletv"},{c:"bb10",d:"blackberry",or:navigator.userAgent.toLowerCase().indexOf("playbook")!==-1},{c:"android",d:"android"}];mobiledevices=[{r:/Android/i,d:"Android"},{r:/blackberry/i,d:"blackberry"},{r:/iPhone|iPod/i,d:"iOS"},{r:/Opera Mini|Opera Mobi/i,d:"Opera"},{r:/IEMobile/i,d:"winphone"}];socialnetworks=[{d:"www.facebook.com",s:"Facebook"},{d:"www.messenger.com",s:"FBMessenger"},{d:"plus.google.com",s:"Google Plus"},{d:"plus.url.google.com",s:"Google Plus"},{d:"t.co",s:"Twitter"},{d:"twitter.com",s:"Twitter"},{d:"instagram.com",s:"Instagram"},{d:"www.linkedin.com",s:"LinkedIn"},{d:"www.pinterest.com",s:"Pinterest"},{d:"vk.com",s:"VK"}];function UserAgent(useragent,appversion,platform){var n=window.navigator;this.useragent=useragent||n.userAgent;this.appversion=appversion||n.appVersion;this.platform=platform||n.platform}UserAgent.prototype={matches:function(ua,d){var c=d.c;if(d.hasOwnProperty("and")){if(d.and&&ua.indexOf(c)!==-1){return true}}else{if(ua.indexOf(c)!==-1||d.or){return true}}},getDevice:function(){var ua=this.useragent.toLowerCase(),i,l;for(i=0,l=devices.length;i0){return(new Function("return ("+expr+")"))}}Targeting.prototype={matches:function(str,set,type){var r,i,l,arr;arr=[];for(i=0,l=set.length;icondValue;break}},range:function(type,condition,from,to,ip){try{if(type==="ipv4"){from=from.split(".");from=parseInt(from[3],10)+(from[2]*256)+(from[1]*Math.pow(256,2))+(from[0]*Math.pow(256,3));to=to.split(".");to=parseInt(to[3],10)+(to[2]*256)+(to[1]*Math.pow(256,2))+(to[0]*Math.pow(256,3));ip=ip.split(".");ip=parseInt(ip[3],10)+(ip[2]*256)+(ip[1]*Math.pow(256,2))+(ip[0]*Math.pow(256,3))}else{if(type==="ipv6"){from=splitAndFillIP(from);from=hex2long(from.replace(/:/g,""));to=splitAndFillIP(to);to=hex2long(to.replace(/:/g,""));ip=splitAndFillIP(ip);ip=hex2long(to.replace(/:/g,""))}}if(condition===10){return(from<=ip&&ip<=to)}else{if(condition===11){return(from>ip||ip>to)}}}catch(e){return false}},useragent:function(c){if(!c){return false}try{return this.matcher(navigator.userAgent,c.value,c.condition)}catch(e){return false}},referrer:function(c){if(!c){return false}try{return this.matcher(getReferrer(),c.value,c.condition)}catch(e){return false}},url:function(c){if(!c){return false}try{return this.matcher(getURL(),c.value,c.condition)}catch(e){return false}},cookieval:function(c){if(!c){return false}try{var cookie=c.value,cookies=Zarget.getCookies();return Zarget.matcher(cookies[cookie.n],cookie.v,c.condition)}catch(e){return false}},browser:function(c){if(!c){return false}try{var u=new UserAgent();return this.matches(u.getBrowser(),c.value,c.condition)}catch(e){return false}},visitor:function(c){if(!c){return false}try{var usertype=!window.zg_is_new_visitor;return Zarget.matcher(usertype?"1":"0",c.value,c.condition)}catch(e){return false}},traffictype:function(c){var TRAFFIC={DIRECT:"direct",REFERRAL:"referral",SEARCH:"search",SOCIAL:"social",MOBILE:"mobile",MOBILEANDTABLET:"mobiletablet",NEWVISITOR:"newvisitor",RETURNINGVISITOR:"returningvisitor",DESKTOP:"desktop"},referrer,url,traffictype,ua,cookie;if(!c){return false}try{if(!c.traffictype){return false}referrer=Zarget.getReferrer()||"";url=document.URL;traffictype=c.traffictype;cookie=document.cookie||"";if(traffictype===TRAFFIC.DIRECT){return referrer.length===0||url===referrer||Zarget.parseURL(url).authority===Zarget.parseURL(referrer).authority}if(traffictype===TRAFFIC.REFERRAL){return referrer.length>0&&Zarget.parseURL(url).authority!==Zarget.parseURL(referrer).authority}if(traffictype===TRAFFIC.SOCIAL){return getSocialNetwork(referrer)?true:false}if(traffictype===TRAFFIC.SEARCH){return getSearchEngine(referrer)?true:false}if(traffictype===TRAFFIC.MOBILE){return new UserAgent().isMobile()?true:false}if(traffictype===TRAFFIC.MOBILEANDTABLET){ua=new UserAgent();return ua.isMobile()||ua.getDevicetype()==="tablet"}if(traffictype===TRAFFIC.NEWVISITOR){return window.zg_is_new_visitor}if(traffictype===TRAFFIC.RETURNINGVISITOR){return !window.zg_is_new_visitor}if(traffictype===TRAFFIC.DESKTOP){ua=new UserAgent();return new UserAgent().isNotMobileTab()}}catch(err){return false}},queryparam:function(c){if(!c){return false}try{var param=c.value,qp=getQueryParameter();return Zarget.matcher(qp[param.n],param.v,c.condition)}catch(e){return false}},prevVisit:function(c){if(!c){return false}try{var url=c.value;if(url){try{var newUrl=new URL(url);if(newUrl){url=newUrl.hostname+""+newUrl.pathname}}catch(e){}}var storage=Zarget.getStorage("pageViewCookie");if(storage){var prevUrlObj=JSON.parse(decodeURIComponent(storage));var flag=false;for(var k in prevUrlObj){if(c.condition===2||c.condition===4||c.condition===7){if(c.condition===7){var match=Zarget.matcher(k,url,c.condition);if(match){flag=true}else{flag=false;return}}else{url=(c.condition===2)?url:String(url).toLowerCase();k=(c.condition===2)?k:String(k).toLowerCase();if(url===k){flag=false;break}else{flag=true}}}else{var match=Zarget.matcher(k,url,c.condition);if(match){flag=true;break}}}return flag}else{return false}}catch(e){return false}},os:function(c){if(!c){return false}try{var u=new UserAgent();return this.matches(u.getOs(),c.value,c.condition)}catch(e){return false}},devicetype:function(c){if(!c){return false}try{var u=new UserAgent();return this.matches(u.getDevicetype(),c.value,c.condition)}catch(e){return false}},mobiledevice:function(c){if(!c){return false}try{var u=new UserAgent();return this.matches(u.getDevice(),c.value,c.condition)}catch(e){return false}},jsvar:function(c){if(!c){return false}try{var jsvar=c.value;return Zarget.matcher(getJavascriptVariable(jsvar.n),jsvar.v,c.condition)}catch(e){return false}},dayofweek:function(c){if(!c){return false}try{return this.matches(getDayOfWeek(),c.value,c.condition)}catch(e){return false}},houroftheday:function(c){if(!c){return false}try{return this.matches(getHourOfTheDay(),c.value,c.condition)}catch(e){return false}},searchengine:function(c){if(!c){return false}try{return this.matches(getSearchEngine(),c.value,c.condition)}catch(e){return false}},socialnetwork:function(c){if(!c){return false}try{return this.matches(getSocialNetwork(),c.value,c.condition)}catch(e){return false}},country:function(c){if(!c){return false}try{return this.matches(getCountry(),c.value,c.condition)}catch(e){return false}},locale:function(c){if(!c){return false}try{var locale=getLocale();if(locale!==null&&typeof(locale)!==undefined){locale=locale.toLowerCase()}if(locale!==""){if(locale==="az"||locale==="az-az"){locale="az-az"}else{if(locale==="de"||locale==="de-de"){locale="de-de"}else{if(locale==="fr"||locale==="fr-fr"){locale="fr-fr"}else{if(locale==="it"||locale==="it-it"){locale="it-it"}else{if(locale==="no"||locale==="no-no"){locale="no-no"}else{if(locale==="pt"||locale==="pt-pt"){locale="pt-pt"}else{if(locale==="es"||locale==="es-es"){locale="es-es"}else{if(locale==="uz"||locale==="uz-uz"){locale="uz-uz"}else{if(locale==="pt"||locale==="pt-pt"){locale="pt-pt"}}}}}}}}}}else{return false}return this.matches(locale,c.value,c.condition)}catch(e){return false}},customjs:function(c){if(!c){return false}try{var custFn=getCustomJSOut(c.value);return custFn()}catch(e){return false}},location:function(c){var curLocation,country,state,city,targetingLocations,i,l,loc,a,matches,pl;if(!c){return false}curLocation=Zarget.getVisitorLocation(),targetingLocations=c.value;if(!curLocation||!targetingLocations||!targetingLocations.length){return false}for(i=0,l=targetingLocations.length;i0){finalFromIPv6+=(v.length===1)?"000"+v:(v.length===2)?"00"+v:(v.length===3)?"0"+v:v}});return finalFromIPv6},fillZeros:function(n){return new Array(n).join("0000:")},hex2long:function(n){return parseInt(n,16)}};Zarget.matchesTargeting=function(condition,personalization){if(!condition){return}return new Targeting(condition,personalization).test()}}(Zarget));var ZargetData={IS_BUNDLE_ACCOUNT:true,excludes:{},mas_tracking_info:{enabled:false},experiments:{},project:{ga_integration:0,adobe_integration:0,excludeIps:[],src_tracking_enabled:0,projectJS:"",auto_map_query_params:0,jquery:1,anonymize_ip:0},polls:{},"domain-url":"account-ahsu.freshmarketer.com",product_name:"Freshworks",webform_tracking_info:{enabled:true},BUNDLE_NAME:"sales360",samplePercentage:75,"fwdomain-url":"ahsu.myfreshworks.com",audiences:{},integrations:{},goals:{},orgidhash:"425651505B57594159555952434C585E585756585F"};var zgAddHeatmapLoader=function(){var loader=document.getElementById("ab-visualeditor-loading");if(window.osmexperiment&&window.osmexperiment.visualeditor){return}if(!loader){var d=document.createElement("div"),style,intervalid,html;var imgsrc='';style="pointer-events:none;transition: opacity 1s;opacity:0.87;z-index: 500000000; position: fixed; top: 0px; left: 0px; width: 100%; height: 1000px; overflow: hidden; display: block; background: rgba(0, 0, 0, 1);";html='
'+imgsrc+"
";d.setAttribute("id","ab-visualeditor-loading");d.setAttribute("class","ab-editor-component");d.style.cssText=style;d.innerHTML=html;document.documentElement.appendChild(d)}else{loader.style.display="block";loader.style.opacity="0.87"}};var zgRemoveHeatmapLoader=function(){var loader=document.querySelector("#ab-visualeditor-loading");loader?loader.style.display="none":null};(function(Zarget,ZargetData){if(typeof ZargetData==="undefined"){Zarget.log("No experiments is running on the current page.");return}if(Zarget.isOptedOut()){return}function trimZargetParams(hash){var hashStr="",params,hasZgParams,i,param,name,value;params=hash.split("&");hasZgParams=false;for(i=0,param,name,value;igaDate){var experimentName=exp.experiment.experimentName?exp.experiment.experimentName:title;dimString="Zarget_"+experimentName+"("+Zarget.getHashCode(curVar.id)+") : "+curVar.name}else{dimString="Zarget_"+title+" ("+exp.experiment.id+") "+curVar.name}ga((exp.experiment.ga.tracker?exp.experiment.ga.tracker+".":"")+"set","dimension"+exp.experiment.ga.dimensionId,dimString)}}}}else{if(arguments[0]==="zg_trackEvent"){var customGoalName=arguments[1];var revenue=arguments[2];if(customGoalName&&!revenue){sendCustomEventGoal(customGoalName,7)}else{if(customGoalName&&revenue&&revenue instanceof Object&&!(revenue instanceof Array)){if(revenue.revenue&&!isNaN(revenue.revenue)){sendCustomEventGoal(customGoalName,6,revenue.revenue)}}}}else{if(arguments[0]==="zg_setCutomAttribute"){try{var customAttrName=arguments[1];var customAttrValue=arguments[2];if(customAttrName&&customAttrValue){updateCustomSegAttributes(customAttrName,customAttrValue)}}catch(e){}}else{if(arguments[0]==="fm_form_tracking"){try{var d=arguments[1],u=arguments[2];if((d&&u&&typeof d==="string"&&typeof u==="object")||(d&&typeof d==="object")){typeof d==="object"?sendMasFormTrackingData("",d):sendMasFormTrackingData(d,u)}else{Zarget.log("Skipping sending mas data, reason: validation failed. ",d,u)}}catch(e){Zarget.log("Error sending mas form tracking data. Reason: ",e)}}}}}}window.zargetAPI.splice(0,arguments.length);return this.length};function sendMasFormTrackingData(digest,userData){if(FM&&FM.trackMasEvent){FM.trackMasEvent("web_form",true,{digest:digest,data:userData})}}function getAllExperimentObj(type,dataObj){var experiments=[];for(var lid in dataObj){var exp=Zarget.isLidExists(ZargetData.experiments,lid);if(exp){if(type==="all"){experiments.push(exp)}else{exp.type===type&&experiments.push(exp)}if(exp.type===1||exp.type===4){var variationName="";for(var i=0,l=exp.variations.length;i0){experiments.concat(tempExps)}}if(isPrevMode){if(!prevModeExperiment){(function poll(){var intervalFn=setInterval(function(){if(prevModeExperiment){clearInterval(intervalFn);experiments=fiterPreviewExp(experiments,prevModeExperiment);if(callback&&typeof callback==="function"){callback(experiments)}}},300);setTimeout(function(){clearInterval(intervalFn)},6000)})()}else{experiments=fiterPreviewExp(experiments,prevModeExperiment);if(callback&&typeof callback==="function"){callback(experiments)}}}else{if(callback&&typeof callback==="function"){callback(experiments)}}}catch(e){Zarget.log("Error while fetching all experiments. Reason : ",e)}};function filterExperiments(vinfo,type){if(!vinfo){return[]}var o=[];for(var lid in vinfo){var exp=Zarget.isLidExists(ZargetData.experiments,lid);if(exp){if(type==="all"){o.push(exp)}else{exp.type===type&&o.push(exp)}if(exp.type===1||exp.type===4){var variationName="";for(var i=0,l=exp.variations.length;i-1?true:false):false);Zarget.rememberGoal(exp,gid);msg=new Zarget.Message(Zarget.MessageType.ADDGOAL);var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);msg.setParam({eid:expid,uid:uid,vid:varid,r:r,gid:gid,ftc:!rc,ety:exp.type});if(revenue){msg.addParam("revenue_amount",revenue)}msg=checkCustomAttr(msg);Zarget.xhrService.sendImmediate(msg)}Zarget.checkCustomAttr=function(msg){return checkCustomAttr(msg)};Zarget.getLocalCustomAttr=function(storekey){var localStoreAttrdata={},cookieAttrData={};cookieAttrData=Zarget.parseJSON(decodeURIComponent(Zarget.getCookie(storekey)))||{};localStoreAttrdata=Zarget.parseJSON(decodeURIComponent(Zarget.getStorage(storekey)))||{};return Zarget.mergeTwoObject(cookieAttrData,localStoreAttrdata)};function checkCustomAttr(msg){if(!msg){return}var segCustAttr=Zarget.getLocalCustomAttr("zg_cus_attr");var attrObjLength=Zarget.getObjectLength(segCustAttr);if((!segCustAttr||attrObjLength==0)&&segmentMsgQueue&&segmentMsgQueue.length<=10){segmentMsgQueue.push(msg)}if(segCustAttr&&attrObjLength>0){for(var cobj in segCustAttr){if(segCustAttr.hasOwnProperty(cobj)){msg.addParam("segAttrName;"+cobj,segCustAttr[cobj])}}}return msg}function updateCustomSegAttributes(attrName,attrValue){if(!attrName||!attrValue){return}var localStoreAttrdata={},cookieAttrData={},age=365*24*60*60*1000;cookieAttrData=Zarget.parseJSON(decodeURIComponent(Zarget.getCookie("zg_cus_attr")))||{};localStoreAttrdata=Zarget.parseJSON(decodeURIComponent(Zarget.getStorage("zg_cus_attr")))||{};if(Zarget.getObjectLength(cookieAttrData)<3){cookieAttrData[attrName]=attrValue;Zarget.setCookie("zg_cus_attr",encodeURIComponent(Zarget.stringifyJSON(cookieAttrData)),age)}else{localStoreAttrdata[attrName]=attrValue;Zarget.setStorage("zg_cus_attr",encodeURIComponent(Zarget.stringifyJSON(localStoreAttrdata)))}if(segmentMsgQueue&&Zarget.getObjectLength(segPageVisitMsg)>0){segmentMsgQueue.push(segPageVisitMsg);segPageVisitMsg=null}processQueueData()}function processQueueData(){if(segmentMsgQueue&&segmentMsgQueue.length>0){for(var i=0;i-1){if(goal.type===5&&expObj.experiment.type===4){for(j=0,l1=goal.s.length;j0};experiments.isLidExists=function(lid){return window.zarget$.grep(this,function(expObj){if(expObj.experiment.lid===lid){return true}}).length?true:false};function Experiment(experiment){if(!(this instanceof Experiment)){return new Experiment(experiment)}this.isRunning=false;this.experiment=experiment;return this}Experiment.prototype={startExperiment:function(){var experiment=this.experiment;if(this.isAlreadyVisitedUser()){if(experiment.isCrossDomainExperiment){if(!window.zarget_masteruserid){Zarget.getVariationForExperimentAndUser(experiment.id,null,this.startExperiment,this);return}}this.isRunning=true;this.sendVisitorInfo(true);if(Zarget.mixpanel){Zarget.mixpanel(this.getAppliedVariation(),experiment)}if(Zarget.kissmetrics){Zarget.kissmetrics(this.getAppliedVariation(),experiment)}startGoalTracking();this.handleVisitedUser();if(variationExpMap&&variationExpMap.hasOwnProperty(experiment.lid)){delete variationExpMap[experiment.lid]}checkUserInfoTimeGoal();return}if(this.isGeoRequest()&&!isGeoRequestFinished()){var self=this;this.zarget_timeoutid=window.setTimeout(function(){self.startExperiment()},5);return}else{try{window.clearTimeout(this.zarget_timeoutid)}catch(e){Zarget.log("Error in clearing geo timer.")}}if(this.isBulkRequest()&&!this.isBulkRequestFinished()){this.zarget_bulktimeoutid=window.setTimeout(this.startExperiment,5);return}else{try{window.clearTimeout(this.zarget_bulktimeoutid)}catch(e){Zarget.log("Error in clearing bulk timer.")}}if(Zarget.isCookieDisabled()){return}if(experiment.hasOwnProperty("audienceid")&&!Zarget.matchesTargeting(ZargetData.audiences[experiment.audienceid])){Zarget.log("Targeting Failed.");return}var variation;if(variationExpMap&&variationExpMap.hasOwnProperty(experiment.lid)){variation=this.getVariation(variationExpMap[experiment.lid])}else{variation=this.pickvariation()}var userid=Zarget.getUidAndSetIfNotExists();if(experiment.type===1){if(!variation){return}if(experiment.isCrossDomainExperiment){window.zarget_crossdomainrequestgoing=true;Zarget.getVariationForExperimentAndUser(experiment.id,variation,null)}startGoalTracking();this.rememberVisitor(variation.id);checkUserInfoTimeGoal();if(variationExpMap&&variationExpMap.hasOwnProperty(experiment.lid)){delete variationExpMap[experiment.lid]}this.isRunning=true;this.sendVisitorInfo(false,userid?true:false);if(Zarget.mixpanel){Zarget.mixpanel(this.getAppliedVariation(),experiment)}if(Zarget.kissmetrics){Zarget.kissmetrics(this.getAppliedVariation(),experiment)}this.route(variation);return}if(experiment.isCrossDomainExperiment){if(!getCookieFinished(experiment,processCrossDomainExperiment,this)){window.zarget_crosstimeoutid=window.setTimeout(self.startExperiment,5);return}else{window.clearTimeout(window.zarget_crosstimeoutid);if(experiment.type===4){checkUserInfoTimeGoal()}return}}if(!variation){return}this.isRunning=true;startGoalTracking();this.rememberVisitor(variation.id);checkUserInfoTimeGoal();this.sendVisitorInfo(false,userid?true:false);if(Zarget.mixpanel){Zarget.mixpanel(this.getAppliedVariation(),experiment)}if(Zarget.kissmetrics){Zarget.kissmetrics(this.getAppliedVariation(),experiment)}this.route(variation)},getExpertmentType:function(){return this.experiment&&this.experiment.type},getExpertmentId:function(){return this.experiment&&this.experiment.id},isAlreadyVisitedUser:function(){var info=Zarget.getVisitorInfo(),userid=Zarget.getUidAndSetIfNotExists();if(userid&&info&&info.hasOwnProperty(this.experiment.lid)){return true}},sendVisitorInfo:function(returning,rv){var visitorinfo=Zarget.getVisitorInfo(),img,experiment=this.experiment,expid=experiment.id,lid=experiment.lid,varid,r,uid,url,referrer,type,msg;if(!visitorinfo||!visitorinfo.hasOwnProperty(lid)){return}url=encodeURIComponent(document.URL);referrer=document.referrer;varid=visitorinfo[lid];type=returning?Zarget.MessageType.UPDATEVISITOR:Zarget.MessageType.ADDVISITOR;if(experiment.isCrossDomainExperiment){if(window.zarget_masteruserid){uid=window.zarget_masteruserid;if(window.zarget_sendvisitortimeoutid2){window.clearTimeout(window.zarget_sendvisitortimeoutid2)}}else{window.zarget_sendvisitortimeoutid2=window.setTimeout(this.sendVisitorInfo,5,returning,uid);return}}else{uid=Zarget.getUidAndSetIfNotExists()}r=(new Date()).getTime();msg=new Zarget.Message(type);var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);msg.setParam({eid:expid,uid:uid,vid:varid,r:r,ftv:!returning,ety:experiment.type});typeof rv!=="undefined"&&msg.addParam("ru",rv);msg=checkCustomAttr(msg);segPageVisitMsg=msg;Zarget.xhrService.send(msg)},checkAllVariationChangesMarked:function(expData){experiment=expData;var variation=getVariationForVisitedUser();if(variation.name==="Original"){return true}if(variation&&variation.changes&&Array.isArray(variation.changes)){var counter=0;for(i=0,l=variation.changes.length;ie&&r<=e+c){return variations[i]}e+=c}},isReqPersonalization:function(variations,condition){for(var i=0,l=variations.length;i-1){var queryStr=docURL.substring(queryIdx);locHref+=queryStr}}var checkURL=Zarget.removeTrailSlash(expurl.path);if(!experiment.queryparam&&experiment.regex){var queryIdx=experiment.url.indexOf("?");if(queryIdx>-1){var queryStr=experiment.url.substring(queryIdx);checkURL+=queryStr}}var finURL=varurl.path;if(!experiment.queryparam){var queryIdx=variation.url.indexOf("?");if(queryIdx>-1){var queryStr=variation.url.substring(queryIdx);finURL+=queryStr}}if(experiment.regex){var found=false;var orig=expurl.authority.replace(/^www./,"")+checkURL;locHref=cururl.authority.replace(/^www./,"")+locHref;orig=orig.replace(/([\[\]\(\)\*\^\$\.\?\|\/\\])/g,"\\$1");var groupPatt=/(\\\(([^\)\/]*)\))/g;var match1=orig.match(groupPatt),grpMatch;var orig1="";if(orig.match(groupPatt)!==null){var d=0;var lastInd=0;while((grpMatch=groupPatt.exec(orig))!==null){var firstSub=orig.substring(lastInd,grpMatch.index).replace(/\\\*+/g,"(.*)");var matchReg="("+grpMatch[2].substring(0,grpMatch[2].length-1)+")";matchReg=matchReg.replace(/\\\|/g,"|");orig1+=firstSub+matchReg;lastInd=grpMatch.index+grpMatch[0].length;d++}orig1+=orig.substring(lastInd,orig.length);orig=orig1}else{orig=orig.replace(/\\\*+/g,"(.*)")}var strEx=new RegExp(orig);var match=locHref.match(strEx),matcher;if(match!==null&&match.index===0&&match[0].length==locHref.length){found=true;checkURL=match[0]}else{found=false;checkURL=""}if(found){var matches={};for(var k=1,len=match.length;k-1?true:false):false);Zarget.rememberGoal(this.experiment,gid);r=(new Date()).getTime();if(this.experiment.isCrossDomainExperiment){if(window.zarget_masteruserid){uid=window.zarget_masteruserid;if(window.zarget_sendvisitortimeoutid3){window.clearTimeout(window.zarget_sendvisitortimeoutid3)}}else{window.zarget_sendvisitortimeoutid3=window.setTimeout(sendGoal,5,goal);return}}else{uid=Zarget.getUidAndSetIfNotExists()}msg=new Zarget.Message(Zarget.MessageType.ADDGOAL);var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);msg.setParam({eid:expid,uid:uid,vid:varid,r:r,gid:gid,ftc:!rc,ety:this.experiment.type});msg=checkCustomAttr(msg);Zarget.xhrService.sendImmediate(msg)},rememberVisitor:function(variationid,personalization){if(!variationid){return}var age=365*24*60*60*1000,visitorinfo=Zarget.getVisitorInfo(),vobj;vobj=typeof visitorinfo==="object"?visitorinfo:{};Zarget.setUserID();if(!vobj.hasOwnProperty(this.experiment.lid)||personalization){vobj[this.experiment.lid]=variationid;Zarget.setCookie(Zarget.visitorInfoCookie,encodeURIComponent(Zarget.stringifyJSON(vobj)),age)}},isReadyToRedirectSplitURL:function(){var experiment=this.experiment;if(experiment&&experiment.type!==4){return false}if(this.isGeoRequest()||this.isBulkRequest()||this.isJsVariable()){return false}return true},isBulkRequestFinished:function(){if(!this.finishBulkReq&&new Date().getTime()<=window.zarget_bulk_requestedtime+1000){return false}return true}};function setExperimentsInCookie(masterCookie){var age=365*24*60*60*1000,visitorinfo=Zarget.getVisitorInfo(),i,vobj=typeof visitorinfo==="object"?visitorinfo:{};var experiments;try{experiments=JSON.parse(masterCookie.experiments)}catch(noExperiments){window.zarget_experiments_loaded=true;Zarget.setCookie(Zarget.visitorInfoCookie,encodeURIComponent(Zarget.stringifyJSON(vobj)),age);return}for(i=0;i=0&&url.indexOf("?")===-1){url=Zarget.getSimpleURL(url);cururl=Zarget.getSimpleURL(document.URL)}else{if(simplematch_conditions.indexOf(urls[j].condition)>=0||urls[j].condition===6||urls[j].condition===5){cururl=document.URL}else{cururl=Zarget.getURL()}}if(urls[j].condition==5){url=new RegExp(url);matches=Zarget.matcher(url,cururl,urls[j].condition)}else{matches=Zarget.matcher(cururl,url,urls[j].condition)}if(matches){sendPageVisitGoal(user,g,exp.id,visitorInfo[lid]);markAsConverted(exp)}}}}}function timeGoalExperimentIteration(timeGoalExperiment,visitorInfo){var user=Zarget.getUidAndSetIfNotExists();if(timeGoalExperiment.length>0){document.removeEventListener("visibilitychange",visibilitychange);document.removeEventListener("keydown",keydown);document.removeEventListener("mousemove",mousemove);clearInterval(window.goalTimeInterval);var startTime=new Date();var count=0;var blur=false;var avgTimeTrack=true;function visibilitychange(){if(document.visibilityState==="hidden"){blur=true}else{if(document.visibilityState==="visible"){count=0;blur=false;startTime=new Date()}}}function keydown(e){if(e.ctrlKey||e.metaKey){var endTime=new Date();var time=(endTime-startTime)/1000;trackTimeAvg(timeGoalExperiment,time,visitorInfo);startTime=new Date()}}function mousemove(e){var x=e.clientX;var y=e.clientY;var tempCount=count;if(y<=10){var endTime=new Date();var time=(endTime-startTime)/1000;if(avgTimeTrack){avgTimeTrack=false;trackTimeAvg(timeGoalExperiment,time,visitorInfo);startTime=new Date()}}else{avgTimeTrack=true}}document.addEventListener("visibilitychange",visibilitychange);document.addEventListener("keydown",keydown);document.addEventListener("mousemove",mousemove);clearInterval(window.goalTimeInterval);window.goalTimeInterval=setInterval(function(){if(!blur){count=count+5;for(var a=0;a=value){if(!timeGoalExperiment[a].goals[b].status){timeGoalExperiment[a].goals[b].status=true;trackTimeGoal(timeGoalExperiment[a].experiment,user,timeGoalExperiment[a].goals[b].goal)}}}}}},5000)}}function trackTimeAvg(timeGoalExperiment,count,visitorInfo){for(var a=0;a-1?true:false):false);Zarget.rememberGoal(exp,gid);r=(new Date()).getTime();if(exp.isCrossDomainExperiment){uid=window.zarget_masteruserid}else{uid=Zarget.getUidAndSetIfNotExists()}msg=new Zarget.Message(Zarget.MessageType.ADDGOAL);var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);msg.setParam({eid:expid,uid:uid,vid:varid,r:r,gid:gid,ety:exp.type,ftc:!rc});msg=checkCustomAttr(msg);Zarget.xhrService.sendImmediate(msg)}function trackGoal(evt){var goals=experiments.filterGoal(evt),e$,ele,tag,r,r1,i,l,goal,type,experiment;if(!goals||goals.length===0){return}e$=window.zarget$(evt.target);ele=e$.get(0);tag=ele.tagName.toLowerCase();type=ele.getAttribute("type");r=/^(img|a|button)$/;r1=/^(submit|button|image)$/;for(i=0,l=goals.length;i0){var obj=window.zarget$.grep(expDet.excludeUrls,function(obj){return obj.url===expDet.url})[0];exclude=obj?true:false}return exclude}window.bulkDetails={};function bulkReq(ind,exp){var experiment=exp.experiment;exp.finishBulkReq=false;if(experiment&&experiment.type!==3&&exp.isBulkRequest()&&!exp.isAlreadyVisitedUser()){var audiences=ZargetData.audiences[experiment.audienceid].conditions;var bulkAudiences=[];window.zarget$.each(audiences,function(id,audience){window.zarget$.each(audience.conditions,function(idx,condition){if(condition.type==="bulkaudience"){bulkAudiences.push(condition)}})});var reqPayload={};window.zarget$.each(bulkAudiences,function(idx1,bulkCondition){var val;if(bulkCondition.value.n===0){val=getQueryparam(bulkCondition.value.v.NAME)}else{val=getCookie(bulkCondition.value.v.NAME)}if(val){reqPayload[bulkCondition.value.v.ID]=val}else{window.bulkDetails[bulkCondition.value.v.ID]=false}});if(Object.keys(reqPayload).length){reqPayload.encid=experiment.id;window.zarget_bulk_requestedtime=new Date().getTime();var headers={"X-Osm-CSRF":"9390uasldkhf8"};window.zarget$.ajax({url:serverurl+"/ab/api/search/audience",method:"GET",data:reqPayload,dataType:"json",contentType:"application/json",headers:headers,crossDomain:true,xhrFields:{withCredentials:true}}).done(function(data,textStatus,xhr){var response=JSON.parse(xhr.responseText);var bulkRes=JSON.parse(response.audience||"{}");for(var key in bulkRes){window.bulkDetails[key]=bulkRes[key]}}).fail(function(xhr,textStatus,errorThrown){Zarget.log("Unable to get preview details.")}).always(function(){exp.finishBulkReq=true})}else{exp.finishBulkReq=true}}else{exp.finishBulkReq=true}}function makeGeoRequest(exps){if((exps.length&&exps.isGeoExp()||ZargetData.project.excludeIps.length)&&!Zarget.isVisitorLocationInLocalStorage()){window.zarget_geo_requestedtime=new Date().getTime();var b=document.head||document.getElementsByTagName("head")[0]||document.documentElement,a=document.createElement("script");a.type="text/javascript";a.async=!0;a.src="//ip.freshmarketer.com/json/?callback=setGeoTargeting";b.insertBefore(a,b.firstChild);window.setGeoTargeting=setGeoTargeting}if(Zarget.isVisitorLocationInLocalStorage()){window.zarget_geoDetails=Zarget.getVisitorLocation()}}function triggerExperiment(exp){try{if(exp&&exp.experiment&&!window.zarget$.isEmptyObject(exp.experiment)){if(exp.experiment.type!==3){if(exp.isReadyToRedirectSplitURL()){init(exp)}else{(function(exp){window.zarget$(document).ready(function(){init(exp)})})(exp)}}}}catch(e){Zarget.log("caught exception in triggerExperiment "+e)}}function triggerExpById(expId){var visitorinfo=Zarget.getVisitorInfo(),expDet;for(var exp in visitorinfo){expDet=Zarget.isLidExists(ZargetData.experiments,exp);if(!expDet||expDet.type===7){continue}if(exp.id===expId){var experiment=Experiment(expDet);if(!experiments.isExists(expId)){experiments.push(experiment)}ZargetData.curexp=experiments;Zarget.initScrollHeatMap();triggerExperiment(experiment);return}}for(var e in ZargetData.experiments){expDet=ZargetData.experiments[e];if(expDet.type===5||expDet.type===7){continue}if(e===expId){var experiment=Experiment(expDet);if(!experiments.isExists(expId)){experiments.push(experiment)}ZargetData.curexp=experiments;Zarget.initScrollHeatMap();triggerExperiment(experiment)}}}window.zargetAPI.triggerTargetExp=function(expId){if(expId&&ZargetData.experiments.hasOwnProperty(expId)&&Zarget.isExperimentURLMatches(ZargetData.experiments[expId])){triggerExpById(expId)}};var trackingOn=false;function pollForConditionalActivation(exp){exp.abPollTimer=setInterval(function(){try{var conditionMet=new Function("return "+exp.experiment.activationModeCondition)();if(typeof conditionMet==="function"){conditionMet=conditionMet()}if(conditionMet){triggerExpById(exp.experiment.id);if(!trackingOn){Zarget.initScrollHeatMap();trackingOn=true}clearInterval(exp.abPollTimer)}else{if(trackingOn){cleanup();Zarget.clearScrollHeatMap();trackingOn=false}}}catch(e){Zarget.log("caught exception in conditional polling ",e)}},300)}if(window.zarget===undefined||window.zarget===true){if(window.zarget!==undefined){clearTimeout(window.zargetTimer)}try{Zarget.log("JS Code Execution started");var jsCode=new Function(ZargetData.project.projectJS);jsCode()}catch(e){Zarget.log("Some Error While Executing Project JavaScriptCode"+e)}Zarget.findExperiment(experiments,Experiment);function trackKeyUp(e){if(e.ctrlKey&&e.shiftKey&&e.keyCode===72&&ZargetData.curexp&&ZargetData.curexp.length){window.setTimeout(function(){var visitorinfo=Zarget.getVisitorInfo(),experiment=ZargetData.curexp[0].experiment;window.zargetCurVariation=visitorinfo[experiment.id];if(experiment.id){var domainObj={expHashId:experiment.id,experiment:experiment};Zarget.getDomainByExperimentId(domainObj,Zarget.initHeatmap)}else{Zarget.initHeatmap(experiment)}},50)}}window.zarget$(window).off("keyup",trackKeyUp).on("keyup",trackKeyUp);if(experiments.length&&Zarget.isReportView&&Zarget.isReportView()){ZargetData.curexp=experiments;return}var variationExpMap={};function initExperiment(){for(var i=0,exp;exp=experiments[i];i++){if(!exp.isAlreadyVisitedUser()){var experiment=exp.experiment;var audience=ZargetData.audiences[experiment.audienceid];if(exp.isGeoRequest()||exp.isBulkRequest()){Zarget.log("Waiting for geo/bulk targeting to finish");return}if(experiment.hasOwnProperty("audienceid")&&!Zarget.matchesTargeting(ZargetData.audiences[experiment.audienceid])){Zarget.log("Targeting failed");return}if(!isPrevMode){var variation=exp.pickvariation();if(!variation){break}variationExpMap[experiment.lid]=variation.id}}}}if(experiments.length&&!isPrevMode){try{initExperiment()}catch(e){Zarget.log("exception in initExperiment")}}makeGeoRequest(experiments);window.zarget$.each(experiments,bulkReq);if(!isPrevMode){trackPageViewForEachExperiment()}if(experiments.length&&!isPrevMode){ZargetData.curexp=experiments;for(var j=0,exp;exp=experiments[j];j++){if(exp.getExpertmentType()!==EXPERIMENT_TYPES.HEATMAP){if(exp.experiment&&exp.experiment.hasOwnProperty("activationMode")){if(exp.experiment.activationMode===2){Zarget.log("waiting for manual activiation... ");continue}else{if(exp.experiment.activationMode===3){Zarget.log("conditional activation... ");pollForConditionalActivation(exp);continue}}}setup();if(exp.isReadyToRedirectSplitURL()){init(exp)}else{(function(exp){Zarget.READYSTATE_RGX=Zarget.ie?/complete/:/complete|interactive/;Zarget.domReady=(document.readyState&&Zarget.READYSTATE_RGX.test(document.readyState));if(Zarget.domReady){init(exp)}else{window.fm_$(document).ready(function(){init(exp)})}})(exp)}}}}else{if(isPrevMode){try{initAbPreview();Zarget.log("preview start ");window.zarget$(document).ready(startAbPreview)}catch(e){Zarget.log("exception in preview "+e)}}}}try{trackPageVisits()}catch(e){Zarget.log(e)}window.ZargetUrlChangeTrigger.register(trackPageVisits)}(Zarget,ZargetData));(function(Zarget,ZargetData){if(typeof ZargetData==="undefined"||!ZargetData.hasOwnProperty("experiments")){return}if(Zarget.isOptedOut()){return}var experiments=ZargetData.curexp;if(!experiments||!experiments.length){var experiment=Zarget.findHeatMapExperiment();if(experiment){ZargetData.curexp=[{experiment:experiment}];experiments=ZargetData.curexp}}if(Zarget.isReportView&&Zarget.isReportView()){var hashParams=Zarget.isPausedExp(),orgid,expid,expHashId,varid,expInfo,segName,segType;if(hashParams){orgid=hashParams.orgid;expid=hashParams.expid;varid=hashParams.varid;segName=hashParams.segName;segType=hashParams.segType;expHashId=hashParams.expHashId}if(window.localStorage&&window.localStorage.zargetextexpinfo&&!expid&&!varid){expInfo=JSON.parse(window.localStorage.zargetextexpinfo);orgid=expInfo.orgid;expid=expInfo.expid;varid=expInfo.varid;segName=expInfo.segName;segType=expInfo.segType;expHashId=expInfo.expHashId;window.localStorage.removeItem("zargetextexpinfo")}if(segName!=null&&segType!=null){window.zg_heatmap_segment_name=segName;window.zg_heatmap_segment_type=segType}if(orgid&&expid&&varid){if(expHashId){var domainObj={orgid:orgid,expid:expid,varid:varid,expHashId:expHashId};Zarget.getDomainByExperimentId(domainObj,Zarget.initPausedExperiment);return}Zarget.initPausedExperiment(orgid,expid,varid)}else{if(experiments&&experiments.length){if(experiments[0].experiment){if(experiments[0].experiment.id){var domainObj={expHashId:experiments[0].experiment.id,experiment:experiments[0].experiment};Zarget.getDomainByExperimentId(domainObj,Zarget.initHeatmap);return}}Zarget.initHeatmap(experiments[0].experiment);return}}}else{window.ZargetUrlChangeTrigger.register(onSPAPageTransition)}Zarget.w=window;Zarget.n=navigator;Zarget.d=document;var serverurl=Zarget.serverinfo.serverurl;var heatmapurl=Zarget.serverinfo.heatmapUrl;(function(){var ua=navigator.userAgent;Zarget.webkit=/\bChrome\b/.test(ua);Zarget.ie=/\bMSIE\b/.test(ua);if(Zarget.webkit){Zarget.webkitVersion=parseInt(/AppleWebKit\/(\d+)/.exec(ua)[1],10)}}());Zarget.on=function(c,evt,handler){if(c.addEventListener){c.addEventListener(evt,handler,true)}else{c.attachEvent("on"+evt,handler)}};Zarget.off=function(c,evt,handler){if(c.removeEventListener){c.removeEventListener(evt,handler,true)}else{c.detachEvent("on"+evt,handler)}};Zarget.scroll=function(c){var b,a;c=c||Zarget.w;b=c.document;if(c.pageXOffset!==null){return{left:c.pageXOffset,top:c.pageYOffset,width:c.innerWidth,height:c.innerHeight}}else{a=b.compatMode==="BackCompat"?b.body:b.documentElement;return{left:a.scrollLeft,top:a.scrollTop,width:a.offsetWidth,height:a.offsetHeight}}};Zarget.getBox=function(e){var g,h,d,i,f,b={};if(e.getBoundingClientRect){g=e.getBoundingClientRect();h=Zarget.scroll();b.left=Math.floor(g.left+h.left);b.top=Math.floor(g.top+h.top);if(Zarget.webkit&&Zarget.webkitVersion<533&&e.style.position==="relative"){b.left+=parseInt(e.style.left,10);b.top+=parseInt(e.style.top,10)}b.width=Math.floor(g.width||(g.right-g.left));b.height=Math.floor(g.height||(g.bottom-g.top))}else{b.width=e.offsetWidth;b.height=e.offsetHeight;d=e;i=0;f=0;do{i+=d.offsetLeft||0;f+=d.offsetTop||0;d=d.offsetParent}while(d);b.left=Math.floor(i);b.top=Math.floor(f)}b.pageX=b.left;b.pageY=b.top;return b};Zarget.getWindow=function(elem){return elem!==null&&elem===window?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false};Zarget.offset=function(elem){var docElem,win,box={top:0,left:0},doc=elem&&elem.ownerDocument,strundefined=typeof undefined;if(!doc){return}docElem=doc.documentElement;if(typeof elem.getBoundingClientRect!==strundefined){box=elem.getBoundingClientRect()}win=Zarget.getWindow(doc);return{top:box.top+(win.pageYOffset||docElem.scrollTop)-(docElem.clientTop||0),left:box.left+(win.pageXOffset||docElem.scrollLeft)-(docElem.clientLeft||0)}};Zarget.isCustomMatch=function(exp){var isMatches=Zarget.isExperimentURLMatches(exp);if(!isMatches){var url=exp.urls[0];if(url&&url.match==="custom"){return true}}return isMatches};Zarget.Tracker=function(){this.ignoredElements=["body","html","head"];this.lastClickedElement=null;this.startTime=(new Date()).getTime();Zarget.on(document,"mousedown",this.handlers.click)};Zarget.Tracker.prototype={isIgnoredElement:function(ele){if(!ele){return false}var tagname=ele.tagName.toLowerCase();return this.ignoredElements.indexOf(tagname)!==-1},handlers:{click:function(evt){try{if(window._ab__plugin__attached||window._ab__toolbar__attached){return}var el,o,x,y,s,px,py,r,b,msg,uid,expid,vid,ttc,url,sch,lid,ety,lang=Zarget.getUserLanguage(),loadt=Zarget.getPageLoadTime(),res=Zarget.getScreenResolution(),referrer;el=evt.srcElement||evt.target;if(!el||Zarget.tracker.isIgnoredElement(el)){return}var visitorinfo=Zarget.getVisitorInfo();for(var i=0,exp;exp=experiments[i];i++){if(exp.experiment.type!=3){if(!exp.isRunning){continue}}if(!Zarget.isCustomMatch(exp.experiment)){continue}if(!exp.experiment.heatmap){continue}expid=exp.experiment.id;lid=exp.experiment.lid;if(exp.experiment.isCrossDomainExperiment){uid=window.zarget_masteruserid}else{uid=Zarget.getUidAndSetIfNotExists()}if(!visitorinfo||!Zarget.isLidExists(experiments,lid)){continue}if(visitorinfo[lid]===-1){continue}vid=Zarget.getVisitorInfo()[lid];s=encodeURIComponent(Zarget.selector(el,exp.experiment.selectorExcludes));url=encodeURIComponent(document.URL);referrer=document.referrer;o=Zarget.offset(el);b=Zarget.getBox(el);px=evt.pageX;py=evt.pageY;x=Math.round(1000*(px-o.left)/b.width)/1000;y=Math.round(1000*(py-o.top)/b.height)/1000;r=+new Date();ttc=r-Zarget.tracker.startTime;msg=new Zarget.Message(Zarget.MessageType.ADDSELECTOR);var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);sch=exp.experiment.schedule;ety=exp.experiment.type;msg.setParam({s:s,x:x,y:y,r:r,eid:expid,vid:vid,uid:uid,ttc:ttc,ety:ety});msg=Zarget.checkCustomAttr(msg);Zarget.xhrService.send(msg)}}catch(e){Zarget.log(e)}}},cleanup:function(){Zarget.off(document,"mousedown",this.handlers.click)}};Zarget.READYSTATE_RGX=Zarget.ie?/complete/:/complete|interactive/;Zarget.domReady=(document.readyState&&Zarget.READYSTATE_RGX.test(document.readyState));function rememberVisitor(variationid,lid){if(!variationid){return}var age=365*24*60*60*1000,visitorinfo=Zarget.getVisitorInfo(),vobj;vobj=typeof visitorinfo==="object"?visitorinfo:{};if(variationid!==-1){Zarget.setUserID()}if(!vobj.hasOwnProperty(lid)){vobj[lid]=variationid;Zarget.setCookie(Zarget.visitorInfoCookie,encodeURIComponent(Zarget.stringifyJSON(vobj)),age)}}function sendVisitorInfo(exp,returning,rv){var experiment=exp.experiment;var visitorinfo=Zarget.getVisitorInfo(),img,expid=experiment.id,lid=experiment.lid,varid,r,uid,url,referrer,type,msg,lang=Zarget.getUserLanguage(),loadt=Zarget.getPageLoadTime(),res=Zarget.getScreenResolution();if(!visitorinfo||!visitorinfo.hasOwnProperty(lid)){return}url=encodeURIComponent(document.URL);referrer=document.referrer;varid=visitorinfo[lid];type=returning?Zarget.MessageType.UPDATEVISITOR:Zarget.MessageType.ADDVISITOR;if(experiment.isCrossDomainExperiment){if(window.zarget_masteruserid){uid=window.zarget_masteruserid;if(window.zarget_sendvisitortimeoutid4){window.clearTimeout(window.zarget_sendvisitortimeoutid4)}}else{window.zarget_sendvisitortimeoutid4=window.setTimeout(sendVisitorInfo,5,exp,returning,rv);return}}else{uid=Zarget.getUidAndSetIfNotExists()}r=(new Date()).getTime();msg=new Zarget.Message(type);var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);msg.setParam({eid:expid,uid:uid,vid:varid,r:r,ftv:!returning,ety:experiment.type});typeof rv!=="undefined"&&msg.addParam("ru",rv);msg=Zarget.checkCustomAttr(msg);Zarget.xhrService.send(msg)}var scrollRecords=[];var FM_SCROLL_LIMIT_PREFIX="fm_scroll_limit_";var FM_SCROLL_MAX_LIMIT_PER_PAGE=50;var ZargetScroll={init:function(){ZargetScroll.lastRecordedTime=0;ZargetScroll.lastRecordedY=0;ZargetScroll.idleAt=null;ZargetScroll.idleSince=+new Date;ZargetScroll.lastRecordedScroll=null;ZargetScroll.IDLE_TIME=1000;ZargetScroll.MIN_TRACK_TIME=2000;ZargetScroll.EXIT_TIME=30*60*1000;ZargetScroll.isScrolling=false;window.onscroll=function(e){ZargetScroll.isScrolling=true;window.setTimeout(function(){ZargetScroll.isScrolling=false},100)}},scroll:function(evt){evt=evt||window;return{left:evt.pageXOffset,top:evt.pageYOffset,width:evt.innerWidth,height:evt.innerHeight}},shouldRecord:function(e){var top=e.top,height=e.height,pos=top+","+height,time=+new Date;if(pos===ZargetScroll.lastRecordedScroll){return !1}if(pos===ZargetScroll.idleAt){if(time-ZargetScroll.idleSince>=ZargetScroll.IDLE_TIME){ZargetScroll.lastRecordedY=top;ZargetScroll.lastRecordedTime=time;ZargetScroll.lastRecordedScroll=pos;return !0}}else{ZargetScroll.idleAt=pos;ZargetScroll.idleSince=time;if(null==ZargetScroll.lastRecordedScroll||Math.abs(top-ZargetScroll.lastRecordedY)>=height/2&&time-ZargetScroll.lastRecordedTime>=ZargetScroll.MIN_TRACK_TIME){ZargetScroll.lastRecordedScroll=pos;ZargetScroll.lastRecordedTime=time;ZargetScroll.lastRecordedY=top;return !0}}return !1},trackScroll:function(){var e=ZargetScroll.scroll();if(!ZargetScroll.isScrolling&&ZargetScroll.shouldRecord(e)){ZargetScroll.sendScrollInfo(e)}},getScrollLimitKey:function(expid){return FM_SCROLL_LIMIT_PREFIX+expid},getScrollLimit:function(expid){if(!expid){return}var key=this.getScrollLimitKey(expid),visitorInfo;if(Zarget.hasLocalStorage()){visitorInfo=window.localStorage[key]}return visitorInfo?JSON.parse(visitorInfo):visitorInfo},getScrollLimitForPage:function(expid){var visitorInfo=ZargetScroll.getScrollLimit(expid);if(!visitorInfo){return 0}var path=Zarget.getCurrentPath();return visitorInfo[path]},setScrollLimit:function(expid){if(!expid){return}var scrollInfo=0,path=Zarget.getCurrentPath();var visitorInfo=ZargetScroll.getScrollLimit(expid);if(!visitorInfo){visitorInfo={}}else{scrollInfo=visitorInfo[path];scrollInfo=scrollInfo||0}scrollInfo+=1;visitorInfo[path]=scrollInfo;var key=this.getScrollLimitKey(expid);if(Zarget.hasLocalStorage()){window.localStorage[key]=JSON.stringify(visitorInfo)}},sendScrollInfo:function(e){var visitorinfo=Zarget.getVisitorInfo(),img,varid,expid,lid,r,uid,url,type,msg,y1,y2,lang=Zarget.getUserLanguage(),loadt=Zarget.getPageLoadTime(),res=Zarget.getScreenResolution(),referrer;if(!e||!e.hasOwnProperty("height")||!e.hasOwnProperty("top")){Zarget.log("Insufficient scroll details.");return}for(var i=0,exp;exp=experiments[i];i++){expid=exp.experiment.id;lid=exp.experiment.lid;if(!visitorinfo||!visitorinfo.hasOwnProperty(lid)){continue}if(visitorinfo[lid]===-1){continue}if(exp.experiment.type!=3){if(!exp.isRunning){continue}}if(!Zarget.isCustomMatch(exp.experiment)){continue}if(ZargetScroll.getScrollLimitForPage(lid)>FM_SCROLL_MAX_LIMIT_PER_PAGE){return}ZargetScroll.setScrollLimit(lid);url=encodeURIComponent(document.URL);referrer=document.referrer;varid=visitorinfo[lid];type=Zarget.MessageType.UPDATEVISITOR;if(exp.experiment.isCrossDomainExperiment){uid=window.zarget_masteruserid}else{uid=Zarget.getUidAndSetIfNotExists()}r=(new Date()).getTime();msg=new Zarget.Message(type);y1=e.top;y2=y1+e.height;msg.setParam({eid:expid,uid:uid,vid:varid,r:r,y1:y1,y2:y2,scroll:1,height:e.height});msg=Zarget.checkCustomAttr(msg);Zarget.xhrService.send(msg)}},cleanup:function(){ZargetScroll.lastRecordedY=null;ZargetScroll.lastRecordedTime=null;ZargetScroll.lastRecordedScroll=null;ZargetScroll.idleAt=null;ZargetScroll.idleSince=null;window.clearInterval(ZargetScroll.scrollInterval)}};function onSPAPageTransition(){var experiment=Zarget.findHeatMapExperiment();if(experiment){ZargetData.curexp=[{experiment:experiment}];experiments=ZargetData.curexp;onDOMReady()}}function onDOMReady(){if(Zarget.tracker){Zarget.tracker.cleanup()}if(Zarget.notAllowSampledVisitor()){return}var uid=Zarget.getUidAndSetIfNotExists();Zarget.setCookie(uid,Zarget.SAMPLE_VISITED_USER);var userid=Zarget.getUidAndSetIfNotExists();for(var i=0,exp;exp=experiments[i];i++){var visitorInfo=Zarget.getVisitorInfo(),expid=exp.experiment.id,lid=exp.experiment.lid,variationID=visitorInfo?visitorInfo[lid]:undefined,traffic,runExperiment,isReturningUser=visitorInfo&&visitorInfo.hasOwnProperty(lid);if(variationID===-1){continue}if(exp.experiment.type===3&&!isReturningUser){traffic=Math.random()*100;if(traffic<=exp.experiment.traffic){rememberVisitor(exp.experiment.variations[0],lid);sendVisitorInfo(exp,false,userid?true:false);runExperiment=true}else{rememberVisitor(-1,lid);continue}}else{if(isReturningUser){sendVisitorInfo(exp,true)}}}Zarget.tracker=new Zarget.Tracker();ZargetScroll.init();ZargetScroll.cleanup();ZargetScroll.scrollInterval=window.setInterval(ZargetScroll.trackScroll,100)}Zarget.initScrollHeatMap=function(){Zarget.log("init scroll heat map");experiments=ZargetData.curexp;onDOMReady()};Zarget.clearScrollHeatMap=function(){Zarget.log("clear scroll heat map");ZargetScroll&&ZargetScroll.cleanup();if(Zarget.tracker){Zarget.tracker.cleanup()}};if(!experiments||!experiments.length){return}if(Zarget.domReady){onDOMReady()}else{if(document.addEventListener){Zarget.on(document,"DOMContentLoaded",onDOMReady)}else{Zarget.on(window,"load",onDOMReady)}}}(Zarget,ZargetData));(function(Zarget,ZargetData){if(Zarget.isOptedOut()){return}var ZARGET_FUNNEL_STORAGE_PREFIX="zarget_funnel_";var ZARGET_FUNNEL_VIRTUAL_PAGE="zg_vpage";var FUNNEL_SESSION_EXPIRY=30*24*60*60;var pendingExperiments=[];var requestAlreadyGoing=false;Zarget.Funnel=function(experiments){this.experiments=experiments};Zarget.Funnel.prototype={callPendingExperiments:function(cookieObj,otherParams){var funnel=new Zarget.Funnel(pendingExperiments);for(i=0,l=pendingExperiments.length;i-1;return domainMatches&&curpath.indexOf(path)>-1}catch(e){Zarget.log("Step url object is not valid. "+e+" step url "+stepurl)}},_custom:function(match,event){if(!match||!event){return false}return match.toLowerCase().trim()===event.toLowerCase().trim()},isRegexMatch:function(experiment,url,presenturl){if(!experiment||!url){return}var urlsToMatch=experiment.urls,curUrl=url||document.URL,matches=false;for(var i=0,spec,url,l=urlsToMatch.length;i0){if(Zarget.notAllowSampledVisitor()){return}var uid=Zarget.getUidAndSetIfNotExists();Zarget.setCookie(uid,Zarget.SAMPLE_VISITED_USER);funnel=new Zarget.Funnel(experiments);funnel.start();window.ZargetFunnelAPI=window.ZargetFunnelAPI||[];window.FMFunnelAPI=window.ZargetFunnelAPI;window.ZargetFunnelAPI.push=function(){Array.prototype.push.apply(this,arguments);try{if(arguments[0]===ZARGET_FUNNEL_VIRTUAL_PAGE&&funnel&&arguments[1]){funnel.start(arguments[1])}}catch(e){Zarget.log("Error while tracking virtual pages.",e)}};window.ZargetUrlChangeTrigger.register(funnel.trackSinglePageapps,funnel)}}())}(Zarget,ZargetData));(function(Zarget,ZargetData){if(typeof ZargetData==="undefined"||!ZargetData.hasOwnProperty("polls")||ZargetData.polls.length===0){return}if(Zarget.isOptedOut()){return}var devices={ALL:1,DESKTOP:2,MOBILE:3,TABLET:4};var show={LOAD:1,TIMER:2,SCROLL:3,CLOSE:4,CUSTOM:5,CLICKELEMENT:6};var poll=Zarget.findPoll(deviceTarget);if(!poll){Zarget.log("No poll is created for this url ");return}if((Zarget.isReportView&&Zarget.isReportView())||Zarget.isPreviewMode()||Zarget.isExpEditMode()){return}Zarget.on=function(c,evt,handler){if(c.addEventListener){c.addEventListener(evt,handler,true)}else{c.attachEvent("on"+evt,handler)}};Zarget.off=function(c,evt,handler){if(c.removeEventListener){c.removeEventListener(evt,handler,true)}else{c.detachEvent("on"+evt,handler)}};Zarget.READYSTATE_RGX=Zarget.ie?/complete/:/complete|interactive/;Zarget.domReady=(document.readyState&&Zarget.READYSTATE_RGX.test(document.readyState));function sendVisitorInfo(returning,status,geoData,rv){var visitorinfo=Zarget.getPollsInfo(),img,fid=poll.id,r,uid,url,referrer,type,msg;if(!visitorinfo||!visitorinfo.hasOwnProperty(fid)){return}url=encodeURIComponent(document.URL);referrer=document.referrer;type=Zarget.MessageType.ADDPOLL;uid=Zarget.getCookie(Zarget.visitorCookie);r=(new Date()).getTime();msg=new Zarget.Message(type);var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);msg.setParam({fid:fid,uid:uid,r:r,ftv:!returning,trigger:poll?poll.trigger:0,ety:Zarget.ExperimentType.POLL});typeof rv!=="undefined"&&msg.addParam("ru",rv);status&&msg.addParam("status",status);poll.schedulertype&&msg.addParam("sch",true);Zarget.xhrService.send(msg)}function sendFieldData(field,answer,status,skipped){var visitorinfo=Zarget.getPollsInfo(),img,fid,varid,r,uid,msg,url,referrer;if(!visitorinfo){return}url=encodeURIComponent(document.URL);referrer=document.referrer;fid=poll.id;r=(new Date()).getTime();uid=Zarget.getCookie(Zarget.visitorCookie);msg=new Zarget.Message(Zarget.MessageType.ADDPOLL);var today=new Date();var nowUTC=today.getTime()+(today.getTimezoneOffset()*60000);msg.setParam({fid:fid,uid:uid,r:r,fieldid:field,trigger:poll?poll.trigger:0,ety:Zarget.ExperimentType.POLL});status&&msg.addParam("status",status);answer&&msg.addParam("answer",answer);skipped&&msg.addParam("skipped",skipped);Zarget.xhrService.send(msg)}var JSTemplate={};JSTemplate.compiled={};function shadeBlendConvert(p,from,to){if(typeof(p)!="number"||p<-1||p>1||typeof(from)!="string"||(from[0]!="r"&&from[0]!="#")||(typeof(to)!="string"&&typeof(to)!="undefined")){return null}if(!this.sbcRip){this.sbcRip=function(d){var l=d.length,RGB=new Object();if(l>9){d=d.split(",");if(d.length<3||d.length>4){return null}RGB[0]=i(d[0].slice(4)),RGB[1]=i(d[1]),RGB[2]=i(d[2]),RGB[3]=d[3]?parseFloat(d[3]):-1}else{if(l==8||l==6||l<4){return null}if(l<6){d="#"+d[1]+d[1]+d[2]+d[2]+d[3]+d[3]+(l>4?d[4]+""+d[4]:"")}d=i(d.slice(1),16),RGB[0]=d>>16&255,RGB[1]=d>>8&255,RGB[2]=d&255,RGB[3]=l==9||l==5?r(((d>>24&255)/255)*10000)/10000:-1}return RGB}}var i=parseInt,r=Math.round,h=from.length>9,h=typeof(to)=="string"?to.length>9?true:to=="c"?!h:false:h,b=p<0,p=b?p*-1:p,to=to&&to!="c"?to:b?"#000000":"#FFFFFF",f=this.sbcRip(from),t=this.sbcRip(to);if(!f||!t){return null}if(h){return"rgb("+r((t[0]-f[0])*p+f[0])+","+r((t[1]-f[1])*p+f[1])+","+r((t[2]-f[2])*p+f[2])+(f[3]<0&&t[3]<0?")":","+(f[3]>-1&&t[3]>-1?r(((t[3]-f[3])*p+f[3])*10000)/10000:t[3]<0?f[3]:t[3])+")")}else{return"#"+(4294967296+(f[3]>-1&&t[3]>-1?r(((t[3]-f[3])*p+f[3])*255):t[3]>-1?r(t[3]*255):f[3]>-1?r(f[3]*255):255)*16777216+r((t[0]-f[0])*p+f[0])*65536+r((t[1]-f[1])*p+f[1])*256+r((t[2]-f[2])*p+f[2])).toString(16).slice(f[3]>-1||t[3]>-1?1:3)}}function stringify(obj){if(typeof obj!=="object"||obj===null||obj instanceof Array){return strValue(obj)}return"{"+Object.keys(obj).map(function(k){return(typeof obj[k]==="function")?null:'"'+k+'":'+strValue(obj[k])}).filter(function(i){return i})+"}"}function strValue(val){switch(typeof val){case"string":return'"'+val.replace(/\\/g,"\\\\").replace('"','\\"')+'"';case"number":case"boolean":return""+val;case"function":return"null";case"object":if(val instanceof Date){return'"'+val.toISOString()+'"'}if(val instanceof Array){return"["+val.map(strValue).join(",")+"]"}if(val===null){return"null"}return stringify(val)}}JSTemplate.render=function(template_id,data,target,truncate,controller){controller.model=data;var func=JSTemplate.compiled[template_id]();if(truncate){while(target.firstChild){target.removeChild(target.lastChild)}}var view=func.getView(data);var span=document.createElement("span");span.innerHTML=view;while(span.firstChild){target.appendChild(span.firstChild)}var bindEvtElems=window.zarget$("[data-bind]",window.zarget$(target));for(var j=0,bindLen=bindEvtElems.length;j=0&¤tAnswerObj.value<=6?"low":(currentAnswerObj.value>=7&¤tAnswerObj.value<=8?"neutral":"high");var answeredObj=currentAns.answers.filter(function(ansObj){var label=JSON.parse(ansObj.label);if(label.type===answered){return label}});var ansCto=answeredObj.length?answeredObj[0].cto:1;var objCto=modelObj.filter(function(obj){if(obj.eid===ansCto){return obj.eid}})[0];next=(objCto&&"eid" in objCto)?objCto.eid:(ansCto==1||ansCto==2)?ansCto:1}else{next=1}}}if(next===1){var ansIndex=modelObj.indexOf(currentAns);if(modelObj[ansIndex+1]){var nextAns=modelObj[ansIndex+1];var elem_id=nextAns.eid;var nextDom=window.zarget$('span[data-elem="'+elem_id+'"]',preview);if(nextAns.mandatory){btn.className="disabled"}nextDom.attr("class","active");Poll.dataBinding.fnSendVisited()}else{Zarget.updatePollData(poll.id,"completed",true,poll.trigger);window.zarget$(".zarget-thank-mgs-holder",preview).removeClass("inactive");window.zarget$(".zarget-thank-mgs-holder",preview).addClass("active");timer=setTimeout(function(){preview.css("display","none")},5000);btn.style.display="none";sendVisitorInfo(true,"completed");window.zarget$(document).off("mouseout")}}else{if(next===2){Zarget.updatePollData(poll.id,"completed",true,poll.trigger);window.zarget$(".zarget-thank-mgs-holder",preview).removeClass("inactive");window.zarget$(".zarget-thank-mgs-holder",preview).addClass("active");timer=setTimeout(function(){preview.css("display","none")},5000);btn.style.display="none";sendVisitorInfo(true,"completed");window.zarget$(document).off("mouseout")}else{var nextAns=modelObj.filter(function(obj){if(obj.eid===parseInt(next)){return obj}})[0];if(!nextAns){var ansIndex=modelObj.indexOf(currentAns);if(modelObj[ansIndex+1]){var nextAns=modelObj[ansIndex+1];var elem_id=nextAns.eid;var nextDom=window.zarget$('span[data-elem="'+elem_id+'"]',preview);if(nextAns.mandatory){btn.className="disabled"}nextDom.attr("class","active");Poll.dataBinding.fnSendVisited()}else{Zarget.updatePollData(poll.id,"completed",true,poll.trigger);window.zarget$(".zarget-thank-mgs-holder",preview).removeClass("inactive");window.zarget$(".zarget-thank-mgs-holder",preview).addClass("active");timer=setTimeout(function(){preview.css("display","none")},5000);btn.style.display="none";sendVisitorInfo(true,"completed");window.zarget$(document).off("mouseout")}}else{var nextDom=window.zarget$('span[data-elem="'+nextAns.eid+'"]',preview);if(nextAns.mandatory){btn.className="disabled"}nextDom.attr("class","active");Poll.dataBinding.fnSendVisited()}}}if(nextAns){btn.innerText=nextAns.next_custom}delete currentAnswerObj.value}};function focusNext(nextDom,nextAns){if(nextAns.ftype===1){window.zarget$("input",nextDom).focus()}else{if(nextAns.ftype===2){window.zarget$("textarea",nextDom).focus()}else{if(nextAns.ftype===3){window.zarget$("input",nextDom)[0].focus()}}}}function init(){if(ZargetData.project.excludeIps.length&&!Zarget.isVisitorLocationInLocalStorage()){zarget_timeoutid=window.setTimeout(init,5);return}else{try{window.clearTimeout(zarget_timeoutid)}catch(e){Zarget.log("Error in clearing geo timer.")}}if(ZargetData.project.excludeIps.length){var excludeIpCheck={type:1,conditions:[{type:0,conditions:[{condition:5,type:"ipv4",value:ZargetData.project.excludeIps}]}]};if(Zarget.matchesTargeting(excludeIpCheck,false)){return false}}window.ZargetUrlChangeTrigger.register(urlChange);try{startExperiment();Zarget.setUserID()}catch(e){Zarget.log(e)}}function isAlreadyVisitedUser(){var info=Zarget.getPollsInfo(),userid=Zarget.getCookie(Zarget.visitorCookie);if(userid&&info&&info.hasOwnProperty(poll.id)){return true}return false}function rememberPoll(){var visitorinfo=Zarget.getPollsInfo(),vobj;vobj=typeof visitorinfo==="object"?visitorinfo:{};if(!vobj.hasOwnProperty(poll.id)){if(poll.trigger){var urlHash=Zarget.sdbmCode(document.URL);vobj[poll.id]={};vobj[poll.id][urlHash]={completed:false}}else{vobj[poll.id]={completed:false}}Zarget.setStorage(Zarget.pollData,encodeURIComponent(Zarget.stringifyJSON(vobj)))}else{if(poll.trigger){var urlHash=Zarget.sdbmCode(document.URL);if(!vobj[poll.id][urlHash]){vobj[poll.id][urlHash]={completed:false}}Zarget.setStorage(Zarget.pollData,encodeURIComponent(Zarget.stringifyJSON(vobj)))}}}function startExperiment(){currentAnswerObj={};answersArr=[];if(isAlreadyVisitedUser()){rememberPoll();if(poll.trigger){sendVisitorInfo(true,"geo")}else{sendVisitorInfo(true)}runPoll();return}if(Zarget.isCookieDisabled()){return}var userid=Zarget.getCookie(Zarget.visitorCookie);Zarget.setUserID();rememberPoll();sendVisitorInfo(false,"geo",userid?true:false);runPoll()}function deviceTarget(target){var targets=Zarget.trim((target||"1").toString()).split(",");for(var i=0,target;target=parseInt(targets[i]);i++){switch(target){case devices.ALL:return true;break;case devices.DESKTOP:if(!(/Android|webOS|iPhone|iPod|tablet|silk|iPad|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))){return true}break;case devices.MOBILE:if(/Android.+mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){return true}break;case devices.TABLET:if(/Android(?!.*mobile)|playbook|tablet|silk|iPad/i.test(navigator.userAgent)){return true}break}}return false}function runPoll(){var pollTmplParsed=function anonymous(){function brTag(str){if(!str){str=""}return str.replace(/\n/g,"
")}function escapeStr(str){if(!str){str=""}str=str.toString();return str.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}return{getView:function(args){var view=[];var questions=args.questions;var thanks=args.thanks;var settings=args.settings;view.push("");var theme=settings.theme;view.push(" ");var bg=settings.color.theme;view.push(" ");var color=settings.color.text;view.push(" ");var bgColor="";view.push(" ");var btnStyle="";view.push(" ");var questTxt="color:rgb("+color+") !important;";view.push(" ");var powerTxt="color:rgba("+color+", .84) !important;";view.push(" ");var lightColor=shadeBlendConvert.call(this,0.9,"rgb("+bg+")");view.push(" ");if(theme===1){view.push(" ");bgColor="background-color:"+lightColor+" !important;border:1px solid rgb("+bg+") !important;";view.push(" ");btnStyle="color:rgb("+color+") !important;border :1px solid rgb("+bg+") !important;background-color:rgb("+bg+") !important;";view.push(" ");questTxt="";view.push(" ");powerTxt="";view.push(" ")}else{if(theme===2){view.push(" ");bgColor="background-color:rgb("+bg+") !important;border:1px solid rgb("+bg+") !important;";view.push(" ");btnStyle="color:rgb("+bg+") !important;border:1px solid rgb("+bg+") !important;background-color:rgb("+color+") !important;";view.push(" ")}else{view.push(" ");btnStyle="color:rgb("+color+") !important;border:1px solid rgb("+bg+") !important;background-color:rgb("+bg+") !important;";view.push(" ");questTxt="";view.push(" ");powerTxt="";view.push(" ")}}view.push("");var pos=(settings.position===2?"right":"left");view.push('
");var types={1:"text",2:"multiline",3:"radio",4:"choice",5:"nps"};view.push('
');for(var i=0,question;question=questions[i];i++){view.push(" ");var type=types[question.ftype];view.push(" ");var questType=question.ftype;view.push(" ");var state=i===0?"active":"inactive";view.push("
");view.push(escapeStr(question.label));view.push('
');if(questType===3){view.push('
    ');var answers=question.answers.slice();view.push(" ");if(question.randomize==1){view.push(" ");answers.sort(function(){return 0.5-Math.random()});view.push(" ")}view.push(" ");for(var j=0,answer;answer=answers[j];j++){view.push('
  • ");if(answer.comment==1){view.push('
    ');var mandatoryComment=answer.MANDATORY_COMMENT?"true":"false";view.push(" ");if(mandatoryComment=="true"&&question.mandatory==1){view.push('
    ')}else{if(mandatoryComment=="false"||question.mandatory==0){view.push('
')}}view.push(" ")}view.push(" ")}view.push(" ")}else{if(questType===4){view.push('
    ');var answers=question.answers.slice();view.push(" ");if(question.randomize==1){view.push(" ");answers.sort(function(){return 0.5-Math.random()});view.push(" ")}view.push(" ");for(var j=0,answer;answer=answers[j];j++){view.push('
  • ");if(answer.comment==1){view.push('
    ');var chkoptman=answer.MANDATORY_COMMENT?"true":"false";view.push(" ");if(chkoptman=="true"&&question.mandatory==1){view.push('
    ')}else{if(chkoptman=="false"||question.mandatory==0){view.push('
')}}view.push(" ")}view.push(" ")}view.push(" ")}else{if(questType===5){view.push('
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
');var lowLabel,highLabel="";view.push(" ");question.answers.filter(function(ansObj){view.push(" ");var label=JSON.parse(ansObj.label);view.push(" ");if(label.type==="low"){lowLabel=label.label}view.push(" ");if(label.type==="high"){highLabel=label.label}view.push(" ");return ansObj;view.push(" ")});view.push('
0 - ");view.push(escapeStr(lowLabel));view.push('
10 - ");view.push(escapeStr(highLabel));view.push("
")}else{if(questType===2){view.push('
')}else{if(questType===1){view.push('
')}}}}}view.push("
")}view.push('

");view.push(brTag(escapeStr(thanks.THANKYOU_MESSAGE)));view.push("

");var displayThanks=thanks.THANKYOU_URL?"block":"none !important";view.push('
');return view.join("")},getModels:function(){return questions,thanks,settings},getBinds:function(){return{}},getCtrls:function(){return{}}}};JSTemplate.compiled.pollTmpl=pollTmplParsed;poll.fields.sort(function(a,b){return a.oid-b.oid});var settings={theme:poll.theme||1,position:poll.position||1};settings.color=JSON.parse(poll.color||'{"theme":"255,77,0","text":"255,255,255"}');settings.showbranding=poll.showbranding||0;var dataModel={questions:poll.fields||[],thanks:poll.thanks||{},settings:settings};var pollContainer=document.getElementById("zg_"+poll.id)?document.getElementById("zg_"+poll.id):document.body.appendChild(document.createElement("span"));pollContainer.id="zg_"+poll.id;var render=JSTemplate.render("pollTmpl",dataModel,pollContainer,true,Poll.dataBinding);var showPollId=poll.show;if(showPollId===show.LOAD){pollContainer.style.cssText="display : block !important";showPoll(null,true)}else{if(showPollId===show.TIMER){showTimer=setTimeout(function(){pollContainer.style.cssText="display : block !important";showPoll(true,true)},poll.triggerTime)}else{if(showPollId===show.SCROLL){window.zarget$(window).on("scroll",scrollShow)}else{if(showPollId===show.CLOSE){window.zarget$(window).on("mouseout",mouseShow)}else{if(showPollId===show.CLICKELEMENT){window.zarget$(window).on("click",clickShow)}}}}}window.zarget$(".zarget-poll-min-max",pollContainer)[0].onclick=function(){showPoll(false)}}function scrollShow(){var halfScroll=Math.floor((window.zarget$("body").prop("scrollHeight")-window.zarget$(window).height())/2);var scrolled=window.zarget$(window).scrollTop();if(scrolled>halfScroll){if(poll){var pollContainer=document.getElementById("zg_"+poll.id);pollContainer.style.cssText="display : block !important";showPoll(true,true)}}}function mouseShow(event){event=event?event:window.event;var from=event.relatedTarget||event.toElement;if((!from||from.nodeName=="HTML")&&(event.clientY<=50||event.pageY<=50)){if(poll){var pollContainer=document.getElementById("zg_"+poll.id);pollContainer.style.cssText="display : block !important";showPoll(true,true)}}}function clickShow(){if(poll){var pollContainer=document.getElementById("zg_"+poll.id);pollContainer.style.cssText="display : block !important";showPoll(true,true)}}window.zargetAPI=window.zargetAPI||[];window.FMApi=window.zargetAPI;window.zargetAPI.triggerPoll=function(){if(poll){var pollContainer=document.getElementById("zg_"+poll.id)?document.getElementById("zg_"+poll.id):document.body.appendChild(document.createElement("span"));pollContainer.style.cssText="display : block !important";showPoll(true)}};function showPoll(expanded,check){var pollWin=window.zarget$(".zarget-poll-window","#zg_"+poll.id);var pos=(poll.position===2?"right":"left");var userid=Zarget.getCookie("zarget_user_id");var action=Zarget.getAction(userid);if(check==true){if(action==1){pollWin.attr("class","zarget-poll-window "+pos+" zarget-theme-skin"+(poll.theme||1)+" zarget-poll-close")}else{pollWin.attr("class","zarget-poll-window "+pos+" zarget-theme-skin"+(poll.theme||1)+" zarget-poll-open")}}else{if(pollWin.hasClass("zarget-poll-close")){pollWin.attr("class","zarget-poll-window "+pos+" zarget-theme-skin"+(poll.theme||1)+" zarget-poll-open");Zarget.setAction(userid,0);Poll.dataBinding.fnSendVisited()}else{if(!expanded){pollWin.attr("class","zarget-poll-window "+pos+" zarget-theme-skin"+(poll.theme||1)+" zarget-poll-close");var count=Zarget.getPollData(poll.id,"count",poll.trigger);count=count?count+1:1;Zarget.setAction(userid,1);Zarget.updatePollData(poll.id,"count",count,poll.trigger);if(count>=poll.visibilityCount){pollWin[0].style.cssText="display:none !important"}}}}}if(poll){var completed=Zarget.getPollData(poll.id,"completed",poll.trigger);var target=deviceTarget(poll.deviceTarget);if(completed||!target){return}var count=Zarget.getPollData(poll.id,"count",poll.trigger);if(count&&poll.visibilityCount&&count>=poll.visibilityCount){return}if(poll.schtime){if(new Date()>=poll.schtime){return}}var r=Math.floor(Math.random()*100)+1;if(r>poll.traffic){return}if(Zarget.domReady){if(Zarget.domReady){init()}}else{if(document.addEventListener){Zarget.on(document,"DOMContentLoaded",init)}else{Zarget.on(window,"load",init)}}}function urlChange(){clearTimeout(timer);clearTimeout(showTimer);window.zarget$(window).off("scroll",scrollShow);window.zarget$(window).off("mouseout",mouseShow);window.zarget$(window).off("click",clickShow);var preview=window.zarget$("#zg_"+poll.id);preview.css("display","none");poll=Zarget.findPoll(deviceTarget);if(!poll){return}var completed=Zarget.getPollData(poll.id,"completed",poll.trigger);var target=deviceTarget(poll.deviceTarget);if(completed||!target){return}var count=Zarget.getPollData(poll.id,"count",poll.trigger);if(count&&poll.visibilityCount&&count>=poll.visibilityCount){return}if(poll.schtime){if(new Date()>=poll.schtime){return}}var r=Math.floor(Math.random()*100)+1;if(r>poll.traffic){return}startExperiment()}}(Zarget,ZargetData));(function(FMCore,FMData){if(FMCore.isOptedOut()){return}var fm={};function log(){if(window.console){window.console.log.apply(window.console,arguments)}}var eventConst={PAGE_VISIT:"page_visit_event",WEB_FORM:"web_form",CUSTOM_EVENT:"custom_event",ASSOCIATE_VISITOR:"associate_visitor"};function trimWwwAndTrailingSlash(u){if(u){u=u.lastIndexOf("/")===u.length-1?u.substring(0,u.length-1):u;u=u.replace(/^https?\:\/\//,"").replace(/^www./,"")}return u}function getCurrentDomain(){return trimWwwAndTrailingSlash(FMCore.parseURL(FMCore.getURL()).authority).toLowerCase()}function isTrackingAllowed(domains){var curDomain=getCurrentDomain();for(var i=0;i0){new a.HTTPTransport(this.eventStore.getOverallEvents()).sendBeacon()}if(this.eventStore.getBatchEvents().length>0){new a.HTTPTransport(this.eventStore.getOverallEvents("batch")).sendBeacon()}};EventHandler.prototype.pagevisit=function(e){if(!isPageVisitTrackingEnabled){return}this.eventStore.addEvent(new a.Event(eventConst.PAGE_VISIT,{},true))};EventHandler.prototype.autoAssociateVisitor=function(e){var url=FMCore.parseURL(window.location.href);if(!url||!url.query||!url.query._fm_st){return}this.eventStore.autoAssociateVisitor(url.query._fm_st)};return EventHandler})();a.EventHandler=EventHandler})(fm||(fm={}));(function(a){var HTTPTransport=(function(){function HTTPTransport(event){this.msg=new FMCore.Message(FMCore.MessageType.EVENT_DATA_SEND);this.msg.setParam(event);this.url=FMCore.Messenger._getApiURL(this.msg.type);this.processCount=1}HTTPTransport.prototype.startProcess=function(callback){this.xhr=FMCore.Messenger.createCORS(this.url,"POST");if(!this.xhr){return}this.xhr.setRequestHeader("Content-Type","application/json;charset=UTF-8");this.xhr.send(FMCore.stringifyJSON(this.msg.getParams()));var _this=this;this.xhr.onreadystatechange=function(){if(_this.xhr.readyState===4){if(callback){callback();callback=null}if(_this.xhr.status!==200){if(_this.processCount<5){window.setTimeout(function(){_this.startProcess()},1000);_this.processCount+=1}}}}};HTTPTransport.prototype.sendBeacon=function(){return typeof navigator.sendBeacon==="function"?navigator.sendBeacon(this.url,FMCore.stringifyJSON(this.msg.getParams())):!1};return HTTPTransport})();a.HTTPTransport=HTTPTransport})(fm||(fm={}));(function(a){var EventEmitter=(function(){function EventEmitter(store){this.eventStore=store;this.immediateInterval=-1;this.batchInterval=-1;this.startImmediateEmitter();this.startBatchEmitter()}EventEmitter.prototype.startImmediateEmitter=function(){if(this.immediateInterval!=-1){return}var _this=this;this.immediateInterval=window.setInterval(function(){var events=_this.eventStore.getEvents();if(events.length>0){var transport=new a.HTTPTransport(_this.eventStore.getOverallEvents());transport.startProcess(function(){_this.immediateInterval=-1;_this.startImmediateEmitter()});_this.stopImmediateEmitter();_this.eventStore.clearEvents()}},500)};EventEmitter.prototype.stopImmediateEmitter=function(){if(this.immediateInterval==-1){return}window.clearInterval(this.immediateInterval);this.immediateInterval=-1};EventEmitter.prototype.startBatchEmitter=function(){if(this.batchInterval!=-1){return}var _this=this;this.batchInterval=window.setInterval(function(){var events=_this.eventStore.getBatchEvents();if(events.length>0){var transport=new a.HTTPTransport(_this.eventStore.getOverallEvents("batch"));transport.startProcess(function(){_this.batchInterval=-1;_this.startBatchEmitter()});_this.stopBatchEmitter();_this.eventStore.clearBatchEvents()}},3000)};EventEmitter.prototype.stopBatchEmitter=function(){if(this.batchInterval==-1){return}window.clearInterval(this.batchInterval);this.batchInterval=-1};return EventEmitter})();a.EventEmitter=EventEmitter})(fm||(fm={}));(function(a){function NameSpace(){return window.__fm_namespace||"FM"}function initNameSpace(namespace){if(window[namespace]){return}window[namespace]={}}function bind(fn,$this){var a=function(){try{return fn.apply($this||this,arguments)}catch(e){log("Error binding event.")}};return a}function addAPI(namespace,api,fn,$this){if(namespace[api]){return}namespace[api]=bind(fn,$this)}a.startTracking=function(){try{this.eventStore=new a.EventStore();this.eventEmitter=new a.EventEmitter(this.eventStore);this.handler=new a.EventHandler(window,this.eventStore);var namespace=NameSpace();initNameSpace(namespace);namespace=window[namespace];var self=this;addAPI(namespace,"trackMasEvent",this.eventStore.pushEvent,this.eventStore);addAPI(namespace,"trackCustomEvent",this.eventStore.pushCustomEvent,this.eventStore);addAPI(namespace,"associateVisitor",this.eventStore.associateVisitor,this.eventStore);addAPI(namespace,"pagevisit",this.eventStore.pagevisit,this.eventStore)}catch(err){}}})(fm||(fm={}));fm.startTracking()})(Zarget,ZargetData);(function(Zarget,ZargetData){try{let parsedUrl=Zarget.parseURL(window.location.href);let projProps=Zarget.getProjectProps();const utm_fields=["utm_source","utm_medium","utm_campaign","utm_term","utm_id","utm_content","gclid","fbclid"];if(containsFmTrackingParams()){fmSourceTracking()}else{if(projProps&&projProps.src_tracking_enabled===1){visitorSourceTracking()}}function containsFmTrackingParams(){if(parsedUrl.query&&Object.keys(parsedUrl.query).length){const fmUtmParams=["fm_source","fm_medium","fm_content","fm_cnt","fm_journey"];return containsQueryParam(fmUtmParams)}return false}function containsQueryParam(params){for(let i=0;i30):true;if((sourceChange||notExp)&&(Zarget.getStorage("_fm_con")||customerId)){var eventData={tracking:{}};paramArr.forEach(function(item){let lVal=Zarget.getStorage(item.store);if(lVal){eventData.tracking[item.type]=lVal}});if(customerId){eventData.customer={id:customerId}}if(FM&&FM.trackMasEvent){Zarget.setStorage("_o_date",Date.now());FM.trackMasEvent("source_tracking",true,eventData)}}}function getntrimValues(paramName){let val=(paramName in parsedUrl.query)?parsedUrl.query[paramName]:"";return val?val.trim().toLowerCase():""}function getCustomerId(){try{if(window.ShopifyAnalytics&&window.ShopifyAnalytics.meta&&window.ShopifyAnalytics.meta.page&&window.ShopifyAnalytics.meta.page.customerId){return window.ShopifyAnalytics.meta.page.customerId}if(window.meta&&window.meta.page&&window.meta.page.customerId){return window.meta.page.customerId}if(__st&&__st.cid){return __st.cid}if(ShopifyAnalytics&&ShopifyAnalytics.lib&&ShopifyAnalytics.lib.user&&ShopifyAnalytics.lib.user().traits&&ShopifyAnalytics.lib.user().traits().uniqToken){return ShopifyAnalytics.lib.user().traits().uniqToken}}catch(err){}return null}function visitorSourceTracking(){let existingSrcParams=getExistingSrcTrackingParams();let latestSrcParams=getLatestSrcTrackingParams();setLocalStorage(latestSrcParams);if(JSON.stringify(existingSrcParams)!==JSON.stringify(latestSrcParams)){if(FM&&FM.trackMasEvent){let eventData={trk:{rs:latestSrcParams.source,rm:latestSrcParams.medium,rc:latestSrcParams.campaign}};FM.trackMasEvent("VISITOR_SOURCE_TRACKING",true,eventData)}}}function getExistingSrcTrackingParams(){return{source:Zarget.getStorage("_fm_rs")||"",medium:Zarget.getStorage("_fm_rm")||"",campaign:Zarget.getStorage("_fm_rc")||""}}function getLatestSrcTrackingParams(){if(parsedUrl.query&&Object.keys(parsedUrl.query).length){const utmParams=["utm_source","utm_medium","utm_campaign"];if(containsQueryParam(utmParams)){return{source:parsedUrl.query.utm_source||"",medium:parsedUrl.query.utm_medium||"",campaign:parsedUrl.query.utm_campaign||""}}}const referrer=document.referrer;if(!referrer){return{source:"Direct",medium:"Direct traffic",campaign:""}}let refDomain=getDomain(referrer);if(refDomain.startsWith("www.")){refDomain=refDomain.substring(4)}let matches;const socialMediaDomains=["digg","facebook","fb","flickr","friendfeed","google+","hackernews","hootsuite","instagram","ig","linkedin","livejournal","meebo","metacafe","mixx","myspace","ning","pinterest","quora","reddit","seesmic","slashdot","slideshare","slide","snapchat","stumbleupon","squidoo","technorati","tiktok","tip'd","tipd","triiibes","tumblr","twitter","vimeo","whatsapp","wikipedia","xing","youtube","zhihu"];matches=getMatchingDomain(socialMediaDomains,refDomain);if(matches.length>0){return{source:matches[0],medium:"organic social",campaign:""}}const searchEngineDomains=["google","yahoo","bing","baidu","aol","duckduckgo","ask","yandex"];matches=getMatchingDomain(searchEngineDomains,refDomain);if(matches.length>0){return{source:matches[0],medium:"organic search",campaign:""}}function getMatchingDomain(domains,refDomain){let matches=[];for(let i=0;i0){fieldValuePairs.unshift({nodeName:data[0].nodeName,name:data[0].getAttribute("name")||"",id:data[0].id?"#"+data[0].id:""||"",classes:data[0].className?"."+data[0].className.replace(" ","."):""||"",selector:selector,url:url||""});Freshsales.post.hallwayData({hallwayData:fieldValuePairs})}},getSelector:function(data){let selector=window.zg_selector(data);return selector},getUrl:function(href){let url=new URL(href);return url.origin+url.pathname},isWebForm:function(closestForm){var container=freshsales.$(closestForm.parent());if(container&&container.hasClass("fserv-container")){return true}return false},listenFormSubmit:function(){freshsales.$.expr.pseudos.contains=function(a,i,m){return !!freshsales.$(a).text().match(new RegExp(m[3],"i"))};const startLimitForEventCounter=0;const maxLimitForEventCounter=60;const eventCounter="event_counter";const eventTime="event_time";let eventCapturedCounter,eventCapturedCurrentTime,eventCapturedMaxTime;const resetCounterAndTimer=function(){sessionStorage.setItem(eventCounter,startLimitForEventCounter);sessionStorage.setItem(eventTime,new Date().getTime())};freshsales.$("body").on("click submit",Freshsales.hallway.buttonSelectors.join(","),function(){if(!sessionStorage.getItem(eventCounter)||!sessionStorage.getItem(eventTime)){resetCounterAndTimer()}eventCapturedCurrentTime=+sessionStorage.getItem(eventTime);eventCapturedMaxTime=eventCapturedCurrentTime+60000;if(new Date().getTime()>eventCapturedMaxTime){resetCounterAndTimer()}eventCapturedCounter=+sessionStorage.getItem(eventCounter);if(eventCapturedCounter0&&selectorObj.web_form_tracking&&selectorObj.web_form_tracking.length>0)?selectorObj.web_form_tracking:null;if(data){data._fw_crm_v=cookie}function trimWwwAndTrailingSlash(url){if(url){url=url.lastIndexOf("/")===url.length-1?url.substring(0,url.length-1):url;url=url.replace(/^https?\:\/\//,"").replace(/^www./,"")}return url}if(Freshsales.analytics.smartformsEnabled){check=true}else{if(!Freshsales.analytics.smartformsEnabled&&selectorList&&data&&data.hallway_data&&data.hallway_data.length>0){check=selectorList.some(function(e){return(e.formSelector===data.hallway_data[0].selector&&trimWwwAndTrailingSlash(e.url)===trimWwwAndTrailingSlash(data.hallway_data[0].url))})}}const re=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;let validEmail=data&&data.hallway_data?data.hallway_data.filter(function(res){if(res.value){return re.test((res.value).toLowerCase())}}):[];let hasEmail=validEmail.length&&validEmail[0].value;if(check&&data&&data.hallway_data&&data.hallway_data.length>0&&hasEmail){window.FMApi=window.FMApi||[];this.setSrcTrackingParams(data);window.FMApi.push("fm_form_tracking",data)}if(data&&data.visitor){var endPoint=Freshsales.analytics.url+"/track/visit.json",method="POST",req=null,_self=this;if(XMLHttpRequest){req=new XMLHttpRequest();if("withCredentials" in req){req.open(method,endPoint,true);req.onreadystatechange=function(){if(req.readyState===Freshsales.util.httpStatus.READY_STATE){if(req.status===Freshsales.util.httpStatus.OK){_self.handleSuccess(req.responseText,successCallBack)}else{_self.handleFailure(req.responseText,errorCallBack)}}}}}else{if(XDomainRequest){req=new XDomainRequest();req.open(method,endPoint);req.onload=function(){_self.handleSuccess(req.responseText,successCallBack)}}else{this.handleFailure(Freshsales.util.errorMessages.CORS_NOT_SUPPORTED,errorCallBack)}}if(req){var dataString=this.serialize(data);req.onerror=function(){_self.handleFailure(Freshsales.util.errorMessages.REQUEST_INCOMPLETE,errorCallBack)};req.ontimeout=function(){_self.handleFailure(Freshsales.util.errorMessages.REQUEST_TIMEOUT,errorCallBack)};req.setRequestHeader("Content-type","application/x-www-form-urlencoded");req.withCredentials=true;req.send(dataString)}}if(hasEmail&&FM){FM.pagevisit(window.location.href)}},setSrcTrackingParams:function(data){let projProps=window.zg_projectProps();if(projProps){if(projProps.src_tracking_enabled===1){data.st={os:localStorage.getItem("_fm_os"),om:localStorage.getItem("_fm_om"),oc:localStorage.getItem("_fm_oc"),rs:localStorage.getItem("_fm_rs"),rm:localStorage.getItem("_fm_rm"),rc:localStorage.getItem("_fm_rc")}}if(projProps.auto_map_query_params===1){this.setUtmQueryParams(data)}}},setUtmQueryParams:function(data){if(!data.st){data.st={}}data.st._ga=this.getGAClientId();data.st.q=this.getUtmFields()},getGAClientId:function(){let ga_client_id="";let full_ga_client_id=zargetCookie.getCookies()["_ga"];if(full_ga_client_id){let splits=full_ga_client_id.split(".");for(let i=2;i0){var item=window.freshsales.salesData.splice(0,1);item=item[0];var function_name=item[0];this.current=function_name;var args=Array.prototype.slice.call(item).splice(1);var obj=this[function_name].apply(this,args);for(var attr in obj){options[attr]=obj[attr]}}if(Freshsales.analytics.formCapture){freshsales.$(function(){Freshsales.hallway.listenFormSubmit()})}if(!Freshsales.analytics.smartformsEnabled){freshsales.$(function(){Freshsales.hallway.getManualForms();Freshsales.hallway.getManualFormSelector()})}Freshsales.analytics.$=freshsales.$;window.freshsales=Freshsales.analytics;Freshsales.post.visit(options);this.initialized=true}}};window.session={options:{gapi_location:false},start:function(session){Freshsales.sessionTracking.processSessionData(session);Freshsales.analytics.start();window.addEventListener("fwcrm_event",function(e){let eventName=e.detail.name;switch(eventName){case"identify":Freshsales.analytics.identify(e.detail.args[0],e.detail.args[1]);break;case"trackCustomEvent":Freshsales.analytics.trackEvent(e.detail.args[0],e.detail.args[1]);break;case"set":Freshsales.analytics.set(e.detail.args[0]);break}})}};var session_fetch=(function(win,doc,nav){var API_VERSION=0.4;var options={use_html5_location:false,ipinfodb_key:false,gapi_location:true,location_cookie:"location",location_cookie_timeout:5,session_timeout:32,session_cookie:"first_session",get_object:null,set_object:null};var SessionRunner=function(){win.session=win.session||{};win.session.contains=function(other_str){if(typeof(other_str)==="string"){return(this.indexOf(other_str)!==-1)}for(var i=0;i1){for(i=0;i-1}const sanitizedUrl=url.replace(ctrlCharactersRegex,"").trim();if(isRelativeUrlWithoutProtocol(sanitizedUrl)){return sanitizedUrl}const urlSchemeParseResults=sanitizedUrl.match(urlSchemeRegex);if(!urlSchemeParseResults){return sanitizedUrl}const urlScheme=urlSchemeParseResults[0];if(invalidProtocolRegex.test(urlScheme)){return"about:blank"}return sanitizedUrl}};if(options.get_object!=null){util.get_obj=options.get_object}if(options.set_object!=null){util.set_obj=options.set_object}var JSON={parse:(win.JSON&&win.JSON.parse)||function(data){if(typeof data!=="string"||!data){return null}return(new Function("return "+data))()},stringify:(win.JSON&&win.JSON.stringify)||function(object){var type=typeof object;if(type!=="object"||object===null){if(type==="string"){return'"'+object+'"'}}else{var k,v,json=[],isArray=(object&&object.constructor===Array);for(k in object){v=object[k];type=typeof v;if(type==="string"){v='"'+v+'"'}else{if(type==="object"&&v!==null){v=this.stringify(v)}}json.push((isArray?"":'"'+k+'":')+v)}return(isArray?"[":"{")+json.join(",")+(isArray?"]":"}")}}};SessionRunner()});if(typeof(window.exports)==="undefined"){session_fetch(window,document,navigator)}else{window.exports.session=session_fetch}function initFreshChat(){window.fcWidget.init({config:{headerProperty:{hideChatButton:window.hideChatWidget}},integrations:window.integrations(),widgetUuid:window.custWidgetId,token:"8bbe9810-63e6-4496-9261-0c6dae04b6fe",host:"https://ahsu-7f5339c482f3e6816830510.freshchat.com"})}function initialize(i,t){var e;i.getElementById(t)?initFreshChat():((e=i.createElement("script")).id=t,e.async=!0,e.src="https://ahsu-7f5339c482f3e6816830510.freshchat.com/js/widget.js",e.onload=initFreshChat,i.head.appendChild(e))}function initiateCall(){initialize(document,"freshchat-js-sdk")}document.readyState==="complete"?initiateCall():window.addEventListener?window.addEventListener("load",initiateCall,!1):window.attachEvent?window.attachEvent("load",initiateCall,!1):initiateCall()}());