(function( blueConic, undefined ) {var ps='https://plugins.blueconic.net/';var pf='/gallery/';(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.BCClass=function(){};BCClass.extend=function(g){var f=this.prototype;a=true;var e=new this();a=false;for(var d in g){e[d]=typeof g[d]=="function"&&typeof f[d]=="function"&&b.test(g[d])?(function(h,i){return function(){var k=this._super;this._super=f[h];var j=i.apply(this,arguments);this._super=k;return j}})(d,g[d]):g[d]}function c(){if(!a&&this.init){this.init.apply(this,arguments)}}c.prototype=e;c.constructor=c;c.extend=arguments.callee;return c}})();var InteractionType=BCClass.extend({init:function(a){},getPreloadProperties:function(){return[]},getContent:function(){},onEvent:function(){},importLibraries:function(c){var e=[];var a=[];if(!c||c.length===0){return}for(var b=0;b<c.length;b++){var d=c[b];if(d&&d.sharing==="none"){e.push(d.url)}else{a.push(d.url)}}blueConic.fn.importLibraries.call(this,e);blueConic.fn.importAndCacheLibraries.call(this,a)}});(function(){ var InteractionTypeImpl;(()=>{"use strict";var t,e,i,o,a,r={d:(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},n={};r.d(n,{default:()=>E}),(a=t||(t={})).SEGMENT="segment",a.LIFECYCLE="lifecycle",a.PROPERTY="property",a.TEXT="text",a.STORE="store",a.EMPTY="empty",a.GROUP="group",a.TIMELINE_EVENT="timelineEvent",a.EXPORT_DATA_PROCESSOR="exportDataPreprocessor",a.GROUP_PROPERTY="groupProperty",(o=e||(e={})).FIXED="fixed",o.SEGMENT="segment",o.SEGMENTS="segments",o.LIFECYCLES="lifecycles",o.PROPERTY="property",o.UNIQUE_PROPERTY="uniqueproperty",o.GROUP_PROPERTY="groupProperty",o.PROPERTY_SOURCE_TENANT="propertySourceTenant",o.GROUP_ID="groupId",o.TEXT="text",o.STORE="store",o.PROFILE_ID="profileid",o.PERMISSION="permission",o.ALL_INTERACTIONS="allInteractions",o.PAGEVIEW_INTERACTIONS="pageviewInteractions",o.TIMELINE_EVENT_TYPE="timeline_event_type",o.TIMELINE_EVENT="timelineEvent",o.TIMELINE_EVENT_CLEANROOM="timelineEventCleanroom",o.TIMELINE_DATE_ID="timelineDateId",o.TIMELINE_EVENT_ID="timelineEventId",o.TIMELINE_PROPERTY="timelineProperty",o.PLUGIN="plugin",o.EXPORT_DATA_PROCESSOR="exportDataPreprocessor",function(t){t.SET_OR_CLEAR="setOrClear",t.ADD="add",t.SUM="sum",t.SET_IF_EMPTY="setIfEmpty",t.SET="set"}(i||(i={}));const s=Object.freeze({SETUP:"setup",IMPORT:"import",EXPORT:"export"}),l=(Object.freeze({SINGLE:"single",MULTIPLE:"multiple"}),"dlpf");class E extends InteractionType{init(t,e){this.blueConicClient=t,this.context=e||null,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.interactionId=this.context.getInteractionId(),this.objectName=this.getObjectName(this.parameters.goalParameters),this.createDatalayer=this.getDatalayerCreateOption(this.parameters.goalParameters),this._goals=[];const i=e.getGoals().reduce((function(t,e){return t[e.getId()]=!0,t}),{});if(this.parameters.goalParameters)for(const e of this.parameters.goalParameters){const o=t.json.parse(e);o.active&&i[o.id]&&this._goals.push(o)}this.connectionContext={LAST_PUSH_PROPERTY:l+"lt"+this.context.getInteractionId(),VARIABLE_STATE_PUSH_PROPERTY:l+"st"+this.context.getInteractionId(),profile:this.profile,variables:[],SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",RECEIVED_FROM_SYSTEM_PROPERTY:"received_from_system",RECEIVED_FROM_CONNECTION_PROPERTY:"received_from_connection"}}getObjectName(t){var e;const i=this.getSetupGoal(t);return(null===(e=null==i?void 0:i.state)||void 0===e?void 0:e.objectname)||"dataLayer"}getDatalayerCreateOption(t){var e;const i=this.getSetupGoal(t);return Boolean(null===(e=null==i?void 0:i.state)||void 0===e?void 0:e.createDatalayer)}getSetupGoal(t){var e;return null===(e=t.map((t=>JSON.parse(t))).filter((t=>t.categoryId===s.SETUP)))||void 0===e?void 0:e[0]}initDataLayerUtil(){this.bcConnectionUtil.md5Lib=this.md5,this._bcDatalayerUtil=new this.BlueConicDataLayerUtility(this.objectName,this.blueConicClient,this.bcConnectionUtil,this.context,this.connectionContext,this.profile),this._bcDatalayerUtil.LAST_PUSH_PROPERTY=l+"lt"+this.context.getInteractionId(),this._bcDatalayerUtil.VARIABLE_STATE_PUSH_PROPERTY=l+"st"+this.context.getInteractionId();const t=this;this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){t._bcDatalayerUtil.stopDataLayerInspection()}))}onLoad(){return new Promise((t=>{this.initDataLayerUtil();let e=0;this.createDatalayer&&this._bcDatalayerUtil.createDatalayer();const i=async()=>{if(this._bcDatalayerUtil.getDataLayer())await this._handleGoals(),t();else{if(e>20)return void t();e++,window.setTimeout(i,250)}};i.call(this)}))}async loadTimelineEventTypes(){var t;const e=[],i=this.blueConicClient.getRestEndpoint(this.context.getInteractionTypeId())+"/timelineEventTypePropertyTypes";for(const i of this._goals)i.categoryId===s.IMPORT&&(null===(t=i.state.importEventMapping)||void 0===t?void 0:t.length)&&e.push(...i.state.importEventMapping.map((t=>t.eventTypeId)));await this._bcDatalayerUtil.loadTimelineEventTypeProperties(e,i)}async _handleGoals(){var t;await this.loadTimelineEventTypes();for(const e of this._goals){const i=null===(t=null==e?void 0:e.state)||void 0===t?void 0:t.segment;this._bcDatalayerUtil.visitorInSegment(i)&&(e.categoryId===s.EXPORT&&this._handleExportGoal(e.state,e.id),e.categoryId===s.IMPORT&&this._handleImportGoal(e.state,e.id))}}_handleImportGoal(t,e){this._bcDatalayerUtil.getDataLayer()&&this._bcDatalayerUtil.doImport(t,e)}_handleExportGoal(t,e){this._bcDatalayerUtil.doExport(t,e)}_addPreloadPropertiesFromGoal(t,e){if(t.categoryId===s.EXPORT){e.push(`${l}st${this.context.getInteractionId()}_${t.id}`,`${l}lt${this.context.getInteractionId()}_${t.id}`);for(const i of t.state.exportMapping)this._addPreloadPropertiesFromExportMapping(i,e)}else if(t.categoryId===s.IMPORT)for(const i of t.state.importMapping)this._addPreloadPropertiesFromImportMapping(i,e)}_addPreloadPropertiesFromImportMapping(t,e){t.to.values.length>0&&e.push(t.to.values[0].id)}_addPreloadPropertiesFromExportMapping(e,i){e.from.dataType===t.PROPERTY&&e.from.values.length>0&&i.push(e.from.values[0].id)}getPreloadProperties(){const t=[this.connectionContext.SENT_TO_SYSTEM_PROPERTY,this.connectionContext.SENT_TO_CONNECTION_PROPERTY,this.connectionContext.RECEIVED_FROM_SYSTEM_PROPERTY,this.connectionContext.RECEIVED_FROM_CONNECTION_PROPERTY];for(const e of this._goals)this._addPreloadPropertiesFromGoal(e,t);return t}}InteractionTypeImpl=n.default})();var a = [];var i='connection_datalayer';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.1.5/web/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.1.5/web/node_modules/@blueconic/datalayer-library/dist/index.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.1.5/web/src/web/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.1.5/'}]);})();(function(){ var inactivityConnection={init:function(t,e){this.blueConicClient=t,this.context=e,this.profile=this.blueConicClient.profile.getProfile(),this.parameters=this.context.getParameters()},getPreloadProperties:function(){return(this.parameters.goalParameters?this.parameters.goalParameters:[]).map(function(t){return this.blueConicClient.json.parse(t)},this).filter(function(t){return t.active}).reduce(function(t,e){return e.parameters.mapping.forEach(function(e){t.push(e.inactivityProperty),t.push(e.lastModifiedProperty)}),t},[]).filter(function(t){return t})},onLoad:function(){var t=this.blueConicClient.getChannelId(),e=this.parameters.goalParameters?this.parameters.goalParameters:[];e=e.map(function(t){return this.blueConicClient.json.parse(t)},this).filter(function(t){return t.active}).filter(function(e){return 0===e.parameters.channels.length||-1!==e.parameters.channels.indexOf(t)});var i=!1;e.forEach(function(t){t.parameters.mapping.forEach(function(t){t.inactivityProperty&&t.lastModifiedProperty&&(parseInt(this.profile.getValue(t.lastModifiedProperty))>parseInt(this.profile.getValue(t.inactivityProperty))&&(this.profile.setValues(t.inactivityProperty,[]),i=!0))},this)},this),i&&this.blueConicClient.profile.updateProfile()}};try{var InteractionTypeImpl=InteractionType.extend(inactivityConnection)}catch(t){try{module.exports=inactivityConnection}catch(t){}};var a = [];var i='connection_inactivity';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.1/'}]);})();(function(){ !function(){var t=null,e=null,i=null,n=null,o=null;window.InteractionTypeImpl=InteractionType.extend({init:function(t,e){this.blueConicClient=t,this.context=e,this.parameters=this.context.getParameters(),this.customCssElements=[],this.customJsElements=[],this.isInEditMode=this.blueConicClient.isInEditMode(),this._temporyLocation=null,this._contentElement=null,this._openedOnce=!1,this._resetTimeoutId=0,this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId())},onLoad:function(){t=window._bcp.notificationBar.Enums.FLOW_TYPE,e=window._bcp.notificationBar.Enums.POSITION,i=window._bcp.notificationBar.Enums.ENTER_ANIMATION,n=window._bcp.notificationBar.Enums.APPEAR_ON,o=window._bcp.notificationBar.Enums.CLOSE_POSITION,this.parseParameters(),this.isInEditMode&&(window._bcp.notificationBar.NotificationBarModern.prototype.close=function(){},window._bcp.notificationBar.NotificationBar.prototype.close=function(){});var r=this;this.loadCustomContent((function(t){if(t)return r.blueConicClient.util.log(t.message);r.addBlueConicEventHandlers()}))},parseParameters:function(){this.notificationBarHeight=parseInt(this.getParameter("height")),this.notificationBarHeight=isNaN(this.notificationBarHeight)?window._bcp.notificationBar.Constants.DEFAULT_HEIGHT:this.notificationBarHeight;var r=this.getParameter("location")||"top";this._position="top"===r?e.TOP:e.BOTTOM;var s=this.getParameter("close_position");if(this._closePosition="TOP_LEFT"===s?o.TOP_LEFT:"BOTTOM_RIGHT"===s?o.BOTTOM_RIGHT:o.TOP_RIGHT,this._closePadding=parseInt(this.getParameter("close_padding")),this._closePadding=isNaN(this._closePadding)?10:this._closePadding,document.body.style.animationName===undefined||!0===this.isInEditMode)this._enterAnimation=i.NONE;else switch(this.getParameter("effect")){case"slideIn":this._enterAnimation=i.SLIDE_IN;break;case"fadeIn":this._enterAnimation=i.FADE_IN;break;default:this._enterAnimation=i.NONE}var a=this.getParameters("selected_when");this._appearOnTriggers=[];for(var c=0;c<a.length;c++)switch(a[c]){case"triggerOn":this._appearOnTriggers.push(n.SCROLL_EVENT);break;case"scroll_depth":this._appearOnTriggers.push(n.SCROLL_DEPTH);break;case"click_selector":this._appearOnTriggers.push(n.ELEMENT_CLICKED);break;case"content_condition":this._appearOnTriggers.push(n.CONTENT_VISIBLE)}0===this._appearOnTriggers.length&&this._appearOnTriggers.push(n.PAGE_LOAD);var l=this.getParameter("location_type");this._type="scroll"===l?t.NON_STICKY:t.STICKY,this._useModernPosition=this.getParameter("use_modern_position")},addBlueConicEventHandlers:function(){this.blueConicClient.event.subscribe("closeoverlay",this,(function(t,e){e instanceof Array&&e[0]===this.context.getInteractionId()&&this.notificationBar.close()})),this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){this.notificationBar&&this.notificationBar.isVisible&&this.notificationBar.close()}))},loadCustomContent:function(t){t||(t=function(){});var e=this;this.callbackChain([this.createContentElement.bind(this),this.loadComplexObjects.bind(this),this.removeTempLocation.bind(this),this.loadCss.bind(this),this.loadCustomCss.bind(this)],(function(i){return i?t(i):(e.createNotificationBar(),e.setShowEventTrigger(),e.isInEditMode&&e.blueConicClient.event.publish("notificationBar.interactionLoaded",{interaction:e}),t())}))},callbackChain:function(t,e,i){var n=this;i||(i=0);try{t[i]((function(o){return o?e(o):i+1>=t.length?e(null):n.callbackChain(t,e,i+1)}))}catch(o){return e(o)}},createContentElement:function(t){return this._temporyLocation=document.createElement("div"),this._temporyLocation.style.display="none",document.body.appendChild(this._temporyLocation),this._contentElement=document.createElement("div"),this._contentElement=this.jQuery("<div></div>").html(this.getContent())[0],this._temporyLocation.appendChild(this._contentElement),t()},removeTempLocation:function(t){return document.body.removeChild(this._temporyLocation),t()},loadComplexObjects:function(t){this.jQuery(this._contentElement).find("div[data-bc-external]").html("");for(var e=this.jQuery(this._contentElement).find("div[data-bc-pluginid]"),i=0;i<e.length;i++){var n=e.eq(i),o=n.attr("data-bc-pluginid"),r=n.attr("data-bc-config");if(r)try{for(var s=r.match(/: *"(\\"|[^"])*\n(\\"|[^"])*"/g)||[],a=r,c=0;c<s.length;c++)a=a.replace(s[c],s[c].replace(/\n/g,"\\n"));r=this.blueConicClient.json.parse(a)}catch(d){console.error("Error parsing the config of the complex object:",d),r=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:r,node:n[0],interactionId:this.context.getInteractionId()}),this.isInEditMode||(n.removeAttr("data-bc-pluginid"),n.removeAttr("data-bc-config"))}if(0===e.length)return t();var l=0,h=setInterval((function(){if(0===e.length)return clearInterval(h),clearTimeout(l),t();for(var i=e.length-1;i>=0;i--)e.eq(i).html()&&e.splice(i,1)}),10);l=setTimeout((function(){return clearInterval(h),t({message:"Couldn't load the complex objects (timeout of 5000ms passed)."})}),5e3)},loadCss:function(t){var e=document.createElement("link");e.setAttribute("type","text/css"),e.setAttribute("rel","stylesheet"),e.onload=function(){t()};var i=this.baseURL;e.onerror=function(e){return t({message:"Error occurred loading the main css file ("+i+"frontend/src/css/notificationBar.css)",eventData:e})},this.jQuery("head").append(e),e.setAttribute("href",this.baseURL+"frontend/src/css/notificationBar.css")},loadCustomCss:function(t){var e=this,i=this.getParameter("styling_css"),n=this.getParameter("styling_css_inline");if(i){var o=document.createElement("link");o.setAttribute("type","text/css"),o.setAttribute("rel","stylesheet"),o.onload=function(){t()},o.onerror=function(n){return e.isInEditMode?(console.error("[BC] Loading the custom css failed for the following url: "+i),t()):t({message:"Loading the custom css failed for the following url: "+i,eventData:n})},this.customCssElements.push(this.jQuery(o)),this.jQuery("head").append(this.jQuery(o)),o.setAttribute("href",i)}if(n){n=n.replace(/&#xd;/gi,"");var r=this.jQuery("<style>"+n+"</style>");this.customCssElements.push(r),this.jQuery("head").append(r)}if("false"===this.getParameter("show_close")){var s=this.jQuery("<style>.bcpNotificationBarClose { display: none; }</style>");this.customCssElements.push(s),this.jQuery("head").append(s)}else if("true"===this.getParameter("custom_close")){var a=this.getParameter("close_icon"),c=this.getParameter("close_icon_hover"),l="";a&&(l+=".bcpNotificationBarCloseIcon {border-radius: 0;background-image: url("+a+");background-position: 0;background-size: contain;}.bcpNotificationBarCloseIcon:hover {background-position: 0;}"),c&&(l+=".bcpNotificationBarCloseIcon:hover {background-image: url("+c+");}");var h=this.jQuery("<style>"+l+"</style>");this.customCssElements.push(h),this.jQuery("head").append(h)}if(!i)return t()},resetCustomCss:function(){for(var t=0;t<this.customCssElements.length;t++){this.customCssElements[t].remove()}this.customCssElements=[]},triggerOnScrollDepth:function(){this.getTargetElement().scrollTop()/(this.jQuery(document).height()-this.getTargetElement().height())*100>=parseInt(this.getParameter("scroll_depth"))&&(this.getTargetElement().off("scroll.bcpNotificationBarTrigger"),this.triggerNotificationBar())},setShowEventTrigger:function(){for(var t=this,e=0;e<this._appearOnTriggers.length;e++)switch(this._appearOnTriggers[e]){case n.PAGE_LOAD:this.triggerNotificationBar();break;case n.SCROLL_EVENT:this.getTargetElement().off("scroll.bcpNotificationBarTriggerEvent").one("scroll.bcpNotificationBarTriggerEvent",(function(){t.triggerNotificationBar()}));break;case n.SCROLL_DEPTH:t.triggerOnScrollDepth(),this.getTargetElement().off("scroll.bcpNotificationBarTriggerDepth").on("scroll.bcpNotificationBarTriggerDepth",(function(){t.triggerOnScrollDepth()}));break;case n.ELEMENT_CLICKED:this.jQuery(this.getParameter("click_selector")).off("click.bcpNotificationBarTrigger").on("click.bcpNotificationBarTrigger",(function(){!1===t.notificationBar.isVisible&&t.triggerNotificationBar()}));break;case n.CONTENT_VISIBLE:this._addTriggerOnContentHandler(t.getParameter("content_condition"))}},_addTriggerOnContentHandler:function(t){var e=this,i=null,n=null,checkAndTriggerFunction=function(){e.jQuery(t).length>0&&e.jQuery(t).html().length>0&&(e.triggerNotificationBar(),i&&i.disconnect(),n&&clearInterval(n))};window.MutationObserver?(i=new MutationObserver(checkAndTriggerFunction)).observe(document.body,{childList:!0,subtree:!0}):n=setInterval(checkAndTriggerFunction,1e3),checkAndTriggerFunction()},triggerNotificationBar:function(){var t=parseInt(this.getParameter("delay")),e=this;function _trigger(){e.callbackChain([function(t){e._handleJavascript((function(i){return i&&!e.isInEditMode?t(i):(e._addInlineJavascript(),t())}))},e.notificationBar.show.bind(e.notificationBar),function(t){return!1===e._openedOnce&&(e._addFrontEndBindings(),e._addClickEventLogger(),e.blueConicClient.createEvent("VIEW",e.context.getInteractionId()),e._openedOnce=!0),!0===e.isInEditMode&&setTimeout((function(){e.notificationBar.scrollIntoView()}),1e3),t()}],(function(t){t&&console.error(t)}))}t&&!isNaN(t)&&!0!==this.isInEditMode||(t=0),0===t?_trigger():setTimeout(_trigger,1e3*t)},_addFrontEndBindings:function(){var t=this.jQuery(".bcpNotificationBarDontShowAgainLink"),e=this.jQuery(".bcpNotificationBarCloseButton"),i=this.jQuery(".bcpNotificationBarCloseIcon"),n=this;i.on("click",(function(){"true"===n.getParameter("hide_after_close")&&n.blueConicClient.doNotShowAgain(n.context.getInteractionId()),n.notificationBar.close()})),t.on("click",(function(t){t.preventDefault(),n.blueConicClient.doNotShowAgain(n.context.getInteractionId()),n.notificationBar.close()})),e.on("click",(function(){n.notificationBar.close()}))},_addClickEventLogger:function(){var t=this.getParameter("click_event_selector");if(t){var e=this;this.jQuery(t).off("click.bcpNotificationBar").one("click.bcpNotificationBar",(function(t){t&&t.target&&t.target.pathname&&t.target.hostname&&0===t.target.pathname.indexOf("/s/")&&-1!==t.target.hostname.indexOf("blueconic")||e.blueConicClient.createEvent("CLICK",e.context.getInteractionId())}))}},_addInlineJavascript:function(){var t=this.getParameter("javascript");if(t&&!this.isInEditMode){t=t.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+this.context.getInteractionId()+'"$2');var e=this.jQuery("<script>"+t+"<\/script>");try{e.appendTo(this.jQuery("body"))}catch(i){console.error(i)}}},_handleJavascript:function(t){var e=this.getParameters("javascript_urls")||[],i=this;if(0===e.length)return t();{var n=null,o=0;function scriptLoaded(){if(++o===e.length)return i.isInEditMode?t():t(n)}function scriptError(t){(n=n||{message:"[BC] Loading for the following javascript urls failed, notificationBar will not be shown.",urls:[]}).urls.push(t),scriptLoaded()}for(var r=0;r<e.length;r++){var s=e[r],a=document.createElement("script");a.setAttribute("src",s),a.onload=scriptLoaded,a.onerror=scriptError.bind(null,s),document.head.appendChild(a)}}},onSave:function(){return this.notificationBar.getContentHTML()},onMessageReceived:function(t){this.blueConicClient.event.publish("notificationBar.messageReceived",t)},getContent:function(){var t=this.getParameter("content");if(!t){var e="nl"===this.context.getLocale()?"nl":"default";t=window._bcp.notificationBar.Constants.HTML[e].content}return t},createNotificationBar:function(){"true"===this._useModernPosition?this.notificationBar=new window._bcp.notificationBar.NotificationBarModern(this.blueConicClient,this.context,this.jQuery,this._contentElement,{closePosition:this._closePosition,closePadding:this._closePadding,flowType:this._type,position:this._position,animationType:this._enterAnimation,height:this.notificationBarHeight,isInEditMode:this.isInEditMode}):this.notificationBar=new window._bcp.notificationBar.NotificationBar(this.blueConicClient,this.context,this.jQuery,this._contentElement,{closePosition:this._closePosition,closePadding:this._closePadding,flowType:this._type,position:this._position,animationType:this._enterAnimation,height:this.notificationBarHeight})},resetNotificationBar:function(){this.notificationBar.domModifier&&this.notificationBar.domModifier.reset(!1),this.jQuery(this.notificationBar._containerElement).remove(),this.resetCustomCss();var t=this;this.loadCustomCss((function(){t.createNotificationBar(),t.notificationBar.show(),!0===t.isInEditMode&&t.notificationBar.scrollIntoView()}))},getParameter:function(t){return this.parameters[t]&&this.parameters[t][0]?this.parameters[t][0]:null},getParameters:function(t){return this.parameters[t]?this.parameters[t]:[]},getTargetElement:function(){return document.documentElement.scrollHeight>jQuery(window).height()?this.jQuery(window):this.jQuery("body")}})}();var a = [];var i='dialogue_notification_bar';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.2/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_7_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.2/frontend/src/scripts/enumsAndConstants.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.2/frontend/src/scripts/elementModifier.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.2/frontend/src/scripts/domModifier.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.2/frontend/src/scripts/notificationBar.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.2/frontend/src/scripts/notificationBarModern.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.2/'},{ id : 'boolean', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'boolean/1.0.1/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.3/'},{ id : 'number', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'number/1.0.2/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,r){this.blueConicClient=e,this.context=r},getPreloadProperties:function(){return this.preloadProperties=[],this.context&&(this.preloadProperties=this.getProfilePropertiesFromParameters(this.context.getParameters())),this.preloadProperties},onLoad:function(){var e=this.context.getProfile(),r=this.context.getParameters(),t=this.jQuery,i=r.listener_rules?r.listener_rules[0]:r.listener_rules;if(i){i=this.blueConicClient.json.parse(i);var s=new this.RuleService(this.blueConicClient,e,t);s.applyRules(i),s.save()}},getProfilePropertiesFromParameters:function(e){var r=[],t=e.listener_rules?e.listener_rules[0]:e.listener_rules;if(!t)return r;t=this.blueConicClient.json.parse(t);for(var i=0;i<t.rules.length;i++){var s=t.rules[i];!s.profileproperty||"set_if_empty"!==s.addset&&"merge"!==s.addset||r.push(s.profileproperty[0].profileproperty)}return r}});var a = [];var i='enrichprofilebyvisitorbehavior';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.9/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_7_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.9/frontend/src/js/ruleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.9/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,r){this.blueConicClient=e,this.context=r,this.parameters=this.context.getParameters(),this.rules=this._migrate(this.parameters.version||1)},getPreloadProperties:function(){return this.preloadProperties=[],this.context&&(this.preloadProperties=this.getProfilePropertiesFromParameters()),this.preloadProperties},onLoad:function(){if(this.rules){var e=this.context.getProfile();new window.FormRuleService(this.blueConicClient,e,this.jQuery).applyRules(this.rules)}},getProfilePropertiesFromParameters:function(){if(this.rules){for(var e=[],r=0;r<this.rules.length;r++){var t=this.rules[r];t.profileProperty&&"set_if_empty"===t.addset&&e.push(t.profileProperty)}return e}},_migrate:function(e){var r=this.parameters.form_listener_rules?this.parameters.form_listener_rules[0]:this.parameters.form_listener_rules;return r=this.blueConicClient.json.parse(r),1===e&&(e=2,r=this._migrateToVersion2(r)),r},_migrateToVersion2:function(e){if(!e)return e;e=e.rules||e;for(var r=0;r<e.length;r++){e[r].id=e[r].id||e[r].identifier,delete e[r].identifier,e[r].profileproperty&&!e[r].profileProperty&&(e[r].profileProperty=e[r].profileproperty[0]&&e[r].profileproperty[0].profileproperty||"",delete e[r].profileproperty);var t=this._migrateConverterMappingsToVersion2(e[r]);t&&(e[r].converter.mappings=t)}return e},_migrateConverterMappingsToVersion2:function(e){if(e&&e.converter&&e.converter.mappings){for(var r=[],t=0;t<e.converter.mappings.length;t++){var i=e.converter.mappings[t];i&&i.original&&i.converted?r.push(i):r.push({id:i.identifier||i.id,original:i.o,converted:i.c})}return r}}});var a = [];var i='enrichprofilewithvisitorinput';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.6/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_7_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.6/frontend/src/node_modules/@blueconic/frontend-form-rule-service/formRuleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(t,n){this.blueConicClient=t,this.rules=[],this.timeouts=[];try{this.rules=this.blueConicClient.json.parse(n.getParameters().rules[0])}catch(i){}this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){this._unsubscribePositionListeners(),this._resetTimeouts(),this.onLoad()})),this._positionListeners=[]},onLoad:function(){for(var t=0;t<this.rules.length;t++){var n=this.rules[t];"click"===n.type?this._setClickBindings(n,!0):this._createEvent(n)}},_resetTimeouts:function(){this.timeouts.forEach((function(t){clearTimeout(t)})),this.timeouts=[]},_createEvent:function(t){var n=t.area.selectedoption,i=!1;if("selector"===n&&t.area.selector?(t.words&&this._contentMatchesWords(this._getContentForSelector(t),t.containsmatches,t.words)||t.anyWord&&this._getContentForSelector(t))&&(i=!0):"variable"===n&&t.area.variable?(t.words&&this._contentMatchesWords(this._getVariableValue(t.area.variable),t.containsmatches,t.words)||t.anyWord&&this._getVariableValue(t.area.variable))&&(i=!0):"customjs"===n&&t.area.customjs&&(t.words&&this._contentMatchesWords(this._getCustomJsValue(t.area.customjs),t.containsmatches,t.words)||t.anyWord&&this._getCustomJsValue(t.area.customjs))&&(i=!0),i){var s=0;t.delay&&!isNaN(parseInt(t.delay))&&(s=parseInt(t.delay));var r=setTimeout(function(){this.blueConicClient.createEvent(t.event.id)}.bind(this),s);this.timeouts.push(r)}},_setClickBindings:function(t,n){if(t.clickarea.selector){var i=this.jQuery,s=null;try{s=i(t.clickarea.selector)}catch(r){return void this.blueConicClient.util.log("Invalid click selector: "+r)}0===s.length?this.blueConicClient.position.subscribe(t.clickarea.selector,this,(function(){this._setClickBindings(t,!1)})):s.off("click."+t.id).on("click."+t.id,{clickRule:t},function(t){this.lastEvent=t;try{this._createEvent(t.data.clickRule)}catch(r){}}.bind(this)),n&&i(document).on("click",t.clickarea.selector,{clickRule:t},function(t){if(!this.lastEvent||this.lastEvent.originalEvent!==t.originalEvent)try{this._createEvent(t.data.clickRule)}catch(r){}}.bind(this))}},_contentMatchesWords:function(t,n,i){if(!t)return!1;for(var s=0;s<i.length;s++)if("contains"===n){if(-1!==t.indexOf(i[s].toLowerCase()))return!0}else if(t===i[s].toLowerCase())return!0;return!1},_getContentForSelector:function(rule){var selector=rule.area.selector,contentAreas=null;if(-1!==selector.indexOf("jQuery("))contentAreas=function(selector,jQuery){return eval("var jQuery = arguments[1]"),eval(selector)}(selector,this.jQuery);else try{contentAreas=this.jQuery(selector)}catch(e){this.blueConicClient.util.log("Invalid content selector: "+e)}if(contentAreas&&contentAreas instanceof this.jQuery&&contentAreas.length>0){var contentArr=[];return this.jQuery.each(contentAreas,function(t,n){var i=this.jQuery(n);i.attr("content")?contentArr.push(this._normalizeText(i.attr("content"))):i.attr("src")?contentArr.push(this._normalizeText(i.attr("src"))):contentArr.push(this._normalizeText(i.text()))}.bind(this)),contentArr.join().toLowerCase()}if("content"===rule.type){var subscription=this.blueConicClient.position.subscribe(selector,this,(function(){this._createEvent(rule)}));this._positionListeners.push(subscription)}},_unsubscribePositionListeners:function(){this._positionListeners&&this._positionListeners.forEach((function(t){this.blueConicClient.position.unsubscribe(t)})),this._positionListeners=[]},_getVariableValue:function(t){try{for(var n=t.split("."),i=window[n.shift()];n.length>0;)i=i[n.shift()];return i instanceof Array?i.join().toLowerCase():"object"==typeof i||"function"==typeof i?this.blueConicClient.json.stringify(i):i?(""+i).toLowerCase():null}catch(s){return null}},_getCustomJsValue:function(customjs){try{var value=function(customjs,jQuery){return eval("var jQuery = arguments[1]"),eval("var $ = arguments[1]"),eval(customjs)}(customjs,this.jQuery);return value&&value instanceof Object&&(value=this._stringify(value)),value?(""+value).toLowerCase():null}catch(e){return null}},_stringify:function(t){try{return this.blueConicClient.json.stringify(t)}catch(i){var n=[];return JSON.stringify(obj,(function(t,i){if("object"==typeof i&&null!==i){if(-1!==n.indexOf(i))return;n.push(i)}return i}))}},_normalizeText:function(t){return t?t.replace(/^\s+|\s+$/g,"").replace(/\r\n+|\r+|\n+/gi,"").replace(/\s+/gi," "):t}});var a = [];var i='eventtrigger';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_7_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b,this.parameters=this.context.getParameters()},_ouibounce:function(){var a=this,b="sensitivity",c="delay";this.ouibounce({aggressive:!0,timer:0,sensitivity:this.parameters[b]?parseInt(this.parameters[b][0]):20,delay:this.parameters[c]?parseInt(this.parameters[c][0]):0,callback:function(){window.blueConicClient&&window.blueConicClient.exitIntentThrown||a.blueConicClient.createEvent("exitintent"),window.blueConicClient&&(window.blueConicClient.exitIntentThrown=!0)}})},onLoad:function(){this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){window.blueConicClient&&window.blueConicClient.exitIntentThrown&&(window.blueConicClient.exitIntentThrown=!1,this._ouibounce())}),this._ouibounce()}});var a = [];var i='exitintent';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.5/js/ouibounce.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.5/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({_timeout:null,_timestamp:null,_interval:200,init:function(t,e){this.blueConicClient=t,this.context=e||null},onLoad:function(){var t=this;this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(e,i){this._setTimestamp(),clearTimeout(t._timeoutID),t._timeoutID=setTimeout((function(){t._checkTimeout()}),t._interval)})),this._setTimestamp();var e,i=this.context.getParameters(),n="true"===i.clicks[0],o="true"===i.inputs[0];if(e=!i.scrolling||"true"===i.scrolling[0],this._timeout=i.timeout[0],this._timeout?isNaN(parseInt(this._timeout))||(this._timeout=1e3*parseInt(this._timeout)):this._timeout=6e4,n||o||e){if(n&&document.addEventListener("click",(function(){t._setTimestamp()})),o){var c=document.querySelectorAll("input"),s=document.querySelectorAll("textarea"),u=document.querySelectorAll("select");Array.prototype.forEach.call(c,(function(e){e.addEventListener("keyup",(function(){t._setTimestamp()}))})),Array.prototype.forEach.call(c,(function(e){e.addEventListener("change",(function(){t._setTimestamp()}))})),Array.prototype.forEach.call(s,(function(e){e.addEventListener("keyup",(function(){t._setTimestamp()}))})),Array.prototype.forEach.call(u,(function(e){e.addEventListener("change",(function(){t._setTimestamp()}))}))}e&&window.addEventListener("scroll",(function(){t._setTimestamp()})),this._timeoutID=setTimeout((function(){t._checkTimeout()}),t._interval)}},_handleInactivity:function(){this.blueConicClient.createEvent("inactivity")},_checkTimeout:function(){var t=(new Date).getTime(),e=this;t-this._timestamp>this._timeout?this._handleInactivity():e._timeoutID=setTimeout((function(){e._checkTimeout()}),e._interval)},_setTimestamp:function(){this._timestamp=(new Date).getTime()}});var a = [];var i='inactivitylistener';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({EVENT_NAME:"adblock_detected",init:function(e,t){this.blueConicClient=e,this.context=t},getPreloadProperties:function(){var e=this.context.getParameters(),t=e.property?e.property[0]:e.property;return t?[t]:[]},onLoad:function(){var e=this,t=this.context.getProfile(),n=this.context.getParameters(),o=n.property?n.property[0]:n.property;o||(o=this.EVENT_NAME);var adBlockNotDetected=function(){"no"!==t.getValue(o)&&(t.setValue(o,"no"),e.blueConicClient.profile.updateProfile())},r=window.navigator.userAgent;/MSIE|Trident/.test(r)?adBlockNotDetected():justDetectAdblock.detectAnyAdblocker().then((function(n){n?("yes"!==t.getValue(o)&&(t.setValue(o,"yes"),e.blueConicClient.profile.updateProfile()),e.blueConicClient.createEvent(e.EVENT_NAME)):adBlockNotDetected()}))}});var a = [];var i='listener_adblock';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/frontend/src/lib/just-detect-adblock.min.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/'}]);})();(function(){ var MARKETING_ET="marketing_data_layer",APPLICATION_ET="application_data_layer",APPLICATION_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","ACORID","Application_ID","MerchantID","PageName","PageSubFlow","sitecode","ApprovalCode","CreditLimit"],MARKETING_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","PageName","offerIds"],CLIENT_NAME_ATTR="ClientName",CALCULATED_CLIENT_NAME_ATTR="Calculated_ClientName",PAGE_KIND_ATTR="PageKind",PAGE_KIND_PREQUAL="prequal",PAGE_KIND_APPLY="apply",PAGE_KIND_SECURED_INSTALLMENT="secured_installment",PAGE_KIND_PREQUAL_SECURED_INSTALLMENT="prequal_secured_installment",PAGE_KIND_APPLY_LOAN="applyloan",PAGE_KIND_OFFER_PERSIST="offerPersist",ACTION_ATTR="action",APP_TYPE_ATTR="appType",DATE_STAMP_ATTR="DateTimestamp",URL_ATTR="URL",PAGE_NAME_ATTR="PageName",PAGE_FUNCTION_ATTR="PageFunction",PAGE_SUB_FUNCTION_ATTR="PageSubFunction",DSA_TOKEN_ATTR="dsaToken",CREDIT_LIMIT_ATTR="CreditLimit",OFFER_EXPIRATION_DATE_ATTR="OfferExpirationDate",CLIENT_MID_ATTR="ClientMID",REASON_CODE_ATTR="ReasonCode",REASON_CODE_A_ATTR="Reason_Code_A",RESPONSE_CODE_ATTR="ResponseCode",APPROVAL_CODE_ATTR="ApprovalCode",OFFER_PERSIST_DL_ATTR=["ABTestname","ACORID","Application_ID","ClientMID","CustomerType","DeclineReason","JSID","Market","MerchantId","OfferExpirationDate","OrgChannel","OrgFlow","PageSubFunction","PrefillType","Program","ReasonCode","ResponseCode","Result","SiteIdentifier","Token","dsaToken","platformToken","promo","sitecode","ApprovalCode","ClientName","Country_Language","CreditLimit","PNL","PageFunction","PageKind","PageName","PageSubFlow","Product"],FIRST_NAME_ATTR="FirstName",LAST_NAME_ATTR="LastName",EMAIL_ADDRESS_ATTR="EmailAddress",IS_BAD_EMAIL_ATTR="IsBadEmail",PREFILL_ATTR="Prefill",APPLICATION_SESSION_ID_ATTR="ApplicationSessionID",DUMMY_PROFILE_KEY_ATTR="DummyProfileKey",ADDRESS1_ATTR="Address1",ADDRESS2_ATTR="Address2",CITY_ATTR="City",STATE_ATTR="State",ZIP_CODE_ATTR="ZipCode",PHONE_NUMBER_ATTR="PhoneNumber",OFFER_EXPIRES_ATTR="OfferExpires",CAL_OFFER_EXPIRES_ATTR="CAL_OfferExpires",VEHICLE_TYPE_ATTR="VehicleType",VEHICLE_MAKE_ATTR="VehicleMake",VEHICLE_YEAR_ATTR="VehicleYear",VEHICLE_MODEL_ATTR="VehicleModel",LANDING_PAGE_NAMES=["auto_fill_invitation"],START_PAGE_NAMES=["prequal_offer","apply options","Termsandconditions","your information"],PREQUAL_START_PAGE_NAMES=["your information"],PREQUAL_DECLINED_PAGE_NAMES=["prequal_offer_declined"],PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES=["your information"],COMPLETE_PAGE_NAMES=["complete approve"],PENDING_PAGE_NAMES=["complete pending"],DECLINED_PAGE_NAMES=["complete decline"],PREQUAL_COMPLETE_PAGE_NAMES=["complete approve","complete pending","complete decline","dApply_start_error"],PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES=["prequal_offer"],PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES=["prequal_offer_declined"],YOUR_INFORMATION_PAGE_NAME="your information",INFORMATION_REVIEW_PAGE_NAME="review",PREQUAL_OFFER_PAGE_NAME="prequal_offer",PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAME="prequal_offer_declined",COMPLETE_PAGE_NAME="complete approve",PENDING_PAGE_NAME="complete pending",DECLINED_PAGE_NAME="complete decline",DAPPLY_START_ERROR_PAGE_NAME="dApply_start_error",VEHICHLE_PAGE_NAME="product info",OFFER_PERSIST_REVIEW_OFFER_PAGE_NAME="review_prequalified_offer",OFFER_PERSIST_ELIGIBILITY_FAILURE_PAGE_NAME="eligibility_failure",PREFILLED_PAGE_SUB_FUNCTION="prefilled",PII_INTERNAL_PROPERY="_dll_pii",VEHICHLE_INFO_INTERNAL_PROPERTY="_vehichle_info",TIME_MILLS_DAY=864e5,MINUTES_TO_MILLS=6e4,APPLICATION_SESSION_ID_COOKIE_NAME="_bcasid",APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME="_bcasid_ts";window._dataLayerListenerEventsCache=window._dataLayerListenerEventsCache||{};var frontendListener={init:function(e,r){this.blueConicClient=e,this.context=r,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.dataLayerName=this.parameters.dataLayerName?this.parameters.dataLayerName[0]:"_SFDDL",this.timelineEventType=this.parameters.timelineEventType?this.parameters.timelineEventType[0]:MARKETING_ET,this.clientNames=this.parameters.clientName?this.parameters.clientName:[],this.calculatedClientNames=this.parameters.calculatedClientNames?JSON.parse(this.parameters.calculatedClientNames[0]):{},this.selectedPageKind=this.parameters.selectedPageKind?this.parameters.selectedPageKind:[],this.lastUpdateTimeProperty=this.parameters.lastUpdateTimeProperty?this.parameters.lastUpdateTimeProperty[0]:null,this.emailProperty=this.parameters.emailProperty?this.parameters.emailProperty[0]:null,this.approvalCodeProperty=this.parameters.approvalCodeProperty?this.parameters.approvalCodeProperty[0]:null,this.appStartProperty=this.parameters.appStartProperty?this.parameters.appStartProperty[0]:null,this.appPendingProperty=this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:null,this.appCompleteProperty=this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:null,this.appDeclinedProperty=this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:null,this.appFraudProperty=this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:null,this.appErrorProperty=this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:null,this.agreeAndAcceptProperty=this.parameters.agreeAndAcceptProperty?this.parameters.agreeAndAcceptProperty[0]:null,this.prequalAppStartProperty=this.parameters.prequalAppStartProperty?this.parameters.prequalAppStartProperty[0]:null,this.prequalAppPendingProperty=this.parameters.prequalAppPendingProperty?this.parameters.prequalAppPendingProperty[0]:null,this.prequalAppCompleteProperty=this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:null,this.prequalAppPendingProperty=this.parameters.prequalAppPendingProperty?this.parameters.prequalAppPendingProperty[0]:null,this.prequalAppDeclinedProperty=this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:null,this.prequalAppErrorProperty=this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:null,this.prequalNotInterestedProperty=this.parameters.prequalNotInterestedProperty?this.parameters.prequalNotInterestedProperty[0]:null,this.prequalSecuredInstallmentAppStartProperty=this.parameters.prequalSecuredInstallmentAppStartProperty?this.parameters.prequalSecuredInstallmentAppStartProperty[0]:null,this.prequalSecuredInstallmentAppPendingProperty=this.parameters.prequalSecuredInstallmentAppPendingProperty?this.parameters.prequalSecuredInstallmentAppPendingProperty[0]:null,this.prequalSecuredInstallmentAppCompleteProperty=this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:null,this.prequalSecuredInstallmentAppDeclinedProperty=this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:null,this.prequalSecuredInstallmentAppErrorProperty=this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:null,this.securedInstallmentAppStartProperty=this.parameters.securedInstallmentAppStartProperty?this.parameters.securedInstallmentAppStartProperty[0]:null,this.securedInstallmentAppPendingProperty=this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:null,this.securedInstallmentAppCompleteProperty=this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:null,this.securedInstallmentAppDeclinedProperty=this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:null,this.securedInstallmentAppFraudProperty=this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:null,this.securedInstallmentAppErrorProperty=this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:null,this.applyLoanAppStartProperty=this.parameters.applyLoanAppStartProperty?this.parameters.applyLoanAppStartProperty[0]:null,this.applyLoanAppPendingProperty=this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:null,this.applyLoanAppCompleteProperty=this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:null,this.applyLoanAppDeclinedProperty=this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:null,this.applyLoanAppFraudProperty=this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:null,this.applyLoanAppErrorProperty=this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:null,this.offerPersistReviewOfferProperty=this.parameters.offerPersistReviewOfferProperty?this.parameters.offerPersistReviewOfferProperty[0]:null,this.offerPersistNotFoundExpProperty=this.parameters.offerPersistNotFoundExpProperty?this.parameters.offerPersistNotFoundExpProperty[0]:null,this.offerPersistEligibilityFailureProperty=this.parameters.offerPersistEligibilityFailureProperty?this.parameters.offerPersistEligibilityFailureProperty[0]:null,this.offerPersistPrequalOfferProperty=this.parameters.offerPersistPrequalOfferProperty?this.parameters.offerPersistPrequalOfferProperty[0]:null,this.offerPersistPrequalOfferDeclineProperty=this.parameters.offerPersistPrequalOfferDeclineProperty?this.parameters.offerPersistPrequalOfferDeclineProperty[0]:null,this.offerPersistCompleteApproveProperty=this.parameters.offerPersistCompleteApproveProperty?this.parameters.offerPersistCompleteApproveProperty[0]:null,this.offerPersistCompletePendingProperty=this.parameters.offerPersistCompletePendingProperty?this.parameters.offerPersistCompletePendingProperty[0]:null,this.offerPersistCompleteDeclineProperty=this.parameters.offerPersistCompleteDeclineProperty?this.parameters.offerPersistCompleteDeclineProperty[0]:null,this.offerPersistDapplyStartErrorProperty=this.parameters.offerPersistDapplyStartErrorProperty?this.parameters.offerPersistDapplyStartErrorProperty[0]:null,this.prequalEmailOfferClickProperty=this.parameters.prequalEmailOfferClickProperty?this.parameters.prequalEmailOfferClickProperty[0]:null,this.offerPersistNotInterestedClickProperty=this.parameters.offerPersistNotInterestedClickProperty?this.parameters.offerPersistNotInterestedClickProperty[0]:null,this.timeline={results:{events:[]}}},getPreloadProperties:function(){return[PII_INTERNAL_PROPERY,VEHICHLE_INFO_INTERNAL_PROPERTY,this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:"",this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:"",this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:"",this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:"",this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:"",this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:"",this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:"",this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:"",this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:"",this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:"",this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:"",this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:"",this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:"",this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:"",this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:"",this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:"",this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:"",this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:"",this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:"",this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:"",this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:"",this.parameters.offerPersistReviewOfferProperty?this.parameters.offerPersistReviewOfferProperty[0]:"",this.parameters.offerPersistNotFoundExpProperty?this.parameters.offerPersistNotFoundExpProperty[0]:"",this.parameters.offerPersistEligibilityFailureProperty?this.parameters.offerPersistEligibilityFailureProperty[0]:"",this.parameters.offerPersistPrequalOfferDeclineProperty?this.parameters.offerPersistPrequalOfferDeclineProperty[0]:"",this.parameters.offerPersistCompleteApproveProperty?this.parameters.offerPersistCompleteApproveProperty[0]:"",this.parameters.offerPersistCompletePendingProperty?this.parameters.offerPersistCompletePendingProperty[0]:"",this.parameters.offerPersistCompleteDeclineProperty?this.parameters.offerPersistCompleteDeclineProperty[0]:"",this.parameters.offerPersistDapplyStartErrorProperty?this.parameters.offerPersistDapplyStartErrorProperty[0]:"",this.parameters.prequalEmailOfferClickProperty?this.parameters.prequalEmailOfferClickProperty[0]:"",this.parameters.offerPersistNotInterestedClickProperty?this.parameters.offerPersistNotInterestedClickProperty[0]:""].filter(function(e){return""!==e})},onLoad:function(){if(this.dataLayerName&&this.timelineEventType){var e=this,r=0;(function t(){if(e._getDataLayer())e._monitorDataLayerUpdates();else{if(r>20)return;r++,window.setTimeout(t,250)}}).call(this)}},_monitorDataLayerUpdates:function(){var e=this._getDataLayer(),r=(e.length,this._getDataHash(e)),t=this;this.pollingInterval=window.setInterval(function(){var e=t._getDataLayer(),i=t._getDataHash(e);r!==i&&(t._importFromDataLayer(e),e.length,r=i)},1e3),this._importFromDataLayer(e)},_getDataLayer:function(){if(!this._dataLayer){for(var e=this.dataLayerName.split("."),r=window,t=0;t<e.length;t++)r=r&&r[e[t]]?r[e[t]]:null;this._dataLayer=r}return this._dataLayer},_getDataHash:function(e){var r=this._getDataString(e);return r?this.md5(r):null},_getDataString:function(e){var r=null;try{r=JSON.stringify(e)}catch(t){r=this._stringify(e)}return r},_stringify:function(e){var r=[],t=JSON.stringify(e,function(e,t){if("object"==typeof t&&null!==t){if(-1!==r.indexOf(t))return;r.push(t)}return t});return r=null,t},_addDaysToTimestamp:function(e,r){return isNaN(parseInt(e))||isNaN(parseInt(r))||e&&13!==e.toString().length?e:parseInt(e)+TIME_MILLS_DAY*parseInt(r)},_formatDateMMDDYYYY:function(e){var r=e.getFullYear();return(e.getMonth()+1).toString().padStart(2,"0")+"/"+e.getDate().toString().padStart(2,"0")+"/"+r},_importFromDataLayer:function(e){if(e.pageInfo){var r=e.pageInfo[CLIENT_NAME_ATTR];if(this.clientNames.length>0&&-1===this.clientNames.indexOf(r))console.info("Listener ID: "+this.context.getInteractionId()+" -- Client name mismatch, skipping. Client: "+e.pageInfo[CLIENT_NAME_ATTR]);else{var t=e.pageInfo[CLIENT_MID_ATTR],s=r&&t&&this.calculatedClientNames[r]&&this.calculatedClientNames[r][t]?this.calculatedClientNames[r][t]:r,p=new Date,o=p.getTime();this._currentMills=o;var a={};if(a[CALCULATED_CLIENT_NAME_ATTR]=s,this.timelineEventType===MARKETING_ET)for(i=0;i<MARKETING_ATTRS.length;i++)e.pageInfo[MARKETING_ATTRS[i]]&&(a[MARKETING_ATTRS[i]]=e.pageInfo[MARKETING_ATTRS[i]]);if(this.timelineEventType===APPLICATION_ET){for(i=0;i<APPLICATION_ATTRS.length;i++)e.pageInfo[APPLICATION_ATTRS[i]]&&(a[APPLICATION_ATTRS[i]]=e.pageInfo[APPLICATION_ATTRS[i]]);if(e.formAction){var l=e.formAction[ACTION_ATTR];l&&(a[ACTION_ATTR]=l),e.formAction[APP_TYPE_ATTR]&&(a[APP_TYPE_ATTR]=e.formAction[APP_TYPE_ATTR])}var n=e.pageInfo[REASON_CODE_ATTR],h=n&&n.startsWith("A");n&&(a[REASON_CODE_ATTR]=n,a[REASON_CODE_A_ATTR]=h);var f=e.pageInfo[PAGE_KIND_ATTR];this._currentPageKind=f;var P=e.pageInfo[PAGE_NAME_ATTR];this._currentPageName=P;var u=e.pageInfo[PAGE_FUNCTION_ATTR],m=e.pageInfo[PAGE_SUB_FUNCTION_ATTR],y=e.pageInfo[DSA_TOKEN_ATTR]?e.pageInfo[DSA_TOKEN_ATTR]:null,d=e.pageInfo[APPROVAL_CODE_ATTR]?e.pageInfo[APPROVAL_CODE_ATTR]:null;this.approvalCodeProperty&&d&&this.profile.addValue(this.approvalCodeProperty,d);var A=this._getSessionIdTimestamp();if(LANDING_PAGE_NAMES.indexOf(P)>-1&&A&&this._currentMills-A>=1e4?this._setSessionId():LANDING_PAGE_NAMES.indexOf(P)>-1&&!A?this._setSessionId():this._getSessionId()||this._setSessionId(),f===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT)&&P===PREQUAL_OFFER_PAGE_NAME||f===PAGE_KIND_OFFER_PERSIST&&this.selectedPageKind.includes(PAGE_KIND_OFFER_PERSIST)&&P===PREQUAL_OFFER_PAGE_NAME||f===PAGE_KIND_PREQUAL&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL)&&P===PREQUAL_OFFER_PAGE_NAME){var c=this._addDaysToTimestamp(o,30),_=new Date(c);a[OFFER_EXPIRES_ATTR]=_,a[CAL_OFFER_EXPIRES_ATTR]=this._formatDateMMDDYYYY(_)}if(f===PAGE_KIND_PREQUAL&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL)){for(this.prequalEmailOfferClickProperty&&this._prequalEmailOfferClickListener(s),this.prequalNotInterestedProperty&&this._prequalNotInterestedListener(s,P),i=0;i<OFFER_PERSIST_DL_ATTR.length;i++)e.pageInfo[OFFER_PERSIST_DL_ATTR[i]]&&(a[OFFER_PERSIST_DL_ATTR[i]]=e.pageInfo[OFFER_PERSIST_DL_ATTR[i]]);this._handlePrequal(s,P)}else if(f===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT))this._handlePrequalSecuredInstallment(s,P),VEHICHLE_PAGE_NAME===P&&this._captureVehicleAttr(s,f),this._addVehicleAttr(s,f,a);else if(f===PAGE_KIND_APPLY&&this.selectedPageKind.includes(PAGE_KIND_APPLY))this._handleApply(s,P);else if(f===PAGE_KIND_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_SECURED_INSTALLMENT))this._handleSecuredInstallment(s,P);else if(f===PAGE_KIND_APPLY_LOAN&&this.selectedPageKind.includes(PAGE_KIND_APPLY_LOAN))this._handleApplyLoan(s,P);else if(f===PAGE_KIND_OFFER_PERSIST&&this.selectedPageKind.includes(PAGE_KIND_OFFER_PERSIST)){for(this.offerPersistNotInterestedClickProperty&&this._offerPersistNotInterestedClickListener(s),i=0;i<OFFER_PERSIST_DL_ATTR.length;i++)e.pageInfo[OFFER_PERSIST_DL_ATTR[i]]&&(a[OFFER_PERSIST_DL_ATTR[i]]=e.pageInfo[OFFER_PERSIST_DL_ATTR[i]]);this._handleOfferPersist(s,P,y,d,m)}P===YOUR_INFORMATION_PAGE_NAME&&this._capturePII(s,f,u,m),P===INFORMATION_REVIEW_PAGE_NAME&&this._capturePiiChanges(s,f),this._addPII(s,f,a)}a[DATE_STAMP_ATTR]=p,a[URL_ATTR]=window.location.href;try{this._getSessionId()&&(a[APPLICATION_SESSION_ID_ATTR]=this._getSessionId())}catch(e){this.blueConicClient.util.log(e)}this.lastUpdateTimeProperty&&this.profile.setValue(this.lastUpdateTimeProperty,o),this._updateProfile(p,a)}}},_updateProfile:function(e,r){this.blueConicClient.profile.updateProfile(this,function(){this.blueConicClient.createEvent("BC_DATALAYER_UPDATED")}),e&&r&&this._createTimelineEvent(e,r)},_createTimelineEvent:function(e,r){var t=JSON.parse(JSON.stringify(r));delete t.DateTimestamp,delete t.Token;var i=this._getDataHash(t),s=this._getTimelineCreated(i);window._dataLayerListenerEventsCache&&window._dataLayerListenerEventsCache[i]&&this._currentMills-window._dataLayerListenerEventsCache[i]<=1e4||s&&this._currentMills-s<=1e4||(window._dataLayerListenerEventsCache[i]=this._currentMills,this._setTimelineCreated(i),this.blueConicClient.profile.getProfile().timeline.createEvent(this.timelineEventType,e,r,this,function(){this.timeline.results.events.push({eventType:this.timelineEventType,eventDate:e,eventData:r})}))},_handleApply:function(e,r){if(START_PAGE_NAMES.indexOf(r)>-1){if(this.appStartProperty&&this.profile.addValue(this.appStartProperty,e),this.appCompleteProperty){var t=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.appCompleteProperty,t)}if(this.appPendingProperty){var i=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.appPendingProperty,i)}if(this.appDeclinedProperty){var s=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.appDeclinedProperty,s)}if(this.appFraudProperty){var p=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.appFraudProperty,p)}if(this.appErrorProperty){var o=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.appErrorProperty,o)}}if(PENDING_PAGE_NAMES.indexOf(r)>-1){if(this.appPendingProperty&&this.profile.addValue(this.appPendingProperty,e),this.appCompleteProperty){var a=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.appCompleteProperty,a)}if(this.appDeclinedProperty){var l=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.appDeclinedProperty,l)}if(this.appErrorProperty){var n=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.appErrorProperty,n)}if(this.appFraudProperty){var h=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.appFraudProperty,h)}}if(COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.appCompleteProperty&&this.profile.addValue(this.appCompleteProperty,e),this.appPendingProperty){var f=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.appPendingProperty,f)}if(this.appDeclinedProperty){var P=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.appDeclinedProperty,P)}if(this.appErrorProperty){var u=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.appErrorProperty,u)}if(this.appFraudProperty){var m=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.appFraudProperty,m)}}if(DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.appDeclinedProperty&&this.profile.addValue(this.appDeclinedProperty,e),this.appPendingProperty){var y=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.appPendingProperty,y)}if(this.appCompleteProperty){var d=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.appCompleteProperty,d)}if(this.appFraudProperty){var A=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.appFraudProperty,A)}if(this.appErrorProperty){var c=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.appErrorProperty,c)}}if(r.toLowerCase().indexOf("fraud")>-1){if(this.appFraudProperty&&this.profile.addValue(this.appFraudProperty,e),this.appPendingProperty){var _=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.appPendingProperty,_)}if(this.appCompleteProperty){var E=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.appCompleteProperty,E)}if(this.appDeclinedProperty){var I=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.appDeclinedProperty,I)}if(this.appErrorProperty){var g=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.appErrorProperty,g)}}if(r.toLowerCase().indexOf("error")>-1){if(this.appErrorProperty&&this.profile.addValue(this.appErrorProperty,e),this.appPendingProperty){var v=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.appPendingProperty,v)}if(this.appCompleteProperty){var C=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(C,e),this.profile.setValues(this.appCompleteProperty,C)}if(this.appFraudProperty){var S=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.appFraudProperty,S)}if(this.appDeclinedProperty){var T=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.appDeclinedProperty,T)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handlePrequal:function(e,r){if(PREQUAL_START_PAGE_NAMES.indexOf(r)>-1){if(this.prequalAppStartProperty&&this.profile.addValue(this.prequalAppStartProperty,e),this.prequalAppPendingProperty){var t=this.profile.getValues(this.prequalAppPendingProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.prequalAppPendingProperty,t)}if(this.prequalAppCompleteProperty){var i=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.prequalAppCompleteProperty,i)}if(this.prequalAppDeclinedProperty){var s=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.prequalAppDeclinedProperty,s)}if(this.prequalAppErrorProperty){var p=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.prequalAppErrorProperty,p)}}if(PENDING_PAGE_NAMES.indexOf(r)>-1){if(this.prequalAppPendingProperty&&this.profile.addValue(this.prequalAppPendingProperty,e),this.prequalAppCompleteProperty){var o=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.prequalAppCompleteProperty,o)}if(this.prequalAppDeclinedProperty){var a=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.prequalAppDeclinedProperty,a)}if(this.prequalAppErrorProperty){var l=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.prequalAppErrorProperty,l)}}if(COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.prequalAppCompleteProperty&&this.profile.addValue(this.prequalAppCompleteProperty,e),this.prequalAppPendingProperty){var n=this.profile.getValues(this.prequalAppPendingProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.prequalAppPendingProperty,n)}if(this.prequalAppDeclinedProperty){var h=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.prequalAppDeclinedProperty,h)}if(this.prequalAppErrorProperty){var f=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.prequalAppErrorProperty,f)}}if(PREQUAL_DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.prequalAppDeclinedProperty&&this.profile.addValue(this.prequalAppDeclinedProperty,e),this.prequalAppPendingProperty){var P=this.profile.getValues(this.prequalAppPendingProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.prequalAppPendingProperty,P)}if(this.prequalAppCompleteProperty){var u=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.prequalAppCompleteProperty,u)}if(this.prequalAppErrorProperty){var m=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.prequalAppErrorProperty,m)}}if(r.toLowerCase().indexOf("error")>-1){if(this.prequalAppErrorProperty&&this.profile.addValue(this.prequalAppErrorProperty,e),this.prequalAppPendingProperty){var y=this.profile.getValues(this.prequalAppPendingProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.prequalAppPendingProperty,y)}if(this.prequalAppCompleteProperty){var d=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.prequalAppCompleteProperty,d)}if(this.prequalAppDeclinedProperty){var A=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.prequalAppDeclinedProperty,A)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handlePrequalSecuredInstallment:function(e,r){if(PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES.indexOf(r)>-1){if(this.prequalSecuredInstallmentAppStartProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppStartProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var t=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,t)}if(this.prequalSecuredInstallmentAppDeclinedProperty){var i=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,i)}if(this.prequalSecuredInstallmentAppErrorProperty){var s=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,s)}}if(PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.prequalSecuredInstallmentAppCompleteProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppCompleteProperty,e),this.prequalSecuredInstallmentAppDeclinedProperty){var p=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,p)}if(this.prequalSecuredInstallmentAppErrorProperty){var o=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,o)}}if(PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.prequalSecuredInstallmentAppDeclinedProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppDeclinedProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var a=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,a)}if(this.prequalSecuredInstallmentAppErrorProperty){var l=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,l)}}if(r.toLowerCase().indexOf("error")>-1){if(this.prequalSecuredInstallmentAppErrorProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppErrorProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var n=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,n)}if(this.prequalSecuredInstallmentAppDeclinedProperty){var h=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,h)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_prequalNotInterestedListener:function(e){var r=document.querySelectorAll('[data-reason="not_interested"]');r.length>0?r.forEach(function(r,t){r.addEventListener("click",function(){this.profile.addValue(this.prequalNotInterestedProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe('[data-reason="not_interested"]',this,function(){this._prequalNotInterestedListener(e)})},_handleSecuredInstallment:function(e,r){if(START_PAGE_NAMES.indexOf(r)>-1){if(this.securedInstallmentAppStartProperty&&this.profile.addValue(this.securedInstallmentAppStartProperty,e),this.securedInstallmentAppPendingProperty){var t=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,t)}if(this.securedInstallmentAppCompleteProperty){var i=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,i)}if(this.securedInstallmentAppDeclinedProperty){var s=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,s)}if(this.securedInstallmentAppFraudProperty){var p=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,p)}if(this.securedInstallmentAppErrorProperty){var o=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,o)}}if(r.toLowerCase().indexOf("pending")>-1){if(this.securedInstallmentAppPendingProperty&&this.profile.addValue(this.securedInstallmentAppPendingProperty,e),this.securedInstallmentAppCompleteProperty){var a=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,a)}if(this.securedInstallmentAppDeclinedProperty){var l=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,l)}if(this.securedInstallmentAppErrorProperty){var n=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,n)}if(this.securedInstallmentAppFraudProperty){var h=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,h)}}if(COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.securedInstallmentAppCompleteProperty&&this.profile.addValue(this.securedInstallmentAppCompleteProperty,e),this.securedInstallmentAppPendingProperty){var f=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,f)}if(this.securedInstallmentAppDeclinedProperty){var P=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,P)}if(this.securedInstallmentAppErrorProperty){var u=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,u)}if(this.securedInstallmentAppFraudProperty){var m=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,m)}}if(DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.securedInstallmentAppDeclinedProperty&&this.profile.addValue(this.securedInstallmentAppDeclinedProperty,e),this.securedInstallmentAppPendingProperty){var y=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,y)}if(this.securedInstallmentAppCompleteProperty){var d=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,d)}if(this.securedInstallmentAppFraudProperty){var A=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,A)}if(this.securedInstallmentAppErrorProperty){var c=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,c)}}if(r.toLowerCase().indexOf("fraud")>-1){if(this.securedInstallmentAppFraudProperty&&this.profile.addValue(this.securedInstallmentAppFraudProperty,e),this.securedInstallmentAppPendingProperty){var _=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,_)}if(this.securedInstallmentAppCompleteProperty){var E=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,E)}if(this.securedInstallmentAppDeclinedProperty){var I=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,I)}if(this.securedInstallmentAppErrorProperty){var g=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,g)}}if(r.toLowerCase().indexOf("error")>-1){if(this.securedInstallmentAppErrorProperty&&this.profile.addValue(this.securedInstallmentAppErrorProperty,e),this.securedInstallmentAppPendingProperty){var v=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,v)}if(this.securedInstallmentAppCompleteProperty){var C=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(C,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,C)}if(this.securedInstallmentAppFraudProperty){var S=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,S)}if(this.securedInstallmentAppDeclinedProperty){var T=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,T)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handleApplyLoan:function(e,r){if(START_PAGE_NAMES.indexOf(r)>-1){if(this.applyLoanAppStartProperty&&this.profile.addValue(this.applyLoanAppStartProperty,e),this.applyLoanAppPendingProperty){var t=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.applyLoanAppPendingProperty,t)}if(this.applyLoanAppCompleteProperty){var i=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.applyLoanAppCompleteProperty,i)}if(this.applyLoanAppDeclinedProperty){var s=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,s)}if(this.applyLoanAppFraudProperty){var p=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.applyLoanAppFraudProperty,p)}if(this.applyLoanAppErrorProperty){var o=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.applyLoanAppErrorProperty,o)}}if(r.toLowerCase().indexOf("pending")>-1){if(this.applyLoanAppPendingProperty&&this.profile.addValue(this.applyLoanAppPendingProperty,e),this.applyLoanAppCompleteProperty){var a=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.applyLoanAppCompleteProperty,a)}if(this.applyLoanAppDeclinedProperty){var l=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,l)}if(this.applyLoanAppErrorProperty){var n=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.applyLoanAppErrorProperty,n)}if(this.applyLoanAppFraudProperty){var h=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.applyLoanAppFraudProperty,h)}}if(COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.applyLoanAppCompleteProperty&&this.profile.addValue(this.applyLoanAppCompleteProperty,e),this.applyLoanAppPendingProperty){var f=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.applyLoanAppPendingProperty,f)}if(this.applyLoanAppDeclinedProperty){var P=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,P)}if(this.applyLoanAppErrorProperty){var u=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.applyLoanAppErrorProperty,u)}if(this.applyLoanAppFraudProperty){var m=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.applyLoanAppFraudProperty,m)}}if(DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.applyLoanAppDeclinedProperty&&this.profile.addValue(this.applyLoanAppDeclinedProperty,e),this.applyLoanAppPendingProperty){var y=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.applyLoanAppPendingProperty,y)}if(this.applyLoanAppCompleteProperty){var d=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.applyLoanAppCompleteProperty,d)}if(this.applyLoanAppFraudProperty){var A=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.applyLoanAppFraudProperty,A)}if(this.applyLoanAppErrorProperty){var c=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.applyLoanAppErrorProperty,c)}}if(r.toLowerCase().indexOf("fraud")>-1){if(this.applyLoanAppFraudProperty&&this.profile.addValue(this.applyLoanAppFraudProperty,e),this.applyLoanAppPendingProperty){var _=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.applyLoanAppPendingProperty,_)}if(this.applyLoanAppCompleteProperty){var E=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.applyLoanAppCompleteProperty,E)}if(this.applyLoanAppDeclinedProperty){var I=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,I)}if(this.applyLoanAppErrorProperty){var g=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.applyLoanAppErrorProperty,g)}}if(r.toLowerCase().indexOf("error")>-1){if(this.applyLoanAppErrorProperty&&this.profile.addValue(this.applyLoanAppErrorProperty,e),this.applyLoanAppPendingProperty){var v=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.applyLoanAppPendingProperty,v)}if(this.applyLoanAppCompleteProperty){var C=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(C,e),this.profile.setValues(this.applyLoanAppCompleteProperty,C)}if(this.applyLoanAppFraudProperty){var S=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.applyLoanAppFraudProperty,S)}if(this.applyLoanAppDeclinedProperty){var T=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,T)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handleOfferPersist:function(e,r,t,i,s){if(r.toLowerCase().indexOf(OFFER_PERSIST_REVIEW_OFFER_PAGE_NAME)>-1&&t){if(this.offerPersistReviewOfferProperty&&this.profile.addValue(this.offerPersistReviewOfferProperty,e),this.offerPersistNotFoundExpProperty){var p=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,p)}if(this.offerPersistEligibilityFailureProperty){var o=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,o)}if(this.offerPersistPrequalOfferDeclineProperty){var a=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,a)}if(this.offerPersistCompleteApproveProperty){var l=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,l)}if(this.offerPersistCompletePendingProperty){var n=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.offerPersistCompletePendingProperty,n)}if(this.offerPersistCompleteDeclineProperty){var h=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,h)}if(this.offerPersistDapplyStartErrorProperty){var f=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,f)}if(this.offerPersistPrequalOfferProperty){var P=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,P)}}if(r===YOUR_INFORMATION_PAGE_NAME&&s===PREFILLED_PAGE_SUB_FUNCTION&&(t||i)){if(this.offerPersistNotFoundExpProperty&&this.profile.addValue(this.offerPersistNotFoundExpProperty,e),this.offerPersistEligibilityFailureProperty){var u=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,u)}if(this.offerPersistPrequalOfferDeclineProperty){var m=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,m)}if(this.offerPersistCompleteApproveProperty){var y=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,y)}if(this.offerPersistCompletePendingProperty){var d=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.offerPersistCompletePendingProperty,d)}if(this.offerPersistCompleteDeclineProperty){var A=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,A)}if(this.offerPersistDapplyStartErrorProperty){var c=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,c)}if(this.offerPersistPrequalOfferProperty){var _=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,_)}}if(r.toLowerCase().indexOf(OFFER_PERSIST_ELIGIBILITY_FAILURE_PAGE_NAME)>-1&&t){if(this.offerPersistEligibilityFailureProperty&&this.profile.addValue(this.offerPersistEligibilityFailureProperty,e),this.offerPersistNotFoundExpProperty){var E=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,E)}if(this.offerPersistPrequalOfferDeclineProperty){var I=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,I)}if(this.offerPersistCompleteApproveProperty){var g=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,g)}if(this.offerPersistCompletePendingProperty){var v=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.offerPersistCompletePendingProperty,v)}if(this.offerPersistCompleteDeclineProperty){var C=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(C,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,C)}if(this.offerPersistDapplyStartErrorProperty){var S=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,S)}if(this.offerPersistPrequalOfferProperty){var T=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,T)}}if(r===PREQUAL_OFFER_PAGE_NAME){if(this.offerPersistPrequalOfferProperty&&this.profile.addValue(this.offerPersistPrequalOfferProperty,e),this.offerPersistNotFoundExpProperty){var V=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(V,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,V)}if(this.offerPersistPrequalOfferDeclineProperty){var N=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(N,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,N)}if(this.offerPersistCompleteApproveProperty){var L=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(L,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,L)}if(this.offerPersistCompletePendingProperty){var D=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(D,e),this.profile.setValues(this.offerPersistCompletePendingProperty,D)}if(this.offerPersistCompleteDeclineProperty){var F=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(F,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,F)}if(this.offerPersistDapplyStartErrorProperty){var O=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(O,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,O)}if(this.offerPersistEligibilityFailureProperty){var R=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(R,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,R)}}if(r===PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAME){if(this.offerPersistPrequalOfferDeclineProperty&&this.profile.addValue(this.offerPersistPrequalOfferDeclineProperty,e),this.offerPersistNotFoundExpProperty){var q=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(q,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,q)}if(this.offerPersistPrequalOfferProperty){var M=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(M,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,M)}if(this.offerPersistCompleteApproveProperty){var b=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(b,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,b)}if(this.offerPersistCompletePendingProperty){var x=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(x,e),this.profile.setValues(this.offerPersistCompletePendingProperty,x)}if(this.offerPersistCompleteDeclineProperty){var G=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(G,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,G)}if(this.offerPersistDapplyStartErrorProperty){var K=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(K,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,K)}if(this.offerPersistEligibilityFailureProperty){var U=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(U,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,U)}}if(r===COMPLETE_PAGE_NAME){if(this.offerPersistCompleteApproveProperty&&this.profile.addValue(this.offerPersistCompleteApproveProperty,e),this.offerPersistNotFoundExpProperty){var w=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(w,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,w)}if(this.offerPersistPrequalOfferProperty){var k=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(k,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,k)}if(this.offerPersistPrequalOfferDeclineProperty){var Y=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(Y,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,Y)}if(this.offerPersistCompletePendingProperty){var H=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(H,e),this.profile.setValues(this.offerPersistCompletePendingProperty,H)}if(this.offerPersistCompleteDeclineProperty){var Q=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(Q,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,Q)}if(this.offerPersistDapplyStartErrorProperty){var B=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(B,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,B)}if(this.offerPersistEligibilityFailureProperty){var z=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(z,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,z)}}if(r===PENDING_PAGE_NAME){if(this.offerPersistCompletePendingProperty&&this.profile.addValue(this.offerPersistCompletePendingProperty,e),this.offerPersistNotFoundExpProperty){var J=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(J,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,J)}if(this.offerPersistPrequalOfferProperty){var X=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(X,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,X)}if(this.offerPersistPrequalOfferDeclineProperty){var j=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(j,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,j)}if(this.offerPersistCompleteApproveProperty){var W=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(W,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,W)}if(this.offerPersistCompleteDeclineProperty){var Z=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(Z,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,Z)}if(this.offerPersistDapplyStartErrorProperty){var $=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray($,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,$)}if(this.offerPersistEligibilityFailureProperty){var ee=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(ee,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,ee)}}if(r===DECLINED_PAGE_NAME){if(this.offerPersistCompleteDeclineProperty&&this.profile.addValue(this.offerPersistCompleteDeclineProperty,e),this.offerPersistNotFoundExpProperty){var re=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(re,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,re)}if(this.offerPersistPrequalOfferProperty){var te=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(te,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,te)}if(this.offerPersistPrequalOfferDeclineProperty){var ie=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(ie,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,ie)}if(this.offerPersistCompleteApproveProperty){var se=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(se,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,se)}if(this.offerPersistCompletePendingProperty){var pe=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(pe,e),this.profile.setValues(this.offerPersistCompletePendingProperty,pe)}if(this.offerPersistDapplyStartErrorProperty){var oe=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(oe,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,oe)}if(this.offerPersistEligibilityFailureProperty){var ae=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(ae,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,ae)}}if(r===DAPPLY_START_ERROR_PAGE_NAME){if(this.offerPersistDapplyStartErrorProperty&&this.profile.addValue(this.offerPersistDapplyStartErrorProperty,e),this.offerPersistNotFoundExpProperty){var le=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(le,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,le)}if(this.offerPersistPrequalOfferProperty){var ne=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(ne,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,ne)}if(this.offerPersistPrequalOfferDeclineProperty){var he=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(he,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,he)}if(this.offerPersistCompleteApproveProperty){var fe=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(fe,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,fe)}if(this.offerPersistCompletePendingProperty){var Pe=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(Pe,e),this.profile.setValues(this.offerPersistCompletePendingProperty,Pe)}if(this.offerPersistCompleteDeclineProperty){var ue=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(ue,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,ue)}if(this.offerPersistEligibilityFailureProperty){var me=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(me,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,me)}}},_prequalEmailOfferClickListener:function(e){var r=document.querySelectorAll("#emailOffer");r.length>0?r.forEach(function(r,t){r.addEventListener("click",function(){this.profile.addValue(this.prequalEmailOfferClickProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe("#emailOffer",this,function(){this._prequalEmailOfferClickListener(e)})},_offerPersistNotInterestedClickListener:function(e){var r=document.querySelectorAll("#notIntersted");r.length>0?r.forEach(function(r,t){r.addEventListener("click",function(){this.profile.addValue(this.offerPersistNotInterestedClickProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe("#notIntersted",this,function(){this._offerPersistNotInterestedClickListener(e)})},_aggreeAcceptClickListener:function(e){var r=document.querySelector("button#acptbtn")||null;r?r.addEventListener("click",function(){this.profile.addValue(this.agreeAndAcceptProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1):this.blueConicClient.position.subscribe("button#acptbtn",this,function(){this._aggreeAcceptClickListener(e)})},_generateProfileKey:function(e){if(!e)return null;try{return this.md5((new Date).getTime().toString()+"_"+e.toLowerCase()).substring(6,26)}catch(e){return console.error("[BC ERROR] Error generating dummyProfileKey key: "+e),null}},_captureVehicleAttr:function(e,r){var t=document.querySelector('button[data-reason="residence"]')||null;null!==t?t.addEventListener("click",function(){var t=document.querySelector("#native-select-vehicleType-native"),i=t?t.options[t.selectedIndex].text:null,s=document.querySelector("#native-select-manufacturerOptions-native"),p=s?s.options[s.selectedIndex].text:null,o=document.querySelector("#native-select-modelYear-native"),a=o?o.options[o.selectedIndex].text:null,l=document.querySelector("#native-select-modelDesc-native"),n=l?l.options[l.selectedIndex].text:null;this.profile.setValue(VEHICHLE_INFO_INTERNAL_PROPERTY,JSON.stringify({currentClient:e,currentPageKind:r,vehicleType:i,vehicleMake:p,vehicleYear:a,vehicleModel:n})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-reason="residence"]',this,function(){this._captureVehicleAttr(e,r)})},_addVehicleAttr:function(e,r,t){var i=this.profile.getValue(VEHICHLE_INFO_INTERNAL_PROPERTY);if(i)try{var s=JSON.parse(i);e===s.currentClient&&r===s.currentPageKind&&(s.vehicleType&&(t[VEHICLE_TYPE_ATTR]=s.vehicleType),s.vehicleYear&&(t[VEHICLE_YEAR_ATTR]=s.vehicleYear),s.vehicleMake&&(t[VEHICLE_MAKE_ATTR]=s.vehicleMake),s.vehicleModel&&(t[VEHICLE_MODEL_ATTR]=s.vehicleModel))}catch(e){}},_capturePiiChanges:function(e,r){var t=document.querySelector('button[data-test="save1-button"]')?document.querySelector('button[data-test="save1-button"]'):null;null!==t?t.addEventListener("click",function(){var t=document.querySelector("#firstName-primary")?document.querySelector("#firstName-primary").value:null,i=document.querySelector("#lastName-primary")?document.querySelector("#lastName-primary").value:null,s=document.querySelector("#emailAddress-primary")?document.querySelector("#emailAddress-primary").value:null,p=null,o=null;s&&(p=this._generateProfileKey(s),o=this._validateEmail(s),this.emailProperty&&this.profile.setValue(this.emailProperty,s)),this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:t,lastName:i,email:s,currentClient:e,currentPageKind:r,isBadEmail:o,dummyProfileKey:p})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-test="save1-button"]',this,function(){this._capturePiiChanges(e,r)})},_capturePII:function(e,r,t,i){submitButton=document.querySelector('button[data-reason="productinfo"]')?document.querySelector('button[data-reason="productinfo"]'):document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]')?document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]'):document.querySelector('button[data-reason="Productinfo"]')?document.querySelector('button[data-reason="Productinfo"]'):document.querySelector('button[title="NEXT: VEHICLE INFO"]')?document.querySelector('button[title="NEXT: VEHICLE INFO"]'):document.querySelector("button#submitButton")?document.querySelector("button#submitButton"):document.querySelector('button[data-reason="see-if-I-prequalify"]')?document.querySelector('button[data-reason="see-if-I-prequalify"]'):null,null!==submitButton?submitButton.addEventListener("click",function(){var s=document.querySelector("#firstName")?document.querySelector("#firstName").value:null,p=document.querySelector("#lastName")?document.querySelector("#lastName").value:null;if(!s&&!p&&document.querySelector("#fullName")||!s&&!p&&document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")){var o=document.querySelector("#fullName")?document.querySelector("#fullName").innerText:document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")?document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm").innerText:null;o&&(s=-1!==o.indexOf(" ")?o.substring(0,o.indexOf(" ")):o,p=-1!==o.indexOf(" ")?o.substring(o.indexOf(" ")+1):null)}s||p||(s=(s=document.querySelector('div.prefill-details label[for="firstName"]')?document.querySelector('div.prefill-details label[for="firstName"]').innerText:null)?s.replace(/\s$/g,""):null,p=(p=document.querySelector('div.prefill-details label[for="lastName"]')?document.querySelector('div.prefill-details label[for="lastName"]').innerText:null)?p.replace(/\s$/g,""):null);var a=document.querySelector("#confirmEmailAddress")?document.querySelector("#confirmEmailAddress").value:document.querySelector("#confirmEmailCheck")?document.querySelector("#confirmEmailCheck").value:null;a||(a=document.querySelector('div.prefill-details label[for="email"]')?document.querySelector('div.prefill-details label[for="email"]').innerText:null);var l=null,n=null;a&&(l=this._generateProfileKey(a),n=this._validateEmail(a),this.emailProperty&&this.profile.setValue(this.emailProperty,a));var h=document.querySelector("#mailingAddress")?document.querySelector("#mailingAddress").value:document.querySelector("div#prefillstreetaddress label[for='streetAddressDapply']")?document.querySelector("div#prefillstreetaddress label[for='streetAddressDapply']").innerText:null,f=document.querySelector("#appAptmtNumber")?document.querySelector("#appAptmtNumber").value:null,P=document.querySelector("#applyVTO_applicantVO_city_id")?document.querySelector("#applyVTO_applicantVO_city_id").value:document.querySelector("div#prefillstreetaddress label[for='cityAndStateDapply']")?document.querySelector("div#prefillstreetaddress label[for='cityAndStateDapply']").innerText:null,u=null,m=null;P&&(u=P.substring(0,P.indexOf(",")),m=P.substring(P.indexOf(",")+2));var y=document.querySelector("#applyVTO_applicantVO_zip_id")?document.querySelector("#applyVTO_applicantVO_zip_id").value:document.querySelector("div#prefillstreetaddress label[for='zip']")?document.querySelector("div#prefillstreetaddress label[for='zip']").innerText:null,d=document.querySelector("#appPrimaryPhone")?document.querySelector("#appPrimaryPhone").value:document.querySelector("div#prefillblock label[for='primaryPhoneDapply']")?document.querySelector("div#prefillblock label[for='primaryPhoneDapply']").innerText:null;this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:s,lastName:p,email:a,currentClient:e,currentPageKind:r,isBadEmail:n,dummyProfileKey:l,address1:h,address2:f,city:u,state:m,zipCode:y,phoneNumber:d,prefill:"payfone"===t&&("prefilled"===i||"no_user_data_in_payfone"===i)})),this.blueConicClient.profile.updateProfile()}.bind(this)):(this.blueConicClient.position.subscribe("button#submitButton",this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[data-reason="productinfo"]',this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[data-reason="Productinfo"]',this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[data-reason="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[title="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[data-reason="see-if-I-prequalify"]',this,function(){this._capturePII(e,r,t,i)}))},_addPII:function(e,r,t){var i=this.profile.getValue(PII_INTERNAL_PROPERY);if(i)try{var s=JSON.parse(i);e===s.currentClient&&r===s.currentPageKind&&(t[FIRST_NAME_ATTR]=s.firstName,t[LAST_NAME_ATTR]=s.lastName,s.email&&(t[EMAIL_ADDRESS_ATTR]=s.email,t[IS_BAD_EMAIL_ATTR]=s.isBadEmail?s.isBadEmail:this._validateEmail(s.email)),s.dummyProfileKey&&(t[DUMMY_PROFILE_KEY_ATTR]=s.dummyProfileKey),t[PREFILL_ATTR]=s.prefill,s.address1&&(t[ADDRESS1_ATTR]=s.address1),s.address2&&(t[ADDRESS2_ATTR]=s.address2),s.city&&(t[CITY_ATTR]=s.city),s.state&&(t[STATE_ATTR]=s.state),s.zipCode&&(t[ZIP_CODE_ATTR]=s.zipCode),s.phoneNumber&&(t[PHONE_NUMBER_ATTR]=s.phoneNumber))}catch(e){}},_validateEmail:function(e){var r=!1;(e.length<5||null===e.match(/@/g)||1!==e.match(/@/g).length||null!==e.match(/\s/g))&&(r=!0);var t=e.split("@")[1];null!==t.match(/\./g)&&1===t.match(/\./g).length&&null===t.match(/,/g)||(r=!0);var i=e.substr(0,1);["@",".",","," ","/","\\","!","#","$","%","^","&","*","(",")","+","-","~"].indexOf(i)>-1&&(r=!0);var s=e.substring(e.lastIndexOf(".")+1);return-1===["COM","NET","EDU","ORG","MIL","GOV","US","BIZ"].indexOf(s.toUpperCase())&&(r=!0),r},_indexOf:function(e,r){return Array.isArray(e)?e.indexOf(r):-1},_removeItemFromArray:function(e,r){if(Array.isArray(e))for(var t;-1!==(t=this._indexOf(e,r));)e.splice(t,1)},_encodeCookieValue:function(e){return"string"!=typeof e&&(e=JSON.stringify(e)),encodeURIComponent(e.replace(/[\n\r]/g,""))},_decodeCookieValue:function(e){return decodeURIComponent(e)},_setCookie:function(e,r,t){if(t){var i=new Date,s=t*MINUTES_TO_MILLS;i.setTime(i.getTime()+s),document.cookie=e+"="+this._encodeCookieValue(r)+(null==t?"":"; expires="+i.toUTCString())+"; path=/; SameSite=None; Secure"}else document.cookie=e+"="+this._encodeCookieValue(r)+"; path=/; SameSite=None; Secure"},_getCookie:function(e){var r,t,i=e+"=",s="";return document.cookie.length>0&&-1!==(r=document.cookie.indexOf(i))&&(r+=i.length,-1===(t=document.cookie.indexOf(";",r))&&(t=document.cookie.length),s=this._decodeCookieValue(document.cookie.substring(r,t))),s},_checkSessionStorageSupport:function(){var e="__storageTest";try{return window.sessionStorage.setItem(e,e),window.sessionStorage.removeItem(e),!0}catch(e){return!1}},_getSessionId:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME):null},_getSessionIdTimestamp:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):null},_setSessionId:function(){var e=this._uuid();return this._checkSessionStorageSupport()&&(window.sessionStorage.setItem(APPLICATION_SESSION_ID_COOKIE_NAME,e),window.sessionStorage.setItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills)),this._setCookie(APPLICATION_SESSION_ID_COOKIE_NAME,e,null),this._setCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills,null),e},_getTimelineCreated:function(e){return this._checkSessionStorageSupport()?window.sessionStorage.getItem(e)?window.sessionStorage.getItem(e):null:this._getCookie(e)?this._getCookie(e):null},_setTimelineCreated:function(e){this._checkSessionStorageSupport()?window.sessionStorage.setItem(e,this._currentMills):this._setCookie(e,this._currentMills,null)},_uuid:function(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(e){return(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})}};try{var InteractionTypeImpl=InteractionType.extend(frontendListener)}catch(e){try{module.exports=frontendListener}catch(e){}};var a = [];var i='listener_app_abandon_scaling_syf';a.push({url: '/plugins/listener_app_abandon_scaling_syf/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_app_abandon_scaling_syf/ts_666c667642d0fa48311666b0bbf07a83/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t},getPreloadProperties:function(){var e=this.context.getParameters(),t=e.responseProperty?e.responseProperty[0]:e.responseProperty;return t?(this.campaignIdentifierProperty=t,[t]):(this.campaignIdentifierProperty="responded_to_campaigns",["responded_to_campaigns"])},onLoad:function(){var e=this.context.getProfile(),t=this.context.getParameters(),r=this.blueConicClient,n=!1,i=!1,o=t.config?t.config[0]:t.config;if(o){for(var a=this.blueConicClient.json.parse(o),c=0;c<a.length;c++){var p=a[c],l=this.getParameterByName(p.parameter);l&&p.profileProperty&&(e.addValue(p.profileProperty,l),n=!0,p.isCampaignIdentifier&&!i&&(this._bindHandlers(l),i=!0))}n&&r.profile.updateProfile()}},_bindHandlers:function(e){var t=this,r=this.context.getProfile(),n=this.blueConicClient,i=document.querySelectorAll("a");Array.prototype.forEach.call(i,(function(i){i.addEventListener("click",(function(){r.addValue(t.campaignIdentifierProperty,e),n.profile.updateProfile()}))}));i=document.querySelectorAll("form");Array.prototype.forEach.call(i,(function(i){i.addEventListener("submit",(function(){r.addValue(t.campaignIdentifierProperty,e),n.profile.updateProfile()}))}))},getParameterByName:function(e){if(!e)return"";e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&#]"+e+"=([^&#]*)").exec(this.getLocationHref());return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},getLocationHref:function(){return window.location.href}});var a = [];var i='listener_campaign_tracker';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.0/'}]);})();(function(){ var MARKETING_ET="marketing_data_layer",APPLICATION_ET="application_data_layer",APPLICATION_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","ACORID","Application_ID","MerchantID","PageName","PageSubFlow","sitecode","ApprovalCode","CreditLimit"],MARKETING_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","PageName","offerIds"],CLIENT_NAME_ATTR="ClientName",PAGE_KIND_ATTR="PageKind",PAGE_KIND_PREQUAL="prequal",PAGE_KIND_APPLY="apply",PAGE_KIND_SECURED_INSTALLMENT="secured_installment",PAGE_KIND_PREQUAL_SECURED_INSTALLMENT="prequal_secured_installment",PAGE_KIND_APPLY_LOAN="applyloan",ACTION_ATTR="action",APP_TYPE_ATTR="appType",DATE_STAMP_ATTR="DateTimestamp",URL_ATTR="URL",PAGE_NAME_ATTR="PageName",PAGE_FUNCTION_ATTR="PageFunction",PAGE_SUB_FUNCTION_ATTR="PageSubFunction",FIRST_NAME_ATTR="FirstName",LAST_NAME_ATTR="LastName",EMAIL_ADDRESS_ATTR="EmailAddress",IS_BAD_EMAIL_ATTR="IsBadEmail",PREFILL_ATTR="Prefill",APPLICATION_SESSION_ID_ATTR="ApplicationSessionID",DUMMY_PROFILE_KEY_ATTR="DummyProfileKey",ZIP_CODE_ATTR="ZipCode",OFFER_EXPIRES_ATTR="OfferExpires",VEHICLE_TYPE_ATTR="VehicleType",VEHICLE_MAKE_ATTR="VehicleMake",VEHICLE_YEAR_ATTR="VehicleYear",VEHICLE_MODEL_ATTR="VehicleModel",LANDING_PAGE_NAMES=["auto_fill_invitation"],START_PAGE_NAMES=["prequal_offer","apply options","Termsandconditions","your information"],PREQUAL_START_PAGE_NAMES=["your information"],PREQUAL_DECLINED_PAGE_NAMES=["prequal_offer_declined"],PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES=["your information"],COMPLETE_PAGE_NAMES=["complete approve"],PENDING_PAGE_NAMES=["complete pending"],DECLINED_PAGE_NAMES=["complete decline"],PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES=["prequal_offer"],PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES=["prequal_offer_declined"],YOUR_INFORMATION_PAGE_NAME="your information",INFORMATION_REVIEW_PAGE_NAME="review",PREQUAL_OFFER_PAGE_NAME="prequal_offer",VEHICHLE_PAGE_NAME="product info",PII_INTERNAL_PROPERY="_dll_pii",VEHICHLE_INFO_INTERNAL_PROPERTY="_vehichle_info",TIME_MILLS_DAY=864e5,MINUTES_TO_MILLS=6e4,APPLICATION_SESSION_ID_COOKIE_NAME="_bcasid",APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME="_bcasid_ts";window._dataLayerListenerEventsCache=window._dataLayerListenerEventsCache||{};var frontendListener={init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.dataLayerName=this.parameters.dataLayerName?this.parameters.dataLayerName[0]:"_SFDDL",this.timelineEventType=this.parameters.timelineEventType?this.parameters.timelineEventType[0]:MARKETING_ET,this.clientNames=this.parameters.clientName?this.parameters.clientName:[],this.selectedPageKind=this.parameters.selectedPageKind?this.parameters.selectedPageKind:[],this.lastUpdateTimeProperty=this.parameters.lastUpdateTimeProperty?this.parameters.lastUpdateTimeProperty[0]:null,this.emailProperty=this.parameters.emailProperty?this.parameters.emailProperty[0]:null,this.appStartProperty=this.parameters.appStartProperty?this.parameters.appStartProperty[0]:null,this.appPendingProperty=this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:null,this.appCompleteProperty=this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:null,this.appDeclinedProperty=this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:null,this.appFraudProperty=this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:null,this.appErrorProperty=this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:null,this.agreeAndAcceptProperty=this.parameters.agreeAndAcceptProperty?this.parameters.agreeAndAcceptProperty[0]:null,this.prequalAppStartProperty=this.parameters.prequalAppStartProperty?this.parameters.prequalAppStartProperty[0]:null,this.prequalAppPendingProperty=this.parameters.prequalAppPendingProperty?this.parameters.prequalAppPendingProperty[0]:null,this.prequalAppCompleteProperty=this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:null,this.prequalAppDeclinedProperty=this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:null,this.prequalAppErrorProperty=this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:null,this.prequalNotInterestedProperty=this.parameters.prequalNotInterestedProperty?this.parameters.prequalNotInterestedProperty[0]:null,this.prequalSecuredInstallmentAppStartProperty=this.parameters.prequalSecuredInstallmentAppStartProperty?this.parameters.prequalSecuredInstallmentAppStartProperty[0]:null,this.prequalSecuredInstallmentAppPendingProperty=this.parameters.prequalSecuredInstallmentAppPendingProperty?this.parameters.prequalSecuredInstallmentAppPendingProperty[0]:null,this.prequalSecuredInstallmentAppCompleteProperty=this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:null,this.prequalSecuredInstallmentAppDeclinedProperty=this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:null,this.prequalSecuredInstallmentAppErrorProperty=this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:null,this.securedInstallmentAppStartProperty=this.parameters.securedInstallmentAppStartProperty?this.parameters.securedInstallmentAppStartProperty[0]:null,this.securedInstallmentAppPendingProperty=this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:null,this.securedInstallmentAppCompleteProperty=this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:null,this.securedInstallmentAppDeclinedProperty=this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:null,this.securedInstallmentAppFraudProperty=this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:null,this.securedInstallmentAppErrorProperty=this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:null,this.applyLoanAppStartProperty=this.parameters.applyLoanAppStartProperty?this.parameters.applyLoanAppStartProperty[0]:null,this.applyLoanAppPendingProperty=this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:null,this.applyLoanAppCompleteProperty=this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:null,this.applyLoanAppDeclinedProperty=this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:null,this.applyLoanAppFraudProperty=this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:null,this.applyLoanAppErrorProperty=this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:null,this.timeline={results:{events:[]}}},getPreloadProperties:function(){return[PII_INTERNAL_PROPERY,VEHICHLE_INFO_INTERNAL_PROPERTY,this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:"",this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:"",this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:"",this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:"",this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:"",this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:"",this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:"",this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:"",this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:"",this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:"",this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:"",this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:"",this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:"",this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:"",this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:"",this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:"",this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:"",this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:"",this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:"",this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:"",this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:""].filter(function(e){return""!==e})},onLoad:function(){if(this.dataLayerName&&this.timelineEventType){var e=this,t=0;(function r(){if(e._getDataLayer())e._monitorDataLayerUpdates();else{if(t>20)return;t++,window.setTimeout(r,250)}}).call(this)}},_monitorDataLayerUpdates:function(){var e=this._getDataLayer(),t=(e.length,this._getDataHash(e)),r=this;this.pollingInterval=window.setInterval(function(){var e=r._getDataLayer(),i=r._getDataHash(e);t!==i&&(r._importFromDataLayer(e),e.length,t=i)},1e3),this._importFromDataLayer(e)},_getDataLayer:function(){if(!this._dataLayer){for(var e=this.dataLayerName.split("."),t=window,r=0;r<e.length;r++)t=t&&t[e[r]]?t[e[r]]:null;this._dataLayer=t}return this._dataLayer},_getDataHash:function(e){var t=this._getDataString(e);return t?this.md5(t):null},_getDataString:function(e){var t=null;try{t=JSON.stringify(e)}catch(r){t=this._stringify(e)}return t},_stringify:function(e){var t=[],r=JSON.stringify(e,function(e,r){if("object"==typeof r&&null!==r){if(-1!==t.indexOf(r))return;t.push(r)}return r});return t=null,r},_addDaysToTimestamp:function(e,t){return isNaN(parseInt(e))||isNaN(parseInt(t))||e&&13!==e.toString().length?e:parseInt(e)+TIME_MILLS_DAY*parseInt(t)},_importFromDataLayer:function(e){if(e.pageInfo){var t=e.pageInfo[CLIENT_NAME_ATTR];if(this.clientNames.length>0&&-1===this.clientNames.indexOf(t))console.info("Listener ID: "+this.context.getInteractionId()+" -- Client name mismatch, skipping. Client: "+e.pageInfo[CLIENT_NAME_ATTR]);else{var r=new Date,a=r.getTime();this._currentMills=a;var n={};if(this.timelineEventType===MARKETING_ET)for(i=0;i<MARKETING_ATTRS.length;i++)e.pageInfo[MARKETING_ATTRS[i]]&&(n[MARKETING_ATTRS[i]]=e.pageInfo[MARKETING_ATTRS[i]]);if(this.timelineEventType===APPLICATION_ET){for(i=0;i<APPLICATION_ATTRS.length;i++)e.pageInfo[APPLICATION_ATTRS[i]]&&(n[APPLICATION_ATTRS[i]]=e.pageInfo[APPLICATION_ATTRS[i]]);if(e.formAction){var p=e.formAction[ACTION_ATTR];p&&(n[ACTION_ATTR]=p),e.formAction[APP_TYPE_ATTR]&&(n[APP_TYPE_ATTR]=e.formAction[APP_TYPE_ATTR])}var s=e.pageInfo[PAGE_KIND_ATTR];this._currentPageKind=s;var l=e.pageInfo[PAGE_NAME_ATTR];this._currentPageName=l;var o=e.pageInfo[PAGE_FUNCTION_ATTR],u=e.pageInfo[PAGE_SUB_FUNCTION_ATTR],d=this._getSessionIdTimestamp();if(LANDING_PAGE_NAMES.indexOf(l)>-1&&d&&this._currentMills-d>=1e4?this._setSessionId():LANDING_PAGE_NAMES.indexOf(l)>-1&&!d?this._setSessionId():this._getSessionId()||this._setSessionId(),s===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT)&&l===PREQUAL_OFFER_PAGE_NAME){var c=this._addDaysToTimestamp(a,30);n[OFFER_EXPIRES_ATTR]=new Date(c)}s===PAGE_KIND_PREQUAL&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL)?(this.prequalNotInterestedProperty&&this._prequalNotInterestedListener(t,l),this._handlePrequal(t,l)):s===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT)?(this._handlePrequalSecuredInstallment(t,l),VEHICHLE_PAGE_NAME===l&&this._captureVehicleAttr(t,s),this._addVehicleAttr(t,s,n)):s===PAGE_KIND_APPLY&&this.selectedPageKind.includes(PAGE_KIND_APPLY)?this._handleApply(t,l):s===PAGE_KIND_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_SECURED_INSTALLMENT)?this._handleSecuredInstallment(t,l):s===PAGE_KIND_APPLY_LOAN&&this.selectedPageKind.includes(PAGE_KIND_APPLY_LOAN)&&this._handleApplyLoan(t,l),l===YOUR_INFORMATION_PAGE_NAME&&this._capturePII(t,s,o,u),l===INFORMATION_REVIEW_PAGE_NAME&&this._capturePiiChanges(t,s),this._addPII(t,s,n)}n[DATE_STAMP_ATTR]=r,n[URL_ATTR]=window.location.href;try{this._getSessionId()&&(n[APPLICATION_SESSION_ID_ATTR]=this._getSessionId())}catch(e){this.blueConicClient.util.log(e)}this.lastUpdateTimeProperty&&this.profile.setValue(this.lastUpdateTimeProperty,a),this._updateProfile(r,n)}}},_updateProfile:function(e,t){this.blueConicClient.profile.updateProfile(this,function(){this.blueConicClient.createEvent("BC_DATALAYER_UPDATED")}),e&&t&&this._createTimelineEvent(e,t)},_createTimelineEvent:function(e,t){var r=JSON.parse(JSON.stringify(t));delete r.DateTimestamp,delete r.Token;var i=this._getDataHash(r),a=this._getTimelineCreated(i);window._dataLayerListenerEventsCache&&window._dataLayerListenerEventsCache[i]&&this._currentMills-window._dataLayerListenerEventsCache[i]<=1e4||a&&this._currentMills-a<=1e4||(window._dataLayerListenerEventsCache[i]=this._currentMills,this._setTimelineCreated(i),this.blueConicClient.profile.getProfile().timeline.createEvent(this.timelineEventType,e,t,this,function(){this.timeline.results.events.push({eventType:this.timelineEventType,eventDate:e,eventData:t})}))},_handleApply:function(e,t){START_PAGE_NAMES.indexOf(t)>-1&&this.appStartProperty&&this.profile.addValue(this.appStartProperty,e),PENDING_PAGE_NAMES.indexOf(t)>-1&&this.appPendingProperty&&this.profile.addValue(this.appPendingProperty,e),COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.appCompleteProperty&&this.profile.addValue(this.appCompleteProperty,e),(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.appDeclinedProperty&&this.profile.addValue(this.appDeclinedProperty,e),t.toLowerCase().indexOf("fraud")>-1&&this.appFraudProperty&&this.profile.addValue(this.appFraudProperty,e),t.toLowerCase().indexOf("error")>-1&&this.appErrorProperty&&this.profile.addValue(this.appErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handlePrequal:function(e,t){PREQUAL_START_PAGE_NAMES.indexOf(t)>-1&&this.prequalAppStartProperty&&this.profile.addValue(this.prequalAppStartProperty,e),COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.prequalAppCompleteProperty&&this.profile.addValue(this.prequalAppCompleteProperty,e),(PREQUAL_DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.prequalAppDeclinedProperty&&this.profile.addValue(this.prequalAppDeclinedProperty,e),t.toLowerCase().indexOf("error")>-1&&this.prequalAppErrorProperty&&this.profile.addValue(this.prequalAppErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handlePrequalSecuredInstallment:function(e,t){PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES.indexOf(t)>-1&&this.prequalSecuredInstallmentAppStartProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppStartProperty,e),PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.prequalSecuredInstallmentAppCompleteProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppCompleteProperty,e),(PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.prequalSecuredInstallmentAppDeclinedProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppDeclinedProperty,e),t.toLowerCase().indexOf("error")>-1&&this.prequalSecuredInstallmentAppErrorProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_prequalNotInterestedListener:function(e){var t=document.querySelectorAll('[data-reason="not_interested"]');t.length>0?t.forEach(function(t,r){t.addEventListener("click",function(){this.profile.addValue(this.prequalNotInterestedProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe('[data-reason="not_interested"]',this,function(){this._prequalNotInterestedListener(e)})},_handleSecuredInstallment:function(e,t){START_PAGE_NAMES.indexOf(t)>-1&&this.securedInstallmentAppStartProperty&&this.profile.addValue(this.securedInstallmentAppStartProperty,e),t.toLowerCase().indexOf("pending")>-1&&this.securedInstallmentAppPendingProperty&&this.profile.addValue(this.securedInstallmentAppPendingProperty,e),COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.securedInstallmentAppCompleteProperty&&this.profile.addValue(this.securedInstallmentAppCompleteProperty,e),(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.securedInstallmentAppDeclinedProperty&&this.profile.addValue(this.securedInstallmentAppDeclinedProperty,e),t.toLowerCase().indexOf("fraud")>-1&&this.securedInstallmentAppFraudProperty&&this.profile.addValue(this.securedInstallmentAppFraudProperty,e),t.toLowerCase().indexOf("error")>-1&&this.securedInstallmentAppErrorProperty&&this.profile.addValue(this.securedInstallmentAppErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handleApplyLoan:function(e,t){START_PAGE_NAMES.indexOf(t)>-1&&this.applyLoanAppStartProperty&&this.profile.addValue(this.applyLoanAppStartProperty,e),t.toLowerCase().indexOf("pending")>-1&&this.applyLoanAppPendingProperty&&this.profile.addValue(this.applyLoanAppPendingProperty,e),COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.applyLoanAppCompleteProperty&&this.profile.addValue(this.applyLoanAppCompleteProperty,e),(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.applyLoanAppDeclinedProperty&&this.profile.addValue(this.applyLoanAppDeclinedProperty,e),t.toLowerCase().indexOf("fraud")>-1&&this.applyLoanAppFraudProperty&&this.profile.addValue(this.applyLoanAppFraudProperty,e),t.toLowerCase().indexOf("error")>-1&&this.applyLoanAppErrorProperty&&this.profile.addValue(this.applyLoanAppErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_aggreeAcceptClickListener:function(e){var t=document.querySelector("button#acptbtn")||null;t?t.addEventListener("click",function(){this.profile.addValue(this.agreeAndAcceptProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1):this.blueConicClient.position.subscribe("button#acptbtn",this,function(){this._aggreeAcceptClickListener(e)})},_generateProfileKey:function(e){if(!e)return null;try{return this.md5((new Date).getTime().toString()+"_"+e.toLowerCase()).substring(6,26)}catch(e){return console.error("[BC ERROR] Error generating dummyProfileKey key: "+e),null}},_captureVehicleAttr:function(e,t){var r=document.querySelector('button[data-reason="residence"]')||null;null!==r?r.addEventListener("click",function(){var r=document.querySelector("#native-select-vehicleType-native"),i=r?r.options[r.selectedIndex].text:null,a=document.querySelector("#native-select-manufacturerOptions-native"),n=a?a.options[a.selectedIndex].text:null,p=document.querySelector("#native-select-modelYear-native"),s=p?p.options[p.selectedIndex].text:null,l=document.querySelector("#native-select-modelDesc-native"),o=l?l.options[l.selectedIndex].text:null;this.profile.setValue(VEHICHLE_INFO_INTERNAL_PROPERTY,JSON.stringify({currentClient:e,currentPageKind:t,vehicleType:i,vehicleMake:n,vehicleYear:s,vehicleModel:o})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-reason="residence"]',this,function(){this._captureVehicleAttr(e,t)})},_addVehicleAttr:function(e,t,r){var i=this.profile.getValue(VEHICHLE_INFO_INTERNAL_PROPERTY);if(i)try{var a=JSON.parse(i);e===a.currentClient&&t===a.currentPageKind&&(a.vehicleType&&(r[VEHICLE_TYPE_ATTR]=a.vehicleType),a.vehicleYear&&(r[VEHICLE_YEAR_ATTR]=a.vehicleYear),a.vehicleMake&&(r[VEHICLE_MAKE_ATTR]=a.vehicleMake),a.vehicleModel&&(r[VEHICLE_MODEL_ATTR]=a.vehicleModel))}catch(e){}},_capturePiiChanges:function(e,t){var r=document.querySelector('button[data-test="save1-button"]')?document.querySelector('button[data-test="save1-button"]'):null;null!==r?r.addEventListener("click",function(){var r=document.querySelector("#firstName-primary")?document.querySelector("#firstName-primary").value:null,i=document.querySelector("#lastName-primary")?document.querySelector("#lastName-primary").value:null,a=document.querySelector("#emailAddress-primary")?document.querySelector("#emailAddress-primary").value:null,n=null,p=null;a&&(t===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&(n=this._generateProfileKey(a)),p=this._validateEmail(a),this.emailProperty&&this.profile.setValue(this.emailProperty,a)),this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:r,lastName:i,email:a,currentClient:e,currentPageKind:t,isBadEmail:p,dummyProfileKey:n})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-test="save1-button"]',this,function(){this._capturePiiChanges(e,t)})},_capturePII:function(e,t,r,i){submitButton=document.querySelector('button[data-reason="productinfo"]')?document.querySelector('button[data-reason="productinfo"]'):document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]')?document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]'):document.querySelector('button[data-reason="Productinfo"]')?document.querySelector('button[data-reason="Productinfo"]'):document.querySelector('button[title="NEXT: VEHICLE INFO"]')?document.querySelector('button[title="NEXT: VEHICLE INFO"]'):document.querySelector("button#submitButton")?document.querySelector("button#submitButton"):null,null!==submitButton?submitButton.addEventListener("click",function(){var a=document.querySelector("#firstName")?document.querySelector("#firstName").value:null,n=document.querySelector("#lastName")?document.querySelector("#lastName").value:null;if(!a&&!n&&document.querySelector("#fullName")||!a&&!n&&document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")){var p=document.querySelector("#fullName")?document.querySelector("#fullName").innerText:document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")?document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm").innerText:null;p&&(a=-1!==p.indexOf(" ")?p.substring(0,p.indexOf(" ")):p,n=-1!==p.indexOf(" ")?p.substring(p.indexOf(" ")+1):null)}a||n||(a=(a=document.querySelector('div.prefill-details label[for="firstName"]')?document.querySelector('div.prefill-details label[for="firstName"]').innerText:null)?a.replace(/\s$/g,""):null,n=(n=document.querySelector('div.prefill-details label[for="lastName"]')?document.querySelector('div.prefill-details label[for="lastName"]').innerText:null)?n.replace(/\s$/g,""):null);var s=document.querySelector("#confirmEmailAddress")?document.querySelector("#confirmEmailAddress").value:document.querySelector("#confirmEmailCheck")?document.querySelector("#confirmEmailCheck").value:null,l=null,o=null;s&&(l=this._generateProfileKey(s),o=this._validateEmail(s),this.emailProperty&&this.profile.setValue(this.emailProperty,s));var u=document.querySelector("#applyVTO_applicantVO_zip_id")?document.querySelector("#applyVTO_applicantVO_zip_id").value:document.querySelector("#zipCode-primary")?document.querySelector("#zipCode-primary").value:null;if(!u){var d=document.querySelector("#address")?document.querySelector("#address").innerText:document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(2) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")?document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(2) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm").innerText:null;d&&(u=d.substring(d.lastIndexOf(", ")+2))}this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:a,lastName:n,email:s,currentClient:e,currentPageKind:t,isBadEmail:o,dummyProfileKey:l,zipCode:u,prefill:"payfone"===r&&("prefilled"===i||"no_user_data_in_payfone"===i)})),this.blueConicClient.profile.updateProfile()}.bind(this)):(this.blueConicClient.position.subscribe("button#submitButton",this,function(){this._capturePII(e,t,r,i)}),this.blueConicClient.position.subscribe('button[data-reason="productinfo"]',this,function(){this._capturePII(e,t,r,i)}),this.blueConicClient.position.subscribe('button[data-reason="Productinfo"]',this,function(){this._capturePII(e,t,r,i)}),this.blueConicClient.position.subscribe('button[data-reason="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,t,r,i)}),this.blueConicClient.position.subscribe('button[title="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,t,r,i)}))},_addPII:function(e,t,r){var i=this.profile.getValue(PII_INTERNAL_PROPERY);if(i)try{var a=JSON.parse(i);e===a.currentClient&&t===a.currentPageKind&&(r[FIRST_NAME_ATTR]=a.firstName,r[LAST_NAME_ATTR]=a.lastName,a.email&&(r[EMAIL_ADDRESS_ATTR]=a.email,r[IS_BAD_EMAIL_ATTR]=a.isBadEmail?a.isBadEmail:this._validateEmail(a.email)),a.dummyProfileKey&&(r[DUMMY_PROFILE_KEY_ATTR]=a.dummyProfileKey),r[PREFILL_ATTR]=a.prefill,a.zipCode&&(r[ZIP_CODE_ATTR]=a.zipCode))}catch(e){}},_validateEmail:function(e){var t=!1;(e.length<5||null===e.match(/@/g)||1!==e.match(/@/g).length||null!==e.match(/\s/g))&&(t=!0);var r=e.split("@")[1];null!==r.match(/\./g)&&1===r.match(/\./g).length&&null===r.match(/,/g)||(t=!0);var i=e.substr(0,1);["@",".",","," ","/","\\","!","#","$","%","^","&","*","(",")","+","-","~"].indexOf(i)>-1&&(t=!0);var a=e.substring(e.lastIndexOf(".")+1);return-1===["COM","NET","EDU","ORG","MIL","GOV","US","BIZ"].indexOf(a.toUpperCase())&&(t=!0),t},_indexOf:function(e,t){return Array.isArray(e)?e.indexOf(t):-1},_removeItemFromArray:function(e,t){if(Array.isArray(e))for(var r;-1!==(r=this._indexOf(e,t));)e.splice(r,1)},_encodeCookieValue:function(e){return"string"!=typeof e&&(e=JSON.stringify(e)),encodeURIComponent(e.replace(/[\n\r]/g,""))},_decodeCookieValue:function(e){return decodeURIComponent(e)},_setCookie:function(e,t,r){if(r){var i=new Date,a=r*MINUTES_TO_MILLS;i.setTime(i.getTime()+a),document.cookie=e+"="+this._encodeCookieValue(t)+(null==r?"":"; expires="+i.toUTCString())+"; path=/; SameSite=None; Secure"}else document.cookie=e+"="+this._encodeCookieValue(t)+"; path=/; SameSite=None; Secure"},_getCookie:function(e){var t,r,i=e+"=",a="";return document.cookie.length>0&&-1!==(t=document.cookie.indexOf(i))&&(t+=i.length,-1===(r=document.cookie.indexOf(";",t))&&(r=document.cookie.length),a=this._decodeCookieValue(document.cookie.substring(t,r))),a},_checkSessionStorageSupport:function(){var e="__storageTest";try{return window.sessionStorage.setItem(e,e),window.sessionStorage.removeItem(e),!0}catch(e){return!1}},_getSessionId:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME):null},_getSessionIdTimestamp:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):null},_setSessionId:function(){var e=this._uuid();return this._checkSessionStorageSupport()&&(window.sessionStorage.setItem(APPLICATION_SESSION_ID_COOKIE_NAME,e),window.sessionStorage.setItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills)),this._setCookie(APPLICATION_SESSION_ID_COOKIE_NAME,e,null),this._setCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills,null),e},_getTimelineCreated:function(e){return this._checkSessionStorageSupport()?window.sessionStorage.getItem(e)?window.sessionStorage.getItem(e):null:this._getCookie(e)?this._getCookie(e):null},_setTimelineCreated:function(e){this._checkSessionStorageSupport()?window.sessionStorage.setItem(e,this._currentMills):this._setCookie(e,this._currentMills,null)},_uuid:function(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(e){return(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})}};try{var InteractionTypeImpl=InteractionType.extend(frontendListener)}catch(e){try{module.exports=frontendListener}catch(e){}};var a = [];var i='listener_carte_barrel_datalayer_syf';a.push({url: '/plugins/listener_carte_barrel_datalayer_syf/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_carte_barrel_datalayer_syf/ts_3aec73d6669cdb566790db2d0a4de2fb/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(t,i){this.blueConicClient=t,this.context=i,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this._objectives=this.parameters.objective?this.parameters.objective:[];var e=this.parameters.clickSelectors?JSON.parse(this.parameters.clickSelectors[0]):[];this._clickSelectors=e.map((function(t){return t&&t.selector?t.selector:""})).filter((function(t){return t&&""!==t&&null!==t&&"null"!==t&&void 0!==t})),this.subscribedPositionUpdates={},this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){this.onLoad()}))},getPreloadProperties:function(){return[]},onLoad:function(){0!==this._objectives.length&&0!==this._clickSelectors.length&&this._clickSelectors.forEach(function(t){this._bindClickListener(t)}.bind(this))},_bindClickListener:function(t){var i=document.querySelectorAll(t);i.length>0?i.forEach(function(t){t.addEventListener("click",function(){this._objectives.forEach(function(t){this.profile.addConsentedObjective(t)}.bind(this)),this.blueConicClient.profile.updateProfile()}.bind(this))}.bind(this)):this.subscribedPositionUpdates[t]||(this.blueConicClient.position.subscribe(t,this,(function(){this._bindClickListener(t)})),this.subscribedPositionUpdates[t]=!0)}});var a = [];var i='listener_consent_by_click_syf';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_consent_by_click_syf/ts_5a0521e318bef85f4046478e5a564d8f/'}]);})();(function(){ var MARKETING_ET="marketing_data_layer",APPLICATION_ET="application_data_layer",APPLICATION_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","ACORID","Application_ID","MerchantID","PageName","PageSubFlow","sitecode","ApprovalCode","CreditLimit"],MARKETING_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","PageName","offerIds"],CLIENT_NAME_ATTR="ClientName",PAGE_KIND_ATTR="PageKind",PAGE_KIND_PREQUAL="prequal",PAGE_KIND_APPLY="apply",PAGE_KIND_SECURED_INSTALLMENT="secured_installment",PAGE_KIND_PREQUAL_SECURED_INSTALLMENT="prequal_secured_installment",PAGE_KIND_APPLY_LOAN="applyloan",ACTION_ATTR="action",APP_TYPE_ATTR="appType",DATE_STAMP_ATTR="DateTimestamp",URL_ATTR="URL",PAGE_NAME_ATTR="PageName",PAGE_FUNCTION_ATTR="PageFunction",PAGE_SUB_FUNCTION_ATTR="PageSubFunction",FIRST_NAME_ATTR="FirstName",LAST_NAME_ATTR="LastName",EMAIL_ADDRESS_ATTR="EmailAddress",IS_BAD_EMAIL_ATTR="IsBadEmail",PREFILL_ATTR="Prefill",APPLICATION_SESSION_ID_ATTR="ApplicationSessionID",DUMMY_PROFILE_KEY_ATTR="DummyProfileKey",ZIP_CODE_ATTR="ZipCode",OFFER_EXPIRES_ATTR="OfferExpires",VEHICLE_TYPE_ATTR="VehicleType",VEHICLE_MAKE_ATTR="VehicleMake",VEHICLE_YEAR_ATTR="VehicleYear",VEHICLE_MODEL_ATTR="VehicleModel",LANDING_PAGE_NAMES=["auto_fill_invitation"],START_PAGE_NAMES=["prequal_offer","apply options","Termsandconditions","your information"],PREQUAL_START_PAGE_NAMES=["your information"],PREQUAL_DECLINED_PAGE_NAMES=["prequal_offer_declined"],PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES=["your information"],COMPLETE_PAGE_NAMES=["complete approve"],PENDING_PAGE_NAMES=["complete pending"],DECLINED_PAGE_NAMES=["complete decline"],PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES=["prequal_offer"],PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES=["prequal_offer_declined"],YOUR_INFORMATION_PAGE_NAME="your information",INFORMATION_REVIEW_PAGE_NAME="review",PREQUAL_OFFER_PAGE_NAME="prequal_offer",VEHICHLE_PAGE_NAME="product info",PII_INTERNAL_PROPERY="_dll_pii",VEHICHLE_INFO_INTERNAL_PROPERTY="_vehichle_info",TIME_MILLS_DAY=864e5,MINUTES_TO_MILLS=6e4,APPLICATION_SESSION_ID_COOKIE_NAME="_bcasid",APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME="_bcasid_ts";window._dataLayerListenerEventsCache=window._dataLayerListenerEventsCache||{};var frontendListener={init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.dataLayerName=this.parameters.dataLayerName?this.parameters.dataLayerName[0]:"_SFDDL",this.timelineEventType=this.parameters.timelineEventType?this.parameters.timelineEventType[0]:MARKETING_ET,this.clientNames=this.parameters.clientName?this.parameters.clientName:[],this.selectedPageKind=this.parameters.selectedPageKind?this.parameters.selectedPageKind:[],this.lastUpdateTimeProperty=this.parameters.lastUpdateTimeProperty?this.parameters.lastUpdateTimeProperty[0]:null,this.emailProperty=this.parameters.emailProperty?this.parameters.emailProperty[0]:null,this.appStartProperty=this.parameters.appStartProperty?this.parameters.appStartProperty[0]:null,this.appPendingProperty=this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:null,this.appCompleteProperty=this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:null,this.appDeclinedProperty=this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:null,this.appFraudProperty=this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:null,this.appErrorProperty=this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:null,this.prequalAppStartProperty=this.parameters.prequalAppStartProperty?this.parameters.prequalAppStartProperty[0]:null,this.prequalAppPendingProperty=this.parameters.prequalAppPendingProperty?this.parameters.prequalAppPendingProperty[0]:null,this.prequalAppCompleteProperty=this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:null,this.prequalAppDeclinedProperty=this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:null,this.prequalAppErrorProperty=this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:null,this.prequalNotInterestedProperty=this.parameters.prequalNotInterestedProperty?this.parameters.prequalNotInterestedProperty[0]:null,this.prequalSecuredInstallmentAppStartProperty=this.parameters.prequalSecuredInstallmentAppStartProperty?this.parameters.prequalSecuredInstallmentAppStartProperty[0]:null,this.prequalSecuredInstallmentAppPendingProperty=this.parameters.prequalSecuredInstallmentAppPendingProperty?this.parameters.prequalSecuredInstallmentAppPendingProperty[0]:null,this.prequalSecuredInstallmentAppCompleteProperty=this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:null,this.prequalSecuredInstallmentAppDeclinedProperty=this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:null,this.prequalSecuredInstallmentAppErrorProperty=this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:null,this.securedInstallmentAppStartProperty=this.parameters.securedInstallmentAppStartProperty?this.parameters.securedInstallmentAppStartProperty[0]:null,this.securedInstallmentAppPendingProperty=this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:null,this.securedInstallmentAppCompleteProperty=this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:null,this.securedInstallmentAppDeclinedProperty=this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:null,this.securedInstallmentAppFraudProperty=this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:null,this.securedInstallmentAppErrorProperty=this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:null,this.applyLoanAppStartProperty=this.parameters.applyLoanAppStartProperty?this.parameters.applyLoanAppStartProperty[0]:null,this.applyLoanAppPendingProperty=this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:null,this.applyLoanAppCompleteProperty=this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:null,this.applyLoanAppDeclinedProperty=this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:null,this.applyLoanAppFraudProperty=this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:null,this.applyLoanAppErrorProperty=this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:null,this.timeline={results:{events:[]}}},getPreloadProperties:function(){return[PII_INTERNAL_PROPERY,VEHICHLE_INFO_INTERNAL_PROPERTY,this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:"",this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:"",this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:"",this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:"",this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:"",this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:"",this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:"",this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:"",this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:"",this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:"",this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:"",this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:"",this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:"",this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:"",this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:"",this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:"",this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:"",this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:"",this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:"",this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:"",this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:""].filter(function(e){return""!==e})},onLoad:function(){if(this.dataLayerName&&this.timelineEventType){var e=this,t=0;(function r(){if(e._getDataLayer())e._monitorDataLayerUpdates();else{if(t>20)return;t++,window.setTimeout(r,250)}}).call(this)}},_monitorDataLayerUpdates:function(){var e=this._getDataLayer(),t=(e.length,this._getDataHash(e)),r=this;this.pollingInterval=window.setInterval(function(){var e=r._getDataLayer(),p=r._getDataHash(e);t!==p&&(r._importFromDataLayer(e),e.length,t=p)},1e3),this._importFromDataLayer(e)},_getDataLayer:function(){if(!this._dataLayer){for(var e=this.dataLayerName.split("."),t=window,r=0;r<e.length;r++)t=t&&t[e[r]]?t[e[r]]:null;this._dataLayer=t}return this._dataLayer},_getDataHash:function(e){var t=this._getDataString(e);return t?this.md5(t):null},_getDataString:function(e){var t=null;try{t=JSON.stringify(e)}catch(r){t=this._stringify(e)}return t},_stringify:function(e){var t=[],r=JSON.stringify(e,function(e,r){if("object"==typeof r&&null!==r){if(-1!==t.indexOf(r))return;t.push(r)}return r});return t=null,r},_addDaysToTimestamp:function(e,t){return isNaN(parseInt(e))||isNaN(parseInt(t))||e&&13!==e.toString().length?e:parseInt(e)+TIME_MILLS_DAY*parseInt(t)},_importFromDataLayer:function(e){if(e.pageInfo){var t=e.pageInfo[CLIENT_NAME_ATTR];if(this.clientNames.length>0&&-1===this.clientNames.indexOf(t))console.info("Listener ID: "+this.context.getInteractionId()+" -- Client name mismatch, skipping. Client: "+e.pageInfo[CLIENT_NAME_ATTR]);else{var r=new Date,p=r.getTime();this._currentMills=p;var s={};if(this.timelineEventType===MARKETING_ET)for(i=0;i<MARKETING_ATTRS.length;i++)e.pageInfo[MARKETING_ATTRS[i]]&&(s[MARKETING_ATTRS[i]]=e.pageInfo[MARKETING_ATTRS[i]]);if(this.timelineEventType===APPLICATION_ET){for(i=0;i<APPLICATION_ATTRS.length;i++)e.pageInfo[APPLICATION_ATTRS[i]]&&(s[APPLICATION_ATTRS[i]]=e.pageInfo[APPLICATION_ATTRS[i]]);if(e.formAction){var a=e.formAction[ACTION_ATTR];a&&(s[ACTION_ATTR]=a),e.formAction[APP_TYPE_ATTR]&&(s[APP_TYPE_ATTR]=e.formAction[APP_TYPE_ATTR])}var l=e.pageInfo[PAGE_KIND_ATTR];this._currentPageKind=l;var o=e.pageInfo[PAGE_NAME_ATTR];this._currentPageName=o;var n=e.pageInfo[PAGE_FUNCTION_ATTR],u=e.pageInfo[PAGE_SUB_FUNCTION_ATTR],h=this._getSessionIdTimestamp();if(LANDING_PAGE_NAMES.indexOf(o)>-1&&h&&this._currentMills-h>=1e4?this._setSessionId():LANDING_PAGE_NAMES.indexOf(o)>-1&&!h?this._setSessionId():this._getSessionId()||this._setSessionId(),l===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT)&&o===PREQUAL_OFFER_PAGE_NAME){var m=this._addDaysToTimestamp(p,30);s[OFFER_EXPIRES_ATTR]=new Date(m)}l===PAGE_KIND_PREQUAL&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL)?(this.prequalNotInterestedProperty&&this._prequalNotInterestedListener(t,o),this._handlePrequal(t,o)):l===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT)?(this._handlePrequalSecuredInstallment(t,o),VEHICHLE_PAGE_NAME===o&&this._captureVehicleAttr(t,l),this._addVehicleAttr(t,l,s)):l===PAGE_KIND_APPLY&&this.selectedPageKind.includes(PAGE_KIND_APPLY)?this._handleApply(t,o):l===PAGE_KIND_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_SECURED_INSTALLMENT)?this._handleSecuredInstallment(t,o):l===PAGE_KIND_APPLY_LOAN&&this.selectedPageKind.includes(PAGE_KIND_APPLY_LOAN)&&this._handleApplyLoan(t,o),o===YOUR_INFORMATION_PAGE_NAME&&this._capturePII(t,l,n,u),o===INFORMATION_REVIEW_PAGE_NAME&&this._capturePiiChanges(t,l),this._addPII(t,l,s)}s[DATE_STAMP_ATTR]=r,s[URL_ATTR]=window.location.href;try{this._getSessionId()&&(s[APPLICATION_SESSION_ID_ATTR]=this._getSessionId())}catch(e){this.blueConicClient.util.log(e)}this.lastUpdateTimeProperty&&this.profile.setValue(this.lastUpdateTimeProperty,p),this._updateProfile(r,s)}}},_updateProfile:function(e,t){this.blueConicClient.profile.updateProfile(this,function(){this.blueConicClient.createEvent("BC_DATALAYER_UPDATED")}),e&&t&&this._createTimelineEvent(e,t)},_createTimelineEvent:function(e,t){var r=JSON.parse(JSON.stringify(t));delete r.DateTimestamp,delete r.Token;var p=this._getDataHash(r),i=this._getTimelineCreated(p);window._dataLayerListenerEventsCache&&window._dataLayerListenerEventsCache[p]&&this._currentMills-window._dataLayerListenerEventsCache[p]<=1e4||i&&this._currentMills-i<=1e4||(window._dataLayerListenerEventsCache[p]=this._currentMills,this._setTimelineCreated(p),this.blueConicClient.profile.getProfile().timeline.createEvent(this.timelineEventType,e,t,this,function(){this.timeline.results.events.push({eventType:this.timelineEventType,eventDate:e,eventData:t})}))},_handleApply:function(e,t){if(START_PAGE_NAMES.indexOf(t)>-1){if(this.appStartProperty&&this.profile.addValue(this.appStartProperty,e),this.appCompleteProperty){var r=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(r,e),this.profile.setValues(this.appCompleteProperty,r)}if(this.appPendingProperty){var p=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.appPendingProperty,p)}if(this.appDeclinedProperty){var i=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.appDeclinedProperty,i)}if(this.appFraudProperty){var s=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.appFraudProperty,s)}if(this.appErrorProperty){var a=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.appErrorProperty,a)}}if(PENDING_PAGE_NAMES.indexOf(t)>-1){if(this.appPendingProperty&&this.profile.addValue(this.appPendingProperty,e),this.appCompleteProperty){var l=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.appCompleteProperty,l)}if(this.appDeclinedProperty){var o=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.appDeclinedProperty,o)}if(this.appErrorProperty){var n=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.appErrorProperty,n)}if(this.appFraudProperty){var u=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.appFraudProperty,u)}}if(COMPLETE_PAGE_NAMES.indexOf(t)>-1){if(this.appCompleteProperty&&this.profile.addValue(this.appCompleteProperty,e),this.appPendingProperty){var h=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.appPendingProperty,h)}if(this.appDeclinedProperty){var m=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.appDeclinedProperty,m)}if(this.appErrorProperty){var d=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.appErrorProperty,d)}if(this.appFraudProperty){var y=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.appFraudProperty,y)}}if(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1){if(this.appDeclinedProperty&&this.profile.addValue(this.appDeclinedProperty,e),this.appPendingProperty){var P=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.appPendingProperty,P)}if(this.appCompleteProperty){var A=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.appCompleteProperty,A)}if(this.appFraudProperty){var c=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.appFraudProperty,c)}if(this.appErrorProperty){var _=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.appErrorProperty,_)}}if(t.toLowerCase().indexOf("fraud")>-1){if(this.appFraudProperty&&this.profile.addValue(this.appFraudProperty,e),this.appPendingProperty){var f=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.appPendingProperty,f)}if(this.appCompleteProperty){var I=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.appCompleteProperty,I)}if(this.appDeclinedProperty){var E=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.appDeclinedProperty,E)}if(this.appErrorProperty){var S=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.appErrorProperty,S)}}if(t.toLowerCase().indexOf("error")>-1){if(this.appErrorProperty&&this.profile.addValue(this.appErrorProperty,e),this.appPendingProperty){var L=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(L,e),this.profile.setValues(this.appPendingProperty,L)}if(this.appCompleteProperty){var g=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.appCompleteProperty,g)}if(this.appFraudProperty){var T=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.appFraudProperty,T)}if(this.appDeclinedProperty){var v=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.appDeclinedProperty,v)}}},_handlePrequal:function(e,t){if(PREQUAL_START_PAGE_NAMES.indexOf(t)>-1){if(this.prequalAppStartProperty&&this.profile.addValue(this.prequalAppStartProperty,e),this.prequalAppCompleteProperty){var r=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(r,e),this.profile.setValues(this.prequalAppCompleteProperty,r)}if(this.prequalAppDeclinedProperty){var p=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.prequalAppDeclinedProperty,p)}if(this.prequalAppErrorProperty){var i=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.prequalAppErrorProperty,i)}}if(COMPLETE_PAGE_NAMES.indexOf(t)>-1){if(this.prequalAppCompleteProperty&&this.profile.addValue(this.prequalAppCompleteProperty,e),this.prequalAppDeclinedProperty){var s=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.prequalAppDeclinedProperty,s)}if(this.prequalAppErrorProperty){var a=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.prequalAppErrorProperty,a)}}if(PREQUAL_DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1){if(this.prequalAppDeclinedProperty&&this.profile.addValue(this.prequalAppDeclinedProperty,e),this.prequalAppCompleteProperty){var l=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.prequalAppCompleteProperty,l)}if(this.prequalAppErrorProperty){var o=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.prequalAppErrorProperty,o)}}if(t.toLowerCase().indexOf("error")>-1){if(this.prequalAppErrorProperty&&this.profile.addValue(this.prequalAppErrorProperty,e),this.prequalAppCompleteProperty){var n=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.prequalAppCompleteProperty,n)}if(this.prequalAppDeclinedProperty){var u=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.prequalAppDeclinedProperty,u)}}},_handlePrequalSecuredInstallment:function(e,t){if(PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES.indexOf(t)>-1){if(this.prequalSecuredInstallmentAppStartProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppStartProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var r=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(r,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,r)}if(this.prequalSecuredInstallmentAppDeclinedProperty){var p=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,p)}if(this.prequalSecuredInstallmentAppFraudProperty){var i=this.profile.getValues(this.prequalSecuredInstallmentAppFraudProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.prequalSecuredInstallmentAppFraudProperty,i)}if(this.prequalSecuredInstallmentAppErrorProperty){var s=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,s)}}if(PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES.indexOf(t)>-1){if(this.prequalSecuredInstallmentAppCompleteProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppCompleteProperty,e),this.prequalSecuredInstallmentAppDeclinedProperty){var a=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,a)}if(this.prequalSecuredInstallmentAppErrorProperty){var l=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,l)}}if(PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1){if(this.prequalSecuredInstallmentAppDeclinedProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppDeclinedProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var o=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,o)}if(this.prequalSecuredInstallmentAppErrorProperty){var n=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,n)}}if(t.toLowerCase().indexOf("error")>-1){if(this.prequalSecuredInstallmentAppErrorProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppErrorProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var u=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,u)}if(this.prequalSecuredInstallmentAppDeclinedProperty){var h=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,h)}}},_prequalNotInterestedListener:function(e){var t=document.querySelectorAll('[data-reason="not_interested"]');t.length>0?t.forEach(function(t,r){t.addEventListener("click",function(){this.profile.addValue(this.prequalNotInterestedProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe('[data-reason="not_interested"]',this,function(){this._prequalNotInterestedListener(e)})},_handleSecuredInstallment:function(e,t){if(START_PAGE_NAMES.indexOf(t)>-1){if(this.securedInstallmentAppStartProperty&&this.profile.addValue(this.securedInstallmentAppStartProperty,e),this.securedInstallmentAppPendingProperty){var r=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(r,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,r)}if(this.securedInstallmentAppCompleteProperty){var p=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,p)}if(this.securedInstallmentAppDeclinedProperty){var i=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,i)}if(this.securedInstallmentAppFraudProperty){var s=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,s)}if(this.securedInstallmentAppErrorProperty){var a=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,a)}}if(t.toLowerCase().indexOf("pending")>-1){if(this.securedInstallmentAppPendingProperty&&this.profile.addValue(this.securedInstallmentAppPendingProperty,e),this.securedInstallmentAppCompleteProperty){var l=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,l)}if(this.securedInstallmentAppDeclinedProperty){var o=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,o)}if(this.securedInstallmentAppErrorProperty){var n=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,n)}if(this.securedInstallmentAppFraudProperty){var u=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,u)}}if(COMPLETE_PAGE_NAMES.indexOf(t)>-1){if(this.securedInstallmentAppCompleteProperty&&this.profile.addValue(this.securedInstallmentAppCompleteProperty,e),this.securedInstallmentAppPendingProperty){var h=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,h)}if(this.securedInstallmentAppDeclinedProperty){var m=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,m)}if(this.securedInstallmentAppErrorProperty){var d=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,d)}if(this.securedInstallmentAppFraudProperty){var y=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,y)}}if(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1){if(this.securedInstallmentAppDeclinedProperty&&this.profile.addValue(this.securedInstallmentAppDeclinedProperty,e),this.securedInstallmentAppPendingProperty){var P=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,P)}if(this.securedInstallmentAppCompleteProperty){var A=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,A)}if(this.securedInstallmentAppFraudProperty){var c=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,c)}if(this.securedInstallmentAppErrorProperty){var _=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,_)}}if(t.toLowerCase().indexOf("fraud")>-1){if(this.securedInstallmentAppFraudProperty&&this.profile.addValue(this.securedInstallmentAppFraudProperty,e),this.securedInstallmentAppPendingProperty){var f=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,f)}if(this.securedInstallmentAppCompleteProperty){var I=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,I)}if(this.securedInstallmentAppDeclinedProperty){var E=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,E)}if(this.securedInstallmentAppErrorProperty){var S=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,S)}}if(t.toLowerCase().indexOf("error")>-1){if(this.securedInstallmentAppErrorProperty&&this.profile.addValue(this.securedInstallmentAppErrorProperty,e),this.securedInstallmentAppPendingProperty){var L=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(L,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,L)}if(this.securedInstallmentAppCompleteProperty){var g=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,g)}if(this.securedInstallmentAppFraudProperty){var T=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,T)}if(this.securedInstallmentAppDeclinedProperty){var v=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,v)}}},_handleApplyLoan:function(e,t){if(START_PAGE_NAMES.indexOf(t)>-1){if(this.applyLoanAppStartProperty&&this.profile.addValue(this.applyLoanAppStartProperty,e),this.applyLoanAppPendingProperty){var r=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(r,e),this.profile.setValues(this.applyLoanAppPendingProperty,r)}if(this.applyLoanAppCompleteProperty){var p=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.applyLoanAppCompleteProperty,p)}if(this.applyLoanAppDeclinedProperty){var i=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,i)}if(this.applyLoanAppFraudProperty){var s=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.applyLoanAppFraudProperty,s)}if(this.applyLoanAppErrorProperty){var a=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.applyLoanAppErrorProperty,a)}}if(t.toLowerCase().indexOf("pending")>-1){if(this.applyLoanAppPendingProperty&&this.profile.addValue(this.applyLoanAppPendingProperty,e),this.applyLoanAppCompleteProperty){var l=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.applyLoanAppCompleteProperty,l)}if(this.applyLoanAppDeclinedProperty){var o=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,o)}if(this.applyLoanAppErrorProperty){var n=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.applyLoanAppErrorProperty,n)}if(this.applyLoanAppFraudProperty){var u=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.applyLoanAppFraudProperty,u)}}if(COMPLETE_PAGE_NAMES.indexOf(t)>-1){if(this.applyLoanAppCompleteProperty&&this.profile.addValue(this.applyLoanAppCompleteProperty,e),this.applyLoanAppPendingProperty){var h=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.applyLoanAppPendingProperty,h)}if(this.applyLoanAppDeclinedProperty){var m=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,m)}if(this.applyLoanAppErrorProperty){var d=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.applyLoanAppErrorProperty,d)}if(this.applyLoanAppFraudProperty){var y=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.applyLoanAppFraudProperty,y)}}if(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1){if(this.applyLoanAppDeclinedProperty&&this.profile.addValue(this.applyLoanAppDeclinedProperty,e),this.applyLoanAppPendingProperty){var P=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.applyLoanAppPendingProperty,P)}if(this.applyLoanAppCompleteProperty){var A=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.applyLoanAppCompleteProperty,A)}if(this.applyLoanAppFraudProperty){var c=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.applyLoanAppFraudProperty,c)}if(this.applyLoanAppErrorProperty){var _=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.applyLoanAppErrorProperty,_)}}if(t.toLowerCase().indexOf("fraud")>-1){if(this.applyLoanAppFraudProperty&&this.profile.addValue(this.applyLoanAppFraudProperty,e),this.applyLoanAppPendingProperty){var f=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.applyLoanAppPendingProperty,f)}if(this.applyLoanAppCompleteProperty){var I=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.applyLoanAppCompleteProperty,I)}if(this.applyLoanAppDeclinedProperty){var E=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,E)}if(this.applyLoanAppErrorProperty){var S=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.applyLoanAppErrorProperty,S)}}if(t.toLowerCase().indexOf("error")>-1){if(this.applyLoanAppErrorProperty&&this.profile.addValue(this.applyLoanAppErrorProperty,e),this.applyLoanAppPendingProperty){var L=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(L,e),this.profile.setValues(this.applyLoanAppPendingProperty,L)}if(this.applyLoanAppCompleteProperty){var g=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.applyLoanAppCompleteProperty,g)}if(this.applyLoanAppFraudProperty){var T=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.applyLoanAppFraudProperty,T)}if(this.applyLoanAppDeclinedProperty){var v=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,v)}}},_generateProfileKey:function(e){if(!e)return null;try{return this.md5((new Date).getTime().toString()+"_"+e.toLowerCase()).substring(6,26)}catch(e){return console.error("[BC ERROR] Error generating dummyProfileKey key: "+e),null}},_captureVehicleAttr:function(e,t){var r=document.querySelector('button[data-reason="residence"]')||null;null!==r?r.addEventListener("click",function(){var r=document.querySelector("#native-select-vehicleType-native"),p=r?r.options[r.selectedIndex].text:null,i=document.querySelector("#native-select-manufacturerOptions-native"),s=i?i.options[i.selectedIndex].text:null,a=document.querySelector("#native-select-modelYear-native"),l=a?a.options[a.selectedIndex].text:null,o=document.querySelector("#native-select-modelDesc-native"),n=o?o.options[o.selectedIndex].text:null;this.profile.setValue(VEHICHLE_INFO_INTERNAL_PROPERTY,JSON.stringify({currentClient:e,currentPageKind:t,vehicleType:p,vehicleMake:s,vehicleYear:l,vehicleModel:n})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-reason="residence"]',this,function(){this._captureVehicleAttr(e,t)})},_addVehicleAttr:function(e,t,r){var p=this.profile.getValue(VEHICHLE_INFO_INTERNAL_PROPERTY);if(p)try{var i=JSON.parse(p);e===i.currentClient&&t===i.currentPageKind&&(i.vehicleType&&(r[VEHICLE_TYPE_ATTR]=i.vehicleType),i.vehicleYear&&(r[VEHICLE_YEAR_ATTR]=i.vehicleYear),i.vehicleMake&&(r[VEHICLE_MAKE_ATTR]=i.vehicleMake),i.vehicleModel&&(r[VEHICLE_MODEL_ATTR]=i.vehicleModel))}catch(e){}},_capturePiiChanges:function(e,t){var r=document.querySelector('button[data-test="save1-button"]')?document.querySelector('button[data-test="save1-button"]'):null;null!==r?r.addEventListener("click",function(){var r=document.querySelector("#firstName-primary")?document.querySelector("#firstName-primary").value:null,p=document.querySelector("#lastName-primary")?document.querySelector("#lastName-primary").value:null,i=document.querySelector("#emailAddress-primary")?document.querySelector("#emailAddress-primary").value:null,s=null,a=null;i&&(t===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&(s=this._generateProfileKey(i)),a=this._validateEmail(i),this.emailProperty&&this.profile.setValue(this.emailProperty,i)),this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:r,lastName:p,email:i,currentClient:e,currentPageKind:t,isBadEmail:a,dummyProfileKey:s})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-test="save1-button"]',this,function(){this._capturePiiChanges(e,t)})},_capturePII:function(e,t,r,p){submitButton=document.querySelector('button[data-reason="productinfo"]')?document.querySelector('button[data-reason="productinfo"]'):document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]')?document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]'):document.querySelector('button[data-reason="Productinfo"]')?document.querySelector('button[data-reason="Productinfo"]'):document.querySelector('button[title="NEXT: VEHICLE INFO"]')?document.querySelector('button[title="NEXT: VEHICLE INFO"]'):document.querySelector("button#submitButton")?document.querySelector("button#submitButton"):null,null!==submitButton?submitButton.addEventListener("click",function(){var i=document.querySelector("#firstName")?document.querySelector("#firstName").value:null,s=document.querySelector("#lastName")?document.querySelector("#lastName").value:null;if(!i&&!s&&document.querySelector("#fullName")||!i&&!s&&document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")){var a=document.querySelector("#fullName")?document.querySelector("#fullName").innerText:document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")?document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm").innerText:null;a&&(i=-1!==a.indexOf(" ")?a.substring(0,a.indexOf(" ")):a,s=-1!==a.indexOf(" ")?a.substring(a.indexOf(" ")+1):null)}i||s||(i=(i=document.querySelector('div.prefill-details label[for="firstName"]')?document.querySelector('div.prefill-details label[for="firstName"]').innerText:null)?i.replace(/\s$/g,""):null,s=(s=document.querySelector('div.prefill-details label[for="lastName"]')?document.querySelector('div.prefill-details label[for="lastName"]').innerText:null)?s.replace(/\s$/g,""):null);var l=document.querySelector("#confirmEmailAddress")?document.querySelector("#confirmEmailAddress").value:document.querySelector("#confirmEmailCheck")?document.querySelector("#confirmEmailCheck").value:null,o=null,n=null;l&&(o=this._generateProfileKey(l),n=this._validateEmail(l),this.emailProperty&&this.profile.setValue(this.emailProperty,l));var u=document.querySelector("#applyVTO_applicantVO_zip_id")?document.querySelector("#applyVTO_applicantVO_zip_id").value:document.querySelector("#zipCode-primary")?document.querySelector("#zipCode-primary").value:null;if(!u){var h=document.querySelector("#address")?document.querySelector("#address").innerText:document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(2) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")?document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(2) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm").innerText:null;h&&(u=h.substring(h.lastIndexOf(", ")+2))}this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:i,lastName:s,email:l,currentClient:e,currentPageKind:t,isBadEmail:n,dummyProfileKey:o,zipCode:u,prefill:"payfone"===r&&("prefilled"===p||"no_user_data_in_payfone"===p)})),this.blueConicClient.profile.updateProfile()}.bind(this)):(this.blueConicClient.position.subscribe("button#submitButton",this,function(){this._capturePII(e,t,r,p)}),this.blueConicClient.position.subscribe('button[data-reason="productinfo"]',this,function(){this._capturePII(e,t,r,p)}),this.blueConicClient.position.subscribe('button[data-reason="Productinfo"]',this,function(){this._capturePII(e,t,r,p)}),this.blueConicClient.position.subscribe('button[data-reason="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,t,r,p)}),this.blueConicClient.position.subscribe('button[title="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,t,r,p)}))},_addPII:function(e,t,r){var p=this.profile.getValue(PII_INTERNAL_PROPERY);if(p)try{var i=JSON.parse(p);e===i.currentClient&&t===i.currentPageKind&&(r[FIRST_NAME_ATTR]=i.firstName,r[LAST_NAME_ATTR]=i.lastName,i.email&&(r[EMAIL_ADDRESS_ATTR]=i.email,r[IS_BAD_EMAIL_ATTR]=i.isBadEmail?i.isBadEmail:this._validateEmail(i.email)),i.dummyProfileKey&&(r[DUMMY_PROFILE_KEY_ATTR]=i.dummyProfileKey),r[PREFILL_ATTR]=i.prefill,i.zipCode&&(r[ZIP_CODE_ATTR]=i.zipCode))}catch(e){}},_validateEmail:function(e){var t=!1;(e.length<5||null===e.match(/@/g)||1!==e.match(/@/g).length||null!==e.match(/\s/g))&&(t=!0);var r=e.split("@")[1];null!==r.match(/\./g)&&1===r.match(/\./g).length&&null===r.match(/,/g)||(t=!0);var p=e.substr(0,1);["@",".",","," ","/","\\","!","#","$","%","^","&","*","(",")","+","-","~"].indexOf(p)>-1&&(t=!0);var i=e.substring(e.lastIndexOf(".")+1);return-1===["COM","NET","EDU","ORG","MIL","GOV","US","BIZ"].indexOf(i.toUpperCase())&&(t=!0),t},_indexOf:function(e,t){return Array.isArray(e)?e.indexOf(t):-1},_removeItemFromArray:function(e,t){if(Array.isArray(e))for(var r;-1!==(r=this._indexOf(e,t));)e.splice(r,1)},_encodeCookieValue:function(e){return"string"!=typeof e&&(e=JSON.stringify(e)),encodeURIComponent(e.replace(/[\n\r]/g,""))},_decodeCookieValue:function(e){return decodeURIComponent(e)},_setCookie:function(e,t,r){if(r){var p=new Date,i=r*MINUTES_TO_MILLS;p.setTime(p.getTime()+i),document.cookie=e+"="+this._encodeCookieValue(t)+(null==r?"":"; expires="+p.toUTCString())+"; path=/; SameSite=None; Secure"}else document.cookie=e+"="+this._encodeCookieValue(t)+"; path=/; SameSite=None; Secure"},_getCookie:function(e){var t,r,p=e+"=",i="";return document.cookie.length>0&&-1!==(t=document.cookie.indexOf(p))&&(t+=p.length,-1===(r=document.cookie.indexOf(";",t))&&(r=document.cookie.length),i=this._decodeCookieValue(document.cookie.substring(t,r))),i},_checkSessionStorageSupport:function(){var e="__storageTest";try{return window.sessionStorage.setItem(e,e),window.sessionStorage.removeItem(e),!0}catch(e){return!1}},_getSessionId:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME):null},_getSessionIdTimestamp:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):null},_setSessionId:function(){var e=this._uuid();return this._checkSessionStorageSupport()&&(window.sessionStorage.setItem(APPLICATION_SESSION_ID_COOKIE_NAME,e),window.sessionStorage.setItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills)),this._setCookie(APPLICATION_SESSION_ID_COOKIE_NAME,e,null),this._setCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills,null),e},_getTimelineCreated:function(e){return this._checkSessionStorageSupport()?window.sessionStorage.getItem(e)?window.sessionStorage.getItem(e):null:this._getCookie(e)?this._getCookie(e):null},_setTimelineCreated:function(e){this._checkSessionStorageSupport()?window.sessionStorage.setItem(e,this._currentMills):this._setCookie(e,this._currentMills,null)},_uuid:function(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(e){return(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})}};try{var InteractionTypeImpl=InteractionType.extend(frontendListener)}catch(e){try{module.exports=frontendListener}catch(e){}};var a = [];var i='listener_datalayer_syf';a.push({url: '/plugins/listener_datalayer_syf/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_datalayer_syf/ts_d14f0559d1f9fe574706ef011d9d7b2c/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PARAMETERS:{ENGAGEMENT_PROPERTY:"engagementProperty",ENGAGEMENT_SCORE_PROPERTY:"engagementScoreProperty",DECAY:"decay",ENGAGEMENT_ON_CHANNEL:"engagementOnChannel"},DEFAULTS:{ENGAGEMENT:"engagement",ENGAGEMENT_SCORE:"engagement_score",VISITS:"visits",CLICKCOUNT:"clickcount"},SCORES:{LOW:"low",MEDIUM:"medium",HIGH:"high"},DEFAULT_DECAY:50,init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=t.getParameters(),this._channelId=e.getChannelId();var i="true"===this.getParameterValue(this.PARAMETERS.ENGAGEMENT_ON_CHANNEL)&&this._channelId;this.properties={engagement:this.getParameterValue(this.PARAMETERS.ENGAGEMENT_PROPERTY,this.DEFAULTS.ENGAGEMENT),engagementScore:this.getParameterValue(this.PARAMETERS.ENGAGEMENT_SCORE_PROPERTY,this.DEFAULTS.ENGAGEMENT_SCORE),engagementObject:"_"+this.getParameterValue(this.PARAMETERS.ENGAGEMENT_PROPERTY,this.DEFAULTS.ENGAGEMENT),visits:this.DEFAULTS.VISITS+(i?"_"+this._channelId:""),clickcount:this.DEFAULTS.CLICKCOUNT+(i?"_"+this._channelId:"")};var r=new Date(2015,0,1,0,0,0,0),n=(new Date).getTime()-r.getTime();this.days=Math.floor(n/864e5),this.weekNr=Math.floor(this.days/7),this.decay=parseInt(this.getParameterValue(this.PARAMETERS.DECAY))||this.DEFAULT_DECAY},getPreloadProperties:function(){return[this.properties.engagementObject,this.properties.visits,this.properties.clickcount]},onLoad:function(){var e=this.context.getProfile(),t=e.getValue(this.properties.clickcount)?parseInt(e.getValue(this.properties.clickcount)):0,i=e.getValue(this.properties.visits)?parseInt(e.getValue(this.properties.visits)):0,r=e.getValues(this.properties.engagementObject).map(function(e){return this.blueConicClient.json.parse(e)||{}}.bind(this)),n=this._clearInvalidValues(r,i),s=n.cleanedValues,a=this._sumInternalValues(s),h=this._addCurrentWeek(a,t,i),o=this._getCalculated(a,i,t),c=this._calculateScore(o);isNaN(c)||((h||s.length>1||n.removedValues)&&e.setValue(this.properties.engagementObject,JSON.stringify(a)),this._setEngagement(e,c))},getParameterValue:function(e,t){return this.parameters&&this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:t},_clearInvalidValues:function(e,t){var i=!1;return e.forEach(function(e){var r=Object.keys(e).filter(function(e){return-1!==e.indexOf("v")}).map(function(e){return parseInt(e.substring(1))});r.sort(function(e,t){return t-e}),r.forEach(function(r){(i||e["v"+r]>t||e["v"+r]<0)&&(delete e["v"+r],delete e["c"+r],i=!0)})},this),{removedValues:i,cleanedValues:e}},_sumInternalValues:function(e){var t={};return e.forEach(function(e){Object.keys(e).forEach(function(i){t[i]=(t[i]||0)+e[i]})}),t},_setEngagement:function(e,t){var i=this.context.getParameters(),r=parseInt(i.lowTreshold?i.lowTreshold[0]:i.lowTreshold),n=parseInt(i.highTreshold?i.highTreshold[0]:i.highTreshold),s=this.SCORES.MEDIUM;t<r?s=this.SCORES.LOW:t>n&&(s=this.SCORES.HIGH),e.setValue(this.properties.engagementScore,t),e.setValue(this.properties.engagement,s),this.blueConicClient.profile.updateProfile()},_addCurrentWeek:function(e,t,i){var r=!1;return e["v"+this.weekNr]||(e["v"+this.weekNr]=i,r=!0),e["c"+this.weekNr]||(e["c"+this.weekNr]=t,r=!0),r},_calculateScore:function(e){for(var t=0,i=0;i<e.length;i++){var r=this._getWeight(i+1,this.decay),n=e[i];t+=(n.clickCount+5*n.visits)*r}return t=Math.floor(t)},_getWeight:function(e,t){return e<=.1*t?1:e<=.2*t?.8:e<=.4*t?.5:e<=t?.3:.1},_getCalculated:function(e,t,i){for(var r=[],n=this.weekNr;n>0;n--){var s=0;e["v"+n]&&(t-=s=Math.max(t-e["v"+n],0));var a=0;e["c"+n]&&(i-=a=Math.max(i-e["c"+n],0)),r.push({week:n,visits:s,clickCount:a})}return r}});var a = [];var i='listener_engagement';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t||null,this.POLLING_TIMEOUT=1e3,this.parameters=t.getParameters()},getPreloadProperties:function(){return["funnel_timestamp","funnel_busy_with","funnel_steps","funnel_laststep","funnel_lastfield"]},_setLastFocus:function(e){this.context.getProfile().setValue("funnel_lastfield",this._funnelName+" - "+this._currentStepId+": "+e),this.blueConicClient.profile.updateProfile()},_addBindings:function(){var e=this,t=["button","hidden","reset","submit"],inputEvtHandler=function(n){var r=n.target.type;-1===t.indexOf(r)&&e._setLastFocus(e._getFieldName(n.target))},selectAndTextareaEvtHandler=function(t){e._setLastFocus(e._getFieldName(t.target))},n=document.querySelectorAll("input"),r=document.querySelectorAll("select"),i=document.querySelectorAll("textarea");Array.prototype.forEach.call(n,(function(e){e.removeEventListener("focus",inputEvtHandler),e.addEventListener("focus",inputEvtHandler)})),Array.prototype.forEach.call(r,(function(e){e.removeEventListener("focus",selectAndTextareaEvtHandler),e.addEventListener("focus",selectAndTextareaEvtHandler)})),Array.prototype.forEach.call(i,(function(e){e.removeEventListener("focus",selectAndTextareaEvtHandler),e.addEventListener("focus",selectAndTextareaEvtHandler)}))},_getFieldName:function(e){return e.getAttribute("name")||e.getAttribute("id")||e.getAttribute("autocomplete")||"Unnamed form field"},_urlsMatches:function(e,t){var n=this;return e.urlMatching.filter((function(e){return n._urlMatches(e,t)})).length>0},_urlMatches:function(e,t){var n=this._normalizeUrl(t),r=this._normalizeUrl(e.url),i=this._escapeRegularExpressionCharacters(r);try{return new RegExp(i,"i").test(n)}catch(a){return!1}},_escapeRegularExpressionCharacters:function(e){if(e){return e=(e=e.replace(/\.(?!\*)|[\\?]/g,(function(e){return"\\"+e}))).replace(/(\.\*|\*)/g,".*")}return""},_stepIsVisible:function(e,t){var n=this;return e.urlMatching.filter((function(e){return n._urlMatches(e,t)&&(!e.word||n._wordIsVisible(e.word))})).length>0},_wordIsVisible:function(e){return e=e.toLowerCase(),Array.prototype.filter.call(Array.prototype.filter.call(document.getElementsByTagName("*"),(function(t){return t.innerText&&-1!==t.innerText.toLowerCase().indexOf(e)})),(function(e){return e.offsetWidth>0&&e.offsetHeight>0})).length>0},_convertStepMapping:function(e,t){var n=this,r=t.map((function(e){return e.name}));return e.filter((function(e){return 0===e.indexOf(n._funnelName)})).map((function(e){var t,n=e.match(/'(.*)' to '(.*)'/);if(n&&n[1]&&n[2]&&-1!==r.indexOf(n[1])&&-1!==r.indexOf(n[2]))t={source:n[1],target:n[2]};else{var i=e.match(/started at '(.*)'/);i&&i[1]&&-1!==r.indexOf(i[1])&&(t={start:i[1]})}return t})).filter((function(e){return e}))},_getFollowedStepsMapping:function(e,t){var n=this.context.getProfile(),r=this._convertStepMapping(n.getValues("funnel_steps"),t),i=null,a=(t.slice(0,t.indexOf(e)),!1);return t.forEach((function(t){var n=t.name;(a=a||n===e)||r.filter((function(e){return e.start===n||e.target===n})).length>0&&(i=n)})),i?this._funnelName+" : '"+i+"' to '"+e+"'":this._funnelName+" : started at '"+e+"'"},_checkWordMatch:function(e){var t=this;setTimeout((function(){var n=!1;t._queue.forEach((function(r){t._stepIsVisible(r,e)&&(n=!0)})),n?t._onLoad():t._checkWordMatch(e)}),this.POLLING_TIMEOUT)},onLoad:function(){this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){this._onLoad()})),this._onLoad()},_handleEndReached:function(){var e=this.context.getProfile(),t=e.getValues("funnel_busy_with"),n=t.indexOf(this._funnelName);-1!==t.indexOf(this._funnelName)&&(t.splice(n,1),e.setValues("funnel_busy_with",t))},_getUrl:function(){return document.location.origin+document.location.pathname+document.location.search+document.location.hash},_getSteps:function(){var e=this.parameters.steps?this.parameters.steps[0]:this.parameters.steps;return e?this.blueConicClient.json.parse(e):[]},_normalizeUrl:function(e){return e=this._removeUrlPart(e,"http://"),e=this._removeUrlPart(e,"https://"),e=this._removeUrlPart(e,"www.")},_removeUrlPart:function(e,t){return 0===e.indexOf(t)&&(e=e.substring(t.length)),e},_onLoad:function(e){var t=this,n=this.context.getProfile();this._funnelName=this.parameters.funnelName?this.parameters.funnelName[0]:this.parameters.funnelName;var r=this._getSteps();if(0!==r.length){e=e||this._getUrl();var i=r.filter((function(n){return t._urlsMatches(n,e)}));this._queue=[];var a=null;if(i.forEach((function(n){t._stepIsVisible(n,e)?a=n:t._queue.push(n)})),this._queue.length>0&&this._checkWordMatch(e),null!==a){this._currentStepId=a.name,this._addBindings(),n.setValue("funnel_laststep",this._funnelName+" - "+this._currentStepId);var s=this._getFollowedStepsMapping(this._currentStepId,r);n.addValue("funnel_steps",s);var u=!1,l=r.filter((function(e){return(u=u||e.name===a.name)&&e.name!==a.name})),o=n.getValues("funnel_steps"),c=this._funnelName;l.forEach((function(e){o=o.filter((function(t){return 0!==t.indexOf(c+" :")||-1===t.indexOf("started at '"+e.name+"'")&&-1===t.indexOf("to '"+e.name+"'")}))})),n.setValues("funnel_steps",o),n.setValue("funnel_lastfield",""),this._currentStepId===r[r.length-1].name?this._handleEndReached():n.addValue("funnel_busy_with",this._funnelName);var f=this.blueConicClient.getCurrentDate().getTime();n.setValue("funnel_timestamp",f),this.blueConicClient.profile.updateProfile()}}}});var a = [];var i='listener_funnel';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(n,t){this.blueConicClient=n,this.context=t},getPreloadProperties:function(){return[]},onLoad:function(){}});var a = [];var i='listener_geolocation';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/'}]);})();(function(){ var frontendListener={init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.profileId=this.profile.getId(),this.ineractionId=this.context.getInteractionId(),this.parameters=this.context.getParameters(),this.isNewProfile=!1,this._getParameters(),this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){this.onLoad()}),this.blueConicClient.event.subscribe("server_side_profile_ready",this,function(){this.profileId=this.profile.getId(),this.hasServerSideProfile=!0})},_getParameters:function(){this.internalProperty="_LL_"+this.ineractionId,this._setSelectorParameters(),this._setDataLayerParameters(),this._setPageParameters(),this._setProfileParameters()},_setSelectorParameters:function(){this.usernameSelector=this.parameters.usernameSelector?this.parameters.usernameSelector[0]:null,this.submitSelector=this.parameters.submitSelector?this.parameters.submitSelector[0]:null,this.correlationIdKey=this.parameters.correlationIdKey?this.parameters.correlationIdKey[0]:null,this.correlationIdProperty=this.parameters.correlationIdProperty?this.parameters.correlationIdProperty[0]:null},_setDataLayerParameters:function(){this.dataLayerName=this.parameters.dataLayerName?this.parameters.dataLayerName[0]:"_SFDDL"},_setPageParameters:function(){this.loginPageKind=this.parameters.loginPageKind?this.parameters.loginPageKind[0]:null,this.loginPageName=this.parameters.loginPageName?this.parameters.loginPageName:[],this.successPageKind=this.parameters.successPageKind?this.parameters.successPageKind[0]:null,this.successPageName=this.parameters.successPageName?this.parameters.successPageName:[]},_setProfileParameters:function(){this.mergeProperty=this.parameters.mergeProperty?this.parameters.mergeProperty[0]:null,this.latestLoginDateProperty=this.parameters.latestLoginDateProperty?this.parameters.latestLoginDateProperty[0]:null,this.standardizeValues=this.parameters.standardizeValues?this.parameters.standardizeValues[0]:"none",this.algorithm=this.parameters.algorithm?this.parameters.algorithm[0]:"sha256",this.executionMethod=this.parameters.executionMethod?this.parameters.executionMethod[0]:"serverSide"},getPreloadProperties:function(){return[this.internalProperty,this.mergeProperty,this.latestLoginDateProperty,this.correlationIdProperty]},onLoad:function(){if(this.usernameSelector&&this.submitSelector&&this.dataLayerName&&this.loginPageKind&&0!==this.loginPageName.length&&this.successPageKind&&0!==this.successPageName.length&&this.mergeProperty){var e=this,t=0;(function i(){if(window[e.dataLayerName]&&window[e.dataLayerName].pageInfo&&window[e.dataLayerName].pageInfo.pagekind&&window[e.dataLayerName].pageInfo.pagename)e._bindListener();else{if(t>40)return;t++,window.setTimeout(i,250)}}).call(this)}},_bindListener:function(){const e=this._getPageInfo();this._handleCorrelationId(e.correlationId),this._handlePageType(e.pageKind,e.pageName),this.blueConicClient.profile.updateProfile()},_getPageInfo:function(){const e=window[this.dataLayerName],t=e&&e.pageInfo;return{pageKind:t&&t.pagekind?t.pagekind:null,pageName:t&&t.pagename?t.pagename:null,correlationId:this.correlationIdKey&&t&&t[this.correlationIdKey]?t[this.correlationIdKey]:null}},_handleCorrelationId:function(e){e&&this.correlationIdProperty&&this._setCorrelationId(e)},_handlePageType:function(e,t){e===this.loginPageKind&&this.loginPageName.includes(t)&&(this._checkProfileExists(),this._startFormListener()),e===this.successPageKind&&this.successPageName.includes(t)&&this._setMergeProperty()},_checkProfileExists:function(){"serverSide"===this.executionMethod?this.profileId?(this._splitCheck(),this.hasServerSideProfile=!0):this._setServersideProperty():this._splitCheck()},_setServersideProperty:function(){this._setServerSideHashDate()},_setServerSideHashDate:function(){this.isNewProfile=!0,this.profile.setValue("ss_login_profile_create_date",this.blueConicClient.getCurrentDate().getTime()),this.blueConicClient.profile.updateProfile(this,function(){this.blueConicClient.createEvent("server_side_profile_ready",[this.ineractionId])})},_startFormListener:function(){var e=document.querySelector(this.submitSelector)||null;null!==e&&e.addEventListener("click",function(){var e=document.querySelector(this.usernameSelector)?document.querySelector(this.usernameSelector).value:null;e&&(e=this._normalizeValueCasing(e),"serverSide"===this.executionMethod&&void 0!==this.profileId&&e?this._createServerSideHash(e):e&&this._createClientSideHash(e))}.bind(this))},_splitCheck:function(){this._hasValueCheck()},_splitProfile:function(){this.blueConicClient.profile.createProfile(),this.profile=this.blueConicClient.profile.getProfile(),this.profileId=this.profile.getId(),this._setServerSideHashDate()},_hasValueCheck:function(){var e=this,t=this.blueConicClient.getRestEndpoint("listener_login_syf/exists")+"?itemId="+this.ineractionId+"&profileId="+this.profileId,i=new XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",function(){try{if(200!==this.status)return void e.blueConicClient.util.log("[ERROR] Unexpected response status code from exists endpoint: "+this.status);"true"===i.responseText&&e._splitProfile()}catch(t){e.blueConicClient.util.log("[ERROR] "+t.message)}}),i.open("GET",t),i.send()},_normalizeValueCasing:function(e){try{return e?this.standardizeValues&&"lower"===this.standardizeValues?e.toString().toLowerCase():this.standardizeValues&&"upper"===this.standardizeValues?e.toString().toUpperCase():e:null}catch(t){return e}},_createServerSideHash:function(e){var t=this.blueConicClient.getRestEndpoint("listener_login_syf/hash")+"?itemId="+this.ineractionId+"&profileId="+this.profileId,i=JSON.stringify({value:e}),r=new Blob([i],{type:"application/json; charset=UTF-8"});navigator.sendBeacon(t,r)},_createClientSideHash:function(e){try{"md5"===this.algorithm?this._saveHash(this.md5(e)):"sha1"===this.algorithm?this._saveHash(this.sha1(e)):"sha256"===this.algorithm?this._saveHash(this.sha256(e)):"sha512"===this.algorithm&&this._saveHash(this.sha512(e))}catch(e){this.blueConicClient.util.log("[ERROR] The login listener was unable to create a hash of the captured username vlaue.",e)}},_setCorrelationId:function(e){this.profile.getValue(this.correlationIdProperty)&&e===this.profile.getValue(this.correlationIdProperty)||this.profile.setValue(this.correlationIdProperty,e)},_saveHash:function(e){this.profile.setValue(this.internalProperty,e),this.blueConicClient.profile.updateProfile()},_setMergeProperty:function(){var e=this.profile.getValue(this.internalProperty);e&&(this.mergeProperty&&this.profile.setValue(this.mergeProperty,e),this.internalProperty&&this.profile.setValues(this.internalProperty,[])),this.latestLoginDateProperty&&this.profile.setValue(this.latestLoginDateProperty,Date.now().toString())}};try{var InteractionTypeImpl=InteractionType.extend(frontendListener)}catch(e){try{module.exports=frontendListener}catch(e){}};var a = [];var i='listener_login_syf';a.push({url: '/plugins/listener_login_syf/frontend/src/lib/md5.min.js', sharing: 'local'});a.push({url: '/plugins/listener_login_syf/frontend/src/lib/sha1.min.js', sharing: 'local'});a.push({url: '/plugins/listener_login_syf/frontend/src/lib/sha256.min.js', sharing: 'local'});a.push({url: '/plugins/listener_login_syf/frontend/src/lib/sha512.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_login_syf/ts_9ae8a663745cb949fc40092097b8e5fb/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t;var n=new Date(2017,8,1,0,0,0,0),r=this.blueConicClient.getCurrentDate().getTime()-n.getTime();this.days=Math.floor(r/864e5)},getPreloadProperties:function(){return[]},onLoad:function(){var e=this.context.getProfile(),t=this.context.getParameters(),n=t.property?t.property[0]:t.property;if(n){var r=this.blueConicClient.util.array.ensureArray(t.excludedKeywords),i=this.blueConicClient.json.parse(n)[0].profileproperty,o=[],s=document.getElementsByTagName("meta");if(s)for(var a=!1,l=0,u=s.length;l<u;l++)if("news_keywords"===s[l].name.toLowerCase()&&"string"==typeof s[l].content){var c=s[l].content.split(",");0===c.length||1===c.length&&""===c[0]||(o=c,a=!0)}else a||0!==o.length||"keywords"!==s[l].name.toLowerCase()||"string"!=typeof s[l].content||(o=s[l].content.split(","));if(o.length>0){for(var h={TIME:(new Date).getTime(),days:this.days,points:1,keywords:[]},p=0;p<o.length;p++){var y=this._trim(o[p]);""!==y&&-1===this.blueConicClient.util.array.indexOfArray(r,y)&&h.keywords.push(y)}h.keywords.length>0&&(e.addValue("_hl_"+i,this.blueConicClient.json.stringify(h)),this.blueConicClient.profile.updateProfile())}}},_trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}});var a = [];var i='listener_meta_keywords_ranker';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.7/'}]);})();(function(){ var MARKETING_ET="marketing_data_layer",APPLICATION_ET="application_data_layer",APPLICATION_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","ACORID","Application_ID","MerchantID","PageName","PageSubFlow","sitecode","ApprovalCode","CreditLimit"],MARKETING_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","PageName","offerIds"],CLIENT_NAME_ATTR="ClientName",PAGE_KIND_ATTR="PageKind",PAGE_KIND_PREQUAL="prequal",PAGE_KIND_APPLY="apply",PAGE_KIND_SECURED_INSTALLMENT="secured_installment",PAGE_KIND_PREQUAL_SECURED_INSTALLMENT="prequal_secured_installment",PAGE_KIND_APPLY_LOAN="applyloan",PAGE_KIND_OFFER_PERSIST="offerPersist",ACTION_ATTR="action",APP_TYPE_ATTR="appType",DATE_STAMP_ATTR="DateTimestamp",URL_ATTR="URL",PAGE_NAME_ATTR="PageName",PAGE_FUNCTION_ATTR="PageFunction",PAGE_SUB_FUNCTION_ATTR="PageSubFunction",DSA_TOKEN_ATTR="dsaToken",CREDIT_LIMIT_ATTR="CreditLimit",OFFER_EXPIRATION_DATE_ATTR="OfferExpirationDate",CLIENT_MID_ATTR="ClientMID",REASON_CODE_ATTR="ReasonCode",RESPONSE_CODE_ATTR="ResponseCode",APPROVAL_CODE_ATTR="ApprovalCode",TOKEN_ATTR="Token",OFFER_PERSIST_DL_ATTR=["ABTestname","ACORID","Application_ID","ClientMID","CustomerType","DeclineReason","JSID","Market","MerchantId","OfferExpirationDate","OrgChannel","OrgFlow","PageSubFunction","PrefillType","Program","ReasonCode","ResponseCode","Result","SiteIdentifier","Token","dsaToken","platformToken","promo","sitecode","ApprovalCode","ClientName","Country_Language","CreditLimit","PNL","PageFunction","PageKind","PageName","PageSubFlow","Product"],FIRST_NAME_ATTR="FirstName",LAST_NAME_ATTR="LastName",EMAIL_ADDRESS_ATTR="EmailAddress",IS_BAD_EMAIL_ATTR="IsBadEmail",PREFILL_ATTR="Prefill",APPLICATION_SESSION_ID_ATTR="ApplicationSessionID",DUMMY_PROFILE_KEY_ATTR="DummyProfileKey",ADDRESS1_ATTR="Address1",ADDRESS2_ATTR="Address2",CITY_ATTR="City",STATE_ATTR="State",ZIP_CODE_ATTR="ZipCode",OFFER_EXPIRES_ATTR="OfferExpires",CAL_OFFER_EXPIRES_ATTR="CAL_OfferExpires",VEHICLE_TYPE_ATTR="VehicleType",VEHICLE_MAKE_ATTR="VehicleMake",VEHICLE_YEAR_ATTR="VehicleYear",VEHICLE_MODEL_ATTR="VehicleModel",LANDING_PAGE_NAMES=["auto_fill_invitation"],START_PAGE_NAMES=["prequal_offer","apply options","Termsandconditions","your information"],PREQUAL_START_PAGE_NAMES=["your information"],PREQUAL_DECLINED_PAGE_NAMES=["prequal_offer_declined"],PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES=["your information"],COMPLETE_PAGE_NAMES=["complete approve"],PENDING_PAGE_NAMES=["complete pending"],DECLINED_PAGE_NAMES=["complete decline"],PREQUAL_COMPLETE_PAGE_NAMES=["complete approve","complete pending","complete decline","dApply_start_error"],PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES=["prequal_offer"],PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES=["prequal_offer_declined"],YOUR_INFORMATION_PAGE_NAME="your information",INFORMATION_REVIEW_PAGE_NAME="review",PREQUAL_OFFER_PAGE_NAME="prequal_offer",PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAME="prequal_offer_declined",COMPLETE_PAGE_NAME="complete approve",PENDING_PAGE_NAME="complete pending",DECLINED_PAGE_NAME="complete decline",DAPPLY_START_ERROR_PAGE_NAME="dApply_start_error",VEHICHLE_PAGE_NAME="product info",OFFER_PERSIST_REVIEW_OFFER_PAGE_NAME="review_prequalified_offer",OFFER_PERSIST_ELIGIBILITY_FAILURE_PAGE_NAME="eligibility_failure",PREFILLED_PAGE_SUB_FUNCTION="prefilled",PII_INTERNAL_PROPERY="_dll_pii",VEHICHLE_INFO_INTERNAL_PROPERTY="_vehichle_info",TIME_MILLS_DAY=864e5,MINUTES_TO_MILLS=6e4,APPLICATION_SESSION_ID_COOKIE_NAME="_bcasid",APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME="_bcasid_ts";window._dataLayerListenerEventsCache=window._dataLayerListenerEventsCache||{};var frontendListener={init:function(e,r){this.blueConicClient=e,this.context=r,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.dataLayerName=this.parameters.dataLayerName?this.parameters.dataLayerName[0]:"_SFDDL",this.timelineEventType=this.parameters.timelineEventType?this.parameters.timelineEventType[0]:MARKETING_ET,this.clientNames=this.parameters.clientName?this.parameters.clientName:[],this.selectedPageKind=this.parameters.selectedPageKind?this.parameters.selectedPageKind:[],this.lastUpdateTimeProperty=this.parameters.lastUpdateTimeProperty?this.parameters.lastUpdateTimeProperty[0]:null,this.emailProperty=this.parameters.emailProperty?this.parameters.emailProperty[0]:null,this.approvalCodeProperty=this.parameters.approvalCodeProperty?this.parameters.approvalCodeProperty[0]:null,this.tokenProperty=this.parameters.tokenProperty?this.parameters.tokenProperty[0]:null,this.appStartProperty=this.parameters.appStartProperty?this.parameters.appStartProperty[0]:null,this.appPendingProperty=this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:null,this.appCompleteProperty=this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:null,this.appDeclinedProperty=this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:null,this.appFraudProperty=this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:null,this.appErrorProperty=this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:null,this.agreeAndAcceptProperty=this.parameters.agreeAndAcceptProperty?this.parameters.agreeAndAcceptProperty[0]:null,this.prequalAppStartProperty=this.parameters.prequalAppStartProperty?this.parameters.prequalAppStartProperty[0]:null,this.prequalAppPendingProperty=this.parameters.prequalAppPendingProperty?this.parameters.prequalAppPendingProperty[0]:null,this.prequalAppCompleteProperty=this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:null,this.prequalAppDeclinedProperty=this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:null,this.prequalAppErrorProperty=this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:null,this.prequalNotInterestedProperty=this.parameters.prequalNotInterestedProperty?this.parameters.prequalNotInterestedProperty[0]:null,this.prequalSecuredInstallmentAppStartProperty=this.parameters.prequalSecuredInstallmentAppStartProperty?this.parameters.prequalSecuredInstallmentAppStartProperty[0]:null,this.prequalSecuredInstallmentAppPendingProperty=this.parameters.prequalSecuredInstallmentAppPendingProperty?this.parameters.prequalSecuredInstallmentAppPendingProperty[0]:null,this.prequalSecuredInstallmentAppCompleteProperty=this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:null,this.prequalSecuredInstallmentAppDeclinedProperty=this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:null,this.prequalSecuredInstallmentAppErrorProperty=this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:null,this.securedInstallmentAppStartProperty=this.parameters.securedInstallmentAppStartProperty?this.parameters.securedInstallmentAppStartProperty[0]:null,this.securedInstallmentAppPendingProperty=this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:null,this.securedInstallmentAppCompleteProperty=this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:null,this.securedInstallmentAppDeclinedProperty=this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:null,this.securedInstallmentAppFraudProperty=this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:null,this.securedInstallmentAppErrorProperty=this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:null,this.applyLoanAppStartProperty=this.parameters.applyLoanAppStartProperty?this.parameters.applyLoanAppStartProperty[0]:null,this.applyLoanAppPendingProperty=this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:null,this.applyLoanAppCompleteProperty=this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:null,this.applyLoanAppDeclinedProperty=this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:null,this.applyLoanAppFraudProperty=this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:null,this.applyLoanAppErrorProperty=this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:null,this.offerPersistReviewOfferProperty=this.parameters.offerPersistReviewOfferProperty?this.parameters.offerPersistReviewOfferProperty[0]:null,this.offerPersistNotFoundExpProperty=this.parameters.offerPersistNotFoundExpProperty?this.parameters.offerPersistNotFoundExpProperty[0]:null,this.offerPersistEligibilityFailureProperty=this.parameters.offerPersistEligibilityFailureProperty?this.parameters.offerPersistEligibilityFailureProperty[0]:null,this.offerPersistPrequalOfferProperty=this.parameters.offerPersistPrequalOfferProperty?this.parameters.offerPersistPrequalOfferProperty[0]:null,this.offerPersistPrequalOfferDeclineProperty=this.parameters.offerPersistPrequalOfferDeclineProperty?this.parameters.offerPersistPrequalOfferDeclineProperty[0]:null,this.offerPersistCompleteApproveProperty=this.parameters.offerPersistCompleteApproveProperty?this.parameters.offerPersistCompleteApproveProperty[0]:null,this.offerPersistCompletePendingProperty=this.parameters.offerPersistCompletePendingProperty?this.parameters.offerPersistCompletePendingProperty[0]:null,this.offerPersistCompleteDeclineProperty=this.parameters.offerPersistCompleteDeclineProperty?this.parameters.offerPersistCompleteDeclineProperty[0]:null,this.offerPersistDapplyStartErrorProperty=this.parameters.offerPersistDapplyStartErrorProperty?this.parameters.offerPersistDapplyStartErrorProperty[0]:null,this.prequalEmailOfferClickProperty=this.parameters.prequalEmailOfferClickProperty?this.parameters.prequalEmailOfferClickProperty[0]:null,this.offerPersistNotInterestedClickProperty=this.parameters.offerPersistNotInterestedClickProperty?this.parameters.offerPersistNotInterestedClickProperty[0]:null,this.timeline={results:{events:[]}}},getPreloadProperties:function(){return[PII_INTERNAL_PROPERY,VEHICHLE_INFO_INTERNAL_PROPERTY,this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:"",this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:"",this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:"",this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:"",this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:"",this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:"",this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:"",this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:"",this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:"",this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:"",this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:"",this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:"",this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:"",this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:"",this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:"",this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:"",this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:"",this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:"",this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:"",this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:"",this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:"",this.parameters.offerPersistReviewOfferProperty?this.parameters.offerPersistReviewOfferProperty[0]:"",this.parameters.offerPersistNotFoundExpProperty?this.parameters.offerPersistNotFoundExpProperty[0]:"",this.parameters.offerPersistEligibilityFailureProperty?this.parameters.offerPersistEligibilityFailureProperty[0]:"",this.parameters.offerPersistPrequalOfferDeclineProperty?this.parameters.offerPersistPrequalOfferDeclineProperty[0]:"",this.parameters.offerPersistCompleteApproveProperty?this.parameters.offerPersistCompleteApproveProperty[0]:"",this.parameters.offerPersistCompletePendingProperty?this.parameters.offerPersistCompletePendingProperty[0]:"",this.parameters.offerPersistCompleteDeclineProperty?this.parameters.offerPersistCompleteDeclineProperty[0]:"",this.parameters.offerPersistDapplyStartErrorProperty?this.parameters.offerPersistDapplyStartErrorProperty[0]:"",this.parameters.prequalEmailOfferClickProperty?this.parameters.prequalEmailOfferClickProperty[0]:"",this.parameters.offerPersistNotInterestedClickProperty?this.parameters.offerPersistNotInterestedClickProperty[0]:""].filter(function(e){return""!==e})},onLoad:function(){if(this.dataLayerName&&this.timelineEventType){var e=this,r=0;(function t(){if(e._getDataLayer())e._monitorDataLayerUpdates();else{if(r>20)return;r++,window.setTimeout(t,250)}}).call(this)}},_monitorDataLayerUpdates:function(){var e=this._getDataLayer(),r=(e.length,this._getDataHash(e)),t=this;this.pollingInterval=window.setInterval(function(){var e=t._getDataLayer(),i=t._getDataHash(e);r!==i&&(t._importFromDataLayer(e),e.length,r=i)},1e3),this._importFromDataLayer(e)},_getDataLayer:function(){if(!this._dataLayer){for(var e=this.dataLayerName.split("."),r=window,t=0;t<e.length;t++)r=r&&r[e[t]]?r[e[t]]:null;this._dataLayer=r}return this._dataLayer},_getDataHash:function(e){var r=this._getDataString(e);return r?this.md5(r):null},_getDataString:function(e){var r=null;try{r=JSON.stringify(e)}catch(t){r=this._stringify(e)}return r},_stringify:function(e){var r=[],t=JSON.stringify(e,function(e,t){if("object"==typeof t&&null!==t){if(-1!==r.indexOf(t))return;r.push(t)}return t});return r=null,t},_addDaysToTimestamp:function(e,r){return isNaN(parseInt(e))||isNaN(parseInt(r))||e&&13!==e.toString().length?e:parseInt(e)+TIME_MILLS_DAY*parseInt(r)},_formatDateMMDDYYYY:function(e){var r=e.getFullYear();return(e.getMonth()+1).toString().padStart(2,"0")+"/"+e.getDate().toString().padStart(2,"0")+"/"+r},_importFromDataLayer:function(e){if(e.pageInfo){var r=e.pageInfo[CLIENT_NAME_ATTR];if(this.clientNames.length>0&&-1===this.clientNames.indexOf(r))console.info("Listener ID: "+this.context.getInteractionId()+" -- Client name mismatch, skipping. Client: "+e.pageInfo[CLIENT_NAME_ATTR]);else{var t=new Date,s=t.getTime();this._currentMills=s;var p={};if(this.timelineEventType===MARKETING_ET)for(i=0;i<MARKETING_ATTRS.length;i++)e.pageInfo[MARKETING_ATTRS[i]]&&(p[MARKETING_ATTRS[i]]=e.pageInfo[MARKETING_ATTRS[i]]);if(this.timelineEventType===APPLICATION_ET){for(i=0;i<APPLICATION_ATTRS.length;i++)e.pageInfo[APPLICATION_ATTRS[i]]&&(p[APPLICATION_ATTRS[i]]=e.pageInfo[APPLICATION_ATTRS[i]]);if(e.formAction){var o=e.formAction[ACTION_ATTR];o&&(p[ACTION_ATTR]=o),e.formAction[APP_TYPE_ATTR]&&(p[APP_TYPE_ATTR]=e.formAction[APP_TYPE_ATTR])}var a=e.pageInfo[PAGE_KIND_ATTR];this._currentPageKind=a;var l=e.pageInfo[PAGE_NAME_ATTR];this._currentPageName=l;var n=e.pageInfo[PAGE_FUNCTION_ATTR],f=e.pageInfo[PAGE_SUB_FUNCTION_ATTR],h=e.pageInfo[DSA_TOKEN_ATTR]?e.pageInfo[DSA_TOKEN_ATTR]:null,P=e.pageInfo[APPROVAL_CODE_ATTR]?e.pageInfo[APPROVAL_CODE_ATTR]:null,u=e.pageInfo[TOKEN_ATTR]?e.pageInfo[TOKEN_ATTR]:null;this.approvalCodeProperty&&P&&this.profile.addValue(this.approvalCodeProperty,P),this.tokenProperty&&u&&this.profile.setValue(this.tokenProperty,u);var m=this._getSessionIdTimestamp();if(LANDING_PAGE_NAMES.indexOf(l)>-1&&m&&this._currentMills-m>=1e4?this._setSessionId():LANDING_PAGE_NAMES.indexOf(l)>-1&&!m?this._setSessionId():this._getSessionId()||this._setSessionId(),a===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT)&&l===PREQUAL_OFFER_PAGE_NAME||a===PAGE_KIND_OFFER_PERSIST&&this.selectedPageKind.includes(PAGE_KIND_OFFER_PERSIST)&&l===PREQUAL_OFFER_PAGE_NAME||a===PAGE_KIND_PREQUAL&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL)&&l===PREQUAL_OFFER_PAGE_NAME){var y=this._addDaysToTimestamp(s,30),d=new Date(y);p[OFFER_EXPIRES_ATTR]=d,p[CAL_OFFER_EXPIRES_ATTR]=this._formatDateMMDDYYYY(d)}if(a===PAGE_KIND_PREQUAL&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL)){for(this.prequalEmailOfferClickProperty&&this._prequalEmailOfferClickListener(r),this.prequalNotInterestedProperty&&this._prequalNotInterestedListener(r,l),i=0;i<OFFER_PERSIST_DL_ATTR.length;i++)e.pageInfo[OFFER_PERSIST_DL_ATTR[i]]&&(p[OFFER_PERSIST_DL_ATTR[i]]=e.pageInfo[OFFER_PERSIST_DL_ATTR[i]]);this._handlePrequal(r,l)}else if(a===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT))this._handlePrequalSecuredInstallment(r,l),VEHICHLE_PAGE_NAME===l&&this._captureVehicleAttr(r,a),this._addVehicleAttr(r,a,p);else if(a===PAGE_KIND_APPLY&&this.selectedPageKind.includes(PAGE_KIND_APPLY))this._handleApply(r,l);else if(a===PAGE_KIND_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_SECURED_INSTALLMENT))this._handleSecuredInstallment(r,l);else if(a===PAGE_KIND_APPLY_LOAN&&this.selectedPageKind.includes(PAGE_KIND_APPLY_LOAN))this._handleApplyLoan(r,l);else if(a===PAGE_KIND_OFFER_PERSIST&&this.selectedPageKind.includes(PAGE_KIND_OFFER_PERSIST)){for(this.offerPersistNotInterestedClickProperty&&this._offerPersistNotInterestedClickListener(r),i=0;i<OFFER_PERSIST_DL_ATTR.length;i++)e.pageInfo[OFFER_PERSIST_DL_ATTR[i]]&&(p[OFFER_PERSIST_DL_ATTR[i]]=e.pageInfo[OFFER_PERSIST_DL_ATTR[i]]);this._handleOfferPersist(r,l,h,P,f)}l===YOUR_INFORMATION_PAGE_NAME&&this._capturePII(r,a,n,f),l===INFORMATION_REVIEW_PAGE_NAME&&this._capturePiiChanges(r,a),this._addPII(r,a,p)}p[DATE_STAMP_ATTR]=t,p[URL_ATTR]=window.location.href;try{this._getSessionId()&&(p[APPLICATION_SESSION_ID_ATTR]=this._getSessionId())}catch(e){this.blueConicClient.util.log(e)}this.lastUpdateTimeProperty&&this.profile.setValue(this.lastUpdateTimeProperty,s),this._updateProfile(t,p)}}},_updateProfile:function(e,r){this.blueConicClient.profile.updateProfile(this,function(){this.blueConicClient.createEvent("BC_DATALAYER_UPDATED")}),e&&r&&this._createTimelineEvent(e,r)},_createTimelineEvent:function(e,r){var t=JSON.parse(JSON.stringify(r));delete t.DateTimestamp,delete t.Token;var i=this._getDataHash(t),s=this._getTimelineCreated(i);window._dataLayerListenerEventsCache&&window._dataLayerListenerEventsCache[i]&&this._currentMills-window._dataLayerListenerEventsCache[i]<=1e4||s&&this._currentMills-s<=1e4||(window._dataLayerListenerEventsCache[i]=this._currentMills,this._setTimelineCreated(i),this.blueConicClient.profile.getProfile().timeline.createEvent(this.timelineEventType,e,r,this,function(){this.timeline.results.events.push({eventType:this.timelineEventType,eventDate:e,eventData:r})}))},_handleApply:function(e,r){if(START_PAGE_NAMES.indexOf(r)>-1){if(this.appStartProperty&&this.profile.addValue(this.appStartProperty,e),this.appCompleteProperty){var t=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.appCompleteProperty,t)}if(this.appPendingProperty){var i=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.appPendingProperty,i)}if(this.appDeclinedProperty){var s=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.appDeclinedProperty,s)}if(this.appFraudProperty){var p=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.appFraudProperty,p)}if(this.appErrorProperty){var o=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.appErrorProperty,o)}}if(PENDING_PAGE_NAMES.indexOf(r)>-1){if(this.appPendingProperty&&this.profile.addValue(this.appPendingProperty,e),this.appCompleteProperty){var a=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.appCompleteProperty,a)}if(this.appDeclinedProperty){var l=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.appDeclinedProperty,l)}if(this.appErrorProperty){var n=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.appErrorProperty,n)}if(this.appFraudProperty){var f=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.appFraudProperty,f)}}if(COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.appCompleteProperty&&this.profile.addValue(this.appCompleteProperty,e),this.appPendingProperty){var h=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.appPendingProperty,h)}if(this.appDeclinedProperty){var P=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.appDeclinedProperty,P)}if(this.appErrorProperty){var u=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.appErrorProperty,u)}if(this.appFraudProperty){var m=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.appFraudProperty,m)}}if(DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.appDeclinedProperty&&this.profile.addValue(this.appDeclinedProperty,e),this.appPendingProperty){var y=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.appPendingProperty,y)}if(this.appCompleteProperty){var d=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.appCompleteProperty,d)}if(this.appFraudProperty){var A=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.appFraudProperty,A)}if(this.appErrorProperty){var c=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.appErrorProperty,c)}}if(r.toLowerCase().indexOf("fraud")>-1){if(this.appFraudProperty&&this.profile.addValue(this.appFraudProperty,e),this.appPendingProperty){var _=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.appPendingProperty,_)}if(this.appCompleteProperty){var E=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.appCompleteProperty,E)}if(this.appDeclinedProperty){var I=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.appDeclinedProperty,I)}if(this.appErrorProperty){var g=this.profile.getValues(this.appErrorProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.appErrorProperty,g)}}if(r.toLowerCase().indexOf("error")>-1){if(this.appErrorProperty&&this.profile.addValue(this.appErrorProperty,e),this.appPendingProperty){var v=this.profile.getValues(this.appPendingProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.appPendingProperty,v)}if(this.appCompleteProperty){var C=this.profile.getValues(this.appCompleteProperty);this._removeItemFromArray(C,e),this.profile.setValues(this.appCompleteProperty,C)}if(this.appFraudProperty){var S=this.profile.getValues(this.appFraudProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.appFraudProperty,S)}if(this.appDeclinedProperty){var T=this.profile.getValues(this.appDeclinedProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.appDeclinedProperty,T)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handlePrequal:function(e,r){if(PREQUAL_START_PAGE_NAMES.indexOf(r)>-1){if(this.prequalAppStartProperty&&this.profile.addValue(this.prequalAppStartProperty,e),this.prequalAppCompleteProperty){var t=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.prequalAppCompleteProperty,t)}if(this.prequalAppDeclinedProperty){var i=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.prequalAppDeclinedProperty,i)}if(this.prequalAppErrorProperty){var s=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.prequalAppErrorProperty,s)}}if(COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.prequalAppCompleteProperty&&this.profile.addValue(this.prequalAppCompleteProperty,e),this.prequalAppDeclinedProperty){var p=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.prequalAppDeclinedProperty,p)}if(this.prequalAppErrorProperty){var o=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.prequalAppErrorProperty,o)}}if(PREQUAL_DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.prequalAppDeclinedProperty&&this.profile.addValue(this.prequalAppDeclinedProperty,e),this.prequalAppCompleteProperty){var a=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.prequalAppCompleteProperty,a)}if(this.prequalAppErrorProperty){var l=this.profile.getValues(this.prequalAppErrorProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.prequalAppErrorProperty,l)}}if(r.toLowerCase().indexOf("error")>-1){if(this.prequalAppErrorProperty&&this.profile.addValue(this.prequalAppErrorProperty,e),this.prequalAppCompleteProperty){var n=this.profile.getValues(this.prequalAppCompleteProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.prequalAppCompleteProperty,n)}if(this.prequalAppDeclinedProperty){var f=this.profile.getValues(this.prequalAppDeclinedProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.prequalAppDeclinedProperty,f)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handlePrequalSecuredInstallment:function(e,r){if(PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES.indexOf(r)>-1){if(this.prequalSecuredInstallmentAppStartProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppStartProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var t=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,t)}if(this.prequalSecuredInstallmentAppDeclinedProperty){var i=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,i)}if(this.prequalSecuredInstallmentAppFraudProperty){var s=this.profile.getValues(this.prequalSecuredInstallmentAppFraudProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.prequalSecuredInstallmentAppFraudProperty,s)}if(this.prequalSecuredInstallmentAppErrorProperty){var p=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,p)}}if(PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.prequalSecuredInstallmentAppCompleteProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppCompleteProperty,e),this.prequalSecuredInstallmentAppDeclinedProperty){var o=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,o)}if(this.prequalSecuredInstallmentAppErrorProperty){var a=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,a)}}if(PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.prequalSecuredInstallmentAppDeclinedProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppDeclinedProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var l=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,l)}if(this.prequalSecuredInstallmentAppErrorProperty){var n=this.profile.getValues(this.prequalSecuredInstallmentAppErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.prequalSecuredInstallmentAppErrorProperty,n)}}if(r.toLowerCase().indexOf("error")>-1){if(this.prequalSecuredInstallmentAppErrorProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppErrorProperty,e),this.prequalSecuredInstallmentAppCompleteProperty){var f=this.profile.getValues(this.prequalSecuredInstallmentAppCompleteProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.prequalSecuredInstallmentAppCompleteProperty,f)}if(this.prequalSecuredInstallmentAppDeclinedProperty){var h=this.profile.getValues(this.prequalSecuredInstallmentAppDeclinedProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.prequalSecuredInstallmentAppDeclinedProperty,h)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_prequalNotInterestedListener:function(e){var r=document.querySelectorAll('[data-reason="not_interested"]');r.length>0?r.forEach(function(r,t){r.addEventListener("click",function(){this.profile.addValue(this.prequalNotInterestedProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe('[data-reason="not_interested"]',this,function(){this._prequalNotInterestedListener(e)})},_handleSecuredInstallment:function(e,r){if(START_PAGE_NAMES.indexOf(r)>-1){if(this.securedInstallmentAppStartProperty&&this.profile.addValue(this.securedInstallmentAppStartProperty,e),this.securedInstallmentAppPendingProperty){var t=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,t)}if(this.securedInstallmentAppCompleteProperty){var i=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,i)}if(this.securedInstallmentAppDeclinedProperty){var s=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,s)}if(this.securedInstallmentAppFraudProperty){var p=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,p)}if(this.securedInstallmentAppErrorProperty){var o=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,o)}}if(r.toLowerCase().indexOf("pending")>-1){if(this.securedInstallmentAppPendingProperty&&this.profile.addValue(this.securedInstallmentAppPendingProperty,e),this.securedInstallmentAppCompleteProperty){var a=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,a)}if(this.securedInstallmentAppDeclinedProperty){var l=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,l)}if(this.securedInstallmentAppErrorProperty){var n=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,n)}if(this.securedInstallmentAppFraudProperty){var f=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,f)}}if(COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.securedInstallmentAppCompleteProperty&&this.profile.addValue(this.securedInstallmentAppCompleteProperty,e),this.securedInstallmentAppPendingProperty){var h=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,h)}if(this.securedInstallmentAppDeclinedProperty){var P=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,P)}if(this.securedInstallmentAppErrorProperty){var u=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,u)}if(this.securedInstallmentAppFraudProperty){var m=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,m)}}if(DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.securedInstallmentAppDeclinedProperty&&this.profile.addValue(this.securedInstallmentAppDeclinedProperty,e),this.securedInstallmentAppPendingProperty){var y=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,y)}if(this.securedInstallmentAppCompleteProperty){var d=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,d)}if(this.securedInstallmentAppFraudProperty){var A=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,A)}if(this.securedInstallmentAppErrorProperty){var c=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,c)}}if(r.toLowerCase().indexOf("fraud")>-1){if(this.securedInstallmentAppFraudProperty&&this.profile.addValue(this.securedInstallmentAppFraudProperty,e),this.securedInstallmentAppPendingProperty){var _=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,_)}if(this.securedInstallmentAppCompleteProperty){var E=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,E)}if(this.securedInstallmentAppDeclinedProperty){var I=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,I)}if(this.securedInstallmentAppErrorProperty){var g=this.profile.getValues(this.securedInstallmentAppErrorProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.securedInstallmentAppErrorProperty,g)}}if(r.toLowerCase().indexOf("error")>-1){if(this.securedInstallmentAppErrorProperty&&this.profile.addValue(this.securedInstallmentAppErrorProperty,e),this.securedInstallmentAppPendingProperty){var v=this.profile.getValues(this.securedInstallmentAppPendingProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.securedInstallmentAppPendingProperty,v)}if(this.securedInstallmentAppCompleteProperty){var C=this.profile.getValues(this.securedInstallmentAppCompleteProperty);this._removeItemFromArray(C,e),this.profile.setValues(this.securedInstallmentAppCompleteProperty,C)}if(this.securedInstallmentAppFraudProperty){var S=this.profile.getValues(this.securedInstallmentAppFraudProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.securedInstallmentAppFraudProperty,S)}if(this.securedInstallmentAppDeclinedProperty){var T=this.profile.getValues(this.securedInstallmentAppDeclinedProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.securedInstallmentAppDeclinedProperty,T)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handleApplyLoan:function(e,r){if(START_PAGE_NAMES.indexOf(r)>-1){if(this.applyLoanAppStartProperty&&this.profile.addValue(this.applyLoanAppStartProperty,e),this.applyLoanAppPendingProperty){var t=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(t,e),this.profile.setValues(this.applyLoanAppPendingProperty,t)}if(this.applyLoanAppCompleteProperty){var i=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(i,e),this.profile.setValues(this.applyLoanAppCompleteProperty,i)}if(this.applyLoanAppDeclinedProperty){var s=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(s,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,s)}if(this.applyLoanAppFraudProperty){var p=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.applyLoanAppFraudProperty,p)}if(this.applyLoanAppErrorProperty){var o=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.applyLoanAppErrorProperty,o)}}if(r.toLowerCase().indexOf("pending")>-1){if(this.applyLoanAppPendingProperty&&this.profile.addValue(this.applyLoanAppPendingProperty,e),this.applyLoanAppCompleteProperty){var a=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.applyLoanAppCompleteProperty,a)}if(this.applyLoanAppDeclinedProperty){var l=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,l)}if(this.applyLoanAppErrorProperty){var n=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.applyLoanAppErrorProperty,n)}if(this.applyLoanAppFraudProperty){var f=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.applyLoanAppFraudProperty,f)}}if(COMPLETE_PAGE_NAMES.indexOf(r)>-1){if(this.applyLoanAppCompleteProperty&&this.profile.addValue(this.applyLoanAppCompleteProperty,e),this.applyLoanAppPendingProperty){var h=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.applyLoanAppPendingProperty,h)}if(this.applyLoanAppDeclinedProperty){var P=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,P)}if(this.applyLoanAppErrorProperty){var u=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.applyLoanAppErrorProperty,u)}if(this.applyLoanAppFraudProperty){var m=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.applyLoanAppFraudProperty,m)}}if(DECLINED_PAGE_NAMES.indexOf(r)>-1||r.toLowerCase().indexOf("decline")>-1){if(this.applyLoanAppDeclinedProperty&&this.profile.addValue(this.applyLoanAppDeclinedProperty,e),this.applyLoanAppPendingProperty){var y=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.applyLoanAppPendingProperty,y)}if(this.applyLoanAppCompleteProperty){var d=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.applyLoanAppCompleteProperty,d)}if(this.applyLoanAppFraudProperty){var A=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.applyLoanAppFraudProperty,A)}if(this.applyLoanAppErrorProperty){var c=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.applyLoanAppErrorProperty,c)}}if(r.toLowerCase().indexOf("fraud")>-1){if(this.applyLoanAppFraudProperty&&this.profile.addValue(this.applyLoanAppFraudProperty,e),this.applyLoanAppPendingProperty){var _=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.applyLoanAppPendingProperty,_)}if(this.applyLoanAppCompleteProperty){var E=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.applyLoanAppCompleteProperty,E)}if(this.applyLoanAppDeclinedProperty){var I=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,I)}if(this.applyLoanAppErrorProperty){var g=this.profile.getValues(this.applyLoanAppErrorProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.applyLoanAppErrorProperty,g)}}if(r.toLowerCase().indexOf("error")>-1){if(this.applyLoanAppErrorProperty&&this.profile.addValue(this.applyLoanAppErrorProperty,e),this.applyLoanAppPendingProperty){var v=this.profile.getValues(this.applyLoanAppPendingProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.applyLoanAppPendingProperty,v)}if(this.applyLoanAppCompleteProperty){var C=this.profile.getValues(this.applyLoanAppCompleteProperty);this._removeItemFromArray(C,e),this.profile.setValues(this.applyLoanAppCompleteProperty,C)}if(this.applyLoanAppFraudProperty){var S=this.profile.getValues(this.applyLoanAppFraudProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.applyLoanAppFraudProperty,S)}if(this.applyLoanAppDeclinedProperty){var T=this.profile.getValues(this.applyLoanAppDeclinedProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.applyLoanAppDeclinedProperty,T)}}this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handleOfferPersist:function(e,r,t,i,s){if(r.toLowerCase().indexOf(OFFER_PERSIST_REVIEW_OFFER_PAGE_NAME)>-1&&t){if(this.offerPersistReviewOfferProperty&&this.profile.addValue(this.offerPersistReviewOfferProperty,e),this.offerPersistNotFoundExpProperty){var p=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(p,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,p)}if(this.offerPersistEligibilityFailureProperty){var o=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(o,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,o)}if(this.offerPersistPrequalOfferDeclineProperty){var a=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(a,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,a)}if(this.offerPersistCompleteApproveProperty){var l=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(l,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,l)}if(this.offerPersistCompletePendingProperty){var n=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(n,e),this.profile.setValues(this.offerPersistCompletePendingProperty,n)}if(this.offerPersistCompleteDeclineProperty){var f=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(f,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,f)}if(this.offerPersistDapplyStartErrorProperty){var h=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(h,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,h)}if(this.offerPersistPrequalOfferProperty){var P=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(P,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,P)}}if(r===YOUR_INFORMATION_PAGE_NAME&&s===PREFILLED_PAGE_SUB_FUNCTION&&(t||i)){if(this.offerPersistNotFoundExpProperty&&this.profile.addValue(this.offerPersistNotFoundExpProperty,e),this.offerPersistEligibilityFailureProperty){var u=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(u,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,u)}if(this.offerPersistPrequalOfferDeclineProperty){var m=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(m,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,m)}if(this.offerPersistCompleteApproveProperty){var y=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(y,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,y)}if(this.offerPersistCompletePendingProperty){var d=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(d,e),this.profile.setValues(this.offerPersistCompletePendingProperty,d)}if(this.offerPersistCompleteDeclineProperty){var A=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(A,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,A)}if(this.offerPersistDapplyStartErrorProperty){var c=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(c,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,c)}if(this.offerPersistPrequalOfferProperty){var _=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(_,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,_)}}if(r.toLowerCase().indexOf(OFFER_PERSIST_ELIGIBILITY_FAILURE_PAGE_NAME)>-1&&t){if(this.offerPersistEligibilityFailureProperty&&this.profile.addValue(this.offerPersistEligibilityFailureProperty,e),this.offerPersistNotFoundExpProperty){var E=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(E,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,E)}if(this.offerPersistPrequalOfferDeclineProperty){var I=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(I,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,I)}if(this.offerPersistCompleteApproveProperty){var g=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(g,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,g)}if(this.offerPersistCompletePendingProperty){var v=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(v,e),this.profile.setValues(this.offerPersistCompletePendingProperty,v)}if(this.offerPersistCompleteDeclineProperty){var C=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(C,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,C)}if(this.offerPersistDapplyStartErrorProperty){var S=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(S,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,S)}if(this.offerPersistPrequalOfferProperty){var T=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(T,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,T)}}if(r===PREQUAL_OFFER_PAGE_NAME){if(this.offerPersistPrequalOfferProperty&&this.profile.addValue(this.offerPersistPrequalOfferProperty,e),this.offerPersistNotFoundExpProperty){var V=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(V,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,V)}if(this.offerPersistPrequalOfferDeclineProperty){var L=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(L,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,L)}if(this.offerPersistCompleteApproveProperty){var F=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(F,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,F)}if(this.offerPersistCompletePendingProperty){var N=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(N,e),this.profile.setValues(this.offerPersistCompletePendingProperty,N)}if(this.offerPersistCompleteDeclineProperty){var D=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(D,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,D)}if(this.offerPersistDapplyStartErrorProperty){var O=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(O,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,O)}if(this.offerPersistEligibilityFailureProperty){var R=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(R,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,R)}}if(r===PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAME){if(this.offerPersistPrequalOfferDeclineProperty&&this.profile.addValue(this.offerPersistPrequalOfferDeclineProperty,e),this.offerPersistNotFoundExpProperty){var q=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(q,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,q)}if(this.offerPersistPrequalOfferProperty){var M=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(M,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,M)}if(this.offerPersistCompleteApproveProperty){var b=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(b,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,b)}if(this.offerPersistCompletePendingProperty){var x=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(x,e),this.profile.setValues(this.offerPersistCompletePendingProperty,x)}if(this.offerPersistCompleteDeclineProperty){var G=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(G,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,G)}if(this.offerPersistDapplyStartErrorProperty){var K=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(K,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,K)}if(this.offerPersistEligibilityFailureProperty){var w=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(w,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,w)}}if(r===COMPLETE_PAGE_NAME){if(this.offerPersistCompleteApproveProperty&&this.profile.addValue(this.offerPersistCompleteApproveProperty,e),this.offerPersistNotFoundExpProperty){var k=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(k,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,k)}if(this.offerPersistPrequalOfferProperty){var U=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(U,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,U)}if(this.offerPersistPrequalOfferDeclineProperty){var Y=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(Y,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,Y)}if(this.offerPersistCompletePendingProperty){var H=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(H,e),this.profile.setValues(this.offerPersistCompletePendingProperty,H)}if(this.offerPersistCompleteDeclineProperty){var Q=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(Q,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,Q)}if(this.offerPersistDapplyStartErrorProperty){var B=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(B,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,B)}if(this.offerPersistEligibilityFailureProperty){var z=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(z,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,z)}}if(r===PENDING_PAGE_NAME){if(this.offerPersistCompletePendingProperty&&this.profile.addValue(this.offerPersistCompletePendingProperty,e),this.offerPersistNotFoundExpProperty){var J=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(J,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,J)}if(this.offerPersistPrequalOfferProperty){var X=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(X,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,X)}if(this.offerPersistPrequalOfferDeclineProperty){var j=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(j,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,j)}if(this.offerPersistCompleteApproveProperty){var W=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(W,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,W)}if(this.offerPersistCompleteDeclineProperty){var Z=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(Z,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,Z)}if(this.offerPersistDapplyStartErrorProperty){var $=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray($,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,$)}if(this.offerPersistEligibilityFailureProperty){var ee=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(ee,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,ee)}}if(r===DECLINED_PAGE_NAME){if(this.offerPersistCompleteDeclineProperty&&this.profile.addValue(this.offerPersistCompleteDeclineProperty,e),this.offerPersistNotFoundExpProperty){var re=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(re,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,re)}if(this.offerPersistPrequalOfferProperty){var te=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(te,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,te)}if(this.offerPersistPrequalOfferDeclineProperty){var ie=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(ie,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,ie)}if(this.offerPersistCompleteApproveProperty){var se=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(se,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,se)}if(this.offerPersistCompletePendingProperty){var pe=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(pe,e),this.profile.setValues(this.offerPersistCompletePendingProperty,pe)}if(this.offerPersistDapplyStartErrorProperty){var oe=this.profile.getValues(this.offerPersistDapplyStartErrorProperty);this._removeItemFromArray(oe,e),this.profile.setValues(this.offerPersistDapplyStartErrorProperty,oe)}if(this.offerPersistEligibilityFailureProperty){var ae=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(ae,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,ae)}}if(r===DAPPLY_START_ERROR_PAGE_NAME){if(this.offerPersistDapplyStartErrorProperty&&this.profile.addValue(this.offerPersistDapplyStartErrorProperty,e),this.offerPersistNotFoundExpProperty){var le=this.profile.getValues(this.offerPersistNotFoundExpProperty);this._removeItemFromArray(le,e),this.profile.setValues(this.offerPersistNotFoundExpProperty,le)}if(this.offerPersistPrequalOfferProperty){var ne=this.profile.getValues(this.offerPersistPrequalOfferProperty);this._removeItemFromArray(ne,e),this.profile.setValues(this.offerPersistPrequalOfferProperty,ne)}if(this.offerPersistPrequalOfferDeclineProperty){var fe=this.profile.getValues(this.offerPersistPrequalOfferDeclineProperty);this._removeItemFromArray(fe,e),this.profile.setValues(this.offerPersistPrequalOfferDeclineProperty,fe)}if(this.offerPersistCompleteApproveProperty){var he=this.profile.getValues(this.offerPersistCompleteApproveProperty);this._removeItemFromArray(he,e),this.profile.setValues(this.offerPersistCompleteApproveProperty,he)}if(this.offerPersistCompletePendingProperty){var Pe=this.profile.getValues(this.offerPersistCompletePendingProperty);this._removeItemFromArray(Pe,e),this.profile.setValues(this.offerPersistCompletePendingProperty,Pe)}if(this.offerPersistCompleteDeclineProperty){var ue=this.profile.getValues(this.offerPersistCompleteDeclineProperty);this._removeItemFromArray(ue,e),this.profile.setValues(this.offerPersistCompleteDeclineProperty,ue)}if(this.offerPersistEligibilityFailureProperty){var me=this.profile.getValues(this.offerPersistEligibilityFailureProperty);this._removeItemFromArray(me,e),this.profile.setValues(this.offerPersistEligibilityFailureProperty,me)}}},_prequalEmailOfferClickListener:function(e){var r=document.querySelectorAll("#emailOffer");r.length>0?r.forEach(function(r,t){r.addEventListener("click",function(){this.profile.addValue(this.prequalEmailOfferClickProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe("#emailOffer",this,function(){this._prequalEmailOfferClickListener(e)})},_offerPersistNotInterestedClickListener:function(e){var r=document.querySelectorAll("#notIntersted");r.length>0?r.forEach(function(r,t){r.addEventListener("click",function(){this.profile.addValue(this.offerPersistNotInterestedClickProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe("#notIntersted",this,function(){this._offerPersistNotInterestedClickListener(e)})},_aggreeAcceptClickListener:function(e){var r=document.querySelector("button#acptbtn")||null;r?r.addEventListener("click",function(){this.profile.addValue(this.agreeAndAcceptProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1):this.blueConicClient.position.subscribe("button#acptbtn",this,function(){this._aggreeAcceptClickListener(e)})},_generateProfileKey:function(e){if(!e)return null;try{return this.md5((new Date).getTime().toString()+"_"+e.toLowerCase()).substring(6,26)}catch(e){return console.error("[BC ERROR] Error generating dummyProfileKey key: "+e),null}},_captureVehicleAttr:function(e,r){var t=document.querySelector('button[data-reason="residence"]')||null;null!==t?t.addEventListener("click",function(){var t=document.querySelector("#native-select-vehicleType-native"),i=t?t.options[t.selectedIndex].text:null,s=document.querySelector("#native-select-manufacturerOptions-native"),p=s?s.options[s.selectedIndex].text:null,o=document.querySelector("#native-select-modelYear-native"),a=o?o.options[o.selectedIndex].text:null,l=document.querySelector("#native-select-modelDesc-native"),n=l?l.options[l.selectedIndex].text:null;this.profile.setValue(VEHICHLE_INFO_INTERNAL_PROPERTY,JSON.stringify({currentClient:e,currentPageKind:r,vehicleType:i,vehicleMake:p,vehicleYear:a,vehicleModel:n})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-reason="residence"]',this,function(){this._captureVehicleAttr(e,r)})},_addVehicleAttr:function(e,r,t){var i=this.profile.getValue(VEHICHLE_INFO_INTERNAL_PROPERTY);if(i)try{var s=JSON.parse(i);e===s.currentClient&&r===s.currentPageKind&&(s.vehicleType&&(t[VEHICLE_TYPE_ATTR]=s.vehicleType),s.vehicleYear&&(t[VEHICLE_YEAR_ATTR]=s.vehicleYear),s.vehicleMake&&(t[VEHICLE_MAKE_ATTR]=s.vehicleMake),s.vehicleModel&&(t[VEHICLE_MODEL_ATTR]=s.vehicleModel))}catch(e){}},_capturePiiChanges:function(e,r){var t=document.querySelector('button[data-test="save1-button"]')?document.querySelector('button[data-test="save1-button"]'):null;null!==t?t.addEventListener("click",function(){var t=document.querySelector("#firstName-primary")?document.querySelector("#firstName-primary").value:null,i=document.querySelector("#lastName-primary")?document.querySelector("#lastName-primary").value:null,s=document.querySelector("#emailAddress-primary")?document.querySelector("#emailAddress-primary").value:null,p=null,o=null;s&&(p=this._generateProfileKey(s),o=this._validateEmail(s),this.emailProperty&&this.profile.setValue(this.emailProperty,s)),this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:t,lastName:i,email:s,currentClient:e,currentPageKind:r,isBadEmail:o,dummyProfileKey:p})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-test="save1-button"]',this,function(){this._capturePiiChanges(e,r)})},_capturePII:function(e,r,t,i){submitButton=document.querySelector('button[data-reason="productinfo"]')?document.querySelector('button[data-reason="productinfo"]'):document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]')?document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]'):document.querySelector('button[data-reason="Productinfo"]')?document.querySelector('button[data-reason="Productinfo"]'):document.querySelector('button[title="NEXT: VEHICLE INFO"]')?document.querySelector('button[title="NEXT: VEHICLE INFO"]'):document.querySelector("button#submitButton")?document.querySelector("button#submitButton"):document.querySelector('button[data-reason="see-if-I-prequalify"]')?document.querySelector('button[data-reason="see-if-I-prequalify"]'):null,null!==submitButton?submitButton.addEventListener("click",function(){var s=document.querySelector("#firstName")?document.querySelector("#firstName").value:null,p=document.querySelector("#lastName")?document.querySelector("#lastName").value:null;if(!s&&!p&&document.querySelector("#fullName")||!s&&!p&&document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")){var o=document.querySelector("#fullName")?document.querySelector("#fullName").innerText:document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")?document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm").innerText:null;o&&(s=-1!==o.indexOf(" ")?o.substring(0,o.indexOf(" ")):o,p=-1!==o.indexOf(" ")?o.substring(o.indexOf(" ")+1):null)}s||p||(s=(s=document.querySelector('div.prefill-details label[for="firstName"]')?document.querySelector('div.prefill-details label[for="firstName"]').innerText:null)?s.replace(/\s$/g,""):null,p=(p=document.querySelector('div.prefill-details label[for="lastName"]')?document.querySelector('div.prefill-details label[for="lastName"]').innerText:null)?p.replace(/\s$/g,""):null);var a=document.querySelector("#confirmEmailAddress")?document.querySelector("#confirmEmailAddress").value:document.querySelector("#confirmEmailCheck")?document.querySelector("#confirmEmailCheck").value:null;a||(a=document.querySelector('div.prefill-details label[for="email"]')?document.querySelector('div.prefill-details label[for="email"]').innerText:null);var l=null,n=null;a&&(l=this._generateProfileKey(a),n=this._validateEmail(a),this.emailProperty&&this.profile.setValue(this.emailProperty,a));var f=document.querySelector("#mailingAddress")?document.querySelector("#mailingAddress").value:document.querySelector("div#prefillstreetaddress label[for='streetAddressDapply']")?document.querySelector("div#prefillstreetaddress label[for='streetAddressDapply']").innerText:null,h=document.querySelector("#appAptmtNumber")?document.querySelector("#appAptmtNumber").value:null,P=document.querySelector("#applyVTO_applicantVO_city_id")?document.querySelector("#applyVTO_applicantVO_city_id").value:document.querySelector("div#prefillstreetaddress label[for='cityAndStateDapply']")?document.querySelector("div#prefillstreetaddress label[for='cityAndStateDapply']").innerText:null,u=null,m=null;P&&(u=P.substring(0,P.indexOf(",")),m=P.substring(P.indexOf(",")+2));var y=document.querySelector("#applyVTO_applicantVO_zip_id")?document.querySelector("#applyVTO_applicantVO_zip_id").value:document.querySelector("div#prefillstreetaddress label[for='zip']")?document.querySelector("div#prefillstreetaddress label[for='zip']").innerText:null;this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:s,lastName:p,email:a,currentClient:e,currentPageKind:r,isBadEmail:n,dummyProfileKey:l,address1:f,address2:h,city:u,state:m,zipCode:y,prefill:"payfone"===t&&("prefilled"===i||"no_user_data_in_payfone"===i)})),this.blueConicClient.profile.updateProfile()}.bind(this)):(this.blueConicClient.position.subscribe("button#submitButton",this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[data-reason="productinfo"]',this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[data-reason="Productinfo"]',this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[data-reason="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[title="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,r,t,i)}),this.blueConicClient.position.subscribe('button[data-reason="see-if-I-prequalify"]',this,function(){this._capturePII(e,r,t,i)}))},_addPII:function(e,r,t){var i=this.profile.getValue(PII_INTERNAL_PROPERY);if(i)try{var s=JSON.parse(i);e===s.currentClient&&r===s.currentPageKind&&(t[FIRST_NAME_ATTR]=s.firstName,t[LAST_NAME_ATTR]=s.lastName,s.email&&(t[EMAIL_ADDRESS_ATTR]=s.email,t[IS_BAD_EMAIL_ATTR]=s.isBadEmail?s.isBadEmail:this._validateEmail(s.email)),s.dummyProfileKey&&(t[DUMMY_PROFILE_KEY_ATTR]=s.dummyProfileKey),t[PREFILL_ATTR]=s.prefill,s.address1&&(t[ADDRESS1_ATTR]=s.address1),s.address2&&(t[ADDRESS2_ATTR]=s.address2),s.city&&(t[CITY_ATTR]=s.city),s.state&&(t[STATE_ATTR]=s.state),s.zipCode&&(t[ZIP_CODE_ATTR]=s.zipCode))}catch(e){}},_validateEmail:function(e){var r=!1;(e.length<5||null===e.match(/@/g)||1!==e.match(/@/g).length||null!==e.match(/\s/g))&&(r=!0);var t=e.split("@")[1];null!==t.match(/\./g)&&1===t.match(/\./g).length&&null===t.match(/,/g)||(r=!0);var i=e.substr(0,1);["@",".",","," ","/","\\","!","#","$","%","^","&","*","(",")","+","-","~"].indexOf(i)>-1&&(r=!0);var s=e.substring(e.lastIndexOf(".")+1);return-1===["COM","NET","EDU","ORG","MIL","GOV","US","BIZ"].indexOf(s.toUpperCase())&&(r=!0),r},_indexOf:function(e,r){return Array.isArray(e)?e.indexOf(r):-1},_removeItemFromArray:function(e,r){if(Array.isArray(e))for(var t;-1!==(t=this._indexOf(e,r));)e.splice(t,1)},_encodeCookieValue:function(e){return"string"!=typeof e&&(e=JSON.stringify(e)),encodeURIComponent(e.replace(/[\n\r]/g,""))},_decodeCookieValue:function(e){return decodeURIComponent(e)},_setCookie:function(e,r,t){if(t){var i=new Date,s=t*MINUTES_TO_MILLS;i.setTime(i.getTime()+s),document.cookie=e+"="+this._encodeCookieValue(r)+(null==t?"":"; expires="+i.toUTCString())+"; path=/; SameSite=None; Secure"}else document.cookie=e+"="+this._encodeCookieValue(r)+"; path=/; SameSite=None; Secure"},_getCookie:function(e){var r,t,i=e+"=",s="";return document.cookie.length>0&&-1!==(r=document.cookie.indexOf(i))&&(r+=i.length,-1===(t=document.cookie.indexOf(";",r))&&(t=document.cookie.length),s=this._decodeCookieValue(document.cookie.substring(r,t))),s},_checkSessionStorageSupport:function(){var e="__storageTest";try{return window.sessionStorage.setItem(e,e),window.sessionStorage.removeItem(e),!0}catch(e){return!1}},_getSessionId:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME):null},_getSessionIdTimestamp:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):null},_setSessionId:function(){var e=this._uuid();return this._checkSessionStorageSupport()&&(window.sessionStorage.setItem(APPLICATION_SESSION_ID_COOKIE_NAME,e),window.sessionStorage.setItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills)),this._setCookie(APPLICATION_SESSION_ID_COOKIE_NAME,e,null),this._setCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills,null),e},_getTimelineCreated:function(e){return this._checkSessionStorageSupport()?window.sessionStorage.getItem(e)?window.sessionStorage.getItem(e):null:this._getCookie(e)?this._getCookie(e):null},_setTimelineCreated:function(e){this._checkSessionStorageSupport()?window.sessionStorage.setItem(e,this._currentMills):this._setCookie(e,this._currentMills,null)},_uuid:function(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(e){return(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})}};try{var InteractionTypeImpl=InteractionType.extend(frontendListener)}catch(e){try{module.exports=frontendListener}catch(e){}};var a = [];var i='listener_offer_persist_datalayer_syf';a.push({url: '/plugins/listener_offer_persist_datalayer_syf/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_offer_persist_datalayer_syf/ts_95c2f5f1d22cf676bdb674ecdf490856/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,n){this.blueConicClient=e,this.context=n||null,this.changePermissionLevel=!1,this.OBJECTIVE_ID="purpose_",this.COOKIE_NAME="OptanonConsent",this.COOKIE_GROUP="groups"},onPrepare:function(){this._handleConsentCookie(!0)},onLoad:function(){this._subscribeConsentOnChanged()},_subscribeConsentOnChanged:function(){var e=this,n=0;(function oneTrustReady(){if(window.OneTrust&&window.OneTrust.OnConsentChanged)window.OneTrust.OnConsentChanged((function(){e._handleConsentCookie()}));else{if(n>20)return;n++,window.setTimeout(oneTrustReady,250)}}).call(this)},_handleConsentCookie:function(e){try{var n=this.blueConicClient.util.cookie.getCookie(this.COOKIE_NAME);if(!n)return;var t=this._consentCookieToObject(n),i=this._getIABPurposes(t);this._setObjectives(i,e)}catch(o){}},_consentCookieToObject:function(e){var n={};if(e)for(var t=e.split("&"),i=0;i<t.length;i++){var o=t[i].split("=");o[0]&&o[1]&&(n[o[0]]=o[1])}return n},_getIABPurposes:function(e){var n={};if(!e||!e[this.COOKIE_GROUP])return n;for(var t=e[this.COOKIE_GROUP].split(","),i=0;i<t.length;i++){var o=t[i];if(o&&(0===o.indexOf("C000")||3===o.length)){var s=(o=o.replace("C000","")).split(":");null!==s[0]&&null!==s[1]&&n[s[0]]===undefined&&(n[s[0]]=1===parseInt(s[1]))}}return n},_setObjectives:function(e,n){var t=this.blueConicClient.profile.getProfile();for(var i in e){var o=this.OBJECTIVE_ID+"c000"+i.toLowerCase();e[i]?t.addConsentedObjective(o):t.addRefusedObjective(o)}n||this.blueConicClient.profile.updateProfile()}});var a = [];var i='listener_onetrust';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_onetrust/ts_7f171d1b1190945a5b3dbfe6e65a833f/'}]);})();(function(){ var InteractionTypeImpl;(()=>{"use strict";var e={d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};(()=>{var i;e.d(t,{default:()=>n}),function(e){e.HASH_CHANGE="hashChange",e.POP_STATE="popState",e.PUSH_STATE="pushState",e.REPLACE_STATE="replaceState"}(i||(i={}));class n extends InteractionType{init(e,t){this.blueConicClient=e,this.context=t}onLoad(){const{events:e}=this.context.getParameters();e.forEach((e=>{switch(JSON.parse(e).id){case i.HASH_CHANGE:window.bcUrlHashListenerActive||"onhashchange"in window&&window.addEventListener&&(window.bcUrlHashListenerActive=!0,window.addEventListener("hashchange",(function(){window.blueConicClient.handlePageView()})));break;case i.POP_STATE:window.bcUrlPopstateListenerActive||"onpopstate"in window&&window.addEventListener&&(window.bcUrlPopstateListenerActive=!0,window.addEventListener("popstate",(function(){window.blueConicClient.handlePageView()})));break;case i.PUSH_STATE:window.bcUrlHistoryPushStateListenerActive||(window.bcUrlHistoryPushStateListenerActive=!0,(null===(t=null===window||void 0===window?void 0:window.history)||void 0===t?void 0:t.pushState)&&(window.history.pushState=o(window.history.pushState)));break;case i.REPLACE_STATE:window.bcUrlHistoryReplaceStateListenerActive||function(){var e;window.bcUrlHistoryReplaceStateListenerActive=!0,(null===(e=null===window||void 0===window?void 0:window.history)||void 0===e?void 0:e.replaceState)&&(window.history.replaceState=o(window.history.replaceState))}()}var t}))}}function o(e){return function(...t){window.blueConicClient.handlePageView(),e.apply(this,t)}}})(),InteractionTypeImpl=t.default})();var a = [];var i='listener_page_change';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,i){this.blueConicClient=e,this.bcHostName=this.blueConicClient.getHostname(),this.context=i,this.ineractionId=this.context.getInteractionId(),this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.profileId=this.profile.getId(),this.videoSelectors=this.parameters.selector?this.parameters.selector:[],this.audioSelectors=this.parameters.audioSelector?this.parameters.audioSelector:[],this.minPageSeconds=this.parameters.minSeconds&&this.parameters.minSeconds.length>=1?this.parameters.minSeconds[0]:0,this.dataLayerName=this.parameters.dataLayerName&&this.parameters.dataLayerName.length>=1?this.parameters.dataLayerName[0]:null,this.restEndpoint="https://"+this.bcHostName+"/rest/custom/frontend/listener_page_time_counter_synchrony/pingback?itemId="+this.ineractionId+"&profileId="+this.profileId},onLoad:function(){this._getPageInfo(),this._getDataLayer(),this._handlePageView(),this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,this._handlePageView)},_getPageInfo:function(){var e=this.blueConicClient.getCurrentDate(),i=window.location.hostname,t=window.location.pathname,a=window.location.protocol+"//"+i+t,o=window.location.href,n=md5(a+"_"+e.getTime().toString());return this.pageInfo=this.pageInfo||{domain:i,path:t,url:a,fullUrl:o,title:document.title,type:"PAGEVIEW",seconds:0,startDate:e,eventId:n},this._sendFirstPageView(),this.initialPageViewSent=!0,this.pageInfo},_sendFirstPageView:function(){this.profile.timeline.createEventById(this.pageInfo.eventId,"page_time",this.pageInfo.startDate,{domain:this.pageInfo.domain,path:this.pageInfo.path,url:this.pageInfo.fullUrl,title:this.pageInfo.title,type:this.pageInfo.type,seconds:this.pageInfo.seconds})},_getDataLayer:function(){if(this.dataLayerName){var e=this,i=0;(function t(){if(window[e.dataLayerName])e._dynamicData=window[e.dataLayerName],e.pageInfo?e.pageInfo.dynamicData=window[e.dataLayerName]:e.pageInfo={dynamicData:window[e.dataLayerName]},e._pageViewBeacon(),e.initialPageViewSent=!0;else{if(i>20)return;i++,window.setTimeout(t,250)}}).call(this)}},_handlePageView:function(){this._startPageInterval(),this._addPageViewUnloadListener(),this._pageViewBeacon(),this.videoSelectors&&this.videoSelectors.length>0&&this._videoListener(),this.audioSelectors&&this.audioSelectors.length>0&&this._audioListener()},_startPageInterval:function(){this.pageInterval&&clearInterval(this.pageInterval),this.pageInterval=setInterval(function(){this.pageInfo.seconds=parseInt(this.pageInfo.seconds)+1}.bind(this),1e3)},_addPageViewUnloadListener:function(){var e=this;document.addEventListener("visibilitychange",function(i){"hidden"===document.visibilityState?(e._pageViewBeacon(),clearInterval(e.pageInterval)):"visible"===document.visibilityState&&e._startPageInterval()},{capture:!0})},_pageViewBeacon:function(){if(!(this.pageInfo.seconds<this.minPageSeconds)){var e=this.pageInfo.title.replace(/!/g,""),i={eventDate:this.pageInfo.startDate,eventId:this.pageInfo.eventId,path:this.pageInfo.path,seconds:this.pageInfo.seconds,domain:this.pageInfo.domain,title:e,type:this.pageInfo.type,url:this.pageInfo.url,fullUrl:this.pageInfo.fullUrl,dynamicData:this.pageInfo.dynamicData},t=JSON.stringify(i),a=new Blob([t],{type:"application/json; charset=UTF-8"});navigator.sendBeacon(this.restEndpoint,a)}},_addMediaUnloadListener:function(e,i){var t=this;document.addEventListener("visibilitychange",function(a){"hidden"===document.visibilityState?(clearInterval(t.videoProgressInterval),t._videoBeacon(i)):(t._videoPlayFired[i].sent=!1,t.videoProgressInterval=setInterval(t._checkVimeoProgress.bind(t),1e3,e,i))},{capture:!0}),window.addEventListener("pagehide",function(e){t._videoBeacon(i),clearInterval(t.videoProgressInterval)})},_addAudioUnloadListener:function(e,i){var t=this;document.addEventListener("visibilitychange",function(a){"hidden"===document.visibilityState?(clearInterval(t.audioProgressInterval),t._audioBeacon(i)):(t._audioPlayFired[i].sent=!1,t.audioProgressInterval=setInterval(t._checkAudioProgress.bind(t),1e3,e,i))},{capture:!0}),window.addEventListener("pagehide",function(e){t._audioBeacon(i),clearInterval(t.audioProgressInterval)})},_videoBeacon:function(e){if(!this._videoPlayFired[e].sent){var i=this._videoPlayFired[e].videoInfo.title.replace(/!/g,""),t=this._videoPlayFired[e].videoInfo.mediaTitle.replace(/!/g,""),a=JSON.stringify({eventId:this._videoPlayFired[e].videoInfo.eventId,eventDate:this._videoPlayFired[e].videoInfo.startDate,path:this._videoPlayFired[e].videoInfo.path,duration:Math.floor(this._videoPlayFired[e].duration),seconds:Math.floor(this._videoPlayFired[e].videoInfo.seconds),playerTime:Math.floor(this._videoPlayFired[e].videoInfo.playerTime),percentPlayed:this._videoPlayFired[e].videoPlayedPercentage,domain:this._videoPlayFired[e].videoInfo.domain,title:i,mediaTitle:t,type:this._videoPlayFired[e].videoInfo.type,url:this._videoPlayFired[e].videoInfo.url,fullUrl:this._videoPlayFired[e].videoInfo.url,mediaUrl:this._videoPlayFired[e].videoInfo.mediaUrl}),o=new Blob([a],{type:"application/json; charset=UTF-8"});navigator.sendBeacon(this.restEndpoint,o),this._videoPlayFired[e].sent=!0}},_audioBeacon:function(e){if(!this._audioPlayFired[e].sent){var i=this._audioPlayFired[e].audioInfo.title.replace(/!/g,""),t=this._audioPlayFired[e].audioInfo.mediaTitle.replace(/!/g,""),a=JSON.stringify({eventId:this._audioPlayFired[e].audioInfo.eventId,eventDate:this._audioPlayFired[e].audioInfo.startDate,path:this._audioPlayFired[e].audioInfo.path,duration:Math.floor(this._audioPlayFired[e].duration),seconds:Math.floor(this._audioPlayFired[e].audioInfo.seconds),playerTime:Math.floor(this._audioPlayFired[e].audioInfo.playerTime),percentPlayed:this._audioPlayFired[e].audioPlayedPercentage,domain:this._audioPlayFired[e].audioInfo.domain,title:i,mediaTitle:t,type:this._audioPlayFired[e].audioInfo.type,url:this._audioPlayFired[e].audioInfo.url,fullUrl:this._audioPlayFired[e].audioInfo.url,mediaUrl:this._audioPlayFired[e].audioInfo.mediaUrl}),o=new Blob([a],{type:"application/json; charset=UTF-8"});navigator.sendBeacon(this.restEndpoint,o),this._audioPlayFired[e].sent=!0}},_videoListener:function(){var e=this;this._videoPlayFired={},this.videoSelectors.forEach(function(i){document.querySelectorAll(i).length>0?e._videoPositionFound(i):e.blueConicClient.position.subscribe(i,e,function(){e._videoPositionFound(i)})}),this.videoProgressInterval&&clearInterval(this.videoProgressInterval),this.videoPlayedPercentage=0},_audioListener:function(){var e=this;this._audioPlayFired={},this.audioSelectors.forEach(function(i){document.querySelectorAll(i).length>0?e._audioPositionFound(i):e.blueConicClient.position.subscribe(i,e,function(){e._audioPositionFound(i)})}),this.audioProgressInterval&&clearInterval(this.audioProgressInterval),this.audioPlayedPercentage=0},_getVideoLocation:function(e){var i=document.createElement("a");i.href=e;var t=e.includes("player.vimeo.com")?"VIDEO":"LIVESTREAM",a=i.hostname,o=i.pathname,n=i.protocol+"//"+a+o,d=this._videoPlayFired[e].title,r=this.blueConicClient.getCurrentDate(),s=md5(n+"_"+r.getTime().toString());return{domain:this.pageInfo.domain,path:this.pageInfo.path,url:this.pageInfo.fullUrl,mediaUrl:n,title:this.pageInfo.title,mediaTitle:d,type:t,seconds:0,playerTime:0,startDate:r,eventId:s}},_getAudioLocation:function(e){var i=document.createElement("a");i.href=e.uri;var t=i.hostname,a=i.pathname,o=i.protocol+"//"+t+a,n=e.title,d=this.blueConicClient.getCurrentDate(),r=md5(o+"_"+d.getTime().toString());return{domain:this.pageInfo.domain,path:this.pageInfo.path,url:this.pageInfo.fullUrl,mediaUrl:o,title:this.pageInfo.title,mediaTitle:n,type:"AUDIO",seconds:0,playerTime:0,startDate:d,eventId:r}},_videoPositionFound:function(e){try{for(var i=document.querySelectorAll(e),t=!1,a=0;a<i.length;a++)if("true"!==i[a].getAttribute("data-blueconic-media-listener")&&"IFRAME"===i[a].tagName&&i[a].src.includes("vimeo.com")){t=!0;var o=i[a],n=new Vimeo.Player(o);this._bindVimeoEvents(o,n)}if(!t){var d=this;this.blueConicClient.position.subscribe(e,this,function(){d._videoPositionFound(e)})}}catch(e){this.blueConicClient.util.log("[BC][ERROR] Failed to establish media listener on video player: "+e)}},_audioPositionFound:function(e){try{for(var i=document.querySelectorAll(e),t=!1,a=0;a<i.length;a++)if("true"!==i[a].getAttribute("data-blueconic-media-listener")&&"IFRAME"===i[a].tagName&&i[a].src.includes("soundcloud.com")){t=!0;var o=i[a],n=SC.Widget(o);this._bindSoundCloudEvents(o,n)}t||this.blueConicClient.position.subscribe(e,this,function(){this._audioPositionFound(e)})}catch(e){this.blueConicClient.util.log("[BC][ERROR] Failed to establish media listener on video player: "+e)}},_bindVimeoEvents:function(e,i){var t=this;e&&!e.getAttribute(i)&&(this.videoPaying=!1,i.on("ended",function(){t._onEndedVimeo(e,i)}),i.on("pause",function(){t._onPauseVimeo(e,i)}),i.on("play",function(){t._onPlayVimeo(e,i)}),i.on("playing",function(){t._onPlayVimeo(e,i)}),e.setAttribute("data-blueconic-media-listener","true"))},_bindSoundCloudEvents:function(e,i){var t=this;e&&!e.getAttribute(i)&&(i.bind(SC.Widget.Events.READY,function(){i.bind(SC.Widget.Events.FINISH,function(){t._onEndedSC(i)}),i.bind(SC.Widget.Events.PAUSE,function(){t._onPauseSC(i)}),i.bind(SC.Widget.Events.PLAY,function(){t._onPlaySC(i)})}),e.setAttribute("data-blueconic-media-listener","true"))},_onPlayVimeo:function(e,i){var t=this,a=e.getAttribute("src");a&&(this._videoPlayFired[a]||(this._addMediaUnloadListener(i,a),this.blueConicClient.createEvent("media:play",[a]),this.blueConicClient.createEvent("media:video:play",[a]),this._videoPlayFired[a]=this._videoPlayFired[a]||{},this._videoPlayFired[a].played=!0,this._videoPlayFired[a].startTime=t.blueConicClient.getCurrentDate(),i.getDuration().then(function(e){0===e||a.includes("vimeo.com/event")?(t._videoPlayFired[a].liveStream=!0,i.getCurrentTime().then(function(i){e=i})):t._videoPlayFired[a].liveStream=!1,t._videoPlayFired[a].duration=e,i.getVideoTitle().then(function(e){t._videoPlayFired[a].title=e,t._videoPlayFired[a].videoInfo=t._getVideoLocation(a),t.videoProgressInterval=setInterval(t._checkVimeoProgress.bind(t),1e3,i,a)})})))},_onPauseVimeo:function(e,i){var t=e.getAttribute("src");this._videoPlayFired[t]&&(this._checkVimeoProgress(i,t),this.blueConicClient.event.publish("media:paused",[t]),this.blueConicClient.event.publish("media:video:paused",[t]),this._videoBeacon(t),clearInterval(this.videoProgressInterval))},_onPlaySC:function(e){var i=this;e.getCurrentSound(function(t){var a=t.uri;a&&(i._audioPlayFired[a]||(i._addAudioUnloadListener(e,a),i.blueConicClient.createEvent("media:play",[a]),i.blueConicClient.createEvent("media:audio:play",[a]),i._audioPlayFired[a]=i._audioPlayFired[a]||{},i._audioPlayFired[a].played=!0,i._audioPlayFired[a].startTime=i.blueConicClient.getCurrentDate(),i._audioPlayFired[a].duration=Math.floor(parseInt(t.duration)/1e3),i._audioPlayFired[a].title=t.title,i._audioPlayFired[a].audioInfo=i._getAudioLocation(t),i.audioProgressInterval=setInterval(i._checkAudioProgress.bind(i),1e3,e,a)))})},_onPauseSC:function(e){var i=this;e.getCurrentSound(function(t){var a=t.uri;a&&(i._audioPlayFired[a]||(i._checkAudioProgress(e,a),i.blueConicClient.event.publish("media:paused",[a]),i.blueConicClient.event.publish("media:audio:paused",[a]),i._audioBeacon(a),clearInterval(i.audioProgressInterval)))})},_onEndedVimeo:function(e,i){var t=e.getAttribute("src");this._videoPlayFired[t]&&(this._checkVimeoProgress(i,t),this.blueConicClient.createEvent("media:ended",[t]),this.blueConicClient.createEvent("media:video:ended",[t]),this._videoBeacon(t),this._videoPlayFired[t].videoInfo=this._getVideoLocation(t),this._videoPlayFired[t].videoPlayedPercentage=0,clearInterval(this.videoProgressInterval))},_onEndedSC:function(e){var i=this;e.getCurrentSound(function(t){var a=t.uri;a&&(i._audioPlayFired[a]||(i._checkAudioProgress(e,a),i.blueConicClient.createEvent("media:ended",[a]),i.blueConicClient.createEvent("media:audio:ended",[a]),i._audioBeacon(a),i._audioPlayFired[a].audioInfo=i._getAudioLocation(a),i._audioPlayFired[a].audioPlayedPercentage=0,clearInterval(i.audioProgressInterval)))})},_checkVimeoProgress:function(e,i){var t=this;this._videoPlayFired[i].videoInfo.seconds=this._videoPlayFired[i].videoInfo.seconds+1;var a=0;e.getCurrentTime().then(function(e){t._videoPlayFired[i].videoInfo.playerTime=e,t._videoPlayFired[i].liveStream?(t._videoPlayFired[i].duration=e,a=t._videoPlayFired[i].videoInfo.seconds):a=e;var o=parseFloat((Math.floor(a)/Math.floor(t._videoPlayFired[i].duration)*100).toFixed(2));if(0!==o){for(var n=t.videoPlayedPercentage+1;n<=o;n++)n%10!=0&&n%25!=0||(t.blueConicClient.event.publish("media:played_"+n+"%",[i]),t.blueConicClient.event.publish("media:video:played_"+n+"%",[i]));t._videoPlayFired[i].videoPlayedPercentage=o,t.videoPlayedPercentage=o}})},_checkAudioProgress:function(e,i){var t=this;this._audioPlayFired[i].audioInfo.seconds=this._audioPlayFired[i].audioInfo.seconds+1,e.getPosition(function(e){var a=Math.floor(e/1e3);t._audioPlayFired[i].audioInfo.playerTime=a;var o=parseFloat((Math.floor(t._audioPlayFired[i].audioInfo.playerTime)/Math.floor(t._audioPlayFired[i].duration)*100).toFixed(2));if(0!==o){for(var n=t.audioPlayedPercentage+1;n<=o;n++)n%10!=0&&n%25!=0||(t.blueConicClient.event.publish("media:played_"+n+"%",[i]),t.blueConicClient.event.publish("media:audio:played_"+n+"%",[i]));t._audioPlayFired[i].audioPlayedPercentage=o,t.audioPlayedPercentage=o}})}});var a = [];var i='listener_page_time_counter_synchrony';a.push({url: 'https://player.vimeo.com/api/player.js', sharing: 'local'});a.push({url: '/plugins/listener_page_time_counter_synchrony/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_page_time_counter_synchrony/ts_b9092b169276d8330fb03a9d4c6a25c2/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b;var c=new Date(2017,8,1,0,0,0,0),d=this.blueConicClient.getCurrentDate().getTime(),e=d-c.getTime();this.days=Math.floor(e/86400000)},getPreloadProperties:function(){return[]},onLoad:function(){var a=this.context.getProfile(),b=this.context.getParameters(),c=b.property?b.property[0]:b.property;if(c){var d=this.blueConicClient.json.parse(c)[0].profileproperty,e=this.blueConicClient.getCurrentDate(),f=this._getTimeFrame(e.getHours(),b.locale[0]),g={TIME:new Date().getTime(),data:[]};g.data.push({n:f,p:1,d:this.days}),a.addValue("_hl_"+d,this.blueConicClient.json.stringify(g)),this.blueConicClient.profile.updateProfile()}},_getTimeFrame:function(a,b){return this._getHour(a,b)+" - "+this._getHour(a+1,b)},_getHour:function(a,b){if("en-us"===b){var c=12<=a?"PM":"AM";return a%=12,a=0===a?12:a,a+" "+c}return a=10>a?"0"+a:a,a+":00"}});var a = [];var i='listener_preferred_hour';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.7/'}]);})();(function(){ var MARKETING_ET="marketing_data_layer",APPLICATION_ET="application_data_layer",APPLICATION_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","ACORID","Application_ID","MerchantID","PageName","PageSubFlow","sitecode","ApprovalCode","CreditLimit"],MARKETING_ATTRS=["ClientName","Country_Language","Device","PageFunction","PageKind","PageSubFunction","PNL","Product","Result","SiteIdentifier","Token","URL","DateTimestamp","PageName","offerIds"],CLIENT_NAME_ATTR="ClientName",PAGE_KIND_ATTR="PageKind",PAGE_KIND_PREQUAL="prequal",PAGE_KIND_APPLY="apply",PAGE_KIND_SECURED_INSTALLMENT="secured_installment",PAGE_KIND_PREQUAL_SECURED_INSTALLMENT="prequal_secured_installment",PAGE_KIND_APPLY_LOAN="applyloan",ACTION_ATTR="action",APP_TYPE_ATTR="appType",DATE_STAMP_ATTR="DateTimestamp",URL_ATTR="URL",PAGE_NAME_ATTR="PageName",PAGE_FUNCTION_ATTR="PageFunction",PAGE_SUB_FUNCTION_ATTR="PageSubFunction",FIRST_NAME_ATTR="FirstName",LAST_NAME_ATTR="LastName",EMAIL_ADDRESS_ATTR="EmailAddress",IS_BAD_EMAIL_ATTR="IsBadEmail",PREFILL_ATTR="Prefill",APPLICATION_SESSION_ID_ATTR="ApplicationSessionID",DUMMY_PROFILE_KEY_ATTR="DummyProfileKey",ZIP_CODE_ATTR="ZipCode",OFFER_EXPIRES_ATTR="OfferExpires",VEHICLE_TYPE_ATTR="VehicleType",VEHICLE_MAKE_ATTR="VehicleMake",VEHICLE_YEAR_ATTR="VehicleYear",VEHICLE_MODEL_ATTR="VehicleModel",LANDING_PAGE_NAMES=["auto_fill_invitation"],START_PAGE_NAMES=["prequal_offer","apply options","Termsandconditions","your information"],PREQUAL_START_PAGE_NAMES=["your information"],PREQUAL_DECLINED_PAGE_NAMES=["prequal_offer_declined"],PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES=["your information"],COMPLETE_PAGE_NAMES=["complete approve"],PENDING_PAGE_NAMES=["complete pending"],DECLINED_PAGE_NAMES=["complete decline"],PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES=["prequal_offer"],PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES=["prequal_offer_declined"],YOUR_INFORMATION_PAGE_NAME="your information",INFORMATION_REVIEW_PAGE_NAME="review",PREQUAL_OFFER_PAGE_NAME="prequal_offer",VEHICHLE_PAGE_NAME="product info",PII_INTERNAL_PROPERY="_dll_pii",VEHICHLE_INFO_INTERNAL_PROPERTY="_vehichle_info",TIME_MILLS_DAY=864e5,MINUTES_TO_MILLS=6e4,APPLICATION_SESSION_ID_COOKIE_NAME="_bcasid",APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME="_bcasid_ts";window._dataLayerListenerEventsCache=window._dataLayerListenerEventsCache||{};var frontendListener={init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.dataLayerName=this.parameters.dataLayerName?this.parameters.dataLayerName[0]:"_SFDDL",this.timelineEventType=this.parameters.timelineEventType?this.parameters.timelineEventType[0]:MARKETING_ET,this.clientNames=this.parameters.clientName?this.parameters.clientName:[],this.selectedPageKind=this.parameters.selectedPageKind?this.parameters.selectedPageKind:[],this.lastUpdateTimeProperty=this.parameters.lastUpdateTimeProperty?this.parameters.lastUpdateTimeProperty[0]:null,this.emailProperty=this.parameters.emailProperty?this.parameters.emailProperty[0]:null,this.appStartProperty=this.parameters.appStartProperty?this.parameters.appStartProperty[0]:null,this.appPendingProperty=this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:null,this.appCompleteProperty=this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:null,this.appDeclinedProperty=this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:null,this.appFraudProperty=this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:null,this.appErrorProperty=this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:null,this.agreeAndAcceptProperty=this.parameters.agreeAndAcceptProperty?this.parameters.agreeAndAcceptProperty[0]:null,this.prequalAppStartProperty=this.parameters.prequalAppStartProperty?this.parameters.prequalAppStartProperty[0]:null,this.prequalAppPendingProperty=this.parameters.prequalAppPendingProperty?this.parameters.prequalAppPendingProperty[0]:null,this.prequalAppCompleteProperty=this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:null,this.prequalAppDeclinedProperty=this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:null,this.prequalAppErrorProperty=this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:null,this.prequalNotInterestedProperty=this.parameters.prequalNotInterestedProperty?this.parameters.prequalNotInterestedProperty[0]:null,this.prequalSecuredInstallmentAppStartProperty=this.parameters.prequalSecuredInstallmentAppStartProperty?this.parameters.prequalSecuredInstallmentAppStartProperty[0]:null,this.prequalSecuredInstallmentAppPendingProperty=this.parameters.prequalSecuredInstallmentAppPendingProperty?this.parameters.prequalSecuredInstallmentAppPendingProperty[0]:null,this.prequalSecuredInstallmentAppCompleteProperty=this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:null,this.prequalSecuredInstallmentAppDeclinedProperty=this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:null,this.prequalSecuredInstallmentAppErrorProperty=this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:null,this.securedInstallmentAppStartProperty=this.parameters.securedInstallmentAppStartProperty?this.parameters.securedInstallmentAppStartProperty[0]:null,this.securedInstallmentAppPendingProperty=this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:null,this.securedInstallmentAppCompleteProperty=this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:null,this.securedInstallmentAppDeclinedProperty=this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:null,this.securedInstallmentAppFraudProperty=this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:null,this.securedInstallmentAppErrorProperty=this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:null,this.applyLoanAppStartProperty=this.parameters.applyLoanAppStartProperty?this.parameters.applyLoanAppStartProperty[0]:null,this.applyLoanAppPendingProperty=this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:null,this.applyLoanAppCompleteProperty=this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:null,this.applyLoanAppDeclinedProperty=this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:null,this.applyLoanAppFraudProperty=this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:null,this.applyLoanAppErrorProperty=this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:null,this.timeline={results:{events:[]}}},getPreloadProperties:function(){return[PII_INTERNAL_PROPERY,VEHICHLE_INFO_INTERNAL_PROPERTY,this.parameters.appCompleteProperty?this.parameters.appCompleteProperty[0]:"",this.parameters.appPendingProperty?this.parameters.appPendingProperty[0]:"",this.parameters.appDeclinedProperty?this.parameters.appDeclinedProperty[0]:"",this.parameters.appFraudProperty?this.parameters.appFraudProperty[0]:"",this.parameters.appErrorProperty?this.parameters.appErrorProperty[0]:"",this.parameters.prequalSecuredInstallmentAppCompleteProperty?this.parameters.prequalSecuredInstallmentAppCompleteProperty[0]:"",this.parameters.prequalSecuredInstallmentAppDeclinedProperty?this.parameters.prequalSecuredInstallmentAppDeclinedProperty[0]:"",this.parameters.prequalSecuredInstallmentAppErrorProperty?this.parameters.prequalSecuredInstallmentAppErrorProperty[0]:"",this.parameters.prequalAppCompleteProperty?this.parameters.prequalAppCompleteProperty[0]:"",this.parameters.prequalAppDeclinedProperty?this.parameters.prequalAppDeclinedProperty[0]:"",this.parameters.prequalAppErrorProperty?this.parameters.prequalAppErrorProperty[0]:"",this.parameters.securedInstallmentAppCompleteProperty?this.parameters.securedInstallmentAppCompleteProperty[0]:"",this.parameters.securedInstallmentAppPendingProperty?this.parameters.securedInstallmentAppPendingProperty[0]:"",this.parameters.securedInstallmentAppDeclinedProperty?this.parameters.securedInstallmentAppDeclinedProperty[0]:"",this.parameters.securedInstallmentAppFraudProperty?this.parameters.securedInstallmentAppFraudProperty[0]:"",this.parameters.securedInstallmentAppErrorProperty?this.parameters.securedInstallmentAppErrorProperty[0]:"",this.parameters.applyLoanAppCompleteProperty?this.parameters.applyLoanAppCompleteProperty[0]:"",this.parameters.applyLoanAppPendingProperty?this.parameters.applyLoanAppPendingProperty[0]:"",this.parameters.applyLoanAppDeclinedProperty?this.parameters.applyLoanAppDeclinedProperty[0]:"",this.parameters.applyLoanAppFraudProperty?this.parameters.applyLoanAppFraudProperty[0]:"",this.parameters.applyLoanAppErrorProperty?this.parameters.applyLoanAppErrorProperty[0]:""].filter(function(e){return""!==e})},onLoad:function(){if(this.dataLayerName&&this.timelineEventType){var e=this,t=0;(function r(){if(e._getDataLayer())e._monitorDataLayerUpdates();else{if(t>20)return;t++,window.setTimeout(r,250)}}).call(this)}},_monitorDataLayerUpdates:function(){var e=this._getDataLayer(),t=(e.length,this._getDataHash(e)),r=this;this.pollingInterval=window.setInterval(function(){var e=r._getDataLayer(),i=r._getDataHash(e);t!==i&&(r._importFromDataLayer(e),e.length,t=i)},1e3),this._importFromDataLayer(e)},_getDataLayer:function(){if(!this._dataLayer){for(var e=this.dataLayerName.split("."),t=window,r=0;r<e.length;r++)t=t&&t[e[r]]?t[e[r]]:null;this._dataLayer=t}return this._dataLayer},_getDataHash:function(e){var t=this._getDataString(e);return t?this.md5(t):null},_getDataString:function(e){var t=null;try{t=JSON.stringify(e)}catch(r){t=this._stringify(e)}return t},_stringify:function(e){var t=[],r=JSON.stringify(e,function(e,r){if("object"==typeof r&&null!==r){if(-1!==t.indexOf(r))return;t.push(r)}return r});return t=null,r},_addDaysToTimestamp:function(e,t){return isNaN(parseInt(e))||isNaN(parseInt(t))||e&&13!==e.toString().length?e:parseInt(e)+TIME_MILLS_DAY*parseInt(t)},_importFromDataLayer:function(e){if(e.pageInfo){var t=e.pageInfo[CLIENT_NAME_ATTR];if(this.clientNames.length>0&&-1===this.clientNames.indexOf(t))console.info("Listener ID: "+this.context.getInteractionId()+" -- Client name mismatch, skipping. Client: "+e.pageInfo[CLIENT_NAME_ATTR]);else{var r=new Date,a=r.getTime();this._currentMills=a;var n={};if(this.timelineEventType===MARKETING_ET)for(i=0;i<MARKETING_ATTRS.length;i++)e.pageInfo[MARKETING_ATTRS[i]]&&(n[MARKETING_ATTRS[i]]=e.pageInfo[MARKETING_ATTRS[i]]);if(this.timelineEventType===APPLICATION_ET){for(i=0;i<APPLICATION_ATTRS.length;i++)e.pageInfo[APPLICATION_ATTRS[i]]&&(n[APPLICATION_ATTRS[i]]=e.pageInfo[APPLICATION_ATTRS[i]]);if(e.formAction){var p=e.formAction[ACTION_ATTR];p&&(n[ACTION_ATTR]=p),e.formAction[APP_TYPE_ATTR]&&(n[APP_TYPE_ATTR]=e.formAction[APP_TYPE_ATTR])}var s=e.pageInfo[PAGE_KIND_ATTR];this._currentPageKind=s;var l=e.pageInfo[PAGE_NAME_ATTR];this._currentPageName=l;var o=e.pageInfo[PAGE_FUNCTION_ATTR],u=e.pageInfo[PAGE_SUB_FUNCTION_ATTR],d=this._getSessionIdTimestamp();if(LANDING_PAGE_NAMES.indexOf(l)>-1&&d&&this._currentMills-d>=1e4?this._setSessionId():LANDING_PAGE_NAMES.indexOf(l)>-1&&!d?this._setSessionId():this._getSessionId()||this._setSessionId(),s===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT)&&l===PREQUAL_OFFER_PAGE_NAME){var c=this._addDaysToTimestamp(a,30);n[OFFER_EXPIRES_ATTR]=new Date(c)}s===PAGE_KIND_PREQUAL&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL)?(this.prequalNotInterestedProperty&&this._prequalNotInterestedListener(t,l),this._handlePrequal(t,l)):s===PAGE_KIND_PREQUAL_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_PREQUAL_SECURED_INSTALLMENT)?(this._handlePrequalSecuredInstallment(t,l),VEHICHLE_PAGE_NAME===l&&this._captureVehicleAttr(t,s),this._addVehicleAttr(t,s,n)):s===PAGE_KIND_APPLY&&this.selectedPageKind.includes(PAGE_KIND_APPLY)?this._handleApply(t,l):s===PAGE_KIND_SECURED_INSTALLMENT&&this.selectedPageKind.includes(PAGE_KIND_SECURED_INSTALLMENT)?this._handleSecuredInstallment(t,l):s===PAGE_KIND_APPLY_LOAN&&this.selectedPageKind.includes(PAGE_KIND_APPLY_LOAN)&&this._handleApplyLoan(t,l),l===YOUR_INFORMATION_PAGE_NAME&&this._capturePII(t,s,o,u),l===INFORMATION_REVIEW_PAGE_NAME&&this._capturePiiChanges(t,s),this._addPII(t,s,n)}n[DATE_STAMP_ATTR]=r,n[URL_ATTR]=window.location.href;try{this._getSessionId()&&(n[APPLICATION_SESSION_ID_ATTR]=this._getSessionId())}catch(e){this.blueConicClient.util.log(e)}this.lastUpdateTimeProperty&&this.profile.setValue(this.lastUpdateTimeProperty,a),this._updateProfile(r,n)}}},_updateProfile:function(e,t){this.blueConicClient.profile.updateProfile(this,function(){this.blueConicClient.createEvent("BC_DATALAYER_UPDATED")}),e&&t&&this._createTimelineEvent(e,t)},_createTimelineEvent:function(e,t){var r=JSON.parse(JSON.stringify(t));delete r.DateTimestamp,delete r.Token;var i=this._getDataHash(r),a=this._getTimelineCreated(i);window._dataLayerListenerEventsCache&&window._dataLayerListenerEventsCache[i]&&this._currentMills-window._dataLayerListenerEventsCache[i]<=1e4||a&&this._currentMills-a<=1e4||(window._dataLayerListenerEventsCache[i]=this._currentMills,this._setTimelineCreated(i),this.blueConicClient.profile.getProfile().timeline.createEvent(this.timelineEventType,e,t,this,function(){this.timeline.results.events.push({eventType:this.timelineEventType,eventDate:e,eventData:t})}))},_handleApply:function(e,t){START_PAGE_NAMES.indexOf(t)>-1&&this.appStartProperty&&this.profile.addValue(this.appStartProperty,e),PENDING_PAGE_NAMES.indexOf(t)>-1&&this.appPendingProperty&&this.profile.addValue(this.appPendingProperty,e),COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.appCompleteProperty&&this.profile.addValue(this.appCompleteProperty,e),(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.appDeclinedProperty&&this.profile.addValue(this.appDeclinedProperty,e),t.toLowerCase().indexOf("fraud")>-1&&this.appFraudProperty&&this.profile.addValue(this.appFraudProperty,e),t.toLowerCase().indexOf("error")>-1&&this.appErrorProperty&&this.profile.addValue(this.appErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handlePrequal:function(e,t){PREQUAL_START_PAGE_NAMES.indexOf(t)>-1&&this.prequalAppStartProperty&&this.profile.addValue(this.prequalAppStartProperty,e),COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.prequalAppCompleteProperty&&this.profile.addValue(this.prequalAppCompleteProperty,e),(PREQUAL_DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.prequalAppDeclinedProperty&&this.profile.addValue(this.prequalAppDeclinedProperty,e),t.toLowerCase().indexOf("error")>-1&&this.prequalAppErrorProperty&&this.profile.addValue(this.prequalAppErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handlePrequalSecuredInstallment:function(e,t){PREQUAL_SECURED_INSTALLMENT_START_PAGE_NAMES.indexOf(t)>-1&&this.prequalSecuredInstallmentAppStartProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppStartProperty,e),PREQUAL_SECURED_INSTALLMENT_COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.prequalSecuredInstallmentAppCompleteProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppCompleteProperty,e),(PREQUAL_SECURED_INSTALLMENT_DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.prequalSecuredInstallmentAppDeclinedProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppDeclinedProperty,e),t.toLowerCase().indexOf("error")>-1&&this.prequalSecuredInstallmentAppErrorProperty&&this.profile.addValue(this.prequalSecuredInstallmentAppErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_prequalNotInterestedListener:function(e){var t=document.querySelectorAll('[data-reason="not_interested"]');t.length>0?t.forEach(function(t,r){t.addEventListener("click",function(){this.profile.addValue(this.prequalNotInterestedProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1)}.bind(this)):this.blueConicClient.position.subscribe('[data-reason="not_interested"]',this,function(){this._prequalNotInterestedListener(e)})},_handleSecuredInstallment:function(e,t){START_PAGE_NAMES.indexOf(t)>-1&&this.securedInstallmentAppStartProperty&&this.profile.addValue(this.securedInstallmentAppStartProperty,e),t.toLowerCase().indexOf("pending")>-1&&this.securedInstallmentAppPendingProperty&&this.profile.addValue(this.securedInstallmentAppPendingProperty,e),COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.securedInstallmentAppCompleteProperty&&this.profile.addValue(this.securedInstallmentAppCompleteProperty,e),(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.securedInstallmentAppDeclinedProperty&&this.profile.addValue(this.securedInstallmentAppDeclinedProperty,e),t.toLowerCase().indexOf("fraud")>-1&&this.securedInstallmentAppFraudProperty&&this.profile.addValue(this.securedInstallmentAppFraudProperty,e),t.toLowerCase().indexOf("error")>-1&&this.securedInstallmentAppErrorProperty&&this.profile.addValue(this.securedInstallmentAppErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_handleApplyLoan:function(e,t){START_PAGE_NAMES.indexOf(t)>-1&&this.applyLoanAppStartProperty&&this.profile.addValue(this.applyLoanAppStartProperty,e),t.toLowerCase().indexOf("pending")>-1&&this.applyLoanAppPendingProperty&&this.profile.addValue(this.applyLoanAppPendingProperty,e),COMPLETE_PAGE_NAMES.indexOf(t)>-1&&this.applyLoanAppCompleteProperty&&this.profile.addValue(this.applyLoanAppCompleteProperty,e),(DECLINED_PAGE_NAMES.indexOf(t)>-1||t.toLowerCase().indexOf("decline")>-1)&&this.applyLoanAppDeclinedProperty&&this.profile.addValue(this.applyLoanAppDeclinedProperty,e),t.toLowerCase().indexOf("fraud")>-1&&this.applyLoanAppFraudProperty&&this.profile.addValue(this.applyLoanAppFraudProperty,e),t.toLowerCase().indexOf("error")>-1&&this.applyLoanAppErrorProperty&&this.profile.addValue(this.applyLoanAppErrorProperty,e),this.agreeAndAcceptProperty&&this._aggreeAcceptClickListener(e)},_aggreeAcceptClickListener:function(e){var t=document.querySelector("button#acptbtn")||null;t?t.addEventListener("click",function(){this.profile.addValue(this.agreeAndAcceptProperty,e),this.blueConicClient.profile.updateProfile()}.bind(this),!1):this.blueConicClient.position.subscribe("button#acptbtn",this,function(){this._aggreeAcceptClickListener(e)})},_generateProfileKey:function(e){if(!e)return null;try{return this.md5((new Date).getTime().toString()+"_"+e.toLowerCase()).substring(6,26)}catch(e){return console.error("[BC ERROR] Error generating dummyProfileKey key: "+e),null}},_captureVehicleAttr:function(e,t){var r=document.querySelector('button[data-reason="residence"]')||null;null!==r?r.addEventListener("click",function(){var r=document.querySelector("#native-select-vehicleType-native"),i=r?r.options[r.selectedIndex].text:null,a=document.querySelector("#native-select-manufacturerOptions-native"),n=a?a.options[a.selectedIndex].text:null,p=document.querySelector("#native-select-modelYear-native"),s=p?p.options[p.selectedIndex].text:null,l=document.querySelector("#native-select-modelDesc-native"),o=l?l.options[l.selectedIndex].text:null;this.profile.setValue(VEHICHLE_INFO_INTERNAL_PROPERTY,JSON.stringify({currentClient:e,currentPageKind:t,vehicleType:i,vehicleMake:n,vehicleYear:s,vehicleModel:o})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-reason="residence"]',this,function(){this._captureVehicleAttr(e,t)})},_addVehicleAttr:function(e,t,r){var i=this.profile.getValue(VEHICHLE_INFO_INTERNAL_PROPERTY);if(i)try{var a=JSON.parse(i);e===a.currentClient&&t===a.currentPageKind&&(a.vehicleType&&(r[VEHICLE_TYPE_ATTR]=a.vehicleType),a.vehicleYear&&(r[VEHICLE_YEAR_ATTR]=a.vehicleYear),a.vehicleMake&&(r[VEHICLE_MAKE_ATTR]=a.vehicleMake),a.vehicleModel&&(r[VEHICLE_MODEL_ATTR]=a.vehicleModel))}catch(e){}},_capturePiiChanges:function(e,t){var r=document.querySelector('button[data-test="save1-button"]')?document.querySelector('button[data-test="save1-button"]'):null;null!==r?r.addEventListener("click",function(){var r=document.querySelector("#firstName-primary")?document.querySelector("#firstName-primary").value:null,i=document.querySelector("#lastName-primary")?document.querySelector("#lastName-primary").value:null,a=document.querySelector("#emailAddress-primary")?document.querySelector("#emailAddress-primary").value:null,n=null,p=null;a&&(n=this._generateProfileKey(a),p=this._validateEmail(a),this.emailProperty&&this.profile.setValue(this.emailProperty,a)),this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:r,lastName:i,email:a,currentClient:e,currentPageKind:t,isBadEmail:p,dummyProfileKey:n})),this.blueConicClient.profile.updateProfile()}.bind(this)):this.blueConicClient.position.subscribe('button[data-test="save1-button"]',this,function(){this._capturePiiChanges(e,t)})},_capturePII:function(e,t,r,i){submitButton=document.querySelector('button[data-reason="productinfo"]')?document.querySelector('button[data-reason="productinfo"]'):document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]')?document.querySelector('button[data-reason="NEXT: VEHICLE INFO"]'):document.querySelector('button[data-reason="Productinfo"]')?document.querySelector('button[data-reason="Productinfo"]'):document.querySelector('button[title="NEXT: VEHICLE INFO"]')?document.querySelector('button[title="NEXT: VEHICLE INFO"]'):document.querySelector("button#submitButton")?document.querySelector("button#submitButton"):null,null!==submitButton?submitButton.addEventListener("click",function(){var a=document.querySelector("#firstName")?document.querySelector("#firstName").value:null,n=document.querySelector("#lastName")?document.querySelector("#lastName").value:null;if(!a&&!n&&document.querySelector("#fullName")||!a&&!n&&document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")){var p=document.querySelector("#fullName")?document.querySelector("#fullName").innerText:document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")?document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(1) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm").innerText:null;p&&(a=-1!==p.indexOf(" ")?p.substring(0,p.indexOf(" ")):p,n=-1!==p.indexOf(" ")?p.substring(p.indexOf(" ")+1):null)}a||n||(a=(a=document.querySelector('div.prefill-details label[for="firstName"]')?document.querySelector('div.prefill-details label[for="firstName"]').innerText:null)?a.replace(/\s$/g,""):null,n=(n=document.querySelector('div.prefill-details label[for="lastName"]')?document.querySelector('div.prefill-details label[for="lastName"]').innerText:null)?n.replace(/\s$/g,""):null);var s=document.querySelector("#confirmEmailAddress")?document.querySelector("#confirmEmailAddress").value:document.querySelector("#confirmEmailCheck")?document.querySelector("#confirmEmailCheck").value:null,l=null,o=null;s&&(l=this._generateProfileKey(s),o=this._validateEmail(s),this.emailProperty&&this.profile.setValue(this.emailProperty,s));var u=document.querySelector("#applyVTO_applicantVO_zip_id")?document.querySelector("#applyVTO_applicantVO_zip_id").value:document.querySelector("#zipCode-primary")?document.querySelector("#zipCode-primary").value:null;if(!u){var d=document.querySelector("#address")?document.querySelector("#address").innerText:document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(2) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm")?document.querySelector("#__next > div:nth-child(2) > div > div.PrefillDetailFormStyles__PrefillSubContainer-sc-j2gedn-2.edKife > div:nth-child(2) > div.subcomponents__Row-sc-pymi2z-0.iyzLbE.PrefillDetailFormStyles__AnswerGrid-sc-j2gedn-6.jrTNbm").innerText:null;d&&(u=d.substring(d.lastIndexOf(", ")+2))}this.profile.setValue(PII_INTERNAL_PROPERY,JSON.stringify({firstName:a,lastName:n,email:s,currentClient:e,currentPageKind:t,isBadEmail:o,dummyProfileKey:l,zipCode:u,prefill:"payfone"===r&&("prefilled"===i||"no_user_data_in_payfone"===i)})),this.blueConicClient.profile.updateProfile()}.bind(this)):(this.blueConicClient.position.subscribe("button#submitButton",this,function(){this._capturePII(e,t,r,i)}),this.blueConicClient.position.subscribe('button[data-reason="productinfo"]',this,function(){this._capturePII(e,t,r,i)}),this.blueConicClient.position.subscribe('button[data-reason="Productinfo"]',this,function(){this._capturePII(e,t,r,i)}),this.blueConicClient.position.subscribe('button[data-reason="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,t,r,i)}),this.blueConicClient.position.subscribe('button[title="NEXT: VEHICLE INFO"]',this,function(){this._capturePII(e,t,r,i)}))},_addPII:function(e,t,r){var i=this.profile.getValue(PII_INTERNAL_PROPERY);if(i)try{var a=JSON.parse(i);e===a.currentClient&&t===a.currentPageKind&&(r[FIRST_NAME_ATTR]=a.firstName,r[LAST_NAME_ATTR]=a.lastName,a.email&&(r[EMAIL_ADDRESS_ATTR]=a.email,r[IS_BAD_EMAIL_ATTR]=a.isBadEmail?a.isBadEmail:this._validateEmail(a.email)),a.dummyProfileKey&&(r[DUMMY_PROFILE_KEY_ATTR]=a.dummyProfileKey),r[PREFILL_ATTR]=a.prefill,a.zipCode&&(r[ZIP_CODE_ATTR]=a.zipCode))}catch(e){}},_validateEmail:function(e){var t=!1;(e.length<5||null===e.match(/@/g)||1!==e.match(/@/g).length||null!==e.match(/\s/g))&&(t=!0);var r=e.split("@")[1];null!==r.match(/\./g)&&1===r.match(/\./g).length&&null===r.match(/,/g)||(t=!0);var i=e.substr(0,1);["@",".",","," ","/","\\","!","#","$","%","^","&","*","(",")","+","-","~"].indexOf(i)>-1&&(t=!0);var a=e.substring(e.lastIndexOf(".")+1);return-1===["COM","NET","EDU","ORG","MIL","GOV","US","BIZ"].indexOf(a.toUpperCase())&&(t=!0),t},_indexOf:function(e,t){return Array.isArray(e)?e.indexOf(t):-1},_removeItemFromArray:function(e,t){if(Array.isArray(e))for(var r;-1!==(r=this._indexOf(e,t));)e.splice(r,1)},_encodeCookieValue:function(e){return"string"!=typeof e&&(e=JSON.stringify(e)),encodeURIComponent(e.replace(/[\n\r]/g,""))},_decodeCookieValue:function(e){return decodeURIComponent(e)},_setCookie:function(e,t,r){if(r){var i=new Date,a=r*MINUTES_TO_MILLS;i.setTime(i.getTime()+a),document.cookie=e+"="+this._encodeCookieValue(t)+(null==r?"":"; expires="+i.toUTCString())+"; path=/; SameSite=None; Secure"}else document.cookie=e+"="+this._encodeCookieValue(t)+"; path=/; SameSite=None; Secure"},_getCookie:function(e){var t,r,i=e+"=",a="";return document.cookie.length>0&&-1!==(t=document.cookie.indexOf(i))&&(t+=i.length,-1===(r=document.cookie.indexOf(";",t))&&(r=document.cookie.length),a=this._decodeCookieValue(document.cookie.substring(t,r))),a},_checkSessionStorageSupport:function(){var e="__storageTest";try{return window.sessionStorage.setItem(e,e),window.sessionStorage.removeItem(e),!0}catch(e){return!1}},_getSessionId:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_COOKIE_NAME):null},_getSessionIdTimestamp:function(){return window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?window.sessionStorage.getItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME)?this._getCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME):null},_setSessionId:function(){var e=this._uuid();return this._checkSessionStorageSupport()&&(window.sessionStorage.setItem(APPLICATION_SESSION_ID_COOKIE_NAME,e),window.sessionStorage.setItem(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills)),this._setCookie(APPLICATION_SESSION_ID_COOKIE_NAME,e,null),this._setCookie(APPLICATION_SESSION_ID_TIMESTAMP_COOKIE_NAME,this._currentMills,null),e},_getTimelineCreated:function(e){return this._checkSessionStorageSupport()?window.sessionStorage.getItem(e)?window.sessionStorage.getItem(e):null:this._getCookie(e)?this._getCookie(e):null},_setTimelineCreated:function(e){this._checkSessionStorageSupport()?window.sessionStorage.setItem(e,this._currentMills):this._setCookie(e,this._currentMills,null)},_uuid:function(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(e){return(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})}};try{var InteractionTypeImpl=InteractionType.extend(frontendListener)}catch(e){try{module.exports=frontendListener}catch(e){}};var a = [];var i='listener_regular_app_abandoner_syf';a.push({url: '/plugins/listener_regular_app_abandoner_syf/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_regular_app_abandoner_syf/ts_be67e3775076de8e53391b782d7a52f3/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b;var c=new Date(2012,0,1,0,0,0,0),d=new Date,e=d.getTime()-c.getTime();this.days=Math.floor(e/86400000)},getPreloadProperties:function(){return[]},onLoad:function(){var a=this.context.getParameters(),b=a.config?a.config[0]:a.config;if(b){var c=this.blueConicClient.json.parse(b),d=document.location.href;(0<=d.indexOf("#")||0<=d.indexOf("?"))&&(d=d.substring(0,d.indexOf("#"))||d.substring(0,d.indexOf("?")));var e,f=d.split("/"),g=!1;for(e=0;e<c.length;e++){var h=c[e],i=f[e+3];h.checked&&h.profileProperty&&!g&&(this._storeEngagement(h.profileProperty,this._getValue(i)),i&&30<i.length&&h.checked&&(g=!0))}this.blueConicClient.profile.updateProfile()}},_getValue:function(a){return a?30<a.length?null:(0<=a.indexOf(".")&&(a=a.substring(0,a.indexOf("."))),isNaN(a)&&"index"!==a&&0!==a.indexOf("index.")?a:null):null},_storeEngagement:function(a,b){if(b){var c=this.context.getProfile(),d={TIME:new Date().getTime()};d[b]={},d[b]["p"+this.days]=1,c.addValue("_"+a,this.blueConicClient.json.stringify(d))}}});var a = [];var i='listener_url_structure';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.20/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({blueConicClient:null,context:null,_profile:null,_userLanguage:null,_systemLanguage:null,_language:null,_referrer:null,_hostName:null,_currentUrl:null,_domain:null,ORIGIN_TYPES:{WEB:"web",MOBILE_WEB:"mobile_web",CONNECTION:"connection",MOBILE:"mobile_app"},CONSTANTS:{THIRTY_MINUTES_IN_MS:18e5,UNKNOWN:""},PROFILE_PROPERTIES:{CLICKCOUNT:"clickcount",VISITS:"visits",VISITCLICKS:"visitclicks",LASTVISITDATE:"lastvisitdate",VISITEDSITES:"visitedsites",VISITEDDOMAIN:"visiteddomain",ENTRYPAGE:"entrypage",REFERRERHOST:"referrerhost",REFERRERHOSTS:"referrerhosts",HOSTENTRYPAGE:"hostentrypage",HOSTAVERAGETIME:"hostaveragetime",LASTREFERRERAVERAGE:"lastreferreraverage",AVERAGETIME:"averagetime",TOTALVISITTIME:"totalvisittime",RESOLUTION:"resolution",CURRENTRESOLUTION:"currentresolution",CURRENTSCREENWIDTH:"currentscreenwidth",CURRENTSCREENHEIGHT:"currentscreenheight",ORIGIN_TYPE:"origin_type",ORIGIN_SOURCE:"origin_source",ORIGIN_DETAIL:"origin_detail",DEVICETYPE:"devicetype",RECEIVED_FROM_SYSTEM:"received_from_system",RECEIVED_FROM_CONNECTION:"received_from_connection",MOBILE_APP_ID:"mobile_app_id",MOBILE_APP_NAMEVERSION:"mobile_app_nameversion",LANGUAGE:"language",KEYWORDS:"keywords",CURRENTKEYWORDS:"currentkeywords",CURRENT_UTM_SOURCE:"current_utm_source",CURRENT_UTM_MEDIUM:"current_utm_medium",CURRENT_UTM_TERM:"current_utm_term",CURRENT_UTM_CONTENT:"current_utm_content",CURRENT_UTM_CAMPAIGN:"current_utm_campaign",UTM_SOURCE:"utm_source",UTM_MEDIUM:"utm_medium",UTM_TERM:"utm_term",UTM_CONTENT:"utm_content",UTM_CAMPAIGN:"utm_campaign"},PROFILE_PROPERTIES_FOR_CHANNEL:{},init:function(e,t){this.blueConicClient=e,this.context=t,this._profile=e.profile.getProfile(),this._channelId=e.getChannelId(),this._referrer=document.referrer,this._hostName=window.location.hostname,this._currentUrl=window.location.href,this._domain=document.domain,this._userLanguage=window.navigator.userLanguage,this._systemLanguage=navigator.systemLanguage,this._language=window.navigator.language,this.PROFILE_PROPERTIES_FOR_CHANNEL={CLICKCOUNT:this.PROFILE_PROPERTIES.CLICKCOUNT+"_"+this._channelId,VISITS:this.PROFILE_PROPERTIES.VISITS+"_"+this._channelId,VISITCLICKS:this.PROFILE_PROPERTIES.VISITCLICKS+"_"+this._channelId,LASTVISITDATE:this.PROFILE_PROPERTIES.LASTVISITDATE+"_"+this._channelId}},onPrepare:function(){this._profile&&(this._setLanguageProperties(),this._setResolutionProperties(),this._setReferrerProperties(),this._setCampaignProperties())},onLoad:function(){this._profile&&(this._setReferrerHostOnLoad(),this._setVisitProperties(),this._setOriginProperties(),this.blueConicClient.profile.updateProfile())},getPreloadProperties:function(){return[this.PROFILE_PROPERTIES.CLICKCOUNT,this.PROFILE_PROPERTIES.VISITS,this.PROFILE_PROPERTIES.VISITCLICKS,this.PROFILE_PROPERTIES.LASTVISITDATE,this.PROFILE_PROPERTIES.VISITEDSITES,this.PROFILE_PROPERTIES.ENTRYPAGE,this.PROFILE_PROPERTIES.HOSTENTRYPAGE,this.PROFILE_PROPERTIES.HOSTAVERAGETIME,this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE,this.PROFILE_PROPERTIES.AVERAGETIME,this.PROFILE_PROPERTIES.TOTALVISITTIME,this.PROFILE_PROPERTIES.RESOLUTION,this.PROFILE_PROPERTIES.DEVICETYPE,this.PROFILE_PROPERTIES.ORIGIN_TYPE,this.PROFILE_PROPERTIES.ORIGIN_SOURCE,this.PROFILE_PROPERTIES.ORIGIN_DETAIL,this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM,this.PROFILE_PROPERTIES.RECEIVED_FROM_CONNECTION,this.PROFILE_PROPERTIES.VISITEDDOMAIN,this.PROFILE_PROPERTIES.MOBILE_APP_ID,this.PROFILE_PROPERTIES.MOBILE_APP_NAMEVERSION,this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITS,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITCLICKS,this.PROFILE_PROPERTIES_FOR_CHANNEL.LASTVISITDATE]},_setLanguageProperties:function(){var e=this._userLanguage||this._systemLanguage||this._language,t=this._normalizeLocale(e).split("-")[0];t&&this._profile.setValue(this.PROFILE_PROPERTIES.LANGUAGE,t)},_normalizeLocale:function(e){return e&&e.replace("_","-").toLowerCase()},_setResolutionProperties:function(){var e=screen.width,t=screen.height;this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTSCREENWIDTH,e),this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTSCREENHEIGHT,t);var i=e+"x"+t;this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTRESOLUTION,i),this._profile.addValue(this.PROFILE_PROPERTIES.RESOLUTION,i)},_setReferrerProperties:function(){this._setReferrerKeywords(),this._setReferrerHost()},_setReferrerKeywords:function(){var e=this.HELPER.decodeReferrer(this._referrer)||[];e.length>0&&(this._addProfileValues(this.PROFILE_PROPERTIES.KEYWORDS,e),this._profile.setValues(this.PROFILE_PROPERTIES.CURRENTKEYWORDS,e))},_addProfileValues:function(e,t){(Array.isArray(t)?t:[t]).forEach((function(t){this._profile.addValue(e,t)}),this)},_setReferrerHost:function(){var e=this._getReferrerHost();e!==this._hostName&&(this._profile.setValue(this.PROFILE_PROPERTIES.ENTRYPAGE,this._currentUrl),e&&(this._profile.setValue(this.PROFILE_PROPERTIES.REFERRERHOST,e),this._profile.addValue(this.PROFILE_PROPERTIES.REFERRERHOSTS,e)))},_setReferrerHostOnLoad:function(){var e=this._getReferrerHost();e!==this._hostName&&this._setHostEntryPageProperty(),this._setHostTotalAndAverageTimeProperty(this._hostName,e)},_getReferrerHost:function(){return this._referrer.replace(/http[s]?:\/\/(.*?)(:|\?|\/|$).*/,"$1")},_setCampaignProperties:function(){[this.PROFILE_PROPERTIES.UTM_SOURCE,this.PROFILE_PROPERTIES.UTM_MEDIUM,this.PROFILE_PROPERTIES.UTM_TERM,this.PROFILE_PROPERTIES.UTM_CONTENT,this.PROFILE_PROPERTIES.UTM_CAMPAIGN].forEach((function(e){var t=this._removeHashPart(this.HELPER._getParameterByName(this._currentUrl,e));t&&(this._profile.setValue("current_"+e,t),this._profile.addValue(e,t))}),this)},_setHostEntryPageProperty:function(){this._profile.setValue(this.PROFILE_PROPERTIES.ENTRYPAGE,this._currentUrl);var e=this._getHostEntryPageMapping();e[this._hostName]={entrypage:this._currentUrl},this._profile.setValue(this.PROFILE_PROPERTIES.HOSTENTRYPAGE,JSON.stringify(e))},_getHostEntryPageMapping:function(){return this._safeJSONParse(this._profile.getValue(this.PROFILE_PROPERTIES.HOSTENTRYPAGE))},_safeJSONParse:function(e){try{var t=e.replace(/'/g,'"');return JSON.parse(t)||{}}catch(i){return{}}},_setHostTotalAndAverageTimeProperty:function(e,t){var i=this._safeJSONParse(this._profile.getValue(this.PROFILE_PROPERTIES.HOSTAVERAGETIME));i[e]||(i[e]=this._createNewVisitData());var E=this.blueConicClient.getCurrentDate().getTime(),s=this._profile.getValue(this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE),r=0,R=0,I=0;Object.keys(i).map((function(e){return e.toString()})).forEach((function(n){var _=i[n];this._isSessionExpired(_.enddate)?this._addVisit(_,_.enddate-_.startdate):n===e?_.enddate=E:n===t&&s!==t&&(_.enddate=E,this._profile.setValue(this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE,t)),0!==_.averageTime&&(R++,r+=_.averageTime,I+=_.averageTime*_.visits)}),this),this._profile.setValue(this.PROFILE_PROPERTIES.HOSTAVERAGETIME,JSON.stringify(i)),this._profile.setValue(this.PROFILE_PROPERTIES.TOTALVISITTIME,I);var n=R>0?Math.round(r/R):0;this._profile.setValue(this.PROFILE_PROPERTIES.AVERAGETIME,n)},_addVisit:function(e,t){if(t>0){var i=e.averageTime*e.visits+t/1e3;e.visits++,e.averageTime=Math.round(i/e.visits)}var E=this.blueConicClient.getCurrentDate().getTime();e.startdate=E,e.enddate=E},_createNewVisitData:function(){var e=this.blueConicClient.getCurrentDate().getTime();return{startdate:e,enddate:e,averageTime:0,visits:0}},_setPropertyIfEmpty:function(e,t,i){"undefined"==typeof e[t]&&(e[t]=i)},_setVisitProperties:function(){this._addVisitedDomain(this._domain),this._increaseClickCount(),this._increaseVisits(this.PROFILE_PROPERTIES.VISITS,this.PROFILE_PROPERTIES.VISITCLICKS,this.PROFILE_PROPERTIES.LASTVISITDATE),this._channelId&&this._increaseVisits(this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITS,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITCLICKS,this.PROFILE_PROPERTIES_FOR_CHANNEL.LASTVISITDATE)},_increaseVisits:function(e,t,i){e=e||this.PROFILE_PROPERTIES.VISITS,t=t||this.PROFILE_PROPERTIES.VISITCLICKS,i=i||this.PROFILE_PROPERTIES.LASTVISITDATE,this._isNewSession(e,i)?(this._resetPageViewsCurrentSession(t),this._increaseSessionCount(e)):this._increasePageViewsCurrentSession(t),this._setLastVisitDate(i,this.blueConicClient.getCurrentDate().getTime())},_setLastVisitDate:function(e,t){e=e||this.PROFILE_PROPERTIES.LASTVISITDATE,this._profile.setValue(e,t)},_addVisitedDomain:function(e){this._hasVisitedDomain(e)||this._profile.addValue(this.PROFILE_PROPERTIES.VISITEDSITES,e)},_hasVisitedDomain:function(e){var t=this._profile.getValues(this.PROFILE_PROPERTIES.VISITEDSITES)||[];return t.length>0&&-1!==t.indexOf(e)},_increaseClickCount:function(){this._profile.incrementValue(this.PROFILE_PROPERTIES.CLICKCOUNT,1),this._channelId&&this._profile.incrementValue(this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT,1)},_isNewSession:function(e,t){e=e||this.PROFILE_PROPERTIES.VISITS,t=t||this.PROFILE_PROPERTIES.LASTVISITDATE;var i=this._getNumberProperty(e),E=this._getNumberProperty(t)||0;return 0===i||this._isSessionExpired(E)},_isSessionExpired:function(e){return this.blueConicClient.getCurrentDate().getTime()>e+this.CONSTANTS.THIRTY_MINUTES_IN_MS},_resetPageViewsCurrentSession:function(e){e=e||this.PROFILE_PROPERTIES.VISITCLICKS,this._profile.setValue(e,1)},_increasePageViewsCurrentSession:function(e){e=e||this.PROFILE_PROPERTIES.VISITCLICKS,this._profile.incrementValue(e,1)},_increaseSessionCount:function(e){e=e||this.PROFILE_PROPERTIES.VISITS,this._profile.incrementValue(e,1)},_setOriginProperties:function(){var e=this._getOriginCount();e>1?this._mergeOriginProperties():0===e&&this._resolveOriginProperties()},_getOriginCount:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_TYPE)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_SOURCE)||[],i=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_DETAIL)||[];return Math.max(e.length,t.length,i.length)},_mergeOriginProperties:function(){this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_TYPE),this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_SOURCE),this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_DETAIL)},_mergePropertyToUnknown:function(e){var t=this._profile.getValues(e)||[];this._profile.setValue(e,1===t.length?t[0]:this.CONSTANTS.UNKNOWN)},_resolveOriginProperties:function(){this._isVisitorOriginFromWeb()?this._resolveOriginForWebVisitor():this._isVisitorOriginFromConnection()?this._resolveOriginForProfileComingFromConnection():this._isVisitorOriginFromMobileApp()&&this._resolveOriginForMobileAppVisitor()},_isVisitorOriginFromWeb:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[];return 0===e.length&&0===t.length},_isVisitorOriginFromMobileApp:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[],i=this._getNumberProperty(this.PROFILE_PROPERTIES.VISITS);return t.length>0&&0===e.length&&0===i},_isVisitorOriginFromConnection:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM),t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID),i=this._getNumberProperty(this.PROFILE_PROPERTIES.VISITS);return e&&e.length>0&&t&&0===t.length&&i<=0},_resolveOriginForWebVisitor:function(){var e="",t=this._profile.getValues(this.PROFILE_PROPERTIES.VISITEDSITES)||[],i=this._profile.getValue(this.PROFILE_PROPERTIES.DEVICETYPE)||"",E=this._profile.getValues(this.PROFILE_PROPERTIES.ENTRYPAGE)||[];i&&(e="PC"===i?this.ORIGIN_TYPES.WEB:this.ORIGIN_TYPES.MOBILE_WEB);var s=1===t.length?t[0]:this.CONSTANTS.UNKNOWN,r=1===E.length?E[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(e,s,r)},_resolveOriginForProfileComingFromConnection:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_CONNECTION)||[],i=1===e.length?e[0]:this.CONSTANTS.UNKNOWN,E=1===t.length?t[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(this.ORIGIN_TYPES.CONNECTION,i,E)},_resolveOriginForMobileAppVisitor:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_NAMEVERSION)||[],i=1===e.length?e[0]:this.CONSTANTS.UNKNOWN,E=1===t.length?t[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(this.ORIGIN_TYPES.MOBILE,i,E)},_setOriginProfileProperties:function(e,t,i){this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_TYPE,e),this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_SOURCE,t),this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_DETAIL,i)},_removeHashPart:function(e){if(e){var t=e.indexOf("#");if(-1!==t)return e.substring(0,t)}return e},HELPER:{search_engines:[["google\\.","q"],["bing\\.","q"],["search\\.yahoo\\.","p"],["search\\.aol\\.","q"],["duckduckgo\\.","q"],["baidu\\.","wd"],["ask\\.com","q"],["search\\.lycos\\.","q"],["dogpile\\.com","q"]],substringToHash:function(e){if(e){var t=e.indexOf("#");if(-1!==t)return e.substring(0,t)}return e},decodeReferrer:function(e){for(var t=new RegExp(""),i=0;i<this.search_engines.length;i++){var E=this.search_engines[i];t.compile("^http(s?)://(www\\.)?"+E[0],"i");var s=e.match(t);if(s){var r;if(r=isNaN(E[1])?this._getParameterByName(e,E[1]):s[E[1]+1])return r=decodeURIComponent(r),E.length>2&&E[2]&&(r=decodeURIComponent(r)),r=(r=(r=r.replace(/'|"/g,"")).split(/[\s,+.]+/)).filter((function(e){return e}));break}}return null},_getParameterByName:function(e,t){if(!t)return"";t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&#]"+t+"=([^&#]*)").exec(e);return null===i?"":decodeURIComponent(i[1].replace(/\+/g," "))}},_getNumberProperty:function(e){var t=this._profile.getValue(e);if(!t)return 0;try{t=parseInt(t),isNaN(t)&&(t=0)}catch(i){t=0}return t}});var a = [];var i='listenerinteractiontype';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({LAST_VISIT_COOKIE_NAME:'last_visit_bc',NEW_VISIT_PROPERTY:'new_visit_bc',SESSION_TIMEOUT_MINUTES:30,init:function(a){this.blueConicClient=a,this.profile=a.profile.getProfile()},onPrepare:function(){var a=this.blueConicClient.getCurrentDate().getTime(),b=this.blueConicClient.util.cookie.getCookie(this.LAST_VISIT_COOKIE_NAME);if(b&&!isNaN(parseInt(b))){var c=new Date(parseInt(b));c.setMinutes(c.getMinutes()+this.SESSION_TIMEOUT_MINUTES),a>c?this.profile.setValue(this.NEW_VISIT_PROPERTY,'true'):this.profile.setValue(this.NEW_VISIT_PROPERTY,'false')}else this.profile.setValue(this.NEW_VISIT_PROPERTY,'true');this.blueConicClient.util.cookie.setCookie(this.LAST_VISIT_COOKIE_NAME,a)},onLoad:function(){'true'===this.profile.getValue(this.NEW_VISIT_PROPERTY)&&this.blueConicClient.createEvent('new_visit')}});var a = [];var i='newvisitlistener';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.2/'}]);})();})(blueConicClient);