window.lpTag=window.lpTag||{},lpTag.taglets=lpTag.taglets||{},lpTag.taglets.lpAnimate={_V:"1.2",name:"lpAnimate",elements:{},queue:{},conf:{interval:13,duration:500,easing:"swing"},init:function(t){if(t)for(var e=0;e{var t=document.createElement("div");return t.style.cssText="opacity:.1",/^0.1/.test(t.style.opacity)})()},_regExp:{alphaFilter:new RegExp("alpha\\([^)]*\\)","i"),opacityInAlphaFilter:new RegExp("opacity=([^)]*)")},_cssPropHooks:{opacity:{get:function(t){return this._supported.opacity?parseFloat(t.style.opacity):this._regExp.opacityInAlphaFilter.test(t.style.filter)?.01*parseFloat(RegExp.$1):null},set:function(t,e){var n;this._supported.opacity?t.style.opacity=e:(n=t.style.filter||"",e="alpha(opacity="+100*e+")",n=this._regExp.alphaFilter.test(n)?n.replace(this._regExp.alphaFilter,e):n+" "+e,t.style.filter=n)}}},_cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0,color:!0},_easing:{linear:function(t,e,n,i,o){return n+i*t},swing:function(t,e,n,i,o){return(-Math.cos(t*Math.PI)/2+.5)*i+n},easeInQuart:function(t,e,n,i,o){return i*(e/=o)*e*e*e+n},easeOutQuart:function(t,e,n,i,o){return-i*((e=e/o-1)*e*e*e-1)+n},easeOutBack:function(t,e,n,i,o,a){return i*((e=e/o-1)*e*(((a=void 0===a?1.70158:a)+1)*e+a)+1)+n},easeInBack:function(t,e,n,i,o,a){return i*(e/=o)*e*(((a=void 0===a?1.70158:a)+1)*e-a)+n}},animate:function(t,e,n){var i;void 0!==t&&void 0!==e&&t&&""!==t.id&&(void 0===this.elements[t.id]?(void 0===e.length&&(e=[e]),i=t.id,this.elements[i]={id:i,domElement:t,props:e,options:{duration:((n="number"==typeof n?{duration:n}:n)&&n.duration?n:this.conf).duration,easing:(n&&n.easing?n:this.conf).easing,callback:n&&"function"==typeof n.callback?n.callback:null,context:n.context||window}},this._doAnimate(i)):this._addToQueue(t.id,{domElement:t,props:e,options:n}))},stop:function(t){var e=this.elements[t];void 0!==e&&(null!=e.timeout&&clearTimeout(e.timeout),e.timeout=null,delete this.elements[t]),this._removeFromQueue(t)},isNumeric:function(t){return void 0!==lpTag.taglets.utils&&lpTag.taglets.utils.isNumeric(t)},_doAnimate:function(t){var e=this.elements[t];e.startTime=(new Date).getTime(),e.relTime=e.relPos=0,e.timeout=null;for(var n=0;n=i.startTime+i.options.duration){for(i.relPos=i.relTime=1,n=0;n{var m,d={base:{margin:0,padding:0,borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:0,fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",listStylePosition:"outside",listStyleImage:"none",listStyleType:"none",letterSpacing:"normal",lineHeight:"normal",textDecoration:"none",verticalAlign:"baseline",whiteSpace:"normal",wordSpacing:"normal"},container:{backgroundRepeat:"repeat-x",backgroundPosition:"bottom left",borderStyle:"solid"},label:{position:"absolute"},heading:{position:"absolute"},image:{position:"absolute",maxWidth:"none",maxHeight:"none"},button:{position:"absolute",backgroundRepeat:"repeat-x",backgroundPosition:"bottom left",borderStyle:"solid",paddingTop:5,paddingBottom:5,paddingLeft:10,paddingRight:10,cursor:"pointer"},closeButton:{position:"absolute",cursor:"pointer"},peel:{},iframe:{},slideOutPin:{position:"absolute",cursor:"pointer"}},r=["LPMacro","searchkeywords","country","state","city"],s={zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0,color:!0},v={ORDER:"lpOrder"},b=1e4,e=0;function n(t,e,n,i,o){var a,r=document.createElement(t),l=(i.isSubContainer=void 0!==i.isSubContainer&&i.isSubContainer,o=o||p(e),r),s=i,c=n,n=o,o=t;if((c=c||{}).id=n,"img"===o&&(s.alt?c.alt=s.alt:c.alt=""),s.attrs)for(var u in s.attrs)s.attrs.hasOwnProperty(u)&&(l.setAttribute(u,s.attrs[u]),"data-lp-channel"===u)&&(s.css=s.css||{},s.css.cursor="pointer");for(a in c)c.hasOwnProperty(a)&&l.setAttribute(a,c[a]);var t=((t,e)=>{var n=void 0!==e.isSubContainer&&e.isSubContainer,e=void 0===e.engagementType?"":e.engagementType,i="";return n||(i="LPM"+t,""!==e&&(i=i+" "+e)),i})(e,i);return""!==t&&(r.className=t),n=i.css,o=e,g(t=r,d.base),g(t,d[o]),g(t,n),r}var T={text:function(t,e){e=n("div",e,null,t,null);return e.innerHTML=i(t.text),e},heading:function(t){var e=n("h"+t.heading,"heading",null,t,null);return e.innerHTML=i(t.text),e},containers:function(t){return n("div","container",null,t,null)},labels:function(t){return"number"==typeof t.heading&&1<=t.heading&&t.heading<=6?T.heading(t):T.text(t,"label")},images:function(t,e){if(null==t.imageUrl||""===t.imageUrl)throw lpTag.log("lpJsonToDom, bad imageUrl :"+t.imageUrl,"ERROR","JSON2DOM"),new Error("invalid data exception");return n("img",e="peel"!==e&&"closeButton"!==e&&"slideOutPin"!==e?"image":e,{src:u(t.imageUrl)},t,null)},buttons:function(t){return t.isClickable=!0,T.text(t,"button")},closeButtons:function(t,e){t.isClickable=!0;t=T.images(t,"closeButton");return t.setAttribute("data-LP-event","close"),t},peels:function(t){var e=T.containers(t),t=T.images(t,"peel");return e.appendChild(t),e},iframes:function(t){var e=p();return n("iframe","iframe",{name:e,frameBorder:0,height:t.css.height,width:t.css.width,scrolling:"no",marginheight:0,marginwidth:0,allowTransparency:!0},t,e)},slideOutPins:function(t){return delete t.alt,T.images(t,"slideOutPin")}};function i(t){return(t=>{var e,n="";if(void 0!==t&&null!=t)for(var i=0;i{var e,n=[];if(void 0!==m&&void 0!==m.length){for(var i=0;i")).replace(/<br />/g,"
")}function y(t,e){t=t[v.ORDER],e=e[v.ORDER];return evoid 0!==lpTag.taglets.utils?lpTag.taglets.utils.extractBgImgUrl(t):t)(i))+'")'),r=a=o=void 0;var o=t,a=n,r=i;switch(a){case"borderRadius":o.style.borderRadius=r,o.style.MozBorderRadius=r,o.style.WebkitBorderRadius=r;break;case"borderTopLeftRadius":o.style.MozBorderRadiusTopleft=r,o.style.WebkitBorderTopLeftRadius=r;break;case"borderTopRightRadius":o.style.MozBorderRadiusTopright=r,o.style.WebkitBorderTopRightRadius=r;break;case"borderBottomLeftRadius":o.style.MozBorderRadiusBottomleft=r,o.style.WebkitBorderBottomLeftRadius=r;break;case"borderBottomRightRadius":o.style.MozBorderRadiusBottomright=r,o.style.WebkitBorderBottomRightRadius=r;break;case"transform":o.style.MozTransform=r,o.style.WebkitTransform=r,o.style.msTransform=r;break;default:o.style[a]=r}t.style[n]=i}}catch(t){lpTag.log("lpJsonToDom, invalid css ["+n+"; e:"+t+"]","ERROR","JSON2DOM")}var l}function c(t){return void 0!==lpTag.taglets.utils&&lpTag.taglets.utils.isNumeric(t)}function p(t){t="LPM"+t+"-"+(new Date).getTime()+"-"+e;return e++,t}function u(t){if(void 0!==lpTag.taglets.utils)return lpTag.taglets.utils.checkHttps(t)}return{version:"1.4",name:"lpJsonToDom",init:function(){},convert:function(t,e,n,i){m=n;var o,a=[];if(void 0===t||null==t)throw lpTag.log("lpJsonToDom, invalid jsons","ERROR","JSON2DOM"),new Error("invalid data exception");for(o in t){var r=t[o];if(void 0===r||null==r)throw lpTag.log("lpJsonToDom, bad value","ERROR","JSON2DOM"),new Error("invalid data exception");void 0===r.length&&(r=[r]);for(var l=0;l{o.lpTag=o.lpTag||{},lpTag.taglets=lpTag.taglets||{};var e=32,n=13;lpTag.taglets.utils={_V:"1.3",name:"utils",init:function(){},checkHttps:function(t){return t="https"==lpTag.protocol&&0!==t.indexOf("https")?"https"+t.substr(4):t},makeScriptCall:function(t,e){t=this.checkHttps(t);var n=document.createElement("script"),e=(n.setAttribute("type","text/javascript"),n.setAttribute("charset",e||"UTF-8"),n.setAttribute("src",t),document.getElementsByTagName("head"));e&&e.item(0).appendChild(n)},makeImgCall:function(t){t=this.checkHttps(t);var e=new Image;return e.src=t,e},decodeUri:function(e){try{return decodeURIComponent(e)}catch(t){return lpTag.log("err decoding string: "+e+"["+t+"]","ERROR","utils"),e}},isEmptyObj:function(t){for(var e in t)return!1;return!0},arrToObject:function(t){for(var e={},n=0;nfunction(){if(delete o[t],this.onload=null,r[t]={width:this.width,height:this.height},s.isEmptyObj(o)&&!l){l=!0,lpTag.log("preloading images complete","INFO","utils");try{e(!0,r)}catch(t){lpTag.log("error in preload callback ["+t+"]","ERROR","utils")}}})(n),a[i].onerror=(t=>function(){if(lpTag.log("error preloading image: "+t,"ERROR","utils"),!l){l=!0;try{e(!1)}catch(t){lpTag.log("error in preload callback ["+t+"]","ERROR","utils")}}})(n),a[i].src=this.checkHttps(n))},stopEventBubble:function(t){t=t||o.event;t&&(t.cancelBubble=!0,t.stopPropagation)&&t.stopPropagation()},geObjById:function(t){return document.getElementById?document.getElementById(t):!!document.all&&document.all(t)},isIE:function(){var t=(t=navigator.userAgent).toLowerCase();return null!=/(msie) ([\w.]+)/.exec(t)},isIE6:function(){var t=(t=navigator.userAgent).toLowerCase(),t=/(msie) ([\w.]+)/.exec(t);if(null!=t&&6==parseInt(t[2],10))return!0;return!1},waitForDocumentBody:function(t,e,n){var i;n=n||0,lpTag.log("in waitForDocumentBody......","INFO",this.name),document.body?t.call(e||o):(i=this,n<400?setTimeout(function(){n++,lpTag.log("Waiting for document.body. try: ("+n+"), time: ("+(new Date).getTime()+")","DEBUG",this.name),i.waitForDocumentBody(t,e,n)},50):lpTag.log("call callback on waitForDocumentBody failed. document.body not exist ","ERROR",this.name))},isQuirksMode:function(){return document.documentMode&&5==document.documentMode||"BackCompat"==document.compatMode?(lpTag.log("Quirks Mode == true","DEBUG","utils"),!0):(lpTag.log("Quirks Mode == false","DEBUG","utils"),!1)},getPageDimensions:function(){for(var t={totalHeight:null,totalWidth:null,windowHeight:null,windowWidth:null,verticalScroll:null,horizontalScroll:null},e=["Height","Width"],n=0;n{var e="prototype",n="baseOffer",i={IMPRESSION:"impDisplay",EXPANDED:"impExpanded",CLOSED:"impClose",TIMEOUT:"impTimeout",CLICK:"impAccept"},o="LP_OFFERS",a="OFFER_IMPRESSION",r="OFFER_EXPANDED",l="OFFER_CLOSED",s="OFFER_TIMEOUT",c="OFFER_CLICK",u="OFFER_ERROR",d="adminArea",g=lpTag.taglets.lpUnifiedWindow,p=lpTag.taglets.rendererStub,h={UNIFIED_WINDOW:0,CUSTOM:1,LEGACY:2},f={LINK:1,BUTTON:2,SEARCH_KEYWORD:3};function m(){return this.conf.channel===this.CHANNELS.CHAT}function v(t,e){t=((t,e,n)=>(t=I(t,e),n&&(t.actionableItem={id:n.id||"",itemType:f[n.type]?n.type:"",name:n.description||"",searchWord:n.searchKeywords||""}),e.multiChannelEngagementSelection&&(t.channel=e.multiChannelEngagementSelection),t))(i.CLICK,t,e);C.call(this,t)}function b(){var t={};return m.call(this)?(t.env="",t.domain=lpTag.csds.getDomain(d),t.params="height=650,width=330,menubar=no,resizable=no",t.target=("LiveEngageChat_"+lpTag.site).replace(/[^a-z0-9]/gi,"_"),"hc1"!==t.domain&&"hc1.dev.lprnd.net"!==t.domain||(t.domain="hc1.dev.lprnd.net",t.env="qa")):(t.params="menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes",t.target=E.call(this).target),t}function T(t,e,n,i,o){var a=function(){var t=h.LEGACY;return m.call(this)&&(this.conf.windowConf=this.conf.windowConf||{},this.conf.windowConf.json=this.conf.windowConf.json||{},"external app"===this.conf.windowConf.type&&this.conf.windowConf.json.externalConfiguration?t=h.CUSTOM:g&&"function"==typeof g.clicked&&(t=h.UNIFIED_WINDOW)),t}.call(this,e);h.CUSTOM===a?function(t,e,n,i){var o=this,e={configuration:this.conf.windowConf.json.externalConfiguration,args:p.getClickObject(t,e,n),errorCallback:function(){o.errorLog("Error while opening an external channel")}};try{lpTag.taglets.lpUtil.runCallbackByObject(e.configuration,e.args,e.errorCallback),v.call(this,t,i)}catch(t){this.errorLog("Exception while opening an external channel: "+t.message)}}.call(this,t,e,n,i):h.UNIFIED_WINDOW===a?function(t,e,n,i,o){o?g.startFlow(p.getClickObject(t,e,n)):(g.clicked(p.getClickObject(t,e,n)),v.call(this,t,i))}.call(this,t,e,n,i,o):function(t,e,n,i){var o=m.call(this)?function(t,e,n){var i="https://"+n.domain+"/hcp/lewindow/index.html?lpNumber="+lpTag.site+"&site="+lpTag.site+"&domain="+n.domain;n.env&&(i+="&env="+n.env);i=lpTag.taglets.lp_monitoringSDK.appendCtx(i),i=(i=(i+="&scid="+encodeURIComponent(t.contextId))+"&cid="+encodeURIComponent(t.campaignId))+"&eid="+encodeURIComponent(t.engagementId),e.skillName&&(i+="&skill="+encodeURIComponent(e.skillName));e.windowId&&(i+="&lewid="+encodeURIComponent(e.windowId));e.language&&(i+="&lang="+encodeURIComponent(e.language));return i}.call(this,t,e,n):E.call(this).url;switch(n.target){case"_self":v.call(this,t,i),o&&setTimeout(function(){window.location.href=o},50);break;case"_parent":case"_top":v.call(this,t,i),o&&window.open(o,n.target,n.params);break;default:o&&window.open(o,n.target||"_blank",n.params),v.call(this,this.engData,i)}}.call(this,t,e,n,i)}function y(t,e){lpTag.log(t+". offer: "+this.engData.tglName+". offerId="+this.offerId,e,n)}function E(){var t={target:"",url:""},e=function(t){return(this.conf.displayInstances||[])[t]||{_isInvalid:!0}}.call(this,this.engData.state);return e._isInvalid||e.events&&e.events.click&&e.events.click.enabled&&(t.target=e.events.click.target,t.url=e.events.click.url),t}function C(t,e){lpTag.sdes&&"function"==typeof lpTag.sdes.send&&t&&(e?lpTag.sdes.push(t):lpTag.sdes.send(t),this.infoLog("Sent SMT event: "+t.type+", campaignID: "+t.campaign+", engagementId: "+t.engId))}function I(t,e){return e&&t?{type:t,campaign:e.campaignId,engId:e.engagementId,revision:e.engagementRevision,eContext:[{type:"engagementContext",id:e.contextId}]}:null}t[e].CHANNELS={CHAT:1,CONTENT:100},t[e].init=function(t,e){this.offerId=t&&t.engagementId,this.engData=t,this.conf=e},t[e].onImpression=function(){C.call(this,I(i.IMPRESSION,this.engData)),this.trigger(a)},t[e].onTimeout=function(){C.call(this,I(i.TIMEOUT,this.engData)),this.trigger(s)},t[e].onClose=function(){C.call(this,I(i.CLOSED,this.engData)),this.trigger(l)},t[e].onError=function(){this.trigger(u)},t[e].onClick=function(t){v.call(this,this.engData,t),this.trigger(c,!0)},t[e].click=function(t){this.trigger(c,!0),T.call(this,this.engData,this.conf,b.call(this),t)},t[e].startChat=function(){T.call(this,this.engData,this.conf,b.call(this),null,!0)},t[e].onExpanded=function(t){C.call(this,((t,e,n)=>{var i,o=[],t=I(t,e);if(n){if(t.expanded=n.expanded,t.userInit=!1!==n.userInit,Array.isArray(n.actionableItems))for(var a=0;a{function g(t,e){t&&e&&this.init(t,e)}function n(){var e=g,t="prototype",n={0:"peeling",1:"overlay",2:"toaster",3:"slider",5:"overlay",6:"overlay"},i={0:!0,1:!0,2:!0,3:!1,5:!1,6:!1},o={HIDE:"HIDE",START:"START",ON_HIDE:"OFFER_HIDE",ON_DISPLAY:"OFFER_DISPLAY",ON_CLOSE:"OFFER_CLOSED",ON_REMOVE:"OFFER_REMOVE",DECLINED:"OFFER_DECLINED",MULTI_CHANNEL_SELECTION:"ENG_MULTI_CHANNEL_SELECTION"},l=lpTag.taglets.utils,a={0:{horizontal:"custom",vertical:"custom"},1:{horizontal:"left",vertical:"top"},2:{horizontal:"center",vertical:"top"},3:{horizontal:"right",vertical:"top"},4:{horizontal:"left",vertical:"middle"},5:{horizontal:"center",vertical:"middle"},6:{horizontal:"right",vertical:"middle"},7:{horizontal:"left",vertical:"bottom"},8:{horizontal:"center",vertical:"bottom"},9:{horizontal:"right",vertical:"bottom"},10:{horizontal:"left",vertical:"top"},11:{horizontal:"left",vertical:"bottom"}};function r(t){return t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t}function s(t){if(t)for(var e=0;e{var e,n=[],i=t,o=n;for(e in i.background&&i.background.image&&(i.background.image=c(i.background.image,!0),o.push(i.background.image)),t.elements)for(var a=t.elements[e]||[],r=0;r{if(t&&t.activeState&&t.activeState.elements)return d((t=t.activeState.elements).buttons)||d(t.images)})(this)?"auto":"pointer"),n},e[t].setInvalid=function(t){this.errorLog("Invalid data ["+t+"]"),this._isInvalid=!0},e[t].bindCommonEvents=function(){var t;"function"!=typeof this.cleanupOffer||this.conf.channel!==this.CHANNELS.CHAT||this.parentContainer||(t=this.bind(o.HIDE,this.cleanupOffer),this.eventIds.push(t))},e[t].cleanupOffer=function(){this.errorLog("cleanupOffer must be implemented")},e[t].extendObj=l.extendObj,e[t].addElements=function(t,e,n){this.appendJson(t,e,this.createEventCallbacks(n));e=t.querySelector('[data-LP-event="close"]');return e&&this.setCloseEvents(e),t},e[t].appendJson=function(t,e,n){if(t&&t.appendChild)for(var i=this.convertJsonToDom(e,n)||[],o=0;o