(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 ARTICLE="article",PRODUCT="product",EVENT_SHOPPING_CART="shoppingcart",EVENT_ORDER="order",InteractionTypeImpl=InteractionType.extend({init:function(t,e){this.blueConicClient=t,this.context=e,this.profile=this.context.getProfile();var i=this.context.getParameters();this.storeId=i.storeId&&i.storeId[0]||null,this.metadata=i.metadata&&i.metadata[0]||null,this.requiredOptionSet=i.requiredOptionSet&&"true"===i.requiredOptionSet[0],this.type="connection_content_collector"===this.context.getInteractionTypeId()?ARTICLE:PRODUCT,this._initProductProperties(i)},_initProductProperties:function(t){this.type===PRODUCT&&(t.lastCartUpdateProperty&&t.lastCartUpdateProperty[0]&&(this.lastCartUpdateProperty=t.lastCartUpdateProperty[0]),t.nrProductsInCartProperty&&t.nrProductsInCartProperty[0]&&(this.nrProductsInCartProperty=t.nrProductsInCartProperty[0]),this._subscribeToShoppingEvents())},_subscribeToShoppingEvents:function(){this.blueConicClient.event.subscribe(EVENT_SHOPPING_CART,this,this._handleShoppingEvent),this.blueConicClient.event.subscribe(EVENT_ORDER,this,this._handleShoppingEvent)},_updateShoppingcartItems:function(t){this.blueConicClient.recommendation.createEvent({storeId:this.storeId,action:EVENT_SHOPPING_CART,itemId:t,profileId:this.profile.getId()}),this.nrProductsInCartProperty&&this._storeItemsInShoppingCart(t),this.lastCartUpdateProperty&&this._storeCurrentDateAsLastCartUpdate(),(this.nrProductsInCartProperty||this.lastCartUpdateProperty)&&this.blueConicClient.profile.updateProfile()},_storeItemsInShoppingCart:function(t){this.profile.setValue(this.nrProductsInCartProperty,t.length)},_storeCurrentDateAsLastCartUpdate:function(){this.profile.setValue(this.lastCartUpdateProperty,this.blueConicClient.getCurrentDate().getTime())},_updateBoughtItems:function(t){this.blueConicClient.recommendation.createEvent({storeId:this.storeId,action:EVENT_ORDER,itemId:t,profileId:this.profile.getId()})},_handleShoppingEvent:function(t,e){if(e&&e.productIds&&(!e.storeId||e.storeId===this.storeId)){var i=this.blueConicClient.util.array.ensureArray(e.productIds);t===EVENT_SHOPPING_CART?this._updateShoppingcartItems(i):t===EVENT_ORDER&&(this._updateBoughtItems(i),this._updateShoppingcartItems([]))}},_isValidItem:function(t,e,i){if(!t.itemId)return this.blueConicClient.util.log("Item will not be scraped due to missing item ID"),!1;if(!t.name)return this.blueConicClient.util.log("Item will not be scraped due to missing name"),!1;if(!t.url)return this.blueConicClient.util.log("Item will not be scraped due to missing URL"),!1;if(!/^https?:\/\//.test(t.url))return this.blueConicClient.util.log("Item will not be scraped due to invalid URL: "+t.url),!1;if(t.pageType!==this.type)return this.blueConicClient.util.log("Item will not be scraped due to incorrect type: "+t.pageType+" !== "+this.type),!1;if(this.type===ARTICLE&&!t.publicationDate)return this.blueConicClient.util.log("Item will not be scraped due to missing publication date"),!1;if(this.requiredOptionSet)for(var r=["id","url","name","type","publicationDate"],n=0;n<i.length;n++)if(i[n].required&&-1===r.indexOf(i[n].fieldId)){var o=e.getFieldValue(i[n]);if(null==o||0===o.length)return this.blueConicClient.util.log("Item will not be scraped due to missing value for required field: "+i[n].fieldId),!1}return!0},onLoad:function(){if(this.storeId){var t=this.metadata?this.blueConicClient.json.parse(this.metadata):null,e=new window.BlueConicMetaDataService(this.jQuery,t,this.type,document.location.href);e.blueConicClient=this.blueConicClient;var i=e.getItemData(t);if(this._isValidItem(i,e,t)){var r=this._makeMetaDataHash(e,t);this._handleView(i.itemId,i.url,r,e)}this._check404Page(i.itemId,i.url||window.location.protocol+"//"+window.location.host+window.location.pathname)}},_handleView:function(t,e,i,r){this.referrer=document.referrer;var n=this.referrer.replace(/http[s]?:\/\/(.*?)(:|\?|\/|$).*/,"$1"),o=window.location.hostname,s={storeId:this.storeId,action:"view",itemId:t,url:e,profileId:this.profile.getId(),isEntrypage:n!==o,hash:i},a=r.getLastModifiedInMs();a&&(s.lastmodified=a),this.blueConicClient.recommendation.createEvent(s)},_makeMetaDataHash:function(t,e){var i=t.getMetaDataValues(e);return this.md5(this.blueConicClient.json.stringify(i))},_check404Page:function(t,e){if(t){var i=[];document.querySelector("title")&&i.push(document.querySelector("title").textContent),document.querySelector('meta[property="description"]')&&i.push(document.querySelector('meta[property="description"]').getAttribute("content")),document.querySelector('meta[property="og:title"]')&&i.push(document.querySelector('meta[property="og:title"]').getAttribute("content")),document.querySelector("h1")&&i.push(document.querySelector("h1").textContent);for(var r=["not found","404","niet gevonden","sorry","probleem"],n=!1,o=this.storeId,s=0;s<i.length;s++){var a=i[s];if(a)for(var l=0;l<r.length;l++){var u=r[l]||"";if(-1!==a.toLowerCase().indexOf(u)){n=!0;break}}}if(n&&t){var handle404=function(){this.blueConicClient.recommendation.createEvent({itemId:t,url:t,storeId:o,lastmodified:(new Date).getTime()})},d=new XMLHttpRequest;d.onreadystatechange=function(){4===d.readyState&&404===d.status&&handle404.bind(this)},d.open("HEAD",e,!0),d.send()}}}});var a = [];var i='connection_content_collector';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.3.6/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.3.6/frontend/src/lib/md5.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.3.6/frontend/src/node_modules/@blueconic/frontend-metadataservice/metaDataService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.3.6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t||null,this.parameters=this.context.getParameters(),this.profile=e.profile.getProfile(),this.isInEditMode=e.isInEditMode(),this._createdElements=[],this.parameters&&this.parameters.content&&(this._fragment=this._createFragment(this.parameters.content))},_createFragment:function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("div"),i=0;i<n.length;i++)n[i].getAttribute("data-bc-external")&&(n[i].innerHTML="");return t},onLoad:function(){if(this.element=this.context.getDOMElement(),this.element){window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery;var e=this.element.cloneNode(!0),t=this;this.loadInteraction((function(n,i){if(n)return console.error("[BC] Content interaction couldn't be loaded because of the following error(s)",n),void(t.isInEditMode||(console.error("[BC] The element will be restored to it's previous content"),t._createdElements.forEach((function(e){e.remove()})),t.element.replaceWith?t.element.replaceWith(e):t.element.innerHTML=e.innerHTML));t._createdElements=i.createdElements,t.isInEditMode?t.blueConicClient.event.publish("contentinteractiontype.interactionLoaded",{interaction:t}):t.blueConicClient.createEvent("VIEW",t.context.getInteractionId())}))}},loadInteraction:function(e,t){var n="boolean"!=typeof(t=t||{}).loadContent||t.loadContent,i=window._bcp.interactionUtil,r=this.getValue("content");r||(r=this.element.innerHTML);var l=[];n&&l.push(i.createContentHandler({content:r,interactionId:this.context.getInteractionId(),bcEvent:this.blueConicClient.event,isInEditMode:this.isInEditMode,jQuery:this.jQuery})),l.push(i.createCssHandler({cssUrl:this.getValue("styling_css")}),i.createAdvancedHandler({blueConicClient:this.blueConicClient,interactionId:this.context.getInteractionId(),clickEventSelector:this.getValue("click_event_selector"),jQuery:this.jQuery}),i.createJavaScriptHandler({interactionId:this.context.getInteractionId(),javaScriptUrls:this.getValues("javascript_urls"),inlineJavaScript:this.getValue("javascript"),isInEditMode:this.isInEditMode})),i.runHandlers(this.element,l,e)},getPreloadProperties:function(){for(var e,t=this.context.getParameters().content+"",n=/data-bc-preload="([^"]*)"/g,i=[];null!==(e=n.exec(t));)for(var r=e[1].split(","),l=0;l<r.length;l++)i.push(r[l]);return i||[]},getContent:function(){return this.loadInlineStyling(),this._fragment?this._fragment.innerHTML:null},loadInlineStyling:function(){var e=this.getValue("styling_css_inline");e?(this._inlineStylingElement||(this._inlineStylingElement=document.createElement("style"),document.head.appendChild(this._inlineStylingElement),this._createdElements.push(this._inlineStylingElement)),this._inlineStylingElement.innerHTML=e):this._inlineStylingElement&&(this._inlineStylingElement.remove(),this._inlineStylingElement=null)},onMessageReceived:function(e){this.blueConicClient.event.publish("contentinteractiontype.messageReceived",e)},getValue:function(e){return this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:null},getValues:function(e){return this.parameters[e]||[]}});var a = [];var i='contentinteractiontype';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handlerUtil.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handleCss.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handleContent.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handleJavaScript.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/scripts/handleAdvanced.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({html:{nl:{content:'<div class="bcCSContent">Plaats hier uw content</div>'},"default":{content:'<div class="bcCSContent">Place your content here</div>'}},init:function(a,b){this.blueConicClient=a,this.context=b?b:null,this.profile=a.profile.getProfile(),this.element=this.context.getDOMElement(),this.identifier='bc_'+this.context.getInteractionId(),this.parameters=this.context.getParameters(),this.currentInsertType=this.parameters.inserttype&&this.parameters.inserttype[0]?this.parameters.inserttype[0]:'replace','replacecontainer'!==this.currentInsertType||document.getElementById(this.identifier)||this._hidePosition();var c=this.parameters.content+'';this.htmlFragment=this.createElement(c),this.lastEvent=null,this._inlineCss=null},getPreloadProperties:function(){return this.htmlFragment?this._getPropertiesFromPlaceholders(this.htmlFragment.innerHTML):[]},getContent:function(){return this.htmlFragment?(this.element||(this.element=this.context.getDOMElement()),'replace'===this.currentInsertType)?(this.emptyElementsWithAttribute(this.htmlFragment,'div','data-bc-external'),this.htmlFragment.innerHTML):void 0:null},onUpdate:function(){this.currentInsertType!==this.context.getParameters().inserttype[0]&&document.location.reload()},onLoad:function(){this.currentInsertType&&this._placeContent()},_hidePosition:function(){this.styleIdentifier='bcCS'+this.context.getInteractionId();var a=this.context.getPosition()+' {opacity: 0 !important}',b=document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0],c=document.createElement('style');c.type='text/css',c.id=this.styleIdentifier,c.styleSheet?c.styleSheet.cssText=a:c.innerHTML=a,b.appendChild(c)},_showPosition:function(){this.jQuery('#'+this.styleIdentifier).remove()},_placeContent:function(){var a=this.element||this.context.getDOMElement();if(a){if(this.handleStyling(),this.blueConicClient.isInEditMode()||this.handleURLs(this.htmlFragment),'replace'===this.currentInsertType){this.assureVisibilty(a);var b=this.getContent();if(!b)return;this.blueConicClient.isInEditMode()||this.blueConicClient.createEvent('VIEW',this.context.getInteractionId());var c=a.nodeName?a.nodeName.toLowerCase():a.nodeName;if(-1===this.blueConicClient.util.array.indexOfArray(['area','base','br','col','command','embed','hr','img','input','keygen','link','meta','param','source','track','wbr'],c))this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?a.innerHTML!==b&&(a.innerHTML=b):this.jQuery(a).html(b);else if(a.parentNode){var d=a.parentNode.innerHTML,e=document.createElement('div');e.appendChild(a.cloneNode(!0));var f=e.innerHTML,g=d.replace(f,b);a.parentNode.innerHTML!==g&&(a.parentNode.innerHTML=g)}this.handleComplexObjects(a)}else if(this.htmlFragment){this.emptyElementsWithAttribute(this.htmlFragment,'div','data-bc-external');var h=this._setContent();h&&!this.blueConicClient.isInEditMode()&&this.blueConicClient.createEvent('VIEW',this.context.getInteractionId())}if(!this.blueConicClient.isInEditMode()){var i=this.parameters.clickselector&&this.parameters.clickselector[0]?this.parameters.clickselector[0]:'';if(i){this.jQuery('body').one('click',i,this.jQuery.proxy(function(a){this.lastEvent&&this.lastEvent.originalEvent===a.originalEvent||this._logClickEvent(a)},this));try{this.jQuery(i).one('click',this.jQuery.proxy(function(a){this.lastEvent=a,this._logClickEvent(a)},this))}catch(a){}}var j=!!this.parameters.forceclick&&('true'===this.parameters.forceclick[0]||!0===this.parameters.forceclick[0]);j&&this.blueConicClient.createEvent('CLICK',this.context.getInteractionId());var k=this.parameters.javascript&&this.parameters.javascript[0]?this.parameters.javascript[0]:'';if(k)try{k=k.replace(/(^|\W)blueConicVariantId(\W|$)/,'$1"'+this.context.getInteractionId()+'"$2'),this.jQuery('<script>'+k+'</script>').appendTo(this.jQuery('body'))}catch(a){console.error(a)}}}},_logClickEvent:function(a){if(!(a&&a.originalEvent&&a.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId())){var b=a&&a.target&&a.target.pathname&&a.target.hostname&&0===a.target.pathname.indexOf('/s/')&&-1!==a.target.hostname.indexOf('blueconic');b||(a.originalEvent&&(a.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent('CLICK',this.context.getInteractionId()))}},_setContent:function(){var a=this._getElementByPosition(this.context.getPosition());if(a){var b=a.parent().get(0),c=this.jQuery('[data-bc-id="'+this.identifier+'"],#'+this.identifier);if(0<c.length)return this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?!1:(c.replaceWith(this.htmlFragment.innerHTML),this.handleComplexObjects(b),'prepend'===this.currentInsertType?a.prev().attr('data-bc-id',this.identifier):'append'===this.currentInsertType&&a.next().attr('data-bc-id',this.identifier),!0);if('prepend'===this.currentInsertType){var d=a.prev();if(0<d.length&&d.attr('data-bc-id')===this.identifier)return!1;if(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode())a.get(0).parentNode.insertBefore(this.htmlFragment,a.get(0)),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'prepend',lockPosition:!0,redrawPosition:!0});else{a.before(this.htmlFragment.innerHTML);var e=a.prev();e.attr('data-bc-id',this.identifier)}}if('append'===this.currentInsertType){var f=a.next();if(0<f.length&&f.attr('data-bc-id')===this.identifier)return!1;if(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode())a.get(0).parentNode.insertBefore(this.htmlFragment,a.get(0).nextSibling),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'append',lockPosition:!0,redrawPosition:!0});else{a.after(this.htmlFragment.innerHTML);var g=a.next();g.attr('data-bc-id',this.identifier)}}return'replacecontainer'===this.currentInsertType&&(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?(a.get(0).parentNode.replaceChild(this.htmlFragment,a.get(0)),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'replace container',lockPosition:!0,redrawPosition:!0})):a.replaceWith(this.htmlFragment.innerHTML),this._showPosition()),this.blueConicClient.isInEditMode()&&null===this.context.getInteractionId()&&setTimeout(function(){window.blueConicClient.fn.postMessage('onOpenEditMode',window.blueConicClient.positionHandlers[0])},500),this.handleComplexObjects(b),!0}},_getElementByPosition:function(a){var b=document.getElementById(a);return b=b?this.jQuery(b):this.jQuery(a),b},createElement:function(a){var b;if(!a)if(this.blueConicClient.isInEditMode()&&('prepend'===this.currentInsertType||'append'===this.currentInsertType)){var c='nl'===this.context.getLocale()?'nl':'default';a=this.html[c].content}else return null;try{b=document.createElement('div'),b.id=this.identifier,b.innerHTML=a}catch(a){return null}return b},handleURLs:function(a){var b=this.parameters.newwindow&&this.parameters.newwindow[0]&&'true'===this.parameters.newwindow[0];if(b)for(var c=a.getElementsByTagName('a'),d=0,e=c.length;d<e;d++){var f=c[d],g=f.getAttribute('target');g||f.setAttribute('target','_blank')}this.handlePlaceholders(a)},assureVisibilty:function(a){this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()&&(a.style.minWidth='10px',a.style.minHeight='10px')},handlePlaceholders:function(a){for(var b=this._getPropertiesFromPlaceholders(a.innerHTML),c=0;c<b.length;c++){var d=b[c],e=this.profile.getValue(d)||'',f=new RegExp('\\$\\{'+d+'\\}','g');a.innerHTML=a.innerHTML.replace(f,encodeURI(e))}},_getPropertiesFromPlaceholders:function(a){for(var b,c=/\$\{([a-zA-Z\-_0-9]+)\}/g,d=[];null!==(b=c.exec(a));)d.push(b[1]);for(var e=/data-bc-preload="([^"]*)"/g,f=[];null!==(b=e.exec(a));)for(var g=b[1].split(','),h=0;h<g.length;h++)f.push(g[h]);return d.concat(f)},emptyElementsWithAttribute:function(a,b,c){for(var d,e=this.getElementsWithAttribute(a,b,c),f=0,g=e.length;f<g;f++)d=e[f],d.innerHTML=''},getElementsWithAttribute:function(a,b,c){for(var d,e=[],f=a.getElementsByTagName(b),g=0,h=f.length;g<h;g++)d=f[g],d.getAttribute(c)&&e.push(d);return e},handleComplexObjects:function(a){for(var b=this.getElementsWithAttribute(a,'div','data-bc-pluginid'),c=0;c<b.length;c++){var d=b[c],e=d.getAttribute('data-bc-pluginid'),f=d.getAttribute('data-bc-config');if(f)try{var g=f.replace(/\n/g,'\\\\n').replace(/\r/g,'\\\\r').replace(/\t/g,'\\\\t');f=this.blueConicClient.json.parse(g)}catch(a){f=null}this.blueConicClient.event.publish('bcComplexObject',{plugin:e,config:f,node:d,interactionId:this.context.getInteractionId()}),this.blueConicClient.isInEditMode()||(d.removeAttribute('data-bc-pluginid'),d.removeAttribute('data-bc-config'))}},handleStyling:function(){var a=this.parameters.styling_css_inline&&this.parameters.styling_css_inline[0]?this.parameters.styling_css_inline[0]:'';if(a){var b=a.replace(/&#xd;/gi,'');this.inlineCss=this.jQuery('<style>'+b+'</style>'),this.inlineCss.appendTo(this.jQuery('body'))}},onMessageReceived:function(a){a.parameters&&(this.parameters=a.parameters),'updateStyling'===a.action&&(this.inlineCss&&this.inlineCss.remove(),this.handleStyling())}});var a = [];var i='contentinteractiontypespecial';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/contentinteractiontypespecial/ts_ac3f76a2feab05e9835ed410d1a415f5/'},{ 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 : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t},onLoad:function(){var e=this.blueConicClient,t=this.context.getParameters(),n=this.jQuery;if(t){var r=(t.clickcandidates||[]).map(JSON.parse).map(_updateSelectorCandidate),a=(t.contentcandidates||[]).map(JSON.parse).map(_updateSelectorCandidate),i={},o={},c={};r.forEach((function(e){candidateChecker(e,registerClickHandlers)})),a.forEach((function(e){candidateChecker(e,checkContentHandler)}))}function candidateChecker(t,n){var handler=function(){n(t);var r=o[t.interactionId],a=c[t.selecterarea];r||a||e.position.subscribe(t.selecterarea,null,handler)};e.position.subscribe(t.selecterarea,null,handler),n(t)}function registerClickHandlers(e){for(var t=getHandler(e),r=n(e.selecterarea),a=0,i=r.length;a<i;a++)r[a].addEventListener("click",t,{once:!0})}function checkContentHandler(e){isContentConversionMomentMet(e)&&getHandler(e)()}function isContentConversionMomentMet(e){if(o[e.interactionId])return!1;for(var t=n(e.selecterarea),r=0,a=t.length;r<a;r++)if(_textContains(t[r].textContent,e.words))return!0;return!1}function getHandler(t){return i[t.interactionId]||(i[t.interactionId]=function(i,l){var s=o[i],u=c[t.selecterarea];if(!s&&!u){var d=[];d=(d=l instanceof MouseEvent?r.filter((function(e){var t=!o[e.interactionId],r=n(e.selecterarea).is(event.target),a=n(e.selecterarea).find(event.target).length>0;return t&&(r||a)})):a.filter((function(e){return isContentConversionMomentMet(e)}))).filter((function(e){return e.interactionId!==t.interactionId})),c[t.selecterarea]=!0,c[t.interactionId]=!0,d.forEach((function(e){c[e.selecterarea]=!0,o[e.interactionId]=!0}));var f=d.map((function(e){return e.interactionId}));e.createEvent("CONVERSION",i,null,(function(){e.util.log("CONVERSION event registered. Interaction: ["+i+"]")}),{losingInteractions:f})}}.bind(null,t.interactionId)),i[t.interactionId]}function _textContains(e,t){if(!e||!Array.isArray(t))return!1;var n=t.filter((function(e){return Boolean(e)&&"pre_any"!==e})).map((function(e){return e.trim().toLowerCase()}));if(0===n.length)return!0;for(var r=e.toLowerCase(),a=0,i=n.length;a<i;a++)if(r.indexOf(n[a])>=0)return!0;return!1}function _updateSelectorCandidate(e){var t=e.selecterarea;return/^pre_any/.test(t)?t="html":/^pre_header/.test(t)?t="h1, h2, h3, h4, h5, h6":/^pre_/.test(t)&&(t=t.replace(/^pre_/,"")),e.selecterarea=t,e}}});var a = [];var i='conversionlistenerinteractiontype';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.10/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.10/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b?b:null,this.profile=this.context.getProfile(),this.targetingParameters=[]},getPreloadProperties:function(){return this._getProfilePropertiesFromParameters()},onLoad:function(){if(this.targetingParameters&&0<this.targetingParameters.length){this._updateLocalStorage(),this.blueConicClient.event.subscribe(this.blueConicClient.event.onSegmentChange,this,this._updateLocalStorage);var a=0,b=function(){if(!window.bcDFPCallback){if(40<a)return;a++,window.setTimeout(b,250)}else window.bcDFPCallback(this._getTargetingParameters())};b.call(this)}},_updateLocalStorage:function(){if("undefined"!=typeof window.Storage)try{window.localStorage.setItem("bcDFPTargetingParams",this.blueConicClient.json.stringify(this._getTargetingParameters()))}catch(a){}},_getTargetingParameters:function(){for(var a=[],b=0;b<this.targetingParameters.length;b++){var c=this.targetingParameters[b],d=c.key,e=this._getParamValue(c);d&&e&&a.push({key:d,value:e})}return a},_getParamValue:function(a){if((!a.type||"text"===a.type)&&a.text)return a.text;if("property"===a.type&&a.property)return this.profile.getValues(a.property);if("segments"===a.type&&0<this.blueConicClient.getSegments().length){var b=[],c=this.blueConicClient.getSegments();if(a.segments&&0<a.segments.length)for(var d,e=0;e<c.length;e++){d=c[e];for(var f,g=0;g<a.segments.length;g++)f=a.segments[g],(d.id&&d.id===f.segmentId||d.name===f.segmentName)&&b.push(f.aamCode||f.dcmCode||f.smCode||d.name)}else for(var h=0;h<c.length;h++)b.push(c[h].name);return b}},_getProfilePropertiesFromParameters:function(){var a=[],b=this.context.getParameters(),c=b.targeting_parameters?b.targeting_parameters[0]:b.targeting_parameters;if(!c)return a;this.targetingParameters=this.blueConicClient.json.parse(c);for(var d,e=0;e<this.targetingParameters.length;e++)d=this.targetingParameters[e],"property"===d.type&&d.property&&a.push(d.property);return a}});var a = [];var i='dfpconnection_to';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/dfpconnection_to/ts_32b63757749a58f10355dc2f44e42503/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters();var r=new Date(2017,8,1,0,0,0,0),s=this.blueConicClient.getCurrentDate().getTime()-r.getTime();this.days=Math.floor(s/864e5);var i=this.parameters.propertyRules&&this.parameters.propertyRules[0]?this.parameters.propertyRules[0]:null;if(i){i=e.json.parse(i),this.preLoadProperties=[];for(var a=0,p=0;p<i.length;p++){var n=i[p];n.profileproperty&&n.decay&&n.nr&&(this.preLoadProperties.push(n.profileproperty+"_index"),n.decay>a&&(a=n.decay,this.property=n.profileproperty))}}else{var o=this.parameters.property?this.parameters.property[0]:this.parameters.property;o&&(this.property=this.blueConicClient.json.parse(o)[0].profileproperty,this.preLoadProperties=[this.property+"_index"])}},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(this.preLoadProperties.length>0){var e=this.context.getProfile(),t=this.parameters.engagement_rules?this.parameters.engagement_rules[0]:this.parameters.engagement_rules;if(!t)return;if(0===(t=this.blueConicClient.json.parse(t)).length)return;var r=this.parameters.interests?this.parameters.interests[0]:this.parameters.interests;r=r?this.blueConicClient.json.parse(r).values:[];var s=new this.BlueConicEngagement(this.blueConicClient,e,this.context.getInteractionId(),!0,r,this.jQuery,this.days,!0);if(s.applyEngagementRules(t),s.isChanged())s.save();else{for(var i=!1,a=0;a<this.preLoadProperties.length;a++){var p=this.preLoadProperties[a];e.getValue(p)||(e.setValue(p,"0"),i=!0)}i&&this.blueConicClient.profile.updateProfile()}}}});var a = [];var i='engagement_interest_ranking';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/frontend/src/node_modules/@blueconic/engagement-service/engagementService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,r){this.blueConicClient=e,this.interaction=r,this.parameters=this.interaction.getParameters();var t=this.parameters.propertyRules&&this.parameters.propertyRules[0]?this.parameters.propertyRules[0]:null;if(t){t=e.json.parse(t),this.preLoadProperties=[];for(var i=0,s=0;s<t.length;s++){var p=t[s];p.profileproperty&&p.decay&&(this.preLoadProperties.push(p.profileproperty),p.decay>i&&(i=p.decay,this.property=p.profileproperty))}}else{var a=this.parameters.property?this.parameters.property[0]:this.parameters.property;a&&(this.property=this.blueConicClient.json.parse(a)[0].profileproperty,this.preLoadProperties=[this.property])}},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(this.preLoadProperties.length>0){var e=this.interaction.getProfile(),r=this.parameters.engagement_rules?this.parameters.engagement_rules[0]:this.parameters.engagement_rules;if(!r)return;if(0===(r=this.blueConicClient.json.parse(r)).length)return;var t=new this.BlueConicEngagement(this.blueConicClient,e,this.property,!1,"",this.jQuery);if(t.applyEngagementRules(r),t.isChanged())t.save();else{for(var i=!1,s=0;s<this.preLoadProperties.length;s++){var p=this.preLoadProperties[s];e.getValue(p)||(e.setValue(p,"0"),i=!0)}i&&this.blueConicClient.profile.updateProfile()}}}});var a = [];var i='engagement_score';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.5.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.5.1/frontend/src/node_modules/@blueconic/engagement-service/engagementService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.5.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.2/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.2/frontend/src/js/ruleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.2/'}]);})();(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) + 'enrichProfileWithVisitorInput/4.4.3/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileWithVisitorInput/4.4.3/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) + 'enrichProfileWithVisitorInput/4.4.3/'}]);})();(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.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/'}]);})();(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({SIMPLE_FIELDS:["email","first_name","last_name","gender"],NAMED_FIELDS:["location","hometown"],init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=e.profile.getProfile(),this.parameters=this.context.getParameters(),this.connectionContext={FACEBOOK_LAST_TRANSFER:"fb_lasttransfer",FACEBOOK_ID:"fb_id",RECEIVED_FROM_SYSTEM_PROPERTY:"received_from_system",RECEIVED_FROM_CONNECTION_PROPERTY:"received_from_connection"},this.preloadProperties=[this.connectionContext.FACEBOOK_LAST_TRANSFER,this.connectionContext.FACEBOOK_ID,this.connectionContext.RECEIVED_FROM_SYSTEM_PROPERTY,this.connectionContext.RECEIVED_FROM_CONNECTION_PROPERTY]},getPreloadProperties:function(){var e=this.preloadProperties;return e.push("fb_lasttransfer"),e.push("fb_id"),e.push("fullname"),e.push("avatar"),e},onLoad:function(){var e=this,t=!1;if(this.profile.getValue("fb_id")){var a=this.profile.getValue("fb_lasttransfer");a||(a=0);var i=new Date(parseInt(a));i.setMinutes(i.getMinutes()+30),(new Date>i||!this.profile.getValue("avatar")||!this.profile.getValue("fullname"))&&(t=!0)}else t=!0;if(t){var r=!(!this.parameters.loadsdk||!this.parameters.loadsdk[0])&&"true"===this.parameters.loadsdk[0],n=this.parameters.applicationid&&this.parameters.applicationid[0]?this.parameters.applicationid[0]:null;if(r&&n&&!window.FB)this._loadFacebookSDK(n);else{var s=0;(function t(){if(window.FB)e._addLoginListener();else{if(s>100)return;s++,window.setTimeout(t,200)}}).call(this)}}},_loadFacebookSDK:function(e){var t,a,i,r,n,s=this.context&&"nl"==this.context.getLocale()?"nl_NL":"en_US",o=this;window.fbAsyncInit=function(){FB.init({appId:e,xfbml:!0,status:!0,version:"v2.2"}),o._addLoginListener()},t=document,a="script",i="facebook-jssdk",n=t.getElementsByTagName(a)[0],t.getElementById(i)||((r=t.createElement(a)).id=i,r.src="//connect.facebook.net/"+s+"/sdk.js",n.parentNode.insertBefore(r,n))},_addLoginListener:function(){var e=this;FB.Event.subscribe("auth.statusChange",function(t){if("connected"===t.status){var a=t.authResponse.userID;e.profile.setValue("fb_id",a),e.profile.setValue("fb_lasttransfer",(new Date).getTime()),e._doTransfer(t.authResponse.accessToken)}})},_doTransfer:function(e){var t=this,a=this.parameters.mapping&&this.parameters.mapping[0]?this.parameters.mapping[0]:null;if(a&&(a=this.blueConicClient.json.parse(a))&&a.length>0){var i=t._getFacebookFieldsFromMapping(a);FB.api("/me",{access_token:e,fields:t._getUniqueFields(i).join(",")},function(e){for(var i=!1,r=0;r<a.length;r++){var n=a[r];n.facebook_property&&n.property&&(i=!0,t._setPropertyValue(e,n.facebook_property,n.property))}t._setUserProfileProperties(e),i&&t.bcConnectionUtil.setSyncProperties(t.context,t.profile,[t.connectionContext.RECEIVED_FROM_SYSTEM_PROPERTY,t.connectionContext.RECEIVED_FROM_CONNECTION_PROPERTY]),t.blueConicClient.profile.updateProfile()})}},_getFacebookFieldsFromMapping:function(e){for(var t=[],a=0;a<e.length;a++){var i=e[a];i.facebook_property&&("likes"==i.facebook_property||"likes_categories"==i.facebook_property?t.push("likes.limit(100)"):t.push(i.facebook_property))}return t},_getUniqueFields:function(e){for(var t=[],a=0;a<e.length;a++)-1==t.indexOf(e[a])&&t.push(e[a]);return t},_setPropertyValue:function(e,t,a){var i,r=[];if(-1!=this.blueConicClient.util.array.indexOfArray(this.SIMPLE_FIELDS,t)&&e[t]&&r.push(e[t]),-1!=this.blueConicClient.util.array.indexOfArray(this.NAMED_FIELDS,t)&&e[t]&&e[t].name&&r.push(e[t].name),"birthday"==t){var n=e[t];if(n){var s=n.split("/");if(3==s.length){var o=new Date(s[2],s[0]-1,s[1]).getTime();isNaN(o)||r.push(o)}}}if("picture"==t){var l=e[t];l&&l.data&&l.data.url&&r.push(l.data.url)}if("age_range"==t){var p=e[t];if(p&&p.min){var f=p.max?p.min+"-"+age_range_max:p.min;r.push(f)}}if("education"==t){var c=e[t];if(c)for(var u=0;u<c.length;u++){var _=c[u];_.type&&r.push(_.type)}}if("work"==t){var h=e[t];if(h)for(u=0;u<h.length;u++){var d=h[u].employer;d.name&&r.push(d.name)}}if("likes"==t&&((i=e[t])&&i.data))for(u=0;u<i.data.length;u++){(m=i.data[u]).name&&r.push(m.name)}if("likes_categories"==t&&((i=e.likes)&&i.data))for(u=0;u<i.data.length;u++){var m;(m=i.data[u]).category&&r.push(m.category)}r.length>0&&this.profile.setValues(a,r)},_setUserProfileProperties:function(e){var t;e.first_name&&e.last_name?t=e.first_name+" "+e.last_name:e.first_name&&!e.last_name?t=e.first_name:!e.first_name&&e.last_name&&(t=e.last_name),t&&!this.profile.getValue("fullname")&&this.profile.setValue("fullname",t),e.picture&&e.picture.data&&e.picture.data.url&&!this.profile.getValue("avatar")&&this.profile.setValue("avatar",e.picture.data.url)}});var a = [];var i='facebookprofiletransferconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.1.0/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.1.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({languageLabels:{nl:{defaultValidation:"Vul een valide waarde in"},"default":{defaultValidation:"Please enter a valid value"}},_editorOpen:!1,init:function(e,t){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),this.blueConicClient=e,this.baseURL=this.blueConicClient.getBaseURL("forms");var i=this;this.blueConicClient.event.subscribe("bcComplexObject",this,(function(e,s){s&&"forms"===s.plugin&&s.config&&(s.config.attributionId=s.interactionId,s.config=this._migrateConfig(s.config),this._loadLibraries(s.config).done((function(){i._loadData(s,t)})))})),this.blueConicClient.isInEditMode()&&(this._sendMessage("forms.formLoaded"),this.blueConicClient.event.subscribe("forms.updateName",this,(function(e,t){var i=t.message.field,s=document.querySelector(".bcForm[data-bc-id='"+t.message.form+"']").querySelector(".fieldHolder[data-bc-id='"+i.id+"']"),n=s.querySelector(".bcLabel");n&&(n.textContent=i.settings.label);var a=s.querySelector(".buttonInput");a&&a.setAttribute("value",i.settings.label)})),this.blueConicClient.event.subscribe("forms.updateField",this,(function(e,s){i._updateField(s.message.form,s.message.field,t)})),this.blueConicClient.event.subscribe("forms.updateLabelLocation",this,(function(e,t){i._updateLabelLocation(t.message.form,t.message.show_labels_inline)})),this.blueConicClient.event.subscribe("forms.updateStyling",this,(function(e,t){i._updateStyling(t.message.styling)})),this.blueConicClient.event.subscribe("forms.addField",this,(function(e,t){i._addField(t.message.form,t.message.field,!0)})),this.blueConicClient.event.subscribe("forms.deleteField",this,(function(e,t){var s=document.querySelector(".bcForm[data-bc-id='"+t.message.form+"']").querySelector(".fieldHolder[data-bc-id='"+t.message.fieldId+"']");s.parentNode.removeChild(s),i._removeSelectedState()})),this.blueConicClient.event.subscribe("forms.updateConfig",this,(function(e,t){var i=document.querySelector(".bcForm[data-bc-id='"+t.message.id+"']");if(i){var s=i.closest(".bccomplexobject");s.setAttribute("data-bc-config",JSON.stringify(t.message));var n=t.message.actions;t.message.fields.length>0&&Array.prototype.forEach.call(t.message.fields,(function(e){"Button"===e.fieldType&&e.settings&&e.settings.actions&&Array.prototype.forEach.call(e.settings.actions,(function(e){n.push(e)}))}));var a=n.filter((function(e){return"setaddvalue"===e.type&&"set_if_empty"===e.operation&&e.property})).map((function(e){return e.property}));s.setAttribute("data-bc-preload",a.join(","))}})),this.blueConicClient.event.subscribe("forms.updateOrdering",this,(function(e,t){i._updateOrdering(t.message.form,t.message.ordering)})),this.blueConicClient.event.subscribe("editorOpened",this,(function(){this._editorOpen=!0;var e=this;this._loadLibraries().done((function(){e._addBindings(t)}))})),this.blueConicClient.event.subscribe("editorClosed",this,(function(){this._editorOpen=!1,i._removeSelectedState(),i._sendMessage("forms.closeConfigurator")})))},getPreloadProperties:function(){return[]},_migrateConfig:function(e){if((e=JSON.parse(JSON.stringify(e))).actions||!e.routing)return e;var t,i=e.routing;return"form_routing_inline"===i.type?t={type:"text",text:i.inline_message}:"form_routing_url"===i.type?t={type:"url",url:i.go_to_url}:"form_routing_close_lightbox"===i.type&&(t={type:"close"}),e.actions=t?[t]:[],e},_loadLibraries:function(e){var t,i,s=this.jQuery;if(window.BlueConicJQuery=s,this.blueConicClient.isInEditMode())t=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/datepicker.min.js"),i=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/jquery-ui.min.js");else for(var n=0;n<e.fields.length;n++)"DatePicker"===e.fields[n].fieldType&&(t=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/datepicker.min.js"));return s.when(t,i)},_getLoadScriptDeferred:function(e){var t=this.jQuery.Deferred();return this.blueConicClient.util.loadScript(e,this,(function(){t.resolve()})),t},_updateOrdering:function(e,t){var i=document.querySelector(".bcForm[data-bc-id='"+e+"']"),s=null;t.forEach((function(e){var t=i.querySelector(".fieldHolder[data-bc-id='"+e+"']");if(s)s.parentNode.insertBefore(t,s.nextSibling);else{var n=i.querySelector("fieldset");n.insertBefore(t,n.firstChild)}s=t}))},_removeSelectedState:function(){var e=document.querySelectorAll(".fieldHolder");Array.prototype.forEach.call(e,(function(e){e.className=e.className.replace("bcSelected","").replace("  "," ")}))},_updateStyling:function(e){if(this._stylingUrl){var t=document.querySelector("link[href='"+this._stylingUrl+"']");t.parentNode.removeChild(t)}this._inlineCss&&this._inlineCss.parentNode.removeChild(this._inlineCss),this._handleStyling(e)},_handleStyling:function(e){if(e&&e.css&&(this._stylingUrl=e.css,this.blueConicClient.util.loadCSS(this._stylingUrl)),e&&e.css_inline){var t=document.createElement("style");t.innerHTML=e.css_inline,this._inlineCss=t,document.body.appendChild(this._inlineCss)}},_selectField:function(e,t){if(this._removeSelectedState(),e.className=e.className.split(" ").concat(["bcSelected"]).join(" "),!t){var i=e.closest(".bccomplexobject").getAttribute("data-bc-config"),s=this._jsonEscape(i);this._sendMessage("forms.fieldSelected",{form:JSON.parse(s),field:e.getAttribute("data-bc-id")})}},_jsonEscape:function(e){return e.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t")},_addBindings:function(e){var t=window.CKEDITOR;if(t){this.baseURL=this.blueConicClient.getBaseURL(e.getInteractionTypeId()),this.blueConicClient.util.loadCSS(this.baseURL+"frontend/src/css/formsinline.css");var i,s=this.jQuery,n=this,clickHandler=function(){n._editorOpen&&n._selectField(this)},a=document.querySelectorAll(".fieldHolder");if(Array.prototype.forEach.call(a,(function(e){e.addEventListener("click",clickHandler)})),t.currentInstance)for(i in t.currentInstance.widgets.instances)if("bccomplexobject"===t.currentInstance.widgets.instances[i].name){var l=t.currentInstance.widgets.instances[i];"forms"===s(l.wrapper.$).find(".bccomplexobject").attr("data-bc-pluginid")&&(l.on("select",(function(e){s(e.sender.wrapper.$).removeClass("cke_widget_selected")})),l.on("deselect",(function(){n._removeSelectedState(),n._sendMessage("forms.closeConfigurator")})))}s(".bcForm fieldset").sortable({handle:".bcDragHandle",stop:function(e){var t=[];s(".fieldHolder",s(this)).each((function(){s(this).attr("data-bc-id")&&t.push(s(this).attr("data-bc-id"))})),n._sendMessage("forms.updateOrdering",{form:JSON.parse(s(this).closest(".bccomplexobject").attr("data-bc-config")),order:t});var i=e.toElement;i.getAttribute("data-bc-config")||(i=i.closest(".fieldHolder")),n._selectField(i,!0)}})}},_sendMessage:function(e,t){this.blueConicClient.fn.postMessage&&this.blueConicClient.fn.postMessage(e,t)},_addField:function(e,t,i){var s=this,n=this._getFieldsHTML(t),a=document.createElement("div");a.innerHTML=n;var l=a.childNodes[0];document.querySelector(".bcForm[data-bc-id='"+e+"'] fieldset").appendChild(l),this._selectField(l,!0),l.addEventListener("click",function(){this._selectField(l)}.bind(this)),i&&setTimeout((function(){s._isElementInViewport(l)||l.scrollIntoView()}),100)},_isElementInViewport:function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},_updateField:function(e,t,i){var s=this._getFieldsHTML(t,!0),n=document.querySelector(".bcForm[data-bc-id='"+e+"']");n&&(n.querySelector(".fieldHolder[data-bc-id='"+t.id+"']").innerHTML=s,this._addDatePickerHandleForField(t,i))},_updateLabelLocation:function(e,t){var i=document.querySelector(".bcForm[data-bc-id='"+e+"'] fieldset");i&&(i.className=t?i.className.split(" ").concat(["inlineLabels"]).join(" "):i.className.replace("inlineLabels","").replace("  "," "))},_loadData:function(e,t){var i=this,s=e.node;s.innerHTML="",this.baseURL=this.blueConicClient.getBaseURL(t.getInteractionTypeId());var n=document.createElement("div");n.innerHTML='<link type="text/css" href="'+this.baseURL+'frontend/src/css/default.uni-form.css" rel="stylesheet" />';var a=n.childNodes[0];a.addEventListener("load",(function(){i._handleStyling(e.config.styling),i._loadForm(s,e.config,t),i._editorOpen&&i._addBindings(t)})),document.head.appendChild(a)},_loadForm:function(e,t,i){this._node=e;var s=document.createElement("div");s.className="bcForm",s.setAttribute("data-bc-external","true"),s.setAttribute("data-bc-id",t.id),e.appendChild(s);var n=this._getForm(t);s.appendChild(n),this.blueConicClient.isInEditMode()?this._addDatePickerHandler(t,i):this._prefillForm(s,t,i)},_getForm:function(e){e.styling||(e.styling={});var t=document.createElement("div");t.className="uniForm",t.setAttribute("id",e.id),t.setAttribute("action","#");var i=document.createElement("div");i.className="formHolder",t.appendChild(i);var s=document.createElement("fieldset");e.styling.show_labels_inline&&(s.className="inlineLabels"),i.appendChild(s);for(var n=e.fields,a=0;a<n.length;a++){var l=n[a],r=this._getFieldsHTML(l),o=document.createElement("div");o.innerHTML=r;var c=o.childNodes[0];s.appendChild(c)}return t},_getFieldsHTML:function(e,t){var i='<% if(settings.description) { %><span class="formHint"><%= settings.description %></span><% } %>',s="<% if(settings.required) { %><em>*</em><% } %>",n="";switch(e.fieldType){case"PlainText":n='<div class="plaintext"><%= settings.text %></div>';break;case"SingleLineText":"small"===e.settings.fieldSize||e.settings.fieldSize;n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><input type="text" class="'+("small"===e.settings.fieldSize?"bcSmall":"large"===e.settings.fieldSize?"bcLarge":"bcMedium")+' textInput" placeholder="<%= settings.value %>" />'+i+"</div>";break;case"TextArea":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><textarea rows="'+("small"===e.settings.fieldSize?3:"large"===e.settings.fieldSize?10:5)+'" placeholder="<%= settings.value %>"></textarea>'+i+"</div>";break;case"Select":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><select class="selectInput"><% if (settings.values) for(var i=0; i < settings.values.length; i++) { %><option<% if(settings.values[i].defaultOn) { %> selected="selected"<% } %> value="<%= escape(settings.values[i].identifier || "") %>"><%= settings.values[i].name %></option><% } %></select>'+i+"</div>";break;case"CheckboxList":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><ul <% if(settings.repeatdirection === "horizontal") { %>class="horizontal"<% } %>><%  if (settings.values) for(var i=0; i < settings.values.length; i++) { %><li><input<% if(settings.values[i].defaultOn) { %> checked="checked"<% } %> type="checkbox" name="bcCList_<%= id %>" id="bcCList_<%= id %>_<%= i %>" value="<%= escape(settings.values[i].identifier || "") %>"/><label for="bcCList_<%= id %>_<%= i %>"><%= settings.values[i].name %></label></li><% } %></ul>'+i+"</div>";break;case"RadioButtonList":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><ul <% if(settings.repeatdirection === "horizontal") { %>class="horizontal"<% } %>><%  if (settings.values) for(var i=0; i < settings.values.length; i++) { %><li><input<% if(settings.values[i].defaultOn) { %> checked="checked"<% } %> type="radio" name="bcRadioList_<%= id %>" id="bcRadioList_<%= id %>_<%= i %>" value="<%= escape(settings.values[i].identifier || "") %>"/><label for="bcRadioList_<%= id %>_<%= i %>"><%= settings.values[i].name %></label></li><% } %></ul>'+i+"</div>";break;case"DatePicker":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><% if(settings.flat) { %><div class="datepicker"/><input type="hidden" class="hiddenInput"/><% } else { %><input type="text" class="textInput" placeholder="<%= settings.value %>" /><input type="hidden" class="hiddenInput"/><% } %>'+i+"</div>";break;case"Button":n='<div class="buttonHolder<% if (settings.className) {%> <%= settings.className %><% } %>"><input type="<% if (settings.submitForm === false) {%>button<% } else { %>submit<% } %>" class="buttonInput primaryAction" value="<%= settings.label %>"/></div>'}return this.blueConicClient.isInEditMode()&&(n+='<div class="bcDragHandle"><div class="bcInnerDragHandle"></div></div>'),t||(n='<div class="fieldHolder blueConic<%= fieldType %>" data-bc-id="<%= id %>">'+n+"</div>"),this._tmpl(n,e)},_prefillForm:function(e,t,i){for(var s=i.getProfile(),n=e.querySelectorAll(".fieldHolder"),a=[],l=0;l<t.fields.length;l++){var r=t.fields[l];r.settings.prefillproperty&&a.push(r.settings.prefillproperty)}0!==a.length?s.loadValues(a,this,(function(){this._addFormListeners(e,t,i);for(var filterAndCheckRadioButtons=function(e,t){Array.prototype.filter.call(e,(function(e){return e.value===t})).forEach((function(e){e.setAttribute("checked","checked")}))},a=0;a<t.fields.length;a++){var l=t.fields[a],r=n[a].querySelectorAll("input, textarea, select");if(l.settings.prefillproperty){var o=s.getValues(l.settings.prefillproperty);if(o.length>0)switch(l.fieldType){case"DatePicker":break;case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":for(var c=0;c<o.length;c++){filterAndCheckRadioButtons(r,o[c])}break;default:r[0].value=o[0]}}}})):this._addFormListeners(e,t,i)},_formatDate:function(e){var t=e.getMonth()+1,i=e.getDate();return e.getYear()+1900+"-"+(t<10?"0":"")+t+"-"+(i<10?"0":"")+i},_addDatePickerHandler:function(e,t){for(var i=0;i<e.fields.length;i++){var s=e.fields[i];this._addDatePickerHandleForField(s,t)}},_getDateForTimestamp:function(e){if(!e)return null;var t=new Date(parseInt(e));return t&&t instanceof Date&&!isNaN(t)?t:null},_addDatePickerHandleForField:function(e,t){var i=this.jQuery;if("DatePicker"===e.fieldType){var s=document.querySelector("div[data-bc-id='"+e.id+"']");if(!s)return;var n,a=this.blueConicClient.profile.getProfile(),l="nl"===t.getLocale()?"NL":"EN",r=this._getDateForTimestamp(a.getValue(e.settings.prefillproperty));if(r){n=r;var o=s.querySelector(".textInput");o&&(o.value=this._formatDate(n))}else n=e.settings.pickerOffset?new Date(e.settings.pickerOffset):new Date;if(i("input.textInput, div.datepicker",i(s)).DatePicker({flat:e.settings.flat,lang:l,calendars:e.settings.calendars,date:n,current:this._formatDate(n),onChange:function(e,t){var s=document.querySelector("div[data-bc-id='"+this.id+"']");s.querySelector("input.hiddenInput").value=t.getTime();var n=s.querySelectorAll("input.textInput");n.length>0&&(n[0].value=e,i(n[0]).DatePickerHide())}.bind(e)}),!e.settings.flat){var c=s.querySelector("input.textInput");c&&c.addEventListener("focus",(function(){i("input.textInput, div.datepicker",s).DatePickerShow()}))}}},_submit:function(e,t,i){if(this._validateForm(e,t,i)){!1!==t.logConversion&&this.blueConicClient.createEvent("CONVERSION",t.attributionId),this._storeFormValues(e,t,i);this.blueConicClient.profile.updateProfile(function(){this._handleActions(t.actions,t.attributionId,e,i)}.bind(this))}},_handleActions:function(e,t,i,s){if(e){var n=new window._bcp.utils.AfterSubmitActionHandlerV2(this.blueConicClient,s,t);e.forEach((function(e){n.executeAction(e,i)}),this)}},_getField:function(e,t){var i=e.closest(".fieldHolder").getAttribute("data-bc-id");if(i&&void 0!==i){for(var s,n=0;n<t.fields.length;n++){var a=t.fields[n];if(a&&a.id&&"undefined"!=typeof a.id&&a.id===i){s=a;break}}return s}},_addFormListeners:function(e,t,i){var s=this;this._addDatePickerHandler(t,i);var submitHandler=function(n){n.preventDefault();var a=s._getField(this,t);a&&a.settings&&!1===a.settings.logClick||s.blueConicClient.createEvent("CLICK",t.attributionId),s._submit(e,t,i)},n=e.querySelectorAll('input[type="submit"]');Array.prototype.forEach.call(n,(function(e){e.addEventListener("click",submitHandler)}));var clickHandler=function(){var n=s._getField(this,t);n&&(n.settings&&!1!==n.settings.logClick&&s.blueConicClient.createEvent("CLICK",t.attributionId),s._handleActions(n.settings.actions,t.attributionId,e,i))},a=e.querySelectorAll('input[type="button"]');if(Array.prototype.forEach.call(a,(function(e){e.addEventListener("click",clickHandler)})),1===t.fields.length&&"RadioButtonList"===t.fields[0].fieldType){var radioClickHandler=function(n){n.preventDefault(),s.blueConicClient.createEvent("CLICK",t.attributionId),s._submit(e,t,i)},l=document.querySelectorAll('input[type="radio"]');Array.prototype.forEach.call(l,(function(e){e.addEventListener("click",radioClickHandler)}))}},_validateForm:function(e,t,i){var s=e.querySelectorAll(".fieldHolder"),n=e.querySelectorAll("span.errormsg");Array.prototype.forEach.call(n,(function(e){e.parentNode.removeChild(e)})),Array.prototype.forEach.call(s,(function(e){e.className=e.className.replace("error","").replace("  "," ")}));for(var a=!0,l=0;l<t.fields.length;l++){var r=t.fields[l],o=s[l],c=o.querySelectorAll("input, textarea, select"),d=!1;if(r.settings.required)switch(r.fieldType){case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":0===this._filterCheckedFields(c).length&&(d=!0);break;case"DatePicker":var u=Array.prototype.filter.call(c,(function(e){return-1!==e.className.indexOf("hiddenInput")}));d=!(u[0]&&u[0].value);break;default:var f=c[0].value;f&&f.trim()||(d=!0)}var p=!1;if(!d&&r.settings.validation){var g=c[0].value,b=g&&g.trim();if(b)switch(r.settings.validation){case"email":b.match(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/)||(p=!0);break;case"number":b.match(/^\d+$/)||(p=!0);break;case"regexp":try{r.settings.validation_regexp&&!b.match(r.settings.validation_regexp)&&(p=!0)}catch(v){console.error(v)}}}if((d||p)&&(a=!1,o.className=o.className.split(" ").concat(["error"]).join(" "),p||r.settings.validation_failed_msg)){var h="nl"===i.getLocale()?"nl":"default",m=document.createElement("span");m.className="errormsg",m.textContent=r.settings.validation_failed_msg||this.languageLabels[h].defaultValidation,o.insertAdjacentElement("beforebegin",m)}}return a},_filterCheckedFields:function(e){return Array.prototype.filter.call(e,(function(e){return e.checked}))},_storeFormValues:function(e,t,i){for(var s=i.getProfile(),n=0;n<t.fields.length;n++){var a,l=t.fields[n],r=e.querySelector("div[data-bc-id = '"+l.id+"']").querySelectorAll("input, textarea, select");if(l.settings.storeproperty)switch(l.fieldType){case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":for(var o=[],c=this._filterCheckedFields(r),d=0;d<c.length;d++){var u=c[d].value;u=unescape(u),o.push(u)}if("set"===l.settings.overwriteValue)s.setValues(l.settings.storeproperty,o);else for(var f=0;f<o.length;f++)s.addValue(l.settings.storeproperty,o[f]);break;case"DatePicker":var p=Array.prototype.filter.call(r,(function(e){return-1!==e.className.indexOf("hiddenInput")}));(a=p[0]&&p[0].value)&&("set"===l.settings.overwriteValue?s.setValue(l.settings.storeproperty,a):s.addValue(l.settings.storeproperty,a));break;default:a=unescape(r[0].value),"set"===l.settings.overwriteValue?s.setValue(l.settings.storeproperty,a):s.addValue(l.settings.storeproperty,a)}}},_tmpl:function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):this.cache[e]=this.cache[e]||_tmpl(document.getElementById(e).innerHTML);return t?i(t):i}});var a = [];var i='forms';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/frontend/src/node_modules/@blueconic/actionhandlers-frontend/AfterSubmitActionHandler.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({SIMPLE_FIELDS:['email','firstName','lastName','gender','city','age','thumbnailURL','hometown'],init:function(a,b){this.blueConicClient=a,this.context=b,this.profile=a.profile.getProfile(),this.parameters=this.context.getParameters(),this.connectionContext={GIGYA_LAST_TRANSFER:'gigya_lasttransfer',GIGYA_ID:'gigya_id',SENT_TO_SYSTEM_PROPERTY:'sent_to_system',SENT_TO_CONNECTION_PROPERTY:'sent_to_connection'},this.preloadProperties=[this.connectionContext.GIGYA_LAST_TRANSFER,this.connectionContext.GIGYA_ID,this.connectionContext.SENT_TO_SYSTEM_PROPERTY,this.connectionContext.SENT_TO_CONNECTION_PROPERTY]},getPreloadProperties:function(){var a=this.preloadProperties;return a.push('gigya_lasttransfer'),a.push('gigya_id'),a.push('fullname'),a.push('avatar'),a},onLoad:function(){function a(){if(!window.gigya){if(100<h)return;h++,window.setTimeout(a,200)}else g._addLoginListener(),g._doTransfer()}var b=!1,c=this.profile.getValue('gigya_id');if(c){var d=this.profile.getValue('gigya_lasttransfer');d||(d=0);var e=new Date(parseInt(d));e.setMinutes(e.getMinutes()+30);var f=new Date;!(f>e)&&this.profile.getValue('avatar')&&this.profile.getValue('fullname')||(b=!0)}else b=!0;if(b){var g=this,h=0;a.call(this)}},_addLoginListener:function(){var a=this;window.gigya.socialize.addEventHandlers({onLogin:function(b){a._transferUser(b.user)}})},_doTransfer:function(){var a=this;window.gigya.socialize.getUserInfo({extraFields:'likes,work,education,address,hometown',callback:function(b){if(0===b.errorCode){var c=b.user;c&&c.UID&&a._transferUser(c)}}})},_transferUser:function(a){var b=this.parameters.mapping&&this.parameters.mapping[0]?this.parameters.mapping[0]:null;if(b&&(b=this.blueConicClient.json.parse(b),b&&0<b.length)){this.profile.setValue('gigya_id',a.UID),this.profile.setValue('gigya_lasttransfer',new Date().getTime());for(var c,d=!1,e=0;e<b.length;e++)c=b[e],c.gigya_property&&c.property&&(d=!0,this._setPropertyValue(a,c.gigya_property,c.property));this._setUserProfileProperties(a),d&&this.bcConnectionUtil.setSyncProperties(this.context,this.profile,[this.connectionContext.SENT_TO_SYSTEM_PROPERTY,this.connectionContext.SENT_TO_CONNECTION_PROPERTY]),this.blueConicClient.profile.updateProfile()}},_setPropertyValue:function(a,b,c){var d=[];if(-1!==this.blueConicClient.util.array.indexOfArray(this.SIMPLE_FIELDS,b)&&a[b]&&d.push(a[b]),'birthday'===b){var e=a.birthDay,f=a.birthMonth,g=a.birthYear;e&&f&&g&&d.push(f+'/'+e+'/'+g)}var h;if('education'===b){var j=a[b];if(j)for(h=0;h<j.length;h++){var k=j[h];k.schoolType&&d.push(k.schoolType)}}if('work'===b){var l=a[b];if(l)for(h=0;h<l.length;h++){var m=l[h];m.company&&d.push(m.company)}}if('likes'===b){var n=a[b];if(n)for(h=0;h<n.length;h++){var o=n[h];o.name&&d.push(o.name)}}if('likes_categories'===b){var p=a.likes;if(p)for(h=0;h<p.length;h++){var q=p[h];q.category&&d.push(q.category)}}0<d.length&&this.profile.setValues(c,d)},_setUserProfileProperties:function(a){var b;a.firstName&&a.lastName?b=a.firstName+' '+a.lastName:a.firstName&&!a.lastName?b=a.firstName:!a.firstName&&a.lastName&&(b=a.lastName),b&&!this.profile.getValue('fullname')&&this.profile.setValue('fullname',b),a.photoURL&&!this.profile.getValue('avatar')&&this.profile.setValue('avatar',a.photoURL)}});var a = [];var i='gigyaconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.14/js/connection_lib/connection_lib.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.14/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,i){if(this.blueConicClient=e,this.context=i||null,this.parameters=this.context.getParameters(),this._initPublishedEvents(),this.parameters){this.blueConicClient.event.subscribe("PAGEVIEW",this,(function(){window._bcp=window._bcp||{},window._bcp.publishedEvents=window._bcp.publishedEvents||{},window._bcp.publishedEvents.viewEvent={}})),"true"!==this.parameters.hasOverlay[0]||this._isViewEventPublished()||this._handleView();var t=this.parameters.positions;if(t)for(var n=0;n<t.length;n++){var s=t[n];this.blueConicClient.position.subscribe(s,this,this._handlePosition)}}},_initPublishedEvents:function(){window._bcp=window._bcp||{},window._bcp.publishedEvents=window._bcp.publishedEvents||{},window._bcp.publishedEvents.viewEvent=window._bcp.publishedEvents.viewEvent||{},window._bcp.publishedEvents.clickEvent=window._bcp.publishedEvents.clickEvent||{}},_handleClick:function(){this._isClickEventPublished()||(this._setClickEventPublished(!0),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId()))},_handleView:function(){this._setViewEventPublished(!0),this.blueConicClient.createEvent("VIEW",this.context.getInteractionId())},_handlePosition:function(e){this._isViewEventPublished()||this.blueConicClient.isInEditMode()||this._handleView();var i=this;try{var t="bcCtrl"+this.context.getInteractionId();if(this.jQuery(e+" a").off("click."+t).on("click."+t,(function(){i._handleClick()})),this.jQuery(document).off("click."+t).on("click."+t,e+" a",(function(){i._handleClick()})),this.jQuery(document).off("submit."+t).on("submit."+t,e+" form",(function(){i._handleClick()})),this.jQuery(e).find("iframe").length>0){window.focus();var n=!1,s=this.jQuery(this.jQuery(e).find("iframe"));s.off("mouseenter."+t).on("mouseenter."+t,(function(){n=!0})),s.off("mouseleave."+t).on("mouseleave."+t,(function(){n=!1})),document.querySelectorAll(window).removeEventListener("blur."+t).addEventListener("blur."+t,function(){n&&this._handleClick()}.bind(this))}}catch(o){}},onLoad:function(){if(this.parameters){var e=this.parameters.positions;if(e)for(var i=0;i<e.length;i++){var t=e[i];this.jQuery(t).length>0&&this._handlePosition(t)}}},_isViewEventPublished:function(){return Boolean(window._bcp.publishedEvents.viewEvent[this.context.getInteractionId()])},_setViewEventPublished:function(e){window._bcp.publishedEvents.viewEvent[this.context.getInteractionId()]=e},_isClickEventPublished:function(){return Boolean(window._bcp.publishedEvents.clickEvent[this.context.getInteractionId()])},_setClickEventPublished:function(e){window._bcp.publishedEvents.clickEvent[this.context.getInteractionId()]=e}});var a = [];var i='globallistener_controlgroup';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.2/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.2/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"gtmpf",BLUECONIC_EVENT_PREFIX:"GTM:",init:function(e,t){this.blueConicClient=e,this.context=t||null,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.parameters=this.migrate(this.parameters),this.objectName=this.parameters.objectname&&this.parameters.objectname.length>0&&this.parameters.objectname[0]?this.parameters.objectname[0]:"dataLayer",this._goals=[];var i=t.getGoals().reduce((function(e,t){return e[t.getId()]=!0,e}),{});if(this.parameters.goalParameters)for(var n=0;n<this.parameters.goalParameters.length;n++){var a=e.json.parse(this.parameters.goalParameters[n]);a.active&&i[a.id]&&this._goals.push(a)}this.connectionContext={LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),VARIABLE_STATE_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"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"}},initDataLayerUtil:function(){this.bcConnectionUtil.md5Lib=this.md5,this._bcDatalayerUtil=new this.BlueConicDataLayerUtil(this.objectName,this.blueConicClient,this.bcConnectionUtil,this.context,this.connectionContext,this.profile),this._bcDatalayerUtil.LAST_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),this._bcDatalayerUtil.VARIABLE_STATE_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId()},onLoad:function(){this.initDataLayerUtil();var e=this,t=0;(function gtmReady(){if(e._bcDatalayerUtil.getDataLayer())e._handleGoals();else{if(t>20)return;t++,window.setTimeout(gtmReady,250)}}).call(this)},_handleGoals:function(){for(var e=0;e<this._goals.length;e++){var t=this._goals[e],i=t.parameters.segment?t.parameters.segment[0]:null;this._bcDatalayerUtil.visitorInSegment(i)&&("export"===t.type&&this._handleExportGoal(t.parameters,t.id),"import"===t.type&&this._handleImportGoal(t.parameters))}},_handleImportGoal:function(e){var t=this._bcDatalayerUtil.getDataLayer();if(t){this._bcDatalayerUtil.doImport(e),this._publishEvents();var i=this,n=t.length;window.setInterval((function(){t=i._bcDatalayerUtil.getDataLayer(),n!==t.length&&(i._publishEvents(n),n=t.length)}),1e3)}},_publishEvents:function(e){for(var t=this._bcDatalayerUtil.getDataLayer(),i=e=e||0;i<t.length;i++){var n=t[i].event;n&&this.blueConicClient.event.publish(this.BLUECONIC_EVENT_PREFIX+n,[t[i]])}},_handleExportGoal:function(e,t){this._bcDatalayerUtil.doExport(e,t);var i=Array.isArray(e.push_interactions)&&"true"===e.push_interactions[0],n=Array.isArray(e.passOnEvents)&&"true"===e.passOnEvents[0];!window[this.objectName]||window[this.objectName].push?(i&&this.blueConicClient.event.subscribe("VIEW",this,this._pushInteractionView),n&&this._subscribeToPassOnEvents()):console.warn("window."+this.objectName+" does not have a push function: is the correct Object Name entered?")},getPreloadProperties:function(){for(var e=[this.connectionContext.SENT_TO_SYSTEM_PROPERTY,this.connectionContext.SENT_TO_CONNECTION_PROPERTY,this.connectionContext.RECEIVED_FROM_SYSTEM_PROPERTY,this.connectionContext.RECEIVED_FROM_CONNECTION_PROPERTY],t=0;t<this._goals.length;t++){var i=this._goals[t];if("export"===i.type){e.push(this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId()+"_"+i.id),e.push(this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId()+"_"+i.id);for(var n=this.blueConicClient.json.parse(i.parameters.exportMapping),a=0;a<n.length;a++)"property"===n[a].from.dataType&&n[a].from.values.length>0&&e.push(n[a].from.values[0].id)}else for(var r=this.blueConicClient.json.parse(i.parameters.importMapping),s=0;s<r.length;s++)r[s].to.values.length>0&&e.push(r[s].to.values[0].id)}return e},_pushInteractionView:function(e,t){var i=this.blueConicClient.getInteractionNamesById(t);if(null!==i){var n=i.variantName?i.name+" / "+i.variantName:i.name;window[this.objectName].push({event:"bcInteractionView",name:n})}},_subscribeToPassOnEvents:function(){var e,t=[["inactivity","Inactivity"],["exitintent","Exit Intent"],["cm_firstview","Content Meter View 1"],["cm_exceeded","Content Meter Exceeded"],["cm_lastview","Content Meter Last View"],["cm_excluded","Content Meter Excluded View"],["cm_bottom","Content Meter Bottom Range"],["cm_middle","Content Meter Middle Range"],["cm_top","Content Meter Top Range"],["cm_already_viewed","Content Meter Already Viewed"],["cm_free_view","Content Meter Free View"],["cm_last_free_view","Content Meter Last Free View"]];for(e=2;e<10;e++)t.push(["cm_view_"+e,"Content Meter View "+e]);for(e=1;e<10;e++)t.push(["cm_free_view_"+e,"Content Meter Free View "+e]);var i=this;t.forEach((function(e){i.blueConicClient.event.subscribe(e[0],i,(function(){window[this.objectName].push({event:"bcEvent",bcEventName:e[1]})}))}))},migrate:function(e){var t=parseInt(e.version||"2");return!e.usecases&&!e.variables||e.goalParameters||(t=1),t<2&&(e=this._migrateToV2(e),t=2),t<3&&(e=this._migrateToV3(e)),e},_migrateToV2:function(e){var t={objectname:e.objectname},i=[];if(-1!==e.usecases.indexOf("uc2")){var n={id:1,name:"Import",active:!0,type:"import"},a=[];if(e.importVariables&&e.importVariables.length>0)for(var r=this.blueConicClient.json.parse(e.importVariables[0]),s=0;s<r.length;s++)a.push({from:{fieldId:r[s].fieldLabel},to:{type:"property",property:r[s].property},restriction:r[s].restriction,mergeRule:r[s].mergeRule});n.parameters={importMapping:[this.blueConicClient.json.stringify(a)]},i.push(this.blueConicClient.json.stringify(n))}if(-1!==e.usecases.indexOf("uc1")){var o={id:2,name:"Export",active:!0,type:"export"},l=[];if(e.variables&&e.variables.length>0)for(var c=this.blueConicClient.json.parse(e.variables[0]),h=0;h<c.length;h++)l.push({to:{fieldId:c[h].key},from:{type:"pm"===c[h].type?"permission":c[h].type,property:c[h].property,segments:c[h].segments,fieldId:c[h].text}});o.parameters={exportMapping:[this.blueConicClient.json.stringify(l)],eventname:e.eventname,push_frequency:e.push_frequency,push_interactions:e.push_interactions,passOnEvents:e.passOnEvents,triggerEvent:e.triggerEvent},i.push(this.blueConicClient.json.stringify(o))}return t.goalParameters=i,t},_migrateToV3:function(e){return e.goalParameters=(e.goalParameters||[]).map(JSON.parse).map((function(e){if("export"===e.type){var t=e.parameters.eventname?e.parameters.eventname[0]:null;e.parameters.eventname=[t||"BlueConic"]}return JSON.stringify(e)})),e}});var a = [];var i='gtmconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/datalayer_lib/datalayer_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/datalayer_lib/lib/jsonpathplus.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/'}]);})();(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({init:function(a,b){this.blueConicClient=a,this.interaction=b},onLoad:function(){var a=this.interaction.getProfile(),b=this.interaction.getParameters(),c=b.ip_range_rules?b.ip_range_rules[0]:b.ip_range_rules,d=b.property?b.property[0]:b.property,e=this.blueConicClient.getIPAddress();if(c&&d&&e&&(c=this.blueConicClient.json.parse(c),0!==c.length)){for(var f=!1,g=0;g<c.rules.length;g++){var h=c.rules[g],i=h.lowest,k=h.highest,l=h.addset,m=h.values;if(i&&k&&m&&0<m.length){var n,o,p;if(1<i.split(":").length&&1<k.split(":").length&&1<e.split(":").length?(n=this.ip2num(this.ip6hexToNumber(e)),o=this.ip2num(this.ip6hexToNumber(i)),p=this.ip2num(this.ip6hexToNumber(k))):(n=this.ip2num(e),o=this.ip2num(i),p=this.ip2num(k)),n<=p&&n>=o)if(f=!0,"add"===l)for(var q=0;q<m.length;q++)a.addValue(d,m[q]);else a.setValues(d,m)}}f&&this.blueConicClient.profile.updateProfile()}},ip2num:function(b){var c=b.split(".");0===c.length&&(c=b.split(":")),4===c.length&&c.unshift(0,0,0,0);var d=256*(256*(256*(256*(256*(256*(256*+c[0]+ +c[1])+ +c[2])+ +c[3])+ +c[4])+ +c[5])+ +c[6])+1*+c[7];return d},ip6hexToNumber:function(a){for(var b=a.split(":"),c=[],d=0;d<b.length;d++)if(""===b[d])for(var e=0;e<=8-b.length;e++)c.push(0);else c.push(parseInt(b[d],16));return c.join(".")}});var a = [];var i='iplistenerinteractiontype';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.8/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(t,e){this.blueConicClient=t,this.context=e,this.parameters=this.context.getParameters(),this.isInEditMode=this.blueConicClient.isInEditMode(),this.fancyBoxLib="frontend/src/lib/fancybox/jquery.fancybox.pack.js";var n=this.context.getInteractionTypeId();this.baseURL=this.blueConicClient.getBaseURL(n);var i=this.parameters.content+"";this.htmlFragment=this.createElement(i),this.profile=t.profile.getProfile(),this.inlineCss=null,this._timestamp=null,this._observer=null,this._eventListenerFunction=null,this._lightboxTriggered=!1,this.blueConicClient._renderedInteractions=this.blueConicClient._renderedInteractions||[],this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){var t=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(t,1)}))},getPreloadProperties:function(){for(var t,e=this.context.getParameters().content+"",n=/data-bc-preload="([^"]*)"/g,i=[];null!==(t=n.exec(e));)for(var o=t[1].split(","),r=0;r<o.length;r++)i.push(o[r]);for(var a=this.htmlFragment?this._getPropertiesFromPlaceholders(this.htmlFragment.innerHTML):[],c=0;c<i.length;c++)a.push(i[c]);return a},onMessageReceived:function(t){this.blueConicClient.event.publish("lightbox.messageReceived",t)},onLoad:function(){window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery,window.bcFancyboxLoading?this.blueConicClient.event.subscribe("bcFancyboxLoaded",this,(function(){this.onLoad()})):this.blueConicClient._lightboxinteractiontypeFancybox?(this.jQuery.fancybox=this.blueConicClient._lightboxinteractiontypeFancybox,this._onLoadWithLibrary()):(window.bcFancyboxLoading=!0,this.blueConicClient.util.loadScript(this.baseURL+this.fancyBoxLib,this,(function(){this.blueConicClient._loadLightboxInteractionTypeFancyBox(window,document,this.jQuery),this.blueConicClient._lightboxinteractiontypeFancybox=this.jQuery.fancybox,delete this.blueConicClient._loadLightboxInteractionTypeFancyBox,this._onLoadWithLibrary(),window.bcFancyboxLoading=!1,this.blueConicClient.event.publish("bcFancyboxLoaded")})))},_onLoadWithLibrary:function(){if(this.isInEditMode)this.showLightbox();else{var t=this.parameters.selected_when||[],e=this.getParameter("click_selector");e&&-1!==this.blueConicClient.util.array.indexOfArray(t,"click_selector")&&this._addClickTriggerBindings(e);var n=this.getParameter("content_condition");n&&-1!==this.blueConicClient.util.array.indexOfArray(t,"content_condition")&&this._addContentPolling(n);var i=this.parameters.scroll_depth&&this.parameters.scroll_depth[0]&&!isNaN(this.parameters.scroll_depth[0])?parseInt(this.parameters.scroll_depth[0]):0;i&&-1!==this.blueConicClient.util.array.indexOfArray(t,"scroll_depth")&&this._addScrollBinding(i),0===t.length&&this.showLightbox(),this._addCloseEventHandler()}},_getScrollPercent:function(){return document.documentElement.scrollTop/(document.documentElement.scrollHeight-window.innerHeight)*100},_checkScrollCondition:function(t){this._getScrollPercent()>=t&&this.showLightbox()},_addScrollBinding:function(t){this._checkScrollCondition(t),document.addEventListener("scroll",function(){this._checkScrollCondition(t)}.bind(this))},_addClickTriggerBindings:function(t){try{var e=this.jQuery(t);e.length>0?e.off("click.lightboxinteractiontype").on("click.lightboxinteractiontype",this.jQuery.proxy((function(){this.showLightbox(!0)}),this)):this.blueConicClient.position.subscribe(t,this,this.jQuery.proxy(this._addClickTriggerBindings,this,t))}catch(n){}},_addContentPolling:function(t){this._checkContentCondition(t);var e=this,n=document.getElementsByTagName("body")[0];if(window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)this._observer=new MutationObserver((function(){e._observeContentChanges(t)})),this._observer.observe(n,{childList:!0,subtree:!0});else if(window.addEventListener)this._eventListenerFunction=function(){e._observeContentChanges(t)},n.addEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else var i=setInterval((function(){e._lightboxTriggered?clearInterval(i):e._checkContentCondition(t)}),500)},_observeContentChanges:function(t){if(this._lightboxTriggered){this._observer?this._observer.disconnect():document.getElementsByTagName("body")[0].removeEventListener("DOMNodeInserted",this._eventListenerFunction,!1)}else{var e=this,n=(new Date).getTime();this._timestamp=n,setTimeout((function(){e._timestamp!==n||e._lightboxTriggered||e._checkContentCondition(t)}),250)}},_checkContentCondition:function(t){this.jQuery(t).length>0&&this.jQuery(t).html()&&this.jQuery(t).html().length>0&&this.showLightbox()},closeLightbox:function(){this.isInEditMode||this.jQuery.fancybox.close()},_addCloseEventHandler:function(){this.blueConicClient.event.subscribe("closeoverlay",this,(function(t,e){e instanceof Array&&e[0]===this.context.getInteractionId()&&this.closeLightbox()}))},showLightbox:function(t){if(-1===this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId())&&(!this._lightboxTriggered||this.isInEditMode||t)){this.blueConicClient._renderedInteractions.push(this.context.getInteractionId());var e=this.parameters.delay&&this.parameters.delay[0]&&!isNaN(this.parameters.delay[0])?1e3*parseInt(this.parameters.delay[0]):0;!this.isInEditMode&&e>0?window.setTimeout(this._showLightbox.bind(this),e):this._showLightbox()}},getSettings:function(){var t=null,e=this.getParameter("width")||null,n=this.getParameter("height")||null,i="true"===this.getParameter("hide_after_close");this.htmlFragment&&(t=this.htmlFragment.innerHTML);var o=!(e||n),r=this.getParameter("show_close"),a=this.getParameter("alternative_close"),c={parent:"body",autoSize:o,autoCenter:!1,autoWidth:!e,autoHeight:!n,closeBtn:"false"!==r,width:e||"auto",height:n||"auto",keys:{close:"false"===a||this.isInEditMode?null:[27]},helpers:{overlay:{locked:!0,closeClick:"false"!==a&&!this.isInEditMode,speedOut:0}}};this.getParameter("template")&&(c.padding=0),(t||this.isInEditMode)&&(c.content=" ",c.type="inline");var s=this,l=this.jQuery,h=this.getParameter("effect"),d=this.getParameter("effect_slide_direction")||"left";if(this.isInEditMode&&(h="noEffect"),h&&"noEffect"!==h&&("fadeIn"===h?l.fancybox.transitions.openEffect=function(){var t=l.fancybox._getPosition(!0);t.opacity=0,l.fancybox.wrap.css(t).show().animate({opacity:1},{duration:l.fancybox.current.openSpeed,complete:l.fancybox._afterZoomIn})}:"slideIn"===h&&(l.fancybox.transitions.openEffect=function(){var t,e=l.fancybox._getPosition(!0),n=window.innerHeight,i=window.innerWidth,o=l.fancybox.current.wrap[0].getBoundingClientRect(),r="top"===d||"bottom"===d?"top":"left";"top"===d||"bottom"===d?t=n-(n-o.height)/2:"left"!==d&&"right"!==d||(t=i-(i-o.width)/2),e[r]="top"===d||"left"===d?parseInt(e[r])-t+"px":parseInt(e[r])+t+"px";var a={},c="top"===d||"left"===d?"+":"-";a[r]=c+"="+t+"px",l.fancybox.wrap.css(e).show().animate(a,{duration:l.fancybox.current.openSpeed,complete:l.fancybox._afterZoomIn})}),l.fancybox.transitions.openEffect&&(c.openMethod="openEffect",c.openSpeed=600)),t)c.afterLoad=function(t){s.emptyElementsWithAttribute(s.htmlFragment,"div","data-bc-external");try{t.inner.html(s.htmlFragment.innerHTML)}catch(n){console.error("[BC] Error occured when injecting the HTML in the DOM",n)}s.isInEditMode&&s.blueConicClient.event.publish("lightbox.interactionLoaded",{interaction:s}),s.handleComplexElements(t.inner[0]);var e=s.getParameter("javascript");if(e&&!s.blueConicClient.isInEditMode()){e=e.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+s.context.getInteractionId()+'"$2'),s._inlineJs=s.jQuery("<script>"+e+"<\/script>");try{s._inlineJs.appendTo(s.jQuery("body"))}catch(n){console.error(n)}}};else if(s.isInEditMode){c.afterLoad=function(){s.blueConicClient.event.publish("lightbox.interactionLoaded",{interaction:s})}}return this.isInEditMode?c.afterShow=function(){l(".fancybox-close").off("click.fb")}:i&&(c.afterShow=function(){Array.prototype.forEach.call(document.querySelectorAll(".fancybox-close"),(function(t){t.addEventListener("click",(function(){s.blueConicClient.doNotShowAgain(s.context.getInteractionId())}))}))}),c.afterClose=function(){var t=s.blueConicClient.util.array.indexOfArray(s.blueConicClient._renderedInteractions,s.context.getInteractionId());s.blueConicClient._renderedInteractions.splice(t,1)},c},updateLightbox:function(){this.jQuery.fancybox.update()},getCurrentFancyBox:function(){return this.jQuery.fancybox.current},_showLightbox:function(){this._lightboxTriggered=!0;var t=this.getParameter("close_icon"),e=this.getParameter("close_icon_hover"),n=this,i=this.jQuery;function doLightBox(){if(!this.isInEditMode){this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()),!!this.parameters.forceclick&&("true"===this.parameters.forceclick[0]||!0===this.parameters.forceclick[0])&&this.blueConicClient.createEvent("CLICK",this.context.getInteractionId());var t=this.getParameter("click_event_selector");if(t){this.jQuery("body").one("click",t,function(t){this.lastClickEvent&&this.lastClickEvent.originalEvent===t.originalEvent||this._logClickEvent(t)}.bind(this));try{this.jQuery(t).one("click",function(t){this.lastClickEvent=t,this._logClickEvent(t)}.bind(this))}catch(i){}}}Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.parentNode.removeChild(t)})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.parentNode.removeChild(t)}));var e=function findHighestZIndex(t){var e,n=document.getElementsByTagName(t),i=0,o=0;for(o=0;o<n.length;o++)"auto"!==(e=document.defaultView.getComputedStyle(n[o],null).getPropertyValue("z-index"))&&parseInt(e)>i&&(i=parseInt(e));return i}("*");this.htmlFragment&&(this.emptyElementsWithAttribute(this.htmlFragment,"div","data-bc-external"),this.isInEditMode||this.handlePlaceholders(this.htmlFragment)),this.jQuery.fancybox(this.getSettings());var n=2147483647;e>8e3&&e+1030<n&&(Array.prototype.forEach.call(document.querySelectorAll(".fancybox-opened"),(function(t){t.style.zIndex=e+1030})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.style.zIndex=e+920})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.style.zIndex=e+910}))),e+1030>=n&&(Array.prototype.forEach.call(document.querySelectorAll(".fancybox-opened"),(function(t){t.style.zIndex=n})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.style.zIndex=2147483646})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.style.zIndex=2147483645}))),this.isInEditMode||this._setupFrontEndBindings()}this.handleStyling(t,e,(function(t){if(!t||(console.error(t),n.isInEditMode))n.handleJavascript().then((function(){doLightBox.call(n,i)}),(function(t){if(console.error("[BC] Loading Javascript urls for the lightbox failed:",t),n.isInEditMode)doLightBox.call(n,i);else{var e=n.blueConicClient.util.array.indexOfArray(n.blueConicClient._renderedInteractions,n.context.getInteractionId());n.blueConicClient._renderedInteractions.splice(e,1)}}));else{var e=n.blueConicClient.util.array.indexOfArray(n.blueConicClient._renderedInteractions,n.context.getInteractionId());n.blueConicClient._renderedInteractions.splice(e,1)}}))},_logClickEvent:function(t){t&&t.originalEvent&&t.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId()||(t&&t.target&&t.target.pathname&&t.target.hostname&&0===t.target.pathname.indexOf("/s/")&&-1!==t.target.hostname.indexOf("blueconic")||(t.originalEvent&&(t.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId())))},_setupFrontEndBindings:function(){var t=this.jQuery(".bcLightboxDontShowAgainLink"),e=this.jQuery(".bcLightboxCloseButton");t.length>0&&t.off("click.dontShowAgainLinks").on("click.dontShowAgainLinks",function(t){t.preventDefault(),this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),this.closeLightbox()}.bind(this)),e.length>0&&e.off("click.closeButtons").on("click.closeButtons",function(){this.closeLightbox()}.bind(this))},handleComplexElements:function(t){for(var e=this.getElementsWithAttribute(t,"div","data-bc-pluginid"),n=0;n<e.length;n++){var i=e[n],o=i.getAttribute("data-bc-pluginid"),r=i.getAttribute("data-bc-config");if(r)try{var a=r.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t");r=this.blueConicClient.json.parse(a)}catch(c){r=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:r,node:i,interactionId:this.context.getInteractionId()}),this.isInEditMode||(i.removeAttribute("data-bc-pluginid"),i.removeAttribute("data-bc-config"))}},emptyElementsWithAttribute:function(t,e,n){for(var i=this.getElementsWithAttribute(t,e,n),o=0,r=i.length;o<r;o++){i[o].innerHTML=""}},getElementsWithAttribute:function(t,e,n){for(var i=[],o=t.getElementsByTagName(e),r=0,a=o.length;r<a;r++){var c=o[r];c.getAttribute(n)&&i.push(c)}return i},createElement:function(t){var e;if(!t)return null;try{(e=document.createElement("div")).innerHTML=t}catch(n){return null}return e},handlePlaceholders:function(t){for(var e=this._getPropertiesFromPlaceholders(t.innerHTML),n=0;n<e.length;n++){var i=e[n],o=this.profile.getValue(i)||"",r=new RegExp("\\$\\{"+i+"\\}","g");t.innerHTML=t.innerHTML.replace(r,encodeURI(o))}},_getPropertiesFromPlaceholders:function(t){for(var e,n=/\$\{([a-zA-Z\-_0-9]+)\}/g,i=[];e=n.exec(t);)i.push(e[1]);return i},getParameter:function(t){return this.parameters[t]&&this.parameters[t][0]?this.parameters[t][0]:null},getParameters:function(t){return this.parameters[t]||null},handleJavascript:function(){var t=this.jQuery,e=this.getParameters("javascript_urls"),n=[];if(e){this.javascriptUrls=e;for(var i=0;i<e.length;i++)n.push(this._getLoadScriptDeferred(e[i]))}return t.when.apply(t,n)},_getLoadScriptDeferred:function(t){var e=this.jQuery.Deferred(),n=document.createElement("script");return n.setAttribute("src",t),n.onload=function(){e.resolve()},n.onerror=function(){e.reject('Url "'+t+"\" couldn't be loaded")},document.head.appendChild(n),e},handleStyling:function(t,e,n){var i=this.getParameter("content"),o=[this.baseURL+"frontend/src/lib/fancybox/jquery.fancybox.css"];i&&-1!==i.indexOf("bcLightboxTemplate")||o.push(this.baseURL+"frontend/src/css/lightbox.css");var r=this.getParameter("styling_css");r&&(this.stylingUrl=r,o.push(r));var a="";"true"===this.getParameter("custom_close")&&t&&(a+=".fancybox-close {background-image: url('"+t+"');background-repeat: no-repeat;background-position: center center;background-size: contain;}",e&&(a+=".fancybox-close:hover {background-image: url('"+e+"');background-repeat: no-repeat;background-position: center center;background-size: contain;}"));var c=this.getParameter("close_position"),s=this.getParameter("close_padding");a+=this._getClosePositionStyling(c,s);var l=this.getParameter("styling_css_inline");return l&&(a+=l.replace(/&#xd;/gi,"")),a&&(this.inlineCss=this.jQuery("<style>"+a+"</style>"),this.inlineCss.appendTo(this.jQuery("body"))),this._loadCssUrls(o,n)},_loadCssUrls:function(t,e){var n=(t=t||[]).length,i=0,o=[];if(0===n)return e();function urlLoaded(){if(++i>=n)return o.length>0?e(o):e()}t.forEach((function(t){if(document.querySelector('link[href="'+t+'"]'))urlLoaded();else{var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e.onload=urlLoaded,e.onerror=function(t){o.push(t),urlLoaded()},document.head.appendChild(e)}}))},_getClosePositionStyling:function(t,e){if(!t)return"";null!==e&&"NaN"!==e||(e="-18");var n=".fancybox-close {";switch(t){case"TOP_LEFT":n+="top:"+e+"px; right: unset; bottom: unset; left:"+e+"px;";break;case"BOTTOM_RIGHT":n+="top: auto; right: "+e+"px; bottom: "+e+"px; left: unset;";break;default:n+="top: "+e+"px; right: "+e+"px; bottom: unset; left: unset;"}return n+"}"}});var a = [];var i='lightboxinteractiontype';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.4.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.4.1/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.2/'},{ 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({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 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 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,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=r.form_listener_rules?r.form_listener_rules[0]:r.form_listener_rules;if(t){t=this.blueConicClient.json.parse(t),t=!Array.isArray(t)&&t.rules?t.rules:t;for(var i=new window.FormRuleService(this.blueConicClient,e,this.jQuery),o=0;o<t.length;o++)t[o].identifier=this.context.getInteractionId()+"_"+o;i.applyRules(t)}},getProfilePropertiesFromParameters:function(e){var r=[],t=e.form_listener_rules?e.form_listener_rules[0]:e.form_listener_rules;if(!t)return r;t=(t=this.blueConicClient.json.parse(t)).rules||t;for(var i=0;i<t.length;i++){var o=t[i];o.profileproperty&&"set_if_empty"===o.addset&&r.push(o.profileproperty[0].profileproperty)}return r}});var a = [];var i='listener_form_scraper';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.4/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 + '/1.2.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t},onLoad:function(){var e=this._profile=this.blueConicClient.profile.getProfile();if(e&&"GDPR"===e.getPrivacyLegislation()){var t=this._parameters=this.context.getParameters(),i=t.blockExistingProfiles&&"true"===t.blockExistingProfiles[0],n=i&&t.deleteExistingProfiles&&"true"===t.deleteExistingProfiles[0],s=e.isNew(),l=!s&&i&&0===e.getConsentedObjectives().length&&e.permission.getLevel()!==blueConicClient.permission.level.DO_NOT_TRACK;(s||l)&&this._handleDntAndDelete(s,l,n)}},_handleDntAndDelete:function(e,t,i){var n=this.context.getParameters();if(t&&i){var s=[];if(i&&n.segments&&(s=n.segments),s.length>0){for(var l=this.blueConicClient.getSegments(),o=!1,r=0;r<l.length;r++)!o&&s.indexOf(l[r].id)>-1&&(o=!0);this._setDNT(!o)}else this._setDNT(!0)}else this._setDNT(e)},_setDNT:function(e){e?(this._profile.permission.setLevel(this.blueConicClient.permission.level.DO_NOT_TRACK),this.blueConicClient.profile.updateProfile(),this._throwEvent()):this.blueConicClient.profile.createProfile(this,(function(){this._profile.permission.setLevel(this.blueConicClient.permission.level.DO_NOT_TRACK),this.blueConicClient.profile.updateProfile(this,(function(){this._throwEvent()}))}))},_throwEvent:function(){var e=this.context.getInteractionId();this.blueConicClient.createEvent("listener_gdpr_profile_delete_event",e,this,(function(e){}))}});var a = [];var i='listener_gdpr';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.5/'}]);})();(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 InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters(),this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId()),this.internalProperty="_"+this.context.getInteractionId(),this.BEHAVIOR={PAGEVIEW:"PAGEVIEW",SCROLL:"PAGESCROLL",CLICK:"CLICK",EVENT:"EVENT",FORM:"FORMSUBMIT"},this.SAVE_POINTS_EVENT="engagementRanker.savePoints",this.DEFAULT_RESTRICTION_OPERATOR="AND"},onLoad:function(){window._bcp.engagementRanker.$=this.jQuery,0!==this.preLoadProperties.length&&this._execute()},getPreloadProperties:function(){this.preLoadProperties=[];var e=this.parameters.storeInInterests&&this.parameters.storeInInterests[0]?this.blueConicClient.json.parse(this.parameters.storeInInterests[0]):[];return this.preLoadProperties=e.filter((function(e){return e.property})).map((function(e){return e.property+"_index"})),this.preLoadProperties},_execute:function(){var e=window._bcp.engagementRanker.util,t=window._bcp.engagementRanker.metadataService,i=e.getParameters(this.parameters);this._initExecuter(i);var n=i.restrictions||{rules:[]};if(t.checkRestrictions(n.rules,n.operator||this.DEFAULT_RESTRICTION_OPERATOR)){this._checkScoreProperties(),this._subscribeSavePointsListener();var r=this.parameters.keywordsSources&&this.parameters.keywordsSources[0]?this.blueConicClient.json.parse(this.parameters.keywordsSources[0]):[];return(r=r.filter((function(t){return e.getHandler(t.id)||console.log("Could not find handler for",t.id),t.selected&&e.getHandler(t.id)}))).forEach((function(e){this._executer.addToRulesMap(e)}),this),this.jQuery.when(this._executer.loadLibraries(r)).then(function(){return this._executer.addBindings()}.bind(this),(function(e){console.log("Failed to load libraries")}))}},_initExecuter:function(e,t){this._executer=new window._bcp.engagementRanker.Executer(this.blueConicClient,this.context,e,this.jQuery,this.baseURL,{postponeTimeout:this.postponeTimeout})},_subscribeSavePointsListener:function(){this.blueConicClient.event.subscribe(this.SAVE_POINTS_EVENT,this,(function(e,t){(t=t||e).internalProperty===this.internalProperty&&this._savePoints(t.changes)}))},_checkScoreProperties:function(){var e=this.blueConicClient.profile.getProfile(),t=!1;this.preLoadProperties.filter((function(t){return 0===e.getValues(t).length})).forEach((function(i){t=!0,e.setValue(i,"0")})),t&&this.blueConicClient.profile.updateProfile()},_savePoints:function(e){if(e&&e.length>0){var t=window._bcp.engagementRanker.util,i={TIME:(new Date).getTime(),days:t.getDays(this.blueConicClient.getCurrentDate()),data:e};this.blueConicClient.profile.getProfile().addValue(this.internalProperty,this.blueConicClient.json.stringify(i)),this.blueConicClient.profile.updateProfile()}}});var a = [];var i='listener_interest_ranker';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/Util.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/Executer.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/MetaKeywordRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/TextRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/UrlRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/MetadataService.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/frontend/src/js/JavascriptRanker.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.4/'}]);})();(function(){ 
var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b},onLoad:function(){var a=this.context.getProfile(),b=this.blueConicClient.getIPAddress();a.setValue("ip_address",b);this.blueConicClient.profile.updateProfile()}});
var a = [];var i='listener_ip_address';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_ip_address/ts_1543ef9062675c92043f20ec509425db/'}]);})();(function(){ 
var InteractionTypeImpl=InteractionType.extend({init:function(a,c){this.blueConicClient=a;var b=c.getParameters();b.selector&&b.selector[0]&&(this.selector=b.selector[0]);if(b.urlRestriction&&b.urlRestriction[0])try{this.urlRestriction=new RegExp(b.urlRestriction[0])}catch(d){a.util.log("[ERROR] "+d.message)}this._playFired={};0<document.querySelectorAll(this.selector).length?this._bindMediaEvents():this.blueConicClient.position.subscribe(this.selector,this,this._bindMediaEvents)},_onEnded:function(a){a=
a.target.getAttribute("src");this._playFired[a]&&(this.urlRestriction&&!this.urlRestriction.test(a)||this.blueConicClient.createEvent("media:ended"))},_onPlaying:function(a){a=a.target.getAttribute("src");this._playFired[a]||this.urlRestriction&&!this.urlRestriction.test(a)||(this.blueConicClient.event.publish("media:play"),this._playFired[a]=!0)},_bindMediaEvents:function(){document.querySelectorAll(this.selector).forEach(function(a){a.addEventListener("ended",this._onEnded.bind(this));a.addEventListener("playing",
this._onPlaying.bind(this))},this)}});
var a = [];var i='listener_media';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_media/ts_050a97dd195d3aaef6ab94f8306f549d/'}]);})();(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.util.array.ensureArray(b.excludedKeywords),e=this.blueConicClient.json.parse(c)[0].profileproperty,f=[],g=document.getElementsByTagName("meta");if(g)for(var h=!1,j=0,k=g.length;j<k;j++)if("news_keywords"===g[j].name.toLowerCase()){var l=g[j].content.split(",");0===l.length||1===l.length&&""===l[0]||(f=l,h=!0)}else h||0!==f.length||"keywords"!==g[j].name.toLowerCase()||(f=g[j].content.split(","));if(0<f.length){for(var m,n={TIME:new Date().getTime(),days:this.days,points:1,keywords:[]},o=0;o<f.length;o++)m=this._trim(f[o]),""!==m&&-1===this.blueConicClient.util.array.indexOfArray(d,m)&&n.keywords.push(m);0<n.keywords.length&&(a.addValue("_hl_"+e,this.blueConicClient.json.stringify(n)),this.blueConicClient.profile.updateProfile())}}},_trim:function(a){return a.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.6/'}]);})();(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.6/'}]);})();(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 s=this.blueConicClient.getCurrentDate().getTime(),E=this._profile.getValue(this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE),r=0,R=0,I=0;Object.keys(i).map((function(e){return e.toString()})).forEach((function(_){var n=i[_];this._isSessionExpired(n.enddate)?this._addVisit(n,n.enddate-n.startdate):_===e?n.enddate=s:_===t&&E!==t&&(n.enddate=s,this._profile.setValue(this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE,t)),0!==n.averageTime&&(R++,r+=n.averageTime,I+=n.averageTime*n.visits)}),this),this._profile.setValue(this.PROFILE_PROPERTIES.HOSTAVERAGETIME,JSON.stringify(i)),this._profile.setValue(this.PROFILE_PROPERTIES.TOTALVISITTIME,I);var _=R>0?Math.round(r/R):0;this._profile.setValue(this.PROFILE_PROPERTIES.AVERAGETIME,_)},_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 s=this.blueConicClient.getCurrentDate().getTime();e.startdate=s,e.enddate=s},_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(){var e=this._getNumberProperty(this.PROFILE_PROPERTIES.CLICKCOUNT);if(this._profile.setValue(this.PROFILE_PROPERTIES.CLICKCOUNT,e+1),this._channelId){var t=this._getNumberProperty(this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT);this._profile.setValue(this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT,t+1)}},_isNewSession:function(e,t){e=e||this.PROFILE_PROPERTIES.VISITS,t=t||this.PROFILE_PROPERTIES.LASTVISITDATE;var i=this._getNumberProperty(e),s=this._getNumberProperty(t)||0;return 0===i||this._isSessionExpired(s)},_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;var t=this._getNumberProperty(e);this._profile.setValue(e,t+1)},_increaseSessionCount:function(e){e=e||this.PROFILE_PROPERTIES.VISITS;var t=this._getNumberProperty(e);this._profile.setValue(e,t+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)||"",s=this._profile.getValues(this.PROFILE_PROPERTIES.ENTRYPAGE)||[];i&&(e="PC"===i?this.ORIGIN_TYPES.WEB:this.ORIGIN_TYPES.MOBILE_WEB);var E=1===t.length?t[0]:this.CONSTANTS.UNKNOWN,r=1===s.length?s[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(e,E,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,s=1===t.length?t[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(this.ORIGIN_TYPES.CONNECTION,i,s)},_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,s=1===t.length?t[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(this.ORIGIN_TYPES.MOBILE,i,s)},_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 s=this.search_engines[i];t.compile("^http(s?)://(www\\.)?"+s[0],"i");var E=e.match(t);if(E){var r;if(r=isNaN(s[1])?this._getParameterByName(e,s[1]):E[s[1]+1])return r=decodeURIComponent(r),s.length>2&&s[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.2.1/'}]);})();(function(){ 
var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b||null},onLoad:function(){}});
var a = [];var i='property_value_converter';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/property_value_converter/ts_f4346ab5b064bb4aa83c0348559e5345/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({open:!1,data:{},nrOfTries:0,closeButtonWidth:10,borderWidth:1,BASE_CSS_ID_PREFIX:"bcBaseStyle_",INLINE_CSS_ID_PREFIX:"bcInlineStyle_",EXTERNAL_CSS_ID_PREFIX:"bcExternalStyle_",html:{nl:{content:"<p>Inhoud</p>"},"default":{content:"<p>Content</p>"}},init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters(),this._variantId=this.context.getInteractionId(),this._viewEventThrown=!1,this._manuallyClosed=!1,this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId())+"frontend/src/",this.customCssUrls=[],this.customJsUrls=[],this.inlineCss=null,this.inlineJs=null,this._timestamp=null,this._observer=null,this._eventListenerFunction=null,this.isInEditMode=this.blueConicClient.isInEditMode(),this.clickTrigger=!1,this.blueConicClient._renderedInteractions=this.blueConicClient._renderedInteractions||[],this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){if(this.open){this.domUtils.removeNode(this._getToasterNode()),this._removeToasterStyling();var e=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(e,1),this.open=!1}}))},getPreloadProperties:function(){for(var e,t=this.context.getParameters().content+"",i=/data-bc-preload="([^"]*)"/g,s=[];null!==(e=i.exec(t));)for(var o=e[1].split(","),n=0;n<o.length;n++)s.push(o[n]);return s||[]},onMessageReceived:function(e){this.blueConicClient.event.publish("toaster.messageReceived",e)},onSave:function(){return this._getNodeWithinToaster(".bcToasterContent")[0].innerHTML},onLoad:function(e){"function"!=typeof e&&(e=function(){}),window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery,this.domUtils=window.bc.BlueConicDomUtilities;var t=this,i=this.getParameter("content"),s=i&&-1!==i.indexOf("bcToasterTemplate")?"_clean":"",o=this.getParameter("version"),n="";n=s||"3"!==o?"css/toaster"+s:"css/toaster_v3",n+=".css";var r=this.domUtils.createNodeFromHtml('<link type="text/css" id="'+this.BASE_CSS_ID_PREFIX+this._variantId+'" href="'+this.baseURL+n+'" rel="stylesheet" />'),a=this.getParameter("template");this.template=a,r.addEventListener("load",(function(){t.handleStyling(t.getParameter("close_icon"),t.getParameter("close_icon_hover"),(function(i){if(i&&(console.error(i.message),!t.isInEditMode))return t._removeUrls(),e(i.message);t.handleJavascript((function(i){return i&&(console.error(i.message),!t.isInEditMode)?(t._removeUrls(),e(i.message)):(t.loadToaster(),e())}))}))})),document.head.appendChild(r)},loadToaster:function(){var e=this.context.getParameters();if(!this.domUtils.nodeHasClassName(this._getToasterNode(),"bcToasterOpen")){this._getToasterNode()&&this.domUtils.removeNode(this._getToasterNode());var t=this.getParameter("close_icon");t&&(this._closeIcon=t);var i=this.getParameter("close_icon_hover");i&&(this._closeIconHover=i);var s=this;if(this._addContent(e,this.jQuery),this._getNodeWithinToaster(".bcClose")[0].addEventListener("click",(function(){s._manuallyClosed=!0,s._hideToaster()})),this.emptyElementsWithAttribute(this._getToasterNode(),"div","data-bc-external"),this.handleComplexElements(this._getToasterNode()),this.positionDivs(),this.isInEditMode)s._showToaster();else{var o=[],n=0,r=this.getParameter("triggerWhen");r?(n=100,o.push(this._convertWhenSettingPreviousToasterVersion(r))):(o=e.selected_when&&0!==e.selected_when.length?e.selected_when:["onPageLoad"],n=e.scroll_depth&&e.scroll_depth[0]&&!isNaN(e.scroll_depth[0])?parseInt(e.scroll_depth[0]):0);for(var a=this.getParameter("click_selector"),l=this.getParameter("content_condition"),c=0;c<o.length;c++)switch(o[c]){case"click_selector":this._addClickTriggerBindings(a);break;case"content_condition":this._addContentPolling(l);break;case"scroll_depth":this._addScrollBinding(n);break;case"triggerOn":this._addScrollOn(s);break;default:s._checkDelayBeforeTrigger()}this._setupFrontEndBindings()}}},_setupFrontEndBindings:function(){var e=this,t=document.querySelectorAll(".bcToasterDontShowAgainLink"),i=document.querySelectorAll(".bcToasterCloseButton");if(t.length>0){var linksClickHandler=function(e){e.preventDefault(),this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),this._hideToaster()};Array.prototype.forEach.call(t,(function(t){t.removeEventListener("click",linksClickHandler),t.addEventListener("click",linksClickHandler.bind(e))}))}if(i.length>0){var buttonClickHandler=function(){e._hideToaster()};Array.prototype.forEach.call(i,(function(t){t.removeEventListener("click",buttonClickHandler),t.addEventListener("click",buttonClickHandler.bind(e))}))}this._addCloseEventHandler()},_convertWhenSettingPreviousToasterVersion:function(e){switch(e){case"scroll":return"triggerOn";case"reachedBottom":return"scroll_depth";default:return"onPageLoad"}},_addCloseEventHandler:function(){this.blueConicClient.event.subscribe("closeoverlay",this,(function(e,t){t instanceof Array&&t[0]===this.context.getInteractionId()&&this._hideToaster()}))},_addScrollOn:function(e){window.addEventListener("scroll",(function(){e._checkDelayBeforeTrigger()}))},_checkScrollCondition:function(e){this.jQuery(window).scrollTop()/(this.jQuery(document).height()-window.innerHeight)*100>=e&&this._checkDelayBeforeTrigger()},_addScrollBinding:function(e){this._checkScrollCondition(e);window.addEventListener("scroll",function(){this._checkScrollCondition(e)}.bind(this))},_addClickTriggerBindings:function(e){try{var t=this.jQuery(e);if(this.clickTrigger=!0,t.length>0){t.off("click").on("click",function(){this._getToasterNode()?this._checkDelayBeforeTrigger(!0):this.open||this._setupToasterBeforeToShow()}.bind(this))}else this.blueConicClient.position.subscribe(e,this,this._addClickTriggerBindings.bind(this,e))}catch(i){}},_setupToasterBeforeToShow:function(){this.handleStyling(this.getParameter("close_icon"),this.getParameter("close_icon_hover"),(function(){})),this.handleJavascript((function(){})),this._addContent(null,this.jQuery);var e=this;Array.prototype.forEach.call(this._getNodeWithinToaster(".bcClose"),(function(t){t.addEventListener("click",(function(){e._hideToaster()}))})),this.clickTrigger=!0,this._checkDelayBeforeTrigger()},_getNodeWithinToaster:function(e){try{var t=this._getToasterNode();if(t)return t.querySelectorAll(e)}catch(i){return void console.error(i)}},_isToasterContentWidthZero:function(){return 0===parseFloat(getComputedStyle(this._getNodeWithinToaster(".bcToasterContent")[0],null).width.replace("px",""))},_getToasterNode:function(){try{return document.getElementById(this._variantId)}catch(e){return void console.error(e)}},_addContentPolling:function(e){this._checkContentCondition(e);var t=this,i=document.getElementsByTagName("body")[0];if(window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)this._observer=new MutationObserver((function(){t._observeContentChanges(e)})),this._observer.observe(i,{childList:!0,subtree:!0});else if(window.addEventListener)this._eventListenerFunction=function(){t._observeContentChanges(e)},i.addEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else var s=setInterval((function(){t.open?clearInterval(s):t._checkContentCondition(e)}),500)},_observeContentChanges:function(e){if(this.open){this._observer?this._observer.disconnect():document.getElementsByTagName("body")[0].removeEventListener("DOMNodeInserted",this._eventListenerFunction,!1)}else{var t=this,i=(new Date).getTime();this._timestamp=i,setTimeout((function(){t._timestamp!==i||t.open||t._checkContentCondition(e)}),250)}},_checkContentCondition:function(e){var t=this.jQuery(e);t.length>0&&t.html()&&t.html().length>0&&this._checkDelayBeforeTrigger()},_addContent:function(e,t){var i=this.getParameter("content");if(i&&-1!==i.indexOf("<body></body>")&&(i=""),!i){var s="nl"===this.context.getLocale()?"nl":"default";i=this.html[s].content}var o=t(i=this.template?'<div class="bcToaster" id="'+this._variantId+'" style="visibility:hidden;"><div class="bcCloseWrapper"><div class="bcClose"><div></div></div></div><div class="bcToasterContent bcTemplateContent">'+i+"</div></div>":'<div class="bcToaster" id="'+this._variantId+'" style="visibility:hidden;"><div class="bcCloseWrapper"><div class="bcClose"><div></div></div></div><div class="bcToasterContent">'+i+"</div></div>"),n=this.getParameter("close_icon");"true"===this.getParameter("custom_close")&&n?this.domUtils.removeClassNames(o.get(0),["bcDefaultClose"]):this.domUtils.appendClassNames(o.get(0),["bcDefaultClose"]);try{o.appendTo(t("body"))}catch(r){this.isInEditMode&&console.error("Error caught: "+r)}},handleComplexElements:function(e){for(var t=this.getElementsWithAttribute(e,"div","data-bc-pluginid"),i=0;i<t.length;i++){var s=t[i],o=s.getAttribute("data-bc-pluginid"),n=s.getAttribute("data-bc-config");if(n)try{var r=n.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t");n=this.blueConicClient.json.parse(r)}catch(a){n=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:n,node:s,interactionId:this.context.getInteractionId()}),this.isInEditMode||(s.removeAttribute("data-bc-pluginid"),s.removeAttribute("data-bc-config"))}},emptyElementsWithAttribute:function(e,t,i){for(var s=this.getElementsWithAttribute(e,t,i),o=0,n=s.length;o<n;o++){s[o].innerHTML=""}},getElementsWithAttribute:function(e,t,i){for(var s=[],o=e.getElementsByTagName(t),n=0,r=o.length;n<r;n++){var a=o[n];a.getAttribute(i)&&s.push(a)}return s},_positionFromPerpendicularEdge:function(){var e=this.getParameter("location")||"right",t=this.getParameter("pixelsFrom")?this.getParameter("pixelsFrom"):"",i=this.getParameter("locationFrom")?this.getParameter("locationFrom"):"left_or_top";if(this.getParameter("locationFrom")||this.getParameter("version")||(i="right_or_bottom"),t||0===t){var s="left"===e||"right"===e?"left_or_top"===i?"top":"bottom":"left_or_top"===i?"left":"right";this._getToasterNode().style[s]=t+"px"}else{var o=this._getNodeWithinToaster(".bcToasterContent")[0].getBoundingClientRect();if("left"===e||"right"===e){var n=window.innerHeight||document.documentElement.clientHeight,r=o.height||o.bottom-o.top;this._getToasterNode().style.top=Math.max((n-r)/2,0)+"px"}else{var a=window.innerWidth||document.documentElement.clientWidth,l=o.width||o.right-o.left;this._getToasterNode().style.left=Math.max((a-l)/2,0)+"px"}}this._getToasterNode().style[e]="0px"},positionDivs:function(){var e=this.getParameter("location")||"right",t=this._getShowClose();this._positionFromPerpendicularEdge(),"left"===e?(this.domUtils.removeClassNames(this._getToasterNode(),["bcRight","bcTop","bcBottom"]),this.domUtils.appendClassNames(this._getToasterNode(),["bcLeft"])):"right"===e?(this.domUtils.removeClassNames(this._getToasterNode(),["bcLeft","bcTop","bcBottom"]),this.domUtils.appendClassNames(this._getToasterNode(),["bcRight"])):"top"===e?(this._getNodeWithinToaster(".bcToasterContent")[0].insertAdjacentElement("afterend",document.querySelector(".bcToaster .bcCloseWrapper")),this.domUtils.removeClassNames(this._getToasterNode(),["bcRight","bcLeft","bcBottom"]),this.domUtils.appendClassNames(this._getToasterNode(),["bcTop"])):(this.domUtils.removeClassNames(this._getToasterNode(),["bcRight","bcLeft","bcTop"]),this.domUtils.appendClassNames(this._getToasterNode(),["bcBottom"])),t?this.domUtils.appendClassNames(this._getToasterNode(),["bcShowClose"]):this.domUtils.removeClassNames(this._getToasterNode(),["bcShowClose"])},handleStyling:function(e,t,i){var s="",o=[];if(this._getShowClose()?this.domUtils.appendClassNames(this._getToasterNode(),["bcShowClose"]):this.domUtils.removeClassNames(this._getToasterNode(),["bcShowClose"]),"true"===this.getParameter("custom_close")&&e){this.domUtils.removeClassNames(this._getToasterNode(),["bcDefaultClose"]),s+=".bcToaster .bcClose > div { background-image: none;}";var n=".bcToaster .bcClose {background-image: url('"+e+"');background-repeat: no-repeat;background-color: transparent;",r=".bcToaster .bcClose:hover {background-image: url('"+t+"');";"3"===this.getParameter("version")?(s+=n+"background-position: center center;background-size: contain;}",t&&(s+=r+"}")):(s+=n+"}",t?s+=r+"background-position: 0px 0px;}":document.querySelectorAll(".bcToaster .bcClose:hover")[0].style.backgroundPosition="")}else this.domUtils.appendClassNames(this._getToasterNode(),["bcDefaultClose"]);var a=this.getParameter("close_position"),l=this.getParameter("close_padding");s+=this._addClosePositionStyling(a,l);var c=this.getParameter("styling_css");c&&(this.stylingUrl=c,this.customCssUrls.push(c),o.push(c));var h=this.getParameter("styling_css_inline");h&&(s+=h.replace(/&#xd;/gi,"")),s&&(this.inlineCss=this.domUtils.createNodeFromHtml("<style id='"+this.INLINE_CSS_ID_PREFIX+this._variantId+"'>"+s+"</style>"),document.head.appendChild(this.inlineCss)),this._loadCss(o,i)},_loadCss:function(e,t){var i=(e=e||[]).length,s=0,o=[];if(this.errorList=null,void 0===t&&(t=function(){}),0===i)return t();function urlLoaded(e){if(++s>=i)return o.length>0?t({message:"Error occured when loading the file "+e,error:o}):t()}e.forEach((function(e){if(document.querySelector('link[href="'+e+'"]'))urlLoaded();else{var t=document.createElement("link");t.setAttribute("href",e),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.onload=urlLoaded,t.onerror=function(t){o.push(t),urlLoaded(e)},document.head.appendChild(t)}}))},_loadJs:function(e,t){var i=(e=e||[]).length,s=0,o=[];if(this.errorList=null,void 0===t&&(t=function(){}),0===i)return t();function urlLoaded(e){if(++s>=i)return o.length>0?t({message:"Error occured when loading the file "+e,error:o}):t()}e.forEach((function(e){if(document.querySelector('script[src="'+e+'"]'))urlLoaded();else{var t=document.createElement("script");t.setAttribute("src",e),t.setAttribute("type","text/javascript"),t.onload=urlLoaded,t.onerror=function(t){o.push(t),urlLoaded(e)},document.head.appendChild(t)}}))},_removeUrls:function(){var e=this;this.customCssUrls.forEach((function(t){t&&e.domUtils.removeNode(document.querySelector('link[href="'+t+'"]'))})),this.customJsUrls.forEach((function(t){t&&e.domUtils.removeNode(document.querySelector('script[src="'+t+'"]'))}))},handleJavascript:function(e){var t=this.getParameters("javascript_urls");this.customJsUrls=t,null===this.customJsUrls&&(this.customJsUrls=[]),this._loadJs(this.customJsUrls,e)},_getShowClose:function(){var e=!1,t=this.getParameter("show_close");return"true"===t||"false"===t||!0===t||!1===t?"true"===t||!0===t:(e=!!this.getParameter("close")&&"showClose"===this.getParameter("close"),this.getParameter("showClose")&&(e=!0),e)},_hideToaster:function(){if(!this.isInEditMode){var e=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(e,1);var t="true"===this.getParameter("hide_after_close"),i=this._getNodeWithinToaster(".bcToasterContent")[0].getBoundingClientRect(),s=this.getParameter("location")||"right",o=this._getShowClose(),n="left"===s||"right"===s?i.width:i.height;this._setToasterEffect(!0,o,n),t&&this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),window.setTimeout(function(){this._removeToasterStyling(),this.domUtils.removeClassNames(this._getToasterNode(),["bcDefaultClose"]),this.clickTrigger&&(this.open=!1)}.bind(this),501)}},_removeToasterStyling:function(){this.domUtils.removeNode(this._getBaseCssReference()),this.domUtils.removeNode(this._getInlineCssReference()),this._externalStylesheetReference&&this.domUtils.removeNode(this._externalStylesheetReference)},_getBaseCssReference:function(){return document.querySelector("#"+this.BASE_CSS_ID_PREFIX+this._variantId)},_getInlineCssReference:function(){return document.querySelector("#"+this.INLINE_CSS_ID_PREFIX+this._variantId)},_checkDelayBeforeTrigger:function(e){var t=this.context.getParameters(),i=t.delay&&t.delay[0]&&!isNaN(t.delay[0])?1e3*parseInt(t.delay[0]):0;if(i>0){window.setTimeout(function(){this._showToaster(e)}.bind(this),i)}else this._showToaster(e)},_showToaster:function(e){var t=this;if(!this._manuallyClosed||this.isInEditMode||e){if(this._getNodeWithinToaster(".bcToasterContent")&&this._isToasterContentWidthZero()&&!e){if(this.nrOfTries>10)return;return this.nrOfTries++,void setTimeout((function(){t._showToaster(e)}),500)}if(!this.open){if(-1!==this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId()))return;this.blueConicClient._renderedInteractions.push(this.context.getInteractionId()),this.isInEditMode||this._viewEventThrown||(this._viewEventThrown=!0,this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()));var i=this._getShowClose();this.positionDivs(),this._getToasterNode().style.visibility="visible",this._getToasterNode().style.display="block",this.domUtils.appendClassNames(this._getToasterNode(),["bcToasterOpen"]);window.addEventListener("resize",function(){this.positionDivs()}.bind(this));var s=this.getParameter("click_event_selector");if(s){this.jQuery("body").one("click",s,function(e){this.lastClickEvent&&this.lastClickEvent.originalEvent===e.originalEvent||this._logClickEvent(e)}.bind(this));try{this.jQuery(s).one("click",function(e){this.lastClickEvent=e,this._logClickEvent(e)}.bind(this))}catch(r){}}this._setToasterEffect(!1,i);var o=t.getParameter("javascript");if(this.inlineJs=o,o&&!t.isInEditMode){o=o.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+t.context.getInteractionId()+'"$2');var n=this.domUtils.createNodeFromHtml("<script>"+o+"<\/script>");try{this.jQuery("body").append(n)}catch(a){console.error(a)}}this.open=!0,this.isInEditMode&&this.blueConicClient.event.publish("toaster.interactionLoaded",{interaction:this})}}},_logClickEvent:function(e){e&&e.originalEvent&&e.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId()||(e&&e.target&&e.target.pathname&&e.target.hostname&&0===e.target.pathname.indexOf("/s/")&&-1!==e.target.hostname.indexOf("blueconic")||(e.originalEvent&&(e.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId())))},_setToasterEffect:function(e,t,i){var s={},o=this.getParameter("location")||"right",n=t?this.closeButtonWidth+this.borderWidth:this.borderWidth,r=this.getParameter("effect");r||this.getParameter("version")||(r="slideIn");var a=this.getParameter("effect_slide_direction")||"left";s[o]="-"+(i+n)+"px";var l=r+"_"+a===this._effect;this.isInEditMode&&l&&(r="noEffect");var c=this;if(r&&"noEffect"!==r){var h=this.jQuery(this._getToasterNode());if("fadeIn"!==r||e)if("fadeIn"===r&&e)h.fadeOut(500);else if("slideIn"!==r||e)"slideIn"===r&&e&&h.animate(s,500,(function(){c._getToasterNode().style.display="none"}));else{s[o]="0px";var d=this._getNodeWithinToaster(".bcToasterContent")[0].getBoundingClientRect(),u="left"===o||"right"===o?d.width:d.height;this._getToasterNode().style[o]="-"+(u+n)+"px",h.animate(s,500,(function(){c.domUtils.appendClassNames(c._getToasterNode(),["bcToasterOpen"])}))}else h.hide(),h.fadeIn(500,(function(){c.domUtils.appendClassNames(c._getToasterNode(),["bcToasterOpen"])}))}else e&&(this._getToasterNode().style.display="none")},_addClosePositionStyling:function(e,t){var i="3"===this.getParameter("version");if(!e||!i)return"";null!==t&&"NaN"!==t||(t="5");var s=".bcToaster .bcClose {";switch(e){case"TOP_LEFT":s+="top:"+t+"px; right: unset; bottom: unset; left:"+t+"px;";break;case"BOTTOM_RIGHT":s+="top: unset; right: "+t+"px; bottom: "+t+"px; left: unset;";break;default:s+="top: "+t+"px; right: "+t+"px; bottom: unset; left: unset;"}return s+="}"},getParameter:function(e){return this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:null},getParameters:function(e){return this.parameters[e]||null}});var a = [];var i='toaster';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.1.4/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.1.4/frontend/src/node_modules/@blueconic/dom_utils/src/index.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.1.4/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.2/'},{ 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({fallbackLabels:{article:{noStore:{nl:{name:"Titel van het artikel (Bron nog niet geselecteerd)",description:"Beschrijving van het artikel (Bron nog niet geselecteerd)"},"default":{name:"Title of the article (source not yet selected)",description:"Description of the article (source not yet selected)"}},noItems:{nl:{name:"Titel van het artikel (aanbevolen artikelen nog niet beschikbaar)",description:"Beschrijving van het artikel (aanbevolen artikelen nog niet beschikbaar)"},"default":{name:"Title of the article (recommended articles not yet available)",description:"Description of the article (recommended articles not yet available)"}}},product:{noStore:{nl:{name:"Titel van het product (Bron nog niet geselecteerd)",description:"Beschrijving van het product (Bron nog niet geselecteerd)"},"default":{name:"Title of the product (source not yet selected)",description:"Description of the product (source not yet selected)"}},noItems:{nl:{name:"Titel van het product (aanbevolen producten nog niet beschikbaar)",description:"Beschrijving van het product (aanbevolen producten nog niet beschikbaar)"},"default":{name:"Title of the product (recommended products not yet available)",description:"Description of the product (recommended products not yet available)"}}}},init:function(e,t){this.blueConicClient=e,this.profile=e.profile.getProfile(),this._templatesLoaded=[],this.baseURL=this.blueConicClient.getBaseURL(t.getInteractionTypeId()),this.context=t,this.locale=t.getLocale(),this.pluginId=t.getInteractionTypeId();var i=this;this.blueConicClient.event.subscribe("bcComplexObject",this,(function(e,t){t&&t.plugin===i.pluginId&&(t.config.interactionId=t.interactionId,this.blueConicClient.isInEditMode()||(t.config.id=(new Date).getTime()+Math.round(1e3*Math.random())),this.type="toolbar_content_recommendations"===t.plugin?"article":"product",i._setUniqueId(t.node,t.config.id),i._applyTemplate(t))})),this.blueConicClient.isInEditMode()&&this._subscribeEditModeEvents()},_subscribeEditModeEvents:function(){this.blueConicClient.event.subscribe("recommendations.updateTemplate",this,(function(e,t){if(t.message.pluginId===this.pluginId){var i=this._createTemplateObject(t.message.template);this._addTemplateToCache(i),this._applyTemplate({update:!0})}})),this.blueConicClient.event.subscribe("recommendations.updateConfig",this,(function(e,t){if(t.message.pluginId===this.pluginId){var i=this._migration(t.message.config);(i=i||{}).settings=i.settings||{};var n=this._getProperties(i);i["data-bc-template-id"]=i.settings.templateId||"";var a='[data-bc-pluginid="'+this.pluginId+'"][data-bc-config*="'+i.id+'"]';if(document.querySelector(a).setAttribute("data-bc-config",JSON.stringify(i)),n.length>0)document.querySelector(a).setAttribute("data-bc-preload",n.join(","));var r=document.querySelector(".bcComplexObject"+i.id);if(this.profile.loadValues(n,this,(function(){this._applyTemplate({config:i,node:r})})),window.CKEDITOR&&window.CKEDITOR.instances&&Object.keys(window.CKEDITOR.instances).length>0)window.CKEDITOR.instances[Object.keys(window.CKEDITOR.instances)[0]].fire("change")}})),this.blueConicClient.event.subscribe("editorClosed",this,(function(){this._sendMessage("recommendations.closeConfigurator")}))},_getProperties:function(e){return e&&e.rules?e.rules.reduce((function(e,t){return t&&t.metaDataFilters&&(e=e.concat(Array.prototype.map.call(Array.prototype.filter.call(t.metaDataFilters,(function(e){return e.property})),(function(e){return e.property})))),e}),[]):[]},_setUniqueId:function(e,t){if(e&&t){var i="bcComplexObject"+t;e.className=[e.className,i].join(" ")}},_applyTemplate:function(e){var t=this._migration(e.config);(t=t||{}).settings=t.settings||{};var i=t.settings.templateId;if(i){var n=".bcComplexObject"+t.id;document.querySelector(n).innerHTML="";var a=this;this._loadTemplate(i,(function(t){e.update||a._loadHTML(e,t)}))}},_getLabelObject:function(e){return"nl"===this.locale?this.fallbackLabels[this.type][e].nl:this.fallbackLabels[this.type][e]["default"]},_getFallbackData:function(e,t){for(var i=this._getLabelObject(e),n=[],a=0;a<t;a++)n.push({name:[i.name],description:[i.description],image:[this.baseURL+"frontend/src/node_modules/@blueconic/frontend-recommendations-rendering/images/fallback600x600.png?"]});return n},_initMetaDataService:function(e){var t=null;if(e){var i=this.context.getConnection(e);if(i){var n=i.getParameters().metadata;t=n?this.blueConicClient.json.parse(n):null}}this._metaDataService=new window.BlueConicMetaDataService(this.jQuery,t,this.type),this._metaDataService.blueConicClient=this.blueConicClient},_getItems:function(e){var t=this.jQuery;this._initMetaDataService(e.settings.connectionId||e["data-bc-connection-id"]);var i=t.Deferred(),n=this._getCount(e),a=this._getQueryStringParametersForRecommendations(e);return a.storeId?this.blueConicClient.recommendation.getRecommendations(a,function(e){var t=e.getItems();(t=t.slice(0,n))&&0!==t.length||!this.blueConicClient.isInEditMode()?i.resolve(t):i.resolve(this._getFallbackData("noItems",n))}.bind(this)):i.resolve(this._getFallbackData("noStore",n)),i},_loadHTML:function(e,t){if(t){var i=e.node,n=this._migration(e.config);this._handleStyling(n,t);var a=this._getWidthClass(i),r=document.createElement("div");return r.className=a,r.setAttribute("data-bc-external","true"),r.setAttribute("data-bc-id",n.id),this._getItems(n).then(function(e){return this._handleItems(e,n,t,r)}.bind(this))}},_handleItems:function(e,t,i,n){if(0!==e.length){var a=this._getDataObject(e,t.interactionId);this._renderTemplate(a,i,n);var r=this._addItemNodes(n,e,t);r&&r.appendChild(n),this.blueConicClient.isInEditMode()||this._bindClicks(n,e[0].recommendationId,t),this._addImageErrorHandler(n,t),this._addJavaScript(i);var s=document.querySelector(".bcComplexObject"+t.id);this._addOnResizeHandler(s,n)}else for(var o=document.querySelector(".bcComplexObject"+t.id);o.firstChild;)o.removeChild(n.firstChild)},_renderTemplate:function(e,t,i){if(e&&t&&window.Mustache){for(var n=t.getHtml().replace(/<img\s+src=(['"]{{image}}['"])/,"<img data-bc-src=$1"),a=window.Mustache.to_html(n,e);i.firstChild;)i.removeChild(i.firstChild);var r=document.createElement("div");r.innerHTML=a,i.appendChild(r),Array.prototype.forEach.call(i.querySelectorAll("img[data-bc-src]"),function(e){var t=e.getAttribute("data-bc-src"),i=e.getAttribute("width");isNaN(i)||null===i||(t+="&width="+i);var n=e.getAttribute("height");isNaN(n)||null===n||(t+="&height="+n),e.setAttribute("src",t),e.removeAttribute("data-bc-src")}.bind(this))}},_addItemNodes:function(e,t,i){var n=document.querySelector(".bcComplexObject"+i.id);if(n&&n.firstChild)for(;n.firstChild;)n.removeChild(n.firstChild);for(var a=0;a<t.length;a++)if(t[a].ID&&t[a].URL)for(var r=e.querySelectorAll('a[href^="'+t[a].URL+'"]'),s=0;s<r.length;s++)r[s].setAttribute("data-bc-item-id",t[a].ID);return n},_addJavaScript:function(e){var t=e.getJavaScript();if(t){var i=document.createElement("script");i.type="text/javascript",i.appendChild(document.createTextNode(t));var n=document.getElementsByTagName("head")[0]||document.documentElement;try{n.insertBefore(i,n.firstChild)}catch(a){console.error(a)}}},_addOnResizeHandler:function(e,t){var i=function(){if(e&&t){for(var i=t.getAttribute("class").split(" "),n=this._getWidthClass(e),a=[n],r="",s=0;s<i.length;s++)-1===i[s].search("^bcp.*Width$")?a.push(i[s]):r=i[s];r!==n&&(t.className=a.join(" "))}}.bind(this);window.addEventListener("resize",(function(){i()}))},_addImageErrorHandler:function(e,t){(t=t||{}).settings=t.settings||{};var i=t.settings.storeId;e.addEventListener("error",function(e){if("IMG"===e.target.tagName){var t=e.target,n=t.getAttribute("src");if(t.style.display="none",!n)return;var a=this.blueConicClient.getHostname();if(-1===n.indexOf(a+"/rest/contentStores/"+i+"/items/"))return;Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(this))return null;do{if(t.matches(e))return t;t=t.parentElement}while(null!==t);return null};var r=t.closest("a[data-bc-item-id]");if(0===r.length)return;var s=r.getAttribute("data-bc-item-id"),o=r.getAttribute("href");if(!s||!o)return;var l=encodeURIComponent(encodeURIComponent(s));if(-1===n.indexOf("/items/"+l+"/image"))return;this.blueConicClient.recommendation.createEvent({itemId:s,url:o,storeId:i,lastmodified:(new Date).getTime()})}}.bind(this),!0)},_getWidthClass:function(e){return e?e.clientWidth<=480?"bcpSmallWidth":e.clientWidth>=1024?"bcpMaxWidth":"bcpDefaultWidth":""},_getUrl:function(){var e=document.querySelector('meta[property="og:url"]'),t=document.querySelector('link[rel="canonical"]');return(e.getAttribute("content")||t.getAttribute("href")||window.location.protocol+"//"+window.location.host+window.location.pathname).split("?")[0]},_getQueryStringParametersForRecommendations:function(e){(e=e||{}).settings=e.settings||{};var t={},i=e.settings.storeId;if(!i)return t;t.storeId=i,"No profile present and will not be created."!==this.profile.getId()&&(t.profileId=this.profile.getId());var n=this._getSettings(e);n.debug&&(t.debug=n.debug),n.frequencyCap&&(t.frequencyCap=n.frequencyCap);var a=this._metaDataService.getItemId(document.location.toString());return a&&(t.itemId=a),t.request=this._getRules(e),t},_getSettings:function(e){var t=e.settings||{};return{debug:Boolean(t.debug),frequencyCap:!t.useFrequencyCap||isNaN(t.frequencyCap)||this.blueConicClient.isInEditMode()?null:t.frequencyCap}},_getRules:function(e){return e.rules=e.rules||[],e.rules.map((function(e){return{id:e.isFallback?"default":e.id,filters:this._getRuleFilters(e),boosts:this._getBoostFilters(e),count:e.isFallback?null:e.amount}}),this)},_getCount:function(e){return(e=e||{}).rules=e.rules||[],Array.prototype.filter.call(e.rules,(function(e){return!e.isFallback})).map((function(e){return e.amount||0})).reduce((function(e,t){return e+t}),0)},_getRuleFilters:function(e){var t=[];if(Array.isArray(e.filters)){var i=e.filters.map((function(e){var t="SHOW"===e.filterType&&"IN_STOCK"!==e.id?"_ONLY":"";return e.id+t}));t=t.concat(i)}return Array.isArray(e.metaDataFilters)&&e.metaDataFilters.forEach((function(e){t=t.concat(this._handleFilterRules(e,this._metaDataService)||[])}),this),t},_getBoostFilters:function(e){return e.algorithms.map((function(e){return e.rampUp||delete e.rampUp,e}))},_handleFilterRules:function(e,t){var i=[];switch(e.operatorSetting){case"MUSTNOTBEEMPTY":i.push("hasproperty:"+e.metaDataField);break;case"MUSTBEEMPTY":i.push("!hasproperty:"+e.metaDataField);break;case"CONTAINS":case"DOESNOTCONTAIN":case"CONTAINSALL":case"DOESNOTCONTAINALL":var n=this._handleListRules(e,t);i=i.concat(n);break;case"AFTER":case"BEFORE":case"BETWEEN":var a=this._handleDateRules(e);i=i.concat(a)}return i},_handleListRules:function(e,t){var i=this._getValues(e,t,t.getMetaDataFields());if(0===i.length)return[];var n=[];switch(e.operatorSetting){case"CONTAINS":n=[e.metaDataField+':"'+i.join('","')+'"'];break;case"DOESNOTCONTAINALL":n=["!"+e.metaDataField+':"'+i.join('","')+'"'];break;case"DOESNOTCONTAIN":n=i.map((function(t){return"!"+e.metaDataField+':"'+t+'"'}));break;case"CONTAINSALL":n=i.map((function(t){return e.metaDataField+':"'+t+'"'}))}return n},_handleDateRules:function(e){if(!e.dateValue&&"BETWEEN"!==e.operatorSetting||!e.dateBetweenValue&&"BETWEEN"===e.operatorSetting)return[];var t=[];if("BETWEEN"!==e.operatorSetting){var i=new Date;switch(e.valueType){case"DAYS":"BEFORE"===e.operatorSetting?(i.setDate(i.getDate()-parseInt(e.dateValue)),t.push(e.metaDataField+"<="+i.toISOString())):(i.setDate(i.getDate()-parseInt(e.dateValue)),t.push(e.metaDataField+">="+i.toISOString()));break;case"HOURS":"BEFORE"===e.operatorSetting?(i.setHours(i.getHours()-parseInt(e.dateValue)),t.push(e.metaDataField+"<="+i.toISOString())):(i.setHours(i.getHours()-parseInt(e.dateValue)),t.push(e.metaDataField+">="+i.toISOString()));break;case"DATE":i=new Date(e.dateValue),t.push("BEFORE"===e.operatorSetting?e.metaDataField+"<="+i.toISOString():e.metaDataField+">="+i.toISOString())}}else{var n=e.dateBetweenValue.start,a=e.dateBetweenValue.end;t.push(e.metaDataField+">="+("string"==typeof n?n:n.toISOString())),t.push(e.metaDataField+"<="+("string"==typeof a?a:a.toISOString()))}return t},_getValues:function(e,t,i){if("values"===e.valueType&&e.values.length>0)return e.values;if("property"===e.valueType)return this.profile.getValues(e.property);if(!i)return t.getFieldValues({fieldId:e.metaDataField,type:"default"});for(var n=0;n<i.length;n++)if(i[n].fieldId===e.metaDataField)return t.getFieldValues(i[n]);return[]},_handleEvent:function(e,t,i,n,a,r,s,o,l){if(n){if(!i)return void(document.location.href=t);var c={storeId:n,action:e,itemId:i,url:t};if("No profile present and will not be created."!==this.profile.getId()&&(c.profileId=this.profile.getId()),s&&r&&(c.debug=!0,c.recommendationId=r),"click"===e){if(l&&l.originalEvent&&l.originalEvent._blueConicLoggedClickEvent===a)return;l&&l.originalEvent&&(l.originalEvent._blueConicLoggedClickEvent=a),this.blueConicClient.createEvent("CLICK",a)}this.blueConicClient.recommendation.createEvent(c,(function(){"click"===e&&(o&&"_blank"!==o?window.open(t,o):o&&"_blank"===o||(document.location.href=t))}))}},_bindClicks:function(e,t,i){(i=i||{}).settings=i.settings||{};var n=i.settings.storeId,a=i.settings.debug,r=i.interactionId,s=function(e,i){e.preventDefault();var s=i.getAttribute("href"),o=i.getAttribute("target");o&&"_blank"===o&&window.open(s,o),this._handleEvent("click",s,i.getAttribute("data-bc-item-id"),n,r,t,a,o,e)}.bind(this);Array.prototype.forEach.call(e.querySelectorAll("a[data-bc-item-id]"),function(e){e.addEventListener("click",(function(t){t.currentTarget.dataset.triggered||s(t,e)}))}.bind(this))},_getDataObject:function(e,t){var i=e.length;e=e.map((function(e,t){return e.isFirstItem=0===t,e.isLastItem=t===i-1,e.index=t,e.id&&!e.ID&&(e.ID=e.id),e.url&&!e.URL&&(e.URL=e.url),e.customProperties&&Object.keys(e.customProperties).forEach((function(t){e[t]=e.customProperties[t]})),e}));var n=null;t&&(n=this.blueConicClient.getInteractionNamesById(t)||{id:t});var a={},r=this._metaDataService.getMetaDataFields(),s=this._metaDataService.getItemType(r);return r&&s===this.type&&r.forEach((function(e){var t=e.fieldId;"url"!==t&&"id"!==t||(t=t.toUpperCase()),a[t]=this._metaDataService.getFieldValues(e)}),this),{interaction:n,current:a,recommendations:e}},_sendMessage:function(e,t){this.blueConicClient.fn.postMessage&&this.blueConicClient.fn.postMessage(e,t)},_handleStyling:function(e,t){(e=e||{}).settings=e.settings||{},e.settings.styling=e.settings.styling||{},this._appendTemplateCss(t,e.id),this._setCssUrl(e),this._appendCustomCss(e)},_appendTemplateCss:function(e,t){var i=this.jQuery,n="bcTemplateCss"+t,a=document.querySelector("."+n);a&&a.parentNode.removeChild(a);var r="";if(e&&e.getCss()){var s=i("<style>"+(r+=e.getCss())+"</style>");s.addClass(n),s.appendTo(i("head"))}},_appendCustomCss:function(e){(e=e||{}).settings=e.settings||{},e.settings.styling=e.settings.styling||{};var t=this.jQuery,i="bcCustomCss"+e.id,n=document.querySelector("."+i);if(n&&n.parentNode.removeChild(n),e.settings.styling.customCSS){var a=t("<style>"+e.settings.styling.customCSS+"</style>");a.addClass(i),a.appendTo(t("head"))}},_setCssUrl:function(e){if((e=e||{}).settings=e.settings||{},e.settings.styling=e.settings.styling||{},!this.blueConicClient.isInEditMode&&e.settings.styling.cssURL)this.blueConicClient.util.loadCSS(e.settings.styling.cssURL);else{var t="bcCssUrl"+e.id,i=document.querySelector("#"+t);if(i&&i.parentNode.removeChild(i),e.settings.styling.cssURL){var n=document.createElement("LINK");n.id=t,n.rel="stylesheet",n.type="text/css",n.href=e.settings.styling.cssURL,document.querySelector("head").appendChild(link)}}},_loadTemplate:function(e,t){if(!this.blueConicClient.isInEditMode)return this.blueConicClient.getTemplate(e,t);var i=this._getTemplateFromCache(e);if(i)return t(i);var n=this;this.blueConicClient.getTemplate(e,(function(e){return n._templatesLoaded.push(e),t(e)}))},_getTemplateFromCache:function(e){for(var t=0;t<this._templatesLoaded.length;t++)if(this._templatesLoaded[t].getId()===e)return this._templatesLoaded[t];return null},_addTemplateToCache:function(e){for(var t=e.getId(),i=0;i<this._templatesLoaded.length;i++)if(this._templatesLoaded[i].getId()===t)return void(this._templatesLoaded[i]=e);this._templatesLoaded.push(e)},_createTemplateObject:function(e){return{_css:(e.css||"").replace(/&#xd;/gi,""),_html:(e.html||"").replace(/&#xd;/gi,""),_id:e.id,_javascript:(e.javaScript||"").replace(/&#xd;/gi,""),_precompiledTemplate:e.precompiledTemplate,getHtml:function(){return this._html},getCss:function(){return this._css},getJavaScript:function(){return this._javascript},getId:function(){return this._id}}},_migration:function(e){if(!e||5===e.version)return e;var t=parseInt(e.version||1);return e.strategy&&e.strategy.boostLevels&&!Array.isArray(e.strategy.boostLevels)&&(e=this._migrateV1(e)),t<2&&(e=this._migrationV2(e)),t<3&&(e=this._migrationV3(e)),t<4&&(e=this._migrationV4(e)),t<5&&(e=this._migrationV5(e)),e},_migrateV1:function(e){var t=Object.keys(e.strategy.boostLevels).map((function(t){return{algorithm:t,value:e.strategy.boostLevels[t]}}));return e.strategy.boostLevels=t,e},_migrationV2:function(e){var t={id:(e=this._normalizeMigratedData(e)).id,interactionId:e.interactionId,version:2,settings:{useFrequencyCap:e.exceptions.useFrequencyCap,frequencyCap:e.exceptions.frequencyCap,templateId:e.styling.templateId,storeId:e.sources,connectionId:e["data-bc-connection-id"],debug:e.debug||!1,styling:{cssURL:e.styling.cssURLNode,customCSS:e.styling.customCSS}},rules:[{id:(new Date).getTime(),amount:e.styling.amount||4,algorithms:e.strategy.boostLevels.map((function(e){return e.algorithm=e.algorithm.replace(/_n$/,"").toUpperCase(),e.rampup&&(e.rampUp=e.rampup,delete e.rampup),"string"==typeof e.value&&(e.value=parseFloat(e.value.replace(",","."))),e})),filters:e.exceptions.filters.map((function(e){return{id:e.replace("instock","in_stock").replace("only","").toUpperCase(),filterType:-1!==e.indexOf("only")?"SHOW":"HIDE"}})),metaDataFilters:e.exceptions.filterRules}],"data-bc-connection-id":e["data-bc-connection-id"],"data-bc-template-id":e["data-bc-template-id"]};return e.exceptions.hideReadArticles&&(t.rules[0].filters.some((function(e){return e.id="VIEWED"}))||t.rules[0].filters.push({id:"VIEWED",filterType:"HIDE"}),delete e.exceptions.hideReadArticles),t},_migrationV3:function(e){if(e)return e.settings&&e.settings.storeId&&(e.sources=e.settings.storeId),e.rules&&(e.rules=e.rules.map((function(e){return e&&e.algorithms&&(e.algorithms=e.algorithms.map((function(e){return e&&"CATEGORY"===e.algorithm&&(e.algorithm="SAME_CATEGORY"),e}))),e}))),e},_migrationV4:function(e){if(e)return e.settings&&e.settings.connectionId&&(e["data-bc-connection-id"]=e.settings.connectionId),e},_migrationV5:function(e){return this._migrationV4(e)},_normalizeMigratedData:function(e){return(e=e||{}).styling=e.styling||{},e.strategy=e.strategy||{},e.strategy.boostLevels=e.strategy.boostLevels||[],e.exceptions=e.exceptions||{},e.exceptions.filters=e.exceptions.filters||[],e.exceptions.filterRules=e.exceptions.filterRules||[],e}});var a = [];var i='toolbar_content_recommendations';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.3.6/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.3.6/frontend/src/node_modules/@blueconic/frontend-recommendations-rendering/lib/mustache-2.2.1.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.3.6/frontend/src/node_modules/@blueconic/frontend-metadataservice/metaDataService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.3.6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({blueConicClient:null,context:null,profile:null,parameters:null,objectName:null,DEFAULT_TRACKER_NAME:"ga",DEFAULT_EVENT_NAME:"BlueConic",SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",PF_PROPERTY_PREFIX:"uapf",_LAST_PUSH_PROPERTY:null,_VARIABLE_STATE_PUSH_PROPERTY:null,_goalParams:null,_preloadProperties:null,_hasSynchronized:!1,_visitorSegmentIds:[],init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this._LAST_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),this._VARIABLE_STATE_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),this.parameters=this._migrateParameters(this.parameters),this.objectName=this.parameters.trackerName&&this.parameters.trackerName[0]||this.DEFAULT_TRACKER_NAME,this._visitorSegmentIds=this._getVisitorSegmentIds(),this._goalParams=this._parseGoalParams(this.parameters.goalParameters),this._fillPreloadProperties()},_getVisitorSegmentIds:function(){return this.blueConicClient.getSegments().map((function(e){return e.id}))||[]},_parseGoalParams:function(e){return e.map((function(e){return e&&this.blueConicClient.json.parse(e)}),this).filter((function(e){return e&&e.active&&e.parameters})).map((function(e){return e.parameters.id=e.id,e.parameters.exportMapping=this._parseExportMapping(e.parameters.exportMapping),e.parameters}),this)},_parseExportMapping:function(e){return(e&&this.blueConicClient.json.parse(e[0])||[]).filter((function(e){return this._isValidExportMapping(e)}),this)},_isValidExportMapping:function(e){var t=e&&e.from&&e.to&&e.to.values&&e.to.values[0]&&e.to.values[0].id&&("property"!==e.from.typeId||e.from.values&&e.from.values[0]&&e.from.values[0].id);return Boolean(t)},_fillPreloadProperties:function(){this._preloadProperties=[this.SENT_TO_SYSTEM_PROPERTY,this.SENT_TO_CONNECTION_PROPERTY],this._goalParams.forEach((function(e){this._preloadProperties.push(this._LAST_PUSH_PROPERTY+"_"+e.id),this._preloadProperties.push(this._VARIABLE_STATE_PUSH_PROPERTY+"_"+e.id),e.exportMapping.forEach((function(e){var t=e.from&&"property"===e.from.typeId&&e.from.values&&e.from.values[0]&&e.from.values[0].id;t&&-1===this._preloadProperties.indexOf(t)&&this._preloadProperties.push(e.from.values[0].id)}),this)}),this)},getPreloadProperties:function(){return this._preloadProperties},onLoad:function(){this.bcConnectionUtil.md5Lib=window.md5;var e=this,t=0;(function tagReady(){if(window[e.objectName])e._handleGoals();else{if(t>20)return;t++,window.setTimeout(tagReady,250)}}).call(this)},_handleGoals:function(){this._goalParams.forEach((function(e){this._isSegmentValid(e.exportSegment)&&this._applyGoal(e)}),this)},_isSegmentValid:function(e){var t=!e||0===e.length,i=e&&e[0]&&-1!==this._visitorSegmentIds.indexOf(e[0]);return t||i},_applyGoal:function(e){var t=this._createConnectionContext(e);this._pushProfileValues(e,t),e.triggerEvent&&e.triggerEvent[0]&&this.blueConicClient.event.subscribe(e.triggerEvent[0],this,(function(){this._doPush(e,t)}));var i=this._getEventNameForGoal(e),n=this._getTrackerNameForGoal(e);e.push_interactions&&"true"===e.push_interactions[0]&&this._subscribeToInteractionViews(n,i),e.passOnEvents&&"true"===e.passOnEvents[0]&&this._subscribeToPassOnEvents(n,i)},_pushProfileValues:function(e,t){this.bcConnectionUtil.doPush(t)?this._doPush(e,t):"plc"===t.push_frequency&&this.blueConicClient.event.subscribe(this.blueConicClient.event.onProfilePermissionChange,this,(function(){this._doPush(e,t)}))},_doPush:function(e,t){var i=e.exportMapping;if(0===i.length)return!1;var n={nonInteraction:1,userId:this.profile.getId()},s=!1;if(i.forEach((function(e){var i=this.bcConnectionUtil.getVariableValue(e.from,t,!0);i&&(n[e.to.values[0].id]=i.join(","),s=!0)}),this),s){var r=this._getEventNameForGoal(e),o=this._getTrackerNameForGoal(e);this._pushUA(o,r,"Profile",n)}return s},_createConnectionContext:function(e){var t={LAST_PUSH_PROPERTY:this._LAST_PUSH_PROPERTY+"_"+e.id,VARIABLE_STATE_PUSH_PROPERTY:this._VARIABLE_STATE_PUSH_PROPERTY+"_"+e.id,profile:this.profile,push_frequency:e.push_frequency&&e.push_frequency[0]?e.push_frequency[0]:null,variables:i,SENT_TO_SYSTEM_PROPERTY:this.SENT_TO_SYSTEM_PROPERTY,SENT_TO_CONNECTION_PROPERTY:this.SENT_TO_CONNECTION_PROPERTY},i=[];return e.exportMapping.forEach((function(e){var n=e.from;this.bcConnectionUtil.getVariableValue(n,t)&&(n.key=e.to.values[0].id,i.push(n))})),t.variables=i,t},_getEventNameForGoal:function(e){return e.eventname&&e.eventname[0]||this.DEFAULT_EVENT_NAME},_getTrackerNameForGoal:function(e){return e.trackerName&&e.trackerName[0]?e.trackerName[0]+".":""},_subscribeToInteractionViews:function(e,t){this.blueConicClient.event.subscribe("VIEW",this,this._pushInteractionViews.bind(this,e,t))},_pushUA:function(e,t,i,n,s){window[this.objectName](e+"send","event",t,i,n,s),this._syncProperties()},_pushInteractionViews:function(e,t){this.blueConicClient.getInteractions().map((function(e){return e.variantName?e.name+" / "+e.variantName:e.name})).forEach((function(i){this._pushUA(e,t,"Interaction View",i,{nonInteraction:1,userId:this.profile.getId()})}),this)},_subscribeToPassOnEvents:function(e,t){this.blueConicClient.event.subscribe("inactivity",this,this.onEventPublished.bind(this,e,t,"Inactivity")),this.blueConicClient.event.subscribe("exitintent",this,this.onEventPublished.bind(this,e,t,"Exit Intent")),this.blueConicClient.event.subscribe("cm_firstview",this,this.onEventPublished.bind(this,e,t,"Content Meter View 1")),this.blueConicClient.event.subscribe("cm_exceeded",this,this.onEventPublished.bind(this,e,t,"Content Meter View Content Meter Exceeded"));for(var i=2;i<10;i++)this.blueConicClient.event.subscribe("cm_view_"+i,this,(function(i){var n=i.split("_")[2];this.onEventPublished(e,t,"Content Meter View "+n)}))},onEventPublished:function(e,t,i){var n={nonInteraction:1,userId:this.profile.getId()};this._pushUA(e,t,i,n)},_syncProperties:function(){this._hasSynchronized||(this.bcConnectionUtil.setSyncProperties(this.context,this.profile,[this.SENT_TO_SYSTEM_PROPERTY,this.SENT_TO_CONNECTION_PROPERTY]),this._hasSynchronized=!0)},_migrateParameters:function(e){return e.goalParameters?e:this._migrateToV2(e)},_migrateToV2:function(e){var getValue=function(t,i){return e[t]||i},t=[],i=getValue("dimensions");(i&&i[0]?JSON.parse(i[0]):[]).forEach((function(e){var i={id:e.id,from:{type:"pm"===e.type?"permission":e.type,property:e.property,segments:e.segments,fieldLabel:"text"===e.type?e.text:undefined,fieldId:e.text},to:{type:"text",fieldLabel:"Dimension "+e.index,fieldId:"dimension"+e.index},mergeRule:"set"};t.push(i)}));var n=getValue("profileproperties"),s={exportSegment:[""],exportMapping:[this.blueConicClient.json.stringify(t)],properties_out:Array.isArray(n)?n:[n],segments:[],push_frequency:getValue("push_frequency")||[""],triggerEvent:getValue("triggerEvent")||[""],eventname:[this.DEFAULT_EVENT_NAME],push_interactions:["true"],passOnEvents:["false"],saved:["true"]};return{trackerName:[getValue("custom_tracker")||this.DEFAULT_TRACKER_NAME],goalParameters:[JSON.stringify({id:"1",type:"export",name:"Export data into Universal Analytics",active:!0,parameters:s})]}}});var a = [];var i='uaconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/'}]);})();(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.visitHistoryProperty="_vl_"+this.context.getInteractionId(),this.visitsProperty=this.parameters.visits_property?this.parameters.visits_property[0]:null,this.nrVisits=this.parameters.nr_visits&&!isNaN(this.parameters.nr_visits)?parseInt(this.parameters.nr_visits):100,this.nrVisitsProperty=this.parameters.nr_visits_property?this.parameters.nr_visits_property[0]:null,this.nrDays=this.parameters.nr_days&&!isNaN(this.parameters.nr_days)?parseInt(this.parameters.nr_days):30,this.totalVisitsProperty=this.parameters.total_visits_property?this.parameters.total_visits_property[0]:null,this.startSessionProperty=this.parameters.start_session_property?this.parameters.start_session_property[0]:null,this.nrPageViewsProperty=this.parameters.nr_page_views_property?this.parameters.nr_page_views_property[0]:null,this.sessionPageViewsProperty=this.parameters.session_page_views_property?this.parameters.session_page_views_property[0]:null,this.firstVisitDateProperty=this.parameters.first_visit_date_property?this.parameters.first_visit_date_property[0]:null,this.lastVisitDateProperty=this.parameters.last_visit_date_property?this.parameters.last_visit_date_property[0]:null,this.averageVisitTimeProperty=this.parameters.average_visit_time_property?this.parameters.average_visit_time_property[0]:null,this.totalVisitTimeProperty=this.parameters.total_visit_time_property?this.parameters.total_visit_time_property[0]:null,this.directVisitsOnly=!!this.parameters.directVisitsOnly&&"true"===this.parameters.directVisitsOnly[0]},onLoad:function(){this._handleNewPageView(),this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,this._handleNewPageView)},getPreloadProperties:function(){var t=[this.visitHistoryProperty];return this.visitsProperty&&t.push(this.visitsProperty),t},_handleNewPageView:function(){var t=this.blueConicClient.getCurrentDate(),i=this._getVisitsHistory(),s=!0;if(i.lastVisit){var e=new Date(i.lastVisit);e.setMinutes(e.getMinutes()+30),s=t>e}this.directVisitsOnly&&s&&document.referrer.length>0||(s?this._handleNewVisit(i,t):this._handleExistingVisit(i,t),i.pageViews=i.pageViews+1,this.nrPageViewsProperty&&this.profile.setValue(this.nrPageViewsProperty,i.pageViews),i.firstVisit||(i.firstVisit=t.getTime(),this.firstVisitDateProperty&&this.profile.setValue(this.firstVisitDateProperty,i.firstVisit)),i.lastVisit=t.getTime(),this.lastVisitDateProperty&&this.profile.setValue(this.lastVisitDateProperty,i.lastVisit),this.profile.setValue(this.visitHistoryProperty,JSON.stringify(i)),this.blueConicClient.profile.updateProfile())},_handleNewVisit:function(t,i){if(t.visits=t.visits+1,t.sessionStart=i.getTime(),t.sessionPageViews=1,this.startSessionProperty&&this.profile.setValue(this.startSessionProperty,t.sessionStart),this.sessionPageViewsProperty&&this.profile.setValue(this.sessionPageViewsProperty,t.sessionPageViews),this.totalVisitsProperty&&this.profile.setValue(this.totalVisitsProperty,t.visits),this.visitsProperty){var s=this.profile.getValues(this.visitsProperty).concat();if(s.push(i.getTime()),s.length<=this.nrVisits?this.profile.addValue(this.visitsProperty,i.getTime()+""):(s.sort((function(t,i){return i-t})),s=s.slice(0,this.nrVisits),this.profile.setValues(this.visitsProperty,s)),this.nrVisitsProperty){var e=new Date(i).setDate(i.getDate()-this.nrDays),r=i.getTime()-e,a=s.filter((function(t){return i.getTime()-parseInt(t)<r})).length;this.profile.setValue(this.nrVisitsProperty,a)}}},_handleExistingVisit:function(t,i){t.sessionPageViews=t.sessionPageViews+1,this.sessionPageViewsProperty&&this.profile.setValue(this.sessionPageViewsProperty,t.sessionPageViews);var s=(i.getTime()-t.lastVisit)/1e3/60;t.totalVisitTime=t.totalVisitTime+s,this.totalVisitTimeProperty&&this.profile.setValue(this.totalVisitTimeProperty,Math.round(t.totalVisitTime)),this.averageVisitTimeProperty&&this.profile.setValue(this.averageVisitTimeProperty,Math.round(t.totalVisitTime/t.visits))},_getVisitsHistory:function(){var t=this.profile.getValue(this.visitHistoryProperty);if(t)try{t=JSON.parse(t)}catch(t){}return t||{visits:0,sessionStart:0,firstVisit:0,lastVisit:0,totalVisitTime:0,pageViews:0,sessionPageViews:0}},_getNumberProperty:function(t){var i=this.profile.getValue(t);try{i=parseInt(i)}catch(t){i=0}return isNaN(i)&&(i=0),i}});var a = [];var i='visitlistener';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.4/'}]);})();})(blueConicClient);