if (undefined === window.Kameleoon){(function(){!function(e,t){e.kbowser=t()}(this,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(18),n=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.map=function(e,t){var r,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r1?n-1:0),a=1;a=3},describe:function(){return{type:s.PLATFORMS_MAP.t}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.m}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.d}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.d}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.d}}}];t.default=a,e.exports=t.default}})}));class APIConfiguration{constructor(e){this.generationTime=e.scriptProduceTime;this.goals=e.goals.map((e=>new APIGoal(e)));this.singlePageSupport=Kameleoon.Internals.runtime?Kameleoon.Internals.runtime.singlePageSupport:e.singlePageSupport;this.siteCode=e.siteCode}}class APIAction{constructor(i,t){const e=0===t;const a=Kameleoon.Internals.runtime.Visitor.currentVisit;const n=Kameleoon.Internals.runtime.storedData.obtainField("Gatherer",e?"experimentsTriggered":"personalizationsTriggered",{});this.dateLaunched=i.dateStatusModified;this.dateModified=i.dateModified;this.id=i.id;this.name=i.name;this.targetSegment=new APISegment(i.targetingSegment);this.active=i.targeting&&!i.disabled&&i.displayedVariation&&null!=i.displayedVariation.id;this.triggered=i.targeting||!1;this.untrackedTrafficReallocationTime=i.untrackedRespoolTime||null;this.triggeredInVisit=n[this.id]?!0:!1;const r=i=>Kameleoon.Internals.runtime.variations.find((t=>t.id==i));if(i.targetingTrigger)this.targetTrigger=new APISegment(i.targetingTrigger);if(i.variations){this.trafficDeviation={};this.variations=[];for(let t in i.deviation){const e=r(parseInt(t));if(e){this.trafficDeviation[t]=100*i.deviation[t];this.variations.push(new APIVariation(e,i))}}}if(e){let t=r(i.registeredVariationId);this.associatedVariation=t?new APIVariation(t,i):null;this.redirectProcessed=i.redirectProcessed||!1;this.activatedInVisit=a.ExperimentActivations[this.id]?!0:!1;this.trackingPerformed=i.trackingPerformed}else{this.associatedVariation=i.associatedVariation?new APIVariation(r(i.associatedVariation.id),i):null;this.activatedInVisit=this.triggeredInVisit&&a.PersonalizationActivations[this.id]?!0:!1}Object.defineProperty(this,"goals",{enumerable:!0,configurable:!0,get:()=>Kameleoon.Internals.configuration.goals.filter((t=>-1!=(i.goals||[]).indexOf(t.id))).map((i=>new APIGoal(i)))});Object.defineProperty(this,"mainGoal",{enumerable:!0,configurable:!0,get:()=>{const t=e?i.kameleoonTracking?.mainGoalId:i.mainGoalId;const a=t&&Kameleoon.Internals.configuration.goals.find((i=>i.id==t));return a?new APIGoal(a):null}})}}class APIActionActivation{constructor(i,n,t){const a=0===i;const o=Kameleoon.Internals.runtime.Campaigns.obtainCampaign(n,a);const s=a?"ExperimentActivations":"PersonalizationActivations";const e=t[s][n].associatedVariationID;const c=Kameleoon.Internals.configuration.variations.find((i=>i.id==e));if(a){this.experimentID=n;this.experiment=o?new APIAction(o,0):null}else{this.personalizationID=n;this.personalization=o?new APIAction(o,1):null}this.times=t[s][n].times;this.associatedVariationID=e;this.associatedVariation=c?new APIVariation(c,o):null}}class APIActions{constructor(e){const n=0===e;const i=()=>{if(Kameleoon.Internals.runtime)return Kameleoon.Internals.runtime.Campaigns.obtainCampaignsList(e);else return[]};const t=n=>new APIAction(n,e);const a=e=>i().map(t).filter(e);this.getAll=()=>i().map(t);this.getActive=()=>i().filter((e=>(!0===e.targeting||e.trackingPerformed)&&1!=e.disabled&&(null!=e.displayedVariation?.id||e.featureFlag&&null!=e.associatedVariation?.id))).map(t);this.getTriggeredInVisit=()=>a((e=>e.triggeredInVisit));this.getActivatedInVisit=()=>a((e=>e.activatedInVisit));const s=(e,n)=>{const a=i().find((i=>i[e]==n));return a?t(a):null};this.getById=e=>s("id",e);this.getByName=e=>s("name",e);if(n){this.assignVariation=(e,n,t)=>{const a=i().find((n=>n.id==e));if(a&&(void 0===a.registeredVariationId||t)){a.registeredVariationId=n;a.assignmentTime=(new Date).getTime();a.writeLocalData()}else if(!a){if(!Kameleoon.Internals.runtime.notUsedCampaigns)Kameleoon.Internals.runtime.notUsedCampaigns={};Kameleoon.Internals.runtime.notUsedCampaigns[e]=n}};this.block=(e,i=!1)=>{const t=Kameleoon.Internals.runtime.Campaigns.obtainCampaign(e,n);if(t){if(i){const n=Kameleoon.Internals.runtime.storedData.obtainField("Runtime","blockedExperiments",[]);n.push(e);Kameleoon.Internals.runtime.storedData.saveField("Runtime","blockedExperiments",n)}t.setBlocked("API")}};this.trigger=(e,i)=>{const t=Kameleoon.Internals.runtime.Campaigns.obtainCampaign(e,n);if(t)if(i){if(t){t.performVariationAssignment(0);Kameleoon.Analyst.Actions.performActionsTracking([t])}}else{t.trigger();Kameleoon.Analyst.Actions.process([t])}else if(i&&null!=Kameleoon.Internals.runtime.notUsedCampaigns?.[e])Kameleoon.Gatherer.track(VisitEvent_Experiment,{id:e,variationId:Kameleoon.Internals.runtime.notUsedCampaigns[e],notTrack:!1,notSave:!0});};this.triggerExperiment=(e,n)=>{this.trigger(e,n);}}else{this.block=(e,i=!1)=>{};this.disable=e=>{};this.trigger=(e,i)=>{}}}}class APIGoal{constructor(t){if(t){this.id=t.id;this.name=t.name;this.type=t.type}}}class APIProduct{constructor(e,a){this.productID=e;const t=new Set(["accessories","auto","available","brand","description","fashion","gender","groupId","isChild","isFashion","isNew","leftovers","merchantID","model","name","params","rating","seasonality","sku","tags","typePrefix","url"]);for(let e in a)switch(e){case"imageURL":case"mainImageURL":this.imageURL=a.mainImageURL||a.imageURL;break;case"price":case"oldPrice":case"availableQuantity":case"priceMargin":this[e]=parseFloat(a[e])||null;break;case"categories":if(a.categories.length>0)this.categories=a.categories.map((e=>{if(e.parent)e.parent=e.parent.toString();e.id=e.id.toString();return e}));break;default:if(t.has(e))this[e]=a[e]}}getTrackingParameters(){let e={};e.url=encodeURIComponent(Kameleoon.Utils.computeCurrentPageCleanAbsoluteURL());for(let a in this)switch(a){case"productID":break;default:switch(typeof this[a]){case"object":e[a]=encodeURIComponent(JSON.stringify(this[a]));break;case"string":e[a]=encodeURIComponent(this[a]);break;case"number":case"boolean":case"symbol":e[a]=this[a]}}return Kameleoon.Utils.parseObjectToUrlParams(e)}}class APITargeting{constructor(e){const n=1===e?"targetingTriggers":"targetingSegments";const t=e=>{const t=Kameleoon.Internals.runtime[n].find(e);return t?new APISegment(t):null};this.getAll=()=>Kameleoon.Internals.runtime[n].map((e=>new APISegment(e)));this.getById=e=>t((n=>n.id==e));this.getByName=e=>t((n=>n.name===e));this.reevaluate=t=>{const a=Kameleoon.Internals.runtime[n].findIndex((e=>e.id==t));if(a>-1){const i=Kameleoon.Internals.runtime.simulationMode?Kameleoon.Internals.runtime.simulationModeData[n]:Kameleoon.Internals.configuration[n];const r=i.find((e=>e.id==t));if(r){Kameleoon.Internals.runtime[n].splice(a,1);const i=Kameleoon.Utils.clone(r);Kameleoon.Internals.runtime[n].push(i);Kameleoon.Targeting.checkTargetingSegmentsTargeting([i]);Kameleoon.Internals.runtime.Campaigns.obtainCampaignsList(0).concat(Kameleoon.Internals.runtime.Campaigns.obtainCampaignsList(1)).forEach((n=>{if(1===e){n.setTargetingTrigger?.(t);if(n.targetingTriggerId==t)n.forceTargeting=!1}else{n.setTargetingSegment(t);if(n.targetingSegmentId==t)n.forceTargeting=!1}}));Kameleoon.Analyst.Actions.processAllActions();return i.targeting}}return;};this.trigger=t=>{const a=Kameleoon.Internals.runtime[n].find((e=>e.id==t));if(a){a.targeting=!0;const n=1===e?"targetingTriggerId":"targetingSegmentId";Kameleoon.Internals.runtime.Campaigns.obtainCampaignsList("experiments").concat(Kameleoon.Internals.runtime.Campaigns.obtainCampaignsList("personalizations")).forEach((e=>{if(e[n]==t){e.targeting=void 0;e.rescheduleTargeting=!0;e.forceTargeting=!0}}));Kameleoon.Analyst.Actions.processAllActions();Kameleoon.Targeting.processTargetingSegments([a])}}}}class APISegment{constructor(t){if(t){this.id=t.id;this.name=t.name;this.targeting=t.targeting}}}class APITemplate{constructor(s,t){this.name=s;this.customFields=t}}class APIVariation{constructor(e,t={}){if(e){this.id=e.id;this.name=e.name;if(t.experimentAction){const i=t.variations.find((t=>t.id==e.id));this.reallocationTime=i?i.respoolTime:null}else this.reallocationTime=null;this.instantiatedTemplate=e.widgetTemplateInputData?new APITemplate(e.widgetTemplateName,e.widgetTemplateInputData):null}}}class APIVisit{constructor(t){this.pageViews=t.obtainPageNumberViews();this.duration=t.lastEventDate-t.startDate;this.locale=Kameleoon.Utils.getLocale();this.startDate=t.startDate;this.index=t.visitNumber;this.currentProduct=null;this.products=[];this.clicks=t.clicks||0;this.pageURLsVisited=t.pageURLsVisited;this.activatedSegments=t.activatedSegments;this.lastEventDate=t.lastEventDate;this.activatedExperiments=Object.keys(t.ExperimentActivations).map((e=>new APIActionActivation(0,parseInt(e),t)));this.activatedPersonalizations=Object.keys(t.PersonalizationActivations).map((e=>new APIActionActivation(1,parseInt(e),t)));if(t==Kameleoon.Internals.runtime.Visitor.currentVisit){this.device=new Device;this.geolocation=t.Geolocation;}this.conversions=Kameleoon.Utils.clone(t.conversions);this.customData={};let i="";let n=[];let a=Kameleoon.Internals.runtime.storedData.obtainField("Runtime","firstReferrersIndices",[]);for(let t=0,e=a.length;t";else{let t=Kameleoon.Internals.runtime.Gatherer.configuration.referrers[e-1];s=null==t?i:t.name}n.push(s)}this.acquisitionChannel=n[0];this.landingPageURL=t.landingPageURL;this.weather=t.Weather}}class APIVisitor{constructor(){this.getCustomDataVisitor=()=>{const t={};return t};this.setVisitorCode=t=>{Kameleoon.Internals.runtime.Visitor.setVisitorCode(t)};const{Visitor:t,personalizationsActive:i,Consent:s}=Kameleoon.Internals.runtime;this.numberOfVisits=t.totalVisits;this.timeStartedEldestVisit=t.timeStartedEldestVisit;this.customData=this.getCustomDataVisitor();this.personalizationsActive=i;this.code=t.currentVisit.visitorCode;this.currentVisit=new APIVisit(t.currentVisit);this.visits=t.visits.map((t=>new APIVisit(t)));this.previousVisit=t.visits.length>1?new APIVisit(t.visits.slice(-2)[0]):null;this.experimentLegalConsent=s.AB_TESTING;this.personalizationLegalConsent=s.PERSONALIZATION;this.productRecommendationLegalConsent=Kameleoon.Internals.runtime.storedData.obtainField("Gatherer","productRecommendation")?!0:!1;this.firstVisitStartDate=t.timeStartedEldestVisit}}class Analyst{constructor(){this.initialize=e=>{this.isTimeout=!1;if(window.kameleoonDisplayPage){if(null==Kameleoon.Internals.configuration.behaviorWhenTimeout||document.getElementById("kameleoonLoadingStyleSheet"))window.clearTimeout(window.kameleoonDisplayPageTimeOut);else if(null==window.kameleoonEndLoadTime)this.isTimeout=!0;try{window.kameleoonDisplayPage(!0)}catch(e){}window.kameleoonDisplayPage=null}window.kameleoonEndLoadTime=Date.now();e()};this.load=()=>{Kameleoon.Utils.sendKameleoonCustomEvent("Internals",{type:"load",time:Date.now()});Kameleoon.Utils.runProtectedFunction((function(){if(window.kameleoonQueue)window.kameleoonQueue=new CommandQueue(window.kameleoonQueue,"IMMEDIATE");window.addEventListener("error",(e=>{if(e.error&&e.error.stack&&e.error.stack.match(/kameleoon/gi)){Kameleoon.Utils.Logger.send(e.error.stack,"kameleoon.js");return!1}}));Kameleoon.Analyst.initialize((()=>{const e=Kameleoon.Analyst.checkBlockingElements();const o=window.kameleoonEndLoadTime-(window.kameleoonStartLoadTime||window.kameleoonEndLoadTime)-25;Kameleoon.Utils.sendKameleoonCustomEvent.call(window,"Loaded",{timeout:"TIMEOUT"==e,loadTime:o});const n=Kameleoon.Internals.runtime;let a=!1;let t=null;if(n){a=!0;t=n.localDataMap;n.clear()}if(0==e.length){Kameleoon.Internals.runtime=new Runtime(a,{localDataMap:t});Kameleoon.Analyst.loadKameleoonFull((()=>{Kameleoon.Internals.runtime.run()}))}else{Kameleoon.Utils.sendKameleoonCustomEvent("Internals",{type:"abort",blockingReason:e});Kameleoon.Utils.sendKameleoonCustomEvent.call(window,"Aborted",{reason:e})}}))}))};this.loadKameleoonFull=(e,o)=>{if(!Kameleoon.Internals.runtime.kameleoonFull&&(this.kameleoonFullNeeded()||o)){const o="kameleoonFullApplicationCode";const n=o=>{Kameleoon.Utils.runProtectedScript(o+"\n;"+"("+e.toString()+")()","kameleoonFull.js")};const a=sessionStorage.getItem(o);if(null!=a)n(a);else{const{ENGINE_FULL_URL:e,staticURL:a}=Kameleoon.Internals.configuration;Kameleoon.Utils.performBeaconServerCall((e||a)+"kameleoon-full.js?cache="+Kameleoon.Utils.obtainRandomString(16),(e=>{if(void 0===e.readyState||4==e.readyState&&200==e.status){sessionStorage.setItem(o,e.responseText);n(e.responseText)}}))}}else e()};this.Actions=new Actions;this.Goals=new Goals}checkBlockingElements(){let e=!1;try{const e="kameleoonPrivateMode";localStorage.getItem(e);sessionStorage.getItem(e)}catch(o){e=!0}if(e)return"STORAGE";if(this.isTimeout){return"TIMEOUT"}document.removeEventListener("visibilitychange",Kameleoon.Analyst.load);if("prerender"==document.visibilityState){document.addEventListener("visibilitychange",Kameleoon.Analyst.load);return"PRERENDER"}if(-1!=location.href.indexOf("kameleoonDisabled"))return"PARAMETER";return""}kameleoonFullNeeded(){const{parameters:e,simulationMode:o}=Kameleoon.Internals.runtime;if(sessionStorage.getItem("kameleoonFullApplicationCode")||sessionStorage.getItem("kameleoonLightExtension")||e.kameleoon||e.kameleoonVariationId||e["kameleoon-simulation"]||e.kameleoonLightExtension||e["kameleoonWidgetPersonalization"]||o||window===window.top&&(e.kameleoonBuilder||sessionStorage.getItem("kameleoonPBXParams"))||Kameleoon.Utils.readLocalData("kameleoonSimulationParameters","COOKIE"))return!0;return!1}loadSimulation(e){if(!Kameleoon.Internals.runtime.parameters.kameleoonVariationId)Object.keys(localStorage).forEach((e=>{if(-1!==e.indexOf("kameleoonVariation-"))localStorage.removeItem(e)}))}loadVariationFromServer(e,o){}processSimulations(){}}Analyst.CODE_ALPHABET="abcdefghijklmnopqrstuvwxyz0123456789";Analyst.HEXADECIMAL_ALPHABET="0123456789ABCDEF";class API{constructor(){this.Core={enableLegalConsent:function(e="BOTH"){Kameleoon.Internals.runtime.Consent.enable(e)},disableLegalConsent:function(e="BOTH"){Kameleoon.Internals.runtime.Consent.disable(e)},enableSinglePageSupport:function(){Kameleoon.Internals.runtime.enableSinglePageSupport.apply(Kameleoon.Internals.runtime,arguments)},enableDynamicRefresh:function(){Kameleoon.Internals.runtime.enableDynamicRefresh.apply(Kameleoon.Internals.runtime,arguments)},getConfiguration:()=>new APIConfiguration(Kameleoon.Internals.configuration),load:function(){Kameleoon.Analyst.load.apply(Kameleoon.Analyst,arguments)},processRedirect:function(){Kameleoon.Utils.processRedirect.apply(Kameleoon.Utils,arguments)},runWhenConditionTrue:(e,n,t=200)=>{if(e())Kameleoon.Utils.runProtectedFunction(n,!0);else{const o=Kameleoon.Utils.setInterval((()=>{if(e()){Kameleoon.Utils.clearInterval(o);Kameleoon.Utils.runProtectedFunction(n,!0)}}),t,!0)}},runWhenElementPresent:(e,n,t,o)=>{const a=null==t;Kameleoon.Internals.runtime.processSelectorPresence({selector:e,useAntiFlicker:a,pollingInterval:t,isDynamicElement:o,callback:n})},runWhenShadowRootElementPresent:(e,n,t,o)=>{this.Core.runWhenElementPresent(e,(a=>{const r=a.filter((e=>e.shadowRoot));if(0===r.length){const a=Kameleoon.Utils.setTimeout((()=>{Kameleoon.Utils.clearInterval(a);this.Core.runWhenShadowRootElementPresent.apply(Kameleoon,[e,n,t,o])}),150);return}const i=`data-kameleoon-shadow-class-${Kameleoon.Utils.obtainRandomString(4)}`;const l=()=>{let e=[];r.forEach((t=>{if(t.shadowRoot)e=e.concat(Kameleoon.Utils.querySelectorAll(n,t.shadowRoot))}));if(o)e=e.filter((e=>!e.getAttribute(i))).map((e=>{e.setAttribute(i,"true");return e}));return e};const s=l();if(s.length)t(s);if(!s.length||o){const e=Kameleoon.Utils.setInterval((()=>{const n=l();if(n.length){t(n);!o&&Kameleoon.Utils.clearInterval(e)}}),150)}}))}};this.Goals={cancelConversion:(e,n)=>{try{this.Goals.processConversions(e,n,!0)}catch(e){}},processConversion:(e,n,t)=>{try{this.Goals.processConversions(e,n,!1,t)}catch(e){}},processConversions:(e,n,t,o)=>{const a=Kameleoon.Analyst.Goals.get(e)??Kameleoon.Analyst.Goals.getList().find((n=>e==n.id||e===n.name));if(a)Kameleoon.Analyst.Goals.processConversions([{goal:a,revenue:n,negative:t,metadata:o}])}};this.Data={readLocalData:e=>Kameleoon.Internals.runtime.storedData.Vars[e]?Kameleoon.Internals.runtime.storedData.Vars[e].value:null,resetCustomData:e=>{this.Data.setCustomData(e,[],!0)},retrieveDataFromRemoteSource:(e,n)=>{const t=Kameleoon.Internals.configuration.siteCode;const o=100;const a=e=>{const n=[];for(let t=0;tnew Promise((n=>{Kameleoon.Utils.performBeaconServerCall(e,(e=>{if(4!==e.readyState)return;if(200!==e.status)return n({});try{n(JSON.parse(e.responseText))}catch{n({})}}),null)}));if(!Array.isArray(e)){const o=Kameleoon.Utils.addParameterToURL(`${Kameleoon.Internals.runtime.DATA_URL}/map/map`,Kameleoon.Utils.parseObjectToUrlParams({siteCode:t,engine:!0,key:encodeURIComponent(String(e))}),!1);return r(o).then((e=>n?.(e)))}if(!e.length)return n?.({});Promise.all(a(e).map((e=>{const n=Kameleoon.Utils.addParameterToURL(`${Kameleoon.Internals.runtime.DATA_URL}/map/maps`,Kameleoon.Utils.parseObjectToUrlParams({siteCode:t,engine:!0,keys:encodeURIComponent(JSON.stringify(e))}),!1);return r(n)}))).then((e=>{const t=Object.assign({},...e);n?.(t)}))},setCustomData:(e,n,t)=>{},writeLocalData:(e,n,t)=>{Kameleoon.Internals.runtime.storedData.Vars[e]={value:n,date:(new Date).getTime()+24*60*60*1e3*(t?30:1/24)}},performRemoteSynchronization:(e,n,t)=>{}};this.Events={triggered:[],trigger:e=>{this.Core.runWhenConditionTrue((()=>!0===Kameleoon.Internals.runtime.setupAfterLocalDataRetrieval),(()=>{this.Events.triggered.push(e);if(Kameleoon.Analyst.Actions)Kameleoon.Analyst.Actions.processAllActions();if(Kameleoon.Targeting)Kameleoon.Targeting.processAllTargetings();}),100)}};this.Tracking={processOmniture:e=>{Kameleoon.Tracking.processOmniture&&Kameleoon.Tracking.processOmniture(e)}};this.Products={obtainFullSearchProducts:(e,n,t)=>{},obtainInstantSearchProducts:(e,n,t)=>{},obtainProductInteractions:(e,n,t,o)=>{const a={};null!=t&&(a.timeBegin=t);null!=o&&(a.timeEnd=o);Kameleoon.Internals.runtime.Visitor.obtainProductData("productCounters",e,a,(e=>{for(const n in e){e[n].views=e[n].v||0;e[n].cartQuantities=e[n].atcq||0;e[n].boughtQuantities=e[n].bq||0;delete e[n].v;delete e[n].atcq;delete e[n].bq}n(e)}))},obtainProductData:(e,n,t={all:!0})=>{Kameleoon.Internals.runtime.Visitor.obtainProductData("productData",e,t,n)},obtainRecommendedProducts:(e,n,t,o)=>{},obtainRecommendedCollections:(e,n,t)=>{},trackAddToCart:(e,n,t=1,o={})=>{e=e.toString();if(null!=e&&e.length>0)if(t>0){Kameleoon.Internals.runtime.RequestManager.sendProduct(e,`eventType=productAddToCart&quantity=${t}`);}},trackAddToWishList:(e,n=1)=>{},trackCategoryView:e=>{},trackSearchQuery:e=>{},trackProductView:(e,n)=>{e=e.toString();if(null!=e&&e.length>0){const t=new APIProduct(e,n);Kameleoon.Internals.runtime.RequestManager.sendProduct(e,`eventType=productPage&${t.getTrackingParameters()}`);if(Kameleoon.Internals.runtime.gathererRun)Kameleoon.Gatherer.track(VisitEvent_Product,{ean:e});Kameleoon.Internals.runtime.product=t}},trackTransaction:(e,n={})=>{for(let n=0;n0){o.quantity=parseInt(o.quantity)||1;if(o.quantity>0)Kameleoon.Internals.runtime.RequestManager.sendProduct(o.productID,`eventType=productBuy&quantity=${o.quantity}`)}}}};this.Experiments=new APIActions(0);this.Personalizations=new APIActions(1);this.Segments=new APITargeting(0);this.Triggers=new APITargeting(1);this.Variations={execute:e=>{let n=Kameleoon.Internals.runtime.variations.find((n=>n.id==e));if(n){n=new Variation(n);Kameleoon.Utils.addCSSStyleSheet(n.cssCode);return n.applyJavascriptCode(!0)}return null}};this.Utils={addEventListener:function(e,n,t,o){Kameleoon.Utils.addEventListener(e,n,t,o,!0)},addUniversalClickListener:function(e,n,t){const o=Kameleoon.Internals.runtime.mouseDownEvent;this.addEventListener(e,o,(function(e){if(!Kameleoon.Internals.runtime.touchMoveEvent&&("mousedown"==o||!e.target||!e.target.closest||!e.target.closest("[disabled]")))n&&n(e)}))},clearInterval:function(){Kameleoon.Utils.clearInterval.apply(Kameleoon.Utils,arguments)},clearTimeout:function(){Kameleoon.Utils.clearTimeout.apply(Kameleoon.Utils,arguments)},createHash:function(e){return Kameleoon.Utils.computeStringHash.apply(Kameleoon.Utils,arguments)},getURLParameters:function(){return Kameleoon.Utils.parseParameters.apply(Kameleoon.Utils,arguments)},performRequest:(e,n,t,o=5e3)=>Kameleoon.Utils.performBeaconServerCall(e,n,t,o),querySelectorAll:function(e){return Kameleoon.Utils.querySelectorAll.apply(Kameleoon.Utils,arguments)},setInterval:(e,n=200)=>Kameleoon.Utils.setInterval(e,n,!1,!0),setTimeout:(e,n=200)=>Kameleoon.Utils.setTimeout(e,n,!0)};Object.defineProperty(this.Utils,"mouseDownEvent",{enumerable:!0,get:function(){return Kameleoon.Internals.runtime.mouseDownEvent}});Object.defineProperty(this.Utils,"touchMoveEvent",{enumerable:!0,get:function(){return Kameleoon.Internals.runtime.touchMoveEvent}});Object.defineProperty(this,"Visitor",{enumerable:!0,get:function(){try{if(!Kameleoon.Internals.runtime)return{setVisitorCode:e=>{Kameleoon.Internals.configuration.predefinedVisitorCode=e}};else return new APIVisitor}catch(e){return null}}});Object.defineProperty(this,"CurrentVisit",{enumerable:!0,get:function(){try{return new APIVisit(Kameleoon.Internals.runtime.Visitor.currentVisit)}catch(e){return null}}})}}class Gatherer{constructor(){this.MAX_HREF_LENGTH_IN_A_REQUEST=200;this.MAX_PAGE_TITLE_LENGTH_IN_A_REQUEST=200}run(){let e=Kameleoon.Utils.clone(Kameleoon.Internals.configuration.Gatherer);if("string"==typeof e)e=JSON.parse(Kameleoon.Utils.decodeString(e));Kameleoon.Internals.runtime.Gatherer={configuration:e,active:!0,clicks:0};this.Browser=new Browser(e.browsers);this.KeyPage=new KeyPage(e.keyPages);this.Language=new Language;this.OperatingSystem=new OperatingSystem(e.oss);this.Referrer=new Referrer(e.referrers);Kameleoon.Internals.runtime.storedData.saveField("Gatherer","startsOfVisitForCurrentPage",0);Kameleoon.Internals.runtime.Visitor=new Visitor;Kameleoon.Internals.runtime.RequestManager=new RequestManager;Kameleoon.Internals.runtime.Visitor.performRemoteVisitorSynchronization();this.track(VisitEvent_Page);this.track(VisitEvent_StaticData);VisitEvent_Activity.initialize();Kameleoon.Internals.runtime.gathererRun=!0}startNewVisit(e,t){Kameleoon.Internals.runtime.Visitor.updateFromStoredData(!0,!0,t);}track(e,t){new VisitEvent(e).track(t)}}class KameleoonEngine{constructor(){this.Analyst=new Analyst;this.API=new API;this.Gatherer=new Gatherer;this.Loader=new Loader;this.Targeting=new Targeting;this.Tracking=new Tracking;this.Utils=new Utils}}class Loader{constructor(){this.enableKameleoonEditorListener=()=>{if(!Kameleoon.Internals.runtime.editorListenerEnabled){Kameleoon.Internals.runtime.editorListenerEnabled=!0;const t=t=>{if(!t)t=window.event;Kameleoon.Loader.listenKeys.call(Kameleoon.Loader,t)};Kameleoon.Utils.addEventListener(document,"keyup",t,!1)}};this.listenKeys=t=>{if(t.shiftKey){if(113==t.keyCode&&Kameleoon.Internals.configuration.webExperimentationSetup){Kameleoon.Internals.runtime.editorMode=!0;Kameleoon.Analyst.loadKameleoonFull((()=>{Kameleoon.Loader.enableKameleoonEditor.apply(Kameleoon.Loader)}),!0)}if(115==t.keyCode&&(Kameleoon.Internals.runtime.simulationMode||Kameleoon.Internals.runtime.parameters.kameleoonVariationSelection))Kameleoon.Analyst.loadKameleoonFull((()=>{Kameleoon.Loader.enableSimulationPanel()}),!0)}};}}class Runtime{constructor(e,t){this.isReloaded=e;this.DATA_URL=Kameleoon.Internals.configuration.DATA_URL;this.PAGE_LOADED_POLL_DELAY=250;this.PAGE_LOADING_POLL_DELAY=75;this.enableSinglePageSupport=()=>{this.singlePageSupport=!0;this.href=window.location.href;KMutationObserver.setMutationObserverSPA();Kameleoon.Utils.setInterval((()=>{const e=this.href;this.href=window.location.href;if(e!=this.href){Kameleoon.Gatherer.Referrer.update(e);Kameleoon.Analyst.load.apply(this,[])}}),100)};this.enableDynamicRefresh=()=>{this.dynamicRefresh=!0;KMutationObserver.setMutationObserverSPA()};this.executeGlobalScript=()=>{if(!this.editorMode&&!this.kameleoonSelectionIframeMode){if(Kameleoon.Internals.configuration.globalScript&&!this.globalScriptProcessed){Kameleoon.Utils.sendKameleoonCustomEvent("Internals",{type:"globalScript"});this.globalScriptProcessed=!0;Kameleoon.Utils.runProtectedScript(Kameleoon.Internals.configuration.globalScript,"kameleoonGlobalScript.js")}}};this.initializePredefinedVisitorCode=()=>{const{predefinedVisitorCode:e,experiments:t,personalizations:o}=Kameleoon.Internals.configuration;if(e){const n=Kameleoon.Utils.readLocalData("kameleoonVisitorCode","COOKIE")||Kameleoon.Utils.readLocalData("kameleoonVisitorCode","LS");if(n==e)return;const a=this.storedData.Visitor.visits;if(a)a.slice(-1)[0].visitorCode=e;if(this.incomingStoredData)this.incomingStoredData["kameleoonVisitorCode"]=e;Kameleoon.Utils.saveVisitorCode(e);t.forEach((e=>{Kameleoon.Utils.eraseLocalData("kameleoonExperiment-"+e.id,null,"LS")}));}};this.initializeActions=()=>{if(Kameleoon.Internals.configuration.webExperimentationSetup){this.targetingSegments=Kameleoon.Utils.clone(Kameleoon.Internals.configuration.targetingSegments);this.targetingTriggers=Kameleoon.Utils.clone(Kameleoon.Internals.configuration.targetingTriggers||[]);this.variations=Kameleoon.Utils.clone(Kameleoon.Internals.configuration.variations);Kameleoon.Internals.configuration.experiments.forEach((e=>{this.Campaigns.addCampaign(new Experiment(e,this.incomingStoredData))}));}};this.initializeActionsAfterGatherer=()=>{};this.initializeIdleTimeListener=()=>{};this.initializeListeners=()=>{Kameleoon.Utils.domReady((()=>{this.domReady=!0;if(!0!==Kameleoon.Internals.configuration.disableEditorLaunchViaKeys)Kameleoon.Loader.enableKameleoonEditorListener();if(this.kameleoonSelectionIframeMode){const e=document.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("charset","utf-8");e.setAttribute("src","https://back-office-redesign."+Kameleoon.Internals.configuration.DOMAIN+"/get-script?type=selection");this.headNode.appendChild(e)}if(0==window.kameleoonLightIframe&&window.kameleoonIframeURL)if(this.Gatherer.startOfVisit)Kameleoon.Utils.setTimeout((()=>{const e=document.createElement("iframe");e.src=window.kameleoonIframeURL;e.id="kameleoonExternalIframe";e.style.cssFloat="left !important";e.style.opacity="0.0 !important";e.width="0px";e.height="0px";e.onload=()=>{e.parentNode.removeChild(e)};document.head.appendChild(e)}),5e3)}));if("touchend"==this.mouseDownEvent){Kameleoon.Utils.addEventListener(document,"touchmove",(e=>{this.touchMoveEvent=!0}));Kameleoon.Utils.addEventListener(document,"touchstart",(e=>{this.touchMoveEvent=!1}))}if(!this.iframeLocalStorage)window.addEventListener("storage",(e=>{const t=e.key?.split("-")??[""];let o=t[0];if(!o.startsWith("kameleoon"))return;let n;try{n=null==e.newValue?null:JSON.parse(e.newValue).value}catch(e){return}try{if(e.oldValue&&JSON.parse(e.oldValue).value===n)return}catch(e){}if("kameleoonData"===o&&t[1])o+="-"+t[1];const a={};switch(o){case"kameleoonExperiment":a.type=o;const e=t[1];a.experimentId=parseInt(e);let i;if(null==n)i=null;else{const e=n.split("/")[0];i=isNaN(e)?e:parseInt(e)}a.registeredVariationId=i;break;case"kameleoonGlobalPersonalizationExposition":a.type=o;a.active=null==n?null:"true"==n.split("/")[0];break;case this.dataKeyName:case"kameleoonSimulationVisitorData":a.type=o;a.value=null==n?null:n;break;case"kameleoonLegalConsent":a.type=o;a.saveLegalConsent=null==n?null:n;break}if(null!=a.type)Kameleoon.Utils.processStorageData(a)}),!1);};this.loadExternalRequests=()=>{this.Geolocation="function"===typeof KGeolocation?new KGeolocation:null;this.Weather="function"===typeof KWeather?new KWeather:null;this.IP="function"===typeof KIP?new KIP:null;};this.initProductRecommendation=()=>{};this.processPageLoaded=()=>{Kameleoon.Utils.removeBlockingStyleSheet();for(let e=0,t=this.variations.length;e{const e="adBlockerCheck";const t=Kameleoon.Utils.setInterval((()=>{let o=document.getElementById(e);if(null==o&&document.body){o=document.createElement("div");o.id=e;o.className="ad-placement";document.body.appendChild(o)}if(null!=o&&0==o.clientWidth){this.adBlocker=!0;Kameleoon.Utils.clearInterval(t)}}),250);const o=Kameleoon.Utils.setTimeout((()=>{Kameleoon.Utils.clearTimeout(o);const n=document.getElementById(e);if(null!=n)n.parentNode.removeChild(n);if(null==this.adBlocker){Kameleoon.Utils.clearInterval(t);this.adBlocker=!1}else Kameleoon.Gatherer.track(VisitEvent_AdBlocker)}),2e3);Kameleoon.Utils.addEventListener(window,"pageshow",(e=>{if(e.persisted)this.updateAfterPageCached()}));this.Visitor.updateFromStoredData(!1,!1,!1);if(!Kameleoon.Internals.configuration.requestsAfterConsent)this.loadExternalRequests();KMutationObserver.setMutationObserver();Kameleoon.Analyst.loadKameleoonFull((()=>{Kameleoon.Analyst.loadSimulation()}));Kameleoon.Analyst.Actions.processAllActions();Kameleoon.Targeting.processAllTargetings();Kameleoon.Analyst.Goals.run()};this.setupLocalData=e=>{Kameleoon.Utils.addEventListener(window,"message",Kameleoon.Utils.processMessageEvent,!1);if(this.iframeLocalStorage){this.immediateSaveActive=!0;this.externalIframe=document.getElementById("kameleoonExternalIframe")||window.kameleoonExternalIframe;this.postMessageOrigin=window.kameleoonIframeOrigin||"";this.postMessageCallbacks={};if(null==Kameleoon.Internals.configuration.externalIframeData)Kameleoon.Utils.postMessageToExternalIframe("retrieve",null,null,(t=>{this.incomingStoredData=t;e()}));else{this.incomingStoredData=Kameleoon.Internals.configuration.externalIframeData;e();delete Kameleoon.Internals.configuration.externalIframeData}}else{this.incomingStoredData=null;this.clearOutdatedStorage();e()}};this.updateAfterPageCached=()=>{this.pageCached=!0;if(this.iframeLocalStorage)Kameleoon.Utils.postMessageToExternalIframe("retrieve",null,null,(()=>{}));else{const e=Kameleoon.Utils.readLocalData(this.simulationMode?"kameleoonSimulationVisitorData":this.dataKeyName,"LS",!0);this.storedData.update(e);this.Visitor.updateFromStoredData(!1,!1,!1);Kameleoon.Gatherer.track(VisitEvent_Page);Kameleoon.Gatherer.track(VisitEvent_StaticData)}};this.clearOutdatedStorage=()=>{try{for(let e=0,t=localStorage.length;e(e.date||e.expirationDate))localStorage.removeItem(t)}}}catch(e){}};this.getSimulationMode=()=>{const e=null!=this.readFromStorageOrExternal("kameleoonSimulation","LS")||this.parameters["kameleoon-simulation"];return e?!0:!1};this.processSelectorPresence=({selector:e,slowQueue:t,pollingInterval:o,isDynamicElement:n,useAntiFlicker:a,callback:i})=>{const s=Kameleoon.Utils.querySelectorAll(e);const l=i;if(Kameleoon.Internals.runtime.querySelectorAllHasError)return;const r=t?Kameleoon.Internals.runtime.waitingSlowElementPresentObjects:Kameleoon.Internals.runtime.waitingElementPresentObjects;const m=t?Kameleoon.Internals.runtime.waitingSlowDynamicElements:Kameleoon.Internals.runtime.waitingDynamicElements;if(n)i=t=>{KMutationObserver.setMutationObserverSPA();const o=`data-kameleoon-dynamic-class-${Kameleoon.Utils.obtainRandomString(4)}`;const n=e=>{e.forEach((e=>e.setAttribute(o,"true")))};n(t);l(t);m.push({selector:e,attribute:o,callback:e=>{n(e);l(e)}})};if(s.length>0){Kameleoon.Utils.runProtectedFunction((()=>{i(s)}),!0);return}if(Kameleoon.Internals.runtime.cantUseMutationObserver||!a){const t=Kameleoon.Utils.setInterval((()=>{const o=Kameleoon.Utils.querySelectorAll(e);if(o.length>0){Kameleoon.Utils.clearInterval(t);Kameleoon.Utils.runProtectedFunction((()=>{i(o)}),!0)}}),o||250,!0);return}else{r.push({selector:e,callback:i,useAntiFlicker:a})}};this.pageStartTime=Date.now();this.dataKeyName="kameleoonData";if(Kameleoon.Internals.configuration.useMultipleSiteCodes){this.dataKeyName=this.dataKeyName+"-"+Kameleoon.Internals.configuration.siteCode;Utils.LOCAL_STORAGE_OBFUSCATED_KEYS[this.dataKeyName]=!0}this.Device=new Device;this.deviceType=this.Device.type;this.parameters=Kameleoon.Utils.parseParameters();this.beforeUnloadEvent="Phone"===this.deviceType&&"Safari"===this.Device.browser?"pagehide":"beforeunload";this.headNode=document.getElementsByTagName("head")[0];this.editorMode="true"==this.parameters.kameleoon;this.proxyMode="proxy."+Kameleoon.Internals.configuration.DOMAIN===window.location.hostname;this.disableCache="true"==this.parameters.kameleoonDisableCache||this.parameters.kameleoonVariationId;this.kameleoonSelectionIframeMode="true"==this.parameters.kameleoonSelectionIframeMode;this.useBroadcastChannel="function"===typeof window.BroadcastChannel;this.iframeLocalStorage=Kameleoon.Internals.configuration.useWideDomainSupport;this.useWideDomainSupport=Kameleoon.Internals.configuration.useWideDomainSupport||null!=window.kameleoonLightIframe;if(!window.kameleoonLightIframe)this.iframeLocalStorage=!1;if(!this.useBroadcastChannel)this.immediateSaveActive=!0;this.tabId=Kameleoon.Utils.secureSessionStorage("getItem","kameleoonTabId");if(!this.tabId){this.tabId=Kameleoon.Utils.obtainRandomString(8,Analyst.HEXADECIMAL_ALPHABET);this.tabIdCreated=!0}this.mouseDownEvent="ontouchend"in document.documentElement?"touchend":"mousedown";this.addedClasses={};this.addedIDs={};this.eventListeners=[];this.listenVariations=[];this.listenSpaCallbacks=[];this.waitingElementPresentObjects=[];this.waitingSlowElementPresentObjects=[];this.waitingDynamicElements=[];this.waitingSlowDynamicElements=[];this.variations=[];this.intervalIds={};this.targetingSegments=[];this.targetingTriggers=[];this.timeoutIds={};this.cantUseMutationObserver="undefined"==typeof MutationObserver;this.Campaigns=new Campaigns;this.Consent=new Consent;Kameleoon.Analyst.Goals.addList(Kameleoon.Internals.configuration.goals);if(e&&Kameleoon.Gatherer.Referrer&&Kameleoon.Gatherer.Referrer.isUpdated)this.prevSpaPage=Kameleoon.Gatherer.Referrer.obtain();try{if(window.self!==window.top)this.isIframe=!0}catch(e){}this.enableRemoteVisitorSynchronization=Kameleoon.Internals.configuration.enableRemoteVisitorSynchronization&&(!Kameleoon.Internals.configuration.enableRemoteVisitorSynchronizationItpOnly||"Safari"===this.Device.browser);if(t?.localDataMap)this.localDataMap=t.localDataMap;Object.defineProperty(this,"experiments",{get(){return this.Campaigns.obtainCampaignsList(0)}});Object.defineProperty(this,"personalizations",{get(){return this.Campaigns.obtainCampaignsList(1)}});Object.defineProperty(this,"goals",{get:()=>Kameleoon.Analyst.Goals.getList()})}clear(){this.eventListeners.forEach((e=>{let t;if("window"==e.elementKey||"document"==e.elementKey)t="window"==e.elementKey?window:document;else{t=document.querySelector(`[kameleoonListener-${e.elementKey}=true]`);if(t)t.removeAttribute(`kameleoonListener-${e.elementKey}`)}if(t)t.removeEventListener(e.eventType,e.actionFunction,e.useCapture)}));this.waitingDynamicElements.forEach((e=>{Kameleoon.Utils.querySelectorAll(`[${e.attribute}=true]`).forEach((t=>{t.removeAttribute(e.attribute)}))}));for(const e in this.timeoutIds)Kameleoon.Utils.clearTimeout(parseInt(e));for(const e in this.intervalIds)Kameleoon.Utils.clearInterval(parseInt(e));this.RequestManager?.processRequests();this.storedData?.save(2);this.mutationObserver?.disconnect();this.mutationObserverSpa?.disconnect();try{this.broadcastSynchranization?.close()}catch{}if(Kameleoon.Targeting)Kameleoon.Targeting.clear?.();Kameleoon.Tracking?.clear?.();Kameleoon.Analyst.Actions?.clear?.();let e=Kameleoon.Utils.querySelectorAll("[id^='kameleoonElement'], [id*='kameleoonScenarioLayerBase'], [id^='kameleoonStyleSheet'], [class*='kameleoonWidget'], [class*='kameleoonInsert']");for(let t=0;t{this.simulationMode=this.getSimulationMode();this.storedData=new StoredData(this.incomingStoredData);this.Consent.setup();this.initializePredefinedVisitorCode();this.initializeActions();Kameleoon.Gatherer.run();this.initializeActionsAfterGatherer();this.executeGlobalScript();window.kameleoonQueue=new CommandQueue(window.kameleoonQueue);Kameleoon.Utils.sendKameleoonCustomEvent.call(window,"Started",{newVisitorCode:1===this.Visitor.visits.length});this.initializeListeners();this.setup();this.setupAfterLocalDataRetrieval=!0}))}}class Utils{constructor(){this.events=[];this.addParameterToURL=(e,t,n)=>{if(n)return e+(-1==e.indexOf("#")?"#":"&")+t;let o="";if(-1!=e.indexOf("#")){o=e.substr(e.indexOf("#"));e=e.substr(0,e.indexOf("#"))}e+=(-1==e.indexOf("?")?"?":"&")+t+o;return e};this.computeCurrentPageAbsoluteURLNoProxyMode=function(){let e=Kameleoon.Internals.runtime;if(null==e.currentPageAbsoluteURLNoProxyMode){if(e.proxyMode){let t=e.parameters.kameleoonExperimentId||e.parameters["kameleoon-experiment-id"];if(null!=t){let n=e.Campaigns.obtainCampaign(t,!0);if(n)e.currentPageAbsoluteURLNoProxyMode=n.baseURL}}if(null==e.currentPageAbsoluteURLNoProxyMode)e.currentPageAbsoluteURLNoProxyMode=window.location.href}return e.currentPageAbsoluteURLNoProxyMode};this.computeCurrentPageCanonicalURL=()=>{if(null==Kameleoon.Internals.runtime.currentPageCanonicalURL){let e=this.querySelectorAll('link[rel="canonical"]');if(e.length>0)Kameleoon.Internals.runtime.currentPageCanonicalURL=e[0].href}return Kameleoon.Internals.runtime.currentPageCanonicalURL};this.computeCurrentPageCleanRelativeURL=()=>{if(null==Kameleoon.Internals.runtime.currentPageCleanRelativeURL)Kameleoon.Internals.runtime.currentPageCleanRelativeURL=this.computeRelativeURL(this.computeCurrentPageCleanAbsoluteURL());return Kameleoon.Internals.runtime.currentPageCleanRelativeURL};this.computeIfSuffix=(e,t)=>{let n=e.length-t.length;let o=e.lastIndexOf(t,n);return o>=0&&o==n};this.computeRelativeURL=e=>{let t=document.createElement("a");t.href=e;return t.pathname+t.search+t.hash};this.computeStringSha256=e=>{let t=1,n,o=[],a=[];while(++t<18)for(n=t*t;n<312;n+=t)o[n]=1;function r(e,t){return Math.pow(e,1/t)%1*4294967296|0}for(t=1,n=0;t<313;)if(!o[++t]){a[n]=r(t,2);o[n++]=r(t,3)}function l(e,t){return e>>>t|e<<32-t}let i=a.slice(t=0),s=this.encodeUTF8(e),m=[],u=s.length,c=[],d,f,h;for(;t>2]|=(255&s.charCodeAt(t))<<8*(3-t++%4);u*=8;c[u>>5]|=128<<24-u%32;c[h=u+64>>5|15]=u;for(t=0;t>>10)+(0|m[n-7])+(l(f=m[n-15],7)^l(f,18)^f>>>3)+(0|m[n-16]);let e;d.unshift((f=(d.pop()+(l(e=d[4],6)^l(e,11)^l(e,25))+((e&d[5]^~e&d[6])+o[n])|0)+(0|m[n++]))+(l(u=d[0],2)^l(u,13)^l(u,22))+(u&d[1]^d[1]&d[2]^d[2]&u))}for(n=8;n--;)i[n]=d[n]+i[n]}for(s="";n<63;)s+=(i[++n>>3]>>4*(7-n%8)&15).toString(16);return s};this.computeURLNoKameleoonParameters=e=>{let t=!1;for(let n in Kameleoon.Internals.runtime.parameters)if(-1!=n.indexOf("kameleoon")){t=!0;e=e.replace(new RegExp(n+"="+Kameleoon.Internals.runtime.parameters[n]+"&?"),"")}return t?e.replace(/\?$/,""):e};this.computeURLRegExpNoKameleoonParameters=e=>e?e.replace(/(\\\?|&|#)kameleoon[^&#()]*/g,""):null;this.decodeString=e=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="";let o,a,r;let l,i,s,m;let u=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(u>4;a=(15&i)<<4|s>>2;r=(3&s)<<6|m;n+=String.fromCharCode(o);if(64!=s)n+=String.fromCharCode(a);if(64!=m)n+=String.fromCharCode(r)}n=this.decodeUTF8(n);return n};this.decodeUTF8=e=>{let t="";let n=0;let o=0,a=0,r;while(n191&&o<224){a=e.charCodeAt(n+1);t+=String.fromCharCode((31&o)<<6|63&a);n+=2}else{a=e.charCodeAt(n+1);r=e.charCodeAt(n+2);t+=String.fromCharCode((15&o)<<12|(63&a)<<6|63&r);n+=3}}return t};this.domReady=e=>{if("complete"==document.readyState||"interactive"==document.readyState)return e();else{let t=!1;this.addEventListener(document,"DOMContentLoaded",(()=>{if(t)return;t=!0;e()}),!1);this.addEventListener(window,"load",(()=>{if(t)return;t=!0;e()}),!1)}};this.encodeString=e=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="";let o,a,r,l,i,s,m;let u=0;e=this.encodeUTF8(e);while(u>2;i=(3&o)<<4|a>>4;s=(15&a)<<2|r>>6;m=63&r;if(isNaN(a))s=m=64;else if(isNaN(r))m=64;n=n+t.charAt(l)+t.charAt(i)+t.charAt(s)+t.charAt(m)}return n};this.encodeUTF8=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let n=0;n127&&o<2048){t+=String.fromCharCode(o>>6|192);t+=String.fromCharCode(63&o|128)}else{t+=String.fromCharCode(o>>12|224);t+=String.fromCharCode(o>>6&63|128);t+=String.fromCharCode(63&o|128)}}return t};this.forceNoFlicker=e=>{let t=document.createElement("style");t.setAttribute("id","kameleoonPageLoading");t.setAttribute("rel","stylesheet");t.setAttribute("type","text/css");t.setAttribute("media","screen");let n="";if("*"===e)n="html::after { content: ''; position: fixed; inset: 0; background: #fff; z-index: 2147483647; }";else n=e+" { visibility: hidden !important; background-image: none !important; }";t.appendChild(document.createTextNode(n));Kameleoon.Internals.runtime.headNode.appendChild(t)};this.getLocale=e=>{let t=Kameleoon.Gatherer.Language.obtainLocaleTag().substring(0,2);if(e&&"fr"!=t)t="en";return t};this.obtainComputedStyle=e=>window.getComputedStyle?.(e,"");this.obtainCurrentRootDomain=()=>{if(null==Kameleoon.Internals.runtime.currentRootDomain){const e=window.location.hostname.split(".");const t=e.length-1;const n="testRootDomain";const o="_detectRootDomain";let a=e[t];for(let r=t-1;r>=0;r--){a=e[r]+"."+a;this.createLocalData(o,n,1,a,"COOKIE",!1,void 0,!0);const t=this.readLocalData(o,"COOKIE",!1);if(t){this.eraseLocalData(o,a,"COOKIE");Kameleoon.Internals.runtime.currentRootDomain=a;break}}}return Kameleoon.Internals.runtime.currentRootDomain};this.obtainRandomString=(e,t=Analyst.CODE_ALPHABET)=>{let n=t.length;let o="";for(let a=0;a{let t=document.createElement("a");t.href=e;return t.hostname};this.processRedirect=(e,t,n)=>{if(window.location.href!=e){t=t||Kameleoon.Analyst.Actions.currentAction;let o=document.createElement("a");o.href=e;if(!Kameleoon.Internals.runtime.useWideDomainSupport&&-1==window.location.href.indexOf(o.protocol+"//"+o.hostname)){if(t)e=this.addParameterToURL(e,"kameleoonRedirect-"+t.id+"="+t.associatedVariation.id,!0)}else if(t)this.createLocalData("kameleoonRedirect-"+t.id,t.associatedVariation.id,1,null,null,!1,null,!0);if(window.location.href!=e){this.forceNoFlicker("*");this.createLocalData("kameleoonReferrer",Kameleoon.Gatherer.Referrer.obtain(),1/24,null,"COOKIE",!1);if(n)Kameleoon.Internals.runtime.redirectInProcess=!0;window.location.replace(e)}}};this.processStorageData=e=>{if(Kameleoon.Internals.runtime.setupAfterLocalDataRetrieval)switch(e.type){case"kameleoonExperiment":const t=Kameleoon.Internals.runtime.Campaigns.obtainCampaign(e.experimentId,!0);if(t)t.registeredVariationId=e.registeredVariationId;break;case"kameleoonGlobalPersonalizationExposition":Kameleoon.Internals.runtime.personalizationsActive=e.active;break;case Kameleoon.Internals.runtime.dataKeyName:case"kameleoonSimulationVisitorData":if(e.type==Kameleoon.Internals.runtime.dataKeyName&&!Kameleoon.Internals.runtime.simulationMode||"kameleoonSimulationVisitorData"==e.type&&Kameleoon.Internals.runtime.simulationMode){if(Kameleoon.Internals.runtime.pageCached)Kameleoon.Internals.runtime.storedData.update(this.readLocalData(e.type,"LS",!0));else Kameleoon.Internals.runtime.storedData.update(JSON.parse(this.unobfuscateString(e.value)));Kameleoon.Internals.runtime.Visitor.updateFromStoredData(!1,!1,!1)}break;case"kameleoonLegalConsent":if(e.saveLegalConsent){let t=e=>e?"enable":"disable";if(null!=e.saveLegalConsent.AB_TESTING){let n=t(e.saveLegalConsent.AB_TESTING);Kameleoon.Internals.runtime.Consent[n]("AB_TESTING",!0)}if(null!=e.saveLegalConsent.PERSONALIZATION){let n=t(e.saveLegalConsent.PERSONALIZATION);Kameleoon.Internals.runtime.Consent[n]("PERSONALIZATION",!0)}}break}};this.querySelectorAll=(e,t)=>{Kameleoon.Internals.runtime.querySelectorAllHasError=!1;let n=!1,o,a=[],r=[];if(null==t)t=document;let l=e.match(/#([0-9]+.*)(?: |$)/);if(l){let t=e.charAt(1);e=e.replace("#"+t,"#\\3"+t+" ")}if(""!==e){if(-1!==e.indexOf("[")&&-1===e.indexOf("']")&&-1===e.indexOf('"]')){let t=e.split(/(?=\.)|(?=#)|(?=\[)/),n,o,a;t.forEach((function(t){if("["===t[0]&&-1===t.indexOf("']")&&-1===e.indexOf('"]')&&-1!==e.indexOf("=")){n=t.split(/=(.+)?/);o=n[1];o=o.substring(0,o.length-1);a=n[0]+"='"+o+"']";e=e.replace(t,a)}}))}if(-1!==e.indexOf(":contains")){n=!0;o=this.treatContainsSelector(e);e=o.newSelector}if(t&&t.querySelectorAll)if(-1!==e.indexOf(":eq"))a=this.treatEqSelector(e,t);else try{a=t.querySelectorAll(e)}catch(e){Kameleoon.Internals.runtime.querySelectorAllHasError=!0;a=[]}for(let e=0,t=a.length;e{try{e()}catch(e){if(t)console.log(e);else this.Logger.send(e,"kameleoon.js");if(Kameleoon.Internals.runtime&&t)Kameleoon.Internals.runtime.processPageLoaded()}};this.runProtectedScript=(e,t,n)=>{if(n)return n();if(e){let n=null;try{let o=t?"//# sourceURL="+t:"";n=eval.call(window,"(function () {\n"+e+"\n})();"+o)}catch(e){n=null;console.log(e)}return n}return null};this.saveVisitorCode=(e,t=!0)=>{if(Kameleoon.Internals.configuration.useWideDomainSupport||Kameleoon.Internals.configuration.useVisitorCodeInLocalStorage)this.createLocalData("kameleoonVisitorCode",e,Utils.MAX_STORAGE_DAYS,null,"LS");if(t)this.createLocalData("kameleoonVisitorCode",e,Utils.MAX_STORAGE_DAYS,Kameleoon.Internals.configuration.customCookieDomainName,"COOKIE")};this.seededRandom=(e,t)=>{let n;if(t){n=this.computeStringSha256(e);return parseInt(n,16)/Math.pow(2,256)}n=this.computeStringHash(e);n=(9301*Math.abs(n)+49297)%233280;return n/233280};this.treatEqSelector=(e,t)=>{if(void 0===e)return null;let n=e.split(/\:eq\([0-9]+\)/g);let o=e.match(/(?!\:eq\()[0-9]+/g)||[];let a=null==t?document:t;for(let t=0;t"===n[t].charAt(0))n[t]=n[t].substring(1,e.length).trim();if(null==a||""==n[t].trim())break;if(t>o.length-1)a=a.querySelectorAll(n[t]);else a=a.querySelectorAll(n[t])[o[t]]}if(null==a)return[];if(void 0==a.length)a=[a];let r=Kameleoon.Utils.querySelectorAll(e.replace(/\:eq\([0-9]+\)/g,""));let l=[];for(let e=0;e{let n=t.split("=");try{e[decodeURIComponent(n[0])]=n[1]?decodeURIComponent(n[1]):null}catch(t){e[unescape(n[0])]=n[1]?unescape(n[1]):null}}))}return e}performBeaconServerCall(e,t,n,o){let a=new XMLHttpRequest;a.open("GET",e,!0);if(t)a.onreadystatechange=function(e){t.bind(a)(e.target)};if(n){a.onerror=function(e){n.bind(a)(e.target)};a.ontimeout=function(e){n.bind(a)(e.target)}}a.timeout=o||15*60*1e3;a.send()}postMessageToExternalIframe(e,t,n,o){const a=JSON.stringify({type:e,key:t??void 0,data:n??void 0,callbackId:this.addPostMessageCallback(o)});if(!Kameleoon.Internals.runtime.externalIframe||!Kameleoon.Internals.runtime.externalIframe.contentWindow){if(window.kameleoonIframeURL){let e=document.createElement("iframe");e.src=window.kameleoonIframeURL;e.id="kameleoonExternalIframe";e.style.cssFloat="left !important";e.style.height="0px !important";e.style.opacity="0.0 !important";e.style.width="0px !important";e.onload=()=>{Kameleoon.Internals.runtime.externalIframe=e;Kameleoon.Internals.runtime.externalIframe.contentWindow.postMessage("kameleoon"+a,"*")};document.head.appendChild(e)}}else Kameleoon.Internals.runtime.externalIframe.contentWindow.postMessage("kameleoon"+a,"*")}processMessageEvent(e){if("string"!==typeof e.data)return;if("obtainTagCommanderVariableNames"==e.data){let t=[];if(window.tc_vars)for(let e in window.tc_vars)t.push(e);if(!(e.source instanceof MessagePort)&&!(e.source instanceof ServiceWorker))e.source.postMessage("tagCommanderVariableNames"+JSON.stringify(t),e.origin);return}if(0==e.data.indexOf("checkKameleoonScriptPresent")){if("https://back-office."+Kameleoon.Internals.configuration.DOMAIN==e.origin){let t="";let n=e.data.replace("checkKameleoonScriptPresent","");Kameleoon.Utils.runProtectedScript(n);if(!(e.source instanceof MessagePort)&&!(e.source instanceof ServiceWorker))e.source.postMessage(t,e.origin)}return}if(Kameleoon.Internals.runtime.iframeLocalStorage&&Kameleoon.Internals.runtime.postMessageOrigin==e.origin)try{let t=JSON.parse(e.data);if(t.kameleoonMessage){if(t.callbackId){let e=Kameleoon.Internals.runtime.postMessageCallbacks[t.callbackId];delete Kameleoon.Internals.runtime.postMessageCallbacks[t.callbackId];e&&e(t.data)}if(null!=t.type)Kameleoon.Utils.processStorageData(t)}}catch(e){}}readLocalData(e,t,n){let o="COOKIE"!=t;let a=Date.now();try{if(!Kameleoon.Internals.runtime.Consent.hasGlobalConsent()){let t=Kameleoon.Internals.runtime.localDataMap;let n=o?"LS":"COOKIE";if(null!=t&&null!=t[n]&&null!=t[n][e]){let o=t[n][e];if(a-24*o.days*60*60*1e3>=o.creationTime)delete t[n][e];else return o.value}}if(o){let t=localStorage.getItem(e);if(!t)return null;t=JSON.parse(t);if(Utils.LOCAL_STORAGE_OBFUSCATED_KEYS[e])t.value=JSON.parse(this.unobfuscateString(t.value));if(a>(t.date||t.expirationDate)){localStorage.removeItem(e);return null}return t.value}else{let t=null;let o=document.cookie.split(";");for(let a=0,r=o.length;ae[0]+"="+e[1])).join("&")}treatContainsSelector(e){let t={},n;function o(e,t){let n=!1;if(t.textContent&&-1!==t.textContent.indexOf(e))n=!0;return n}n=e.match(/:contains\(['"]([\s\S]+)['"]\)/);t.containText=n[1];t.newSelector=e.replace(n[0],"");if(""===t.newSelector)t.newSelector="*";t.check=o;return t}unobfuscateString(e){let t="";for(let n=0,o=e.length;n{o=null;e()}),t)}}}Utils.LOCAL_STORAGE_OBFUSCATED_KEYS={kameleoonData:!0,kameleoonSimulationVisitorData:!0};Utils.MAX_STORAGE_DAYS=365;class Browser{constructor(e){this.browsers=e}obtain(){let e=Kameleoon.Internals.runtime.Device.browser;if("Internet Explorer"==e||"Microsoft Edge"==e)e="Explorer";return e}obtainIndex(){let e=this.obtain()||"";let r=e.toUpperCase();for(let e in this.browsers)if(this.browsers[e].name.toUpperCase()==r)return parseInt(e);return null}}class KeyPage{constructor(e){this.keyPages=e}obtainIndexes(){const e=[];if(0==e.length)e.push(null);return e}}class Language{constructor(){this.DEFAULT_LOCALE_LANGUAGE_TAG="en"}obtainLocaleTag(){return navigator&&navigator.language||this.DEFAULT_LOCALE_LANGUAGE_TAG}}class OperatingSystem{constructor(e){this.oss=e}obtainIndex(){const e=this.obtain().toUpperCase();for(const s in this.oss)if(this.oss[s].name.toUpperCase()==e)return parseInt(s);return null}obtain(){const e=(Kameleoon.Utils.bowser.parsedResult||Kameleoon.Utils.bowser.parse(navigator.userAgent)).os.name;switch(e){case"Windows Phone":case"iOS":case"Android":case"Linux":case"Windows":return e;case"macOS":return"Tablet"==Kameleoon.Internals.runtime.Device.type?"iOS":"Mac";default:return"Other"}}}class Referrer{constructor(e){this.referrers=e;this.referrer=Kameleoon.Internals.runtime.prevSpaPage||document.referrer;const t="kameleoonReferrer";const r=Kameleoon.Utils.readLocalData(t,"COOKIE");if(r){this.referrer=r;Kameleoon.Utils.eraseLocalData(t,null,"COOKIE")}}obtainCorrected(e){switch(this.obtainType(e)){case 0:case 1:return null;default:return this.obtain()}}update(e){this.isUpdated=!0;this.referrer=e}obtain(){return this.referrer}obtainDetectionMatches(e){let t=this.obtainDetectionPartMatches(e.method,e.parameters);if(e.and)t=t&&this.obtainDetectionPartMatches(e.andMethod,e.andParameters);return t}obtainDetectionPartMatches(e,t){try{switch(e){case 0:return new RegExp(t).test(this.obtain());case 1:const e=new RegExp(t);return e.test(Kameleoon.Utils.computeCurrentPageCleanAbsoluteURL())||e.test(Kameleoon.Utils.computeCurrentPageCleanRelativeURL());default:return!0===Kameleoon.Utils.runProtectedScript(t)}}catch(e){console.log(e);return!1}}obtainIndexes(e){switch(this.obtainType(e)){case 0:case 1:return[0];default:let e=[];let t=Number.NEGATIVE_INFINITY;for(const r in Kameleoon.Internals.runtime.Gatherer.configuration.referrers){const n=Kameleoon.Internals.runtime.Gatherer.configuration.referrers[r];if(this.obtainMatches(n)){let a=n.priority;if(null==a)a=Number.NEGATIVE_INFINITY;if(a>=t){if(a>t){e=[];t=a}e.push(parseInt(r)+1)}}}if(0==e.length)e.push(null);return e}}obtainIsIgnored(e){return!1}obtainMatches(e){const t=e.detections;for(let e=0;e1)return 1;return 3}}class StoredData{constructor(e){this.Gatherer={};this.Runtime={};this.Vars=Kameleoon.Utils.readLocalData("kameleoonVars","LS")||{};this.Visitor={};this.canSave=!1;if(e){let a="";if(e[Kameleoon.Internals.runtime.dataKeyName]){a=e[Kameleoon.Internals.runtime.dataKeyName];if(e.Kameleoon)Kameleoon.Utils.eraseLocalData("kameleoonData",null,"LS")}else if(e["kameleoonData"])a=e["kameleoonData"];if(Kameleoon.Internals.runtime.simulationMode){const t=e["kameleoonDataSimulation"]||e["kameleoonSimulationVisitorData"];a=t??""}let t=Kameleoon.Utils.unobfuscateString(a);let n=t&&JSON.parse(t)||{};this.Gatherer=n.Gatherer||{};this.Runtime=n.Runtime||{};this.Vars=n.Vars||e["kameleoonVars"]||{};this.Visitor=n.Visitor||{}}else{let e=Kameleoon.Utils.readLocalData("kameleoonData","LS");if(Kameleoon.Internals.configuration.useMultipleSiteCodes){let a=Kameleoon.Utils.readLocalData(Kameleoon.Internals.runtime.dataKeyName,"LS",!0);if(a)e=a;Kameleoon.Utils.eraseLocalData("kameleoonData",null,"LS")}if(Kameleoon.Internals.runtime.simulationMode){const a=Kameleoon.Utils.readLocalData("kameleoonDataSimulation","LS",!0);const t=Kameleoon.Utils.readLocalData("kameleoonSimulationVisitorData","LS",!0);e=a||t}if(e){this.Gatherer=e.Gatherer||{};this.Runtime=e.Runtime||{};this.Vars=e.Vars||this.Vars||{};this.Visitor=e.Visitor||{}}}Kameleoon.Utils.eraseLocalData("kameleoonVars",null,"LS");for(let e in this.Vars)if(Kameleoon.Internals.runtime.pageStartTime>this.Vars[e].date)delete this.Vars[e];Kameleoon.Utils.setInterval((()=>{if(this.canSave){this.save(2);this.canSave=!1}}),1e3);this.processTabSynchronization();let a=0;const t=e=>{const t=Date.now();if(e||t-a>100){a=t;this.save(2)}};Kameleoon.Utils.addEventListener(window,"pagehide",(()=>{let e=!1;if(Kameleoon.Internals.runtime.isIframe){const a=Kameleoon.Utils.readLocalData(Kameleoon.Internals.runtime.simulationMode?"kameleoonSimulationVisitorData":Kameleoon.Internals.runtime.dataKeyName,"LS");if(a){e=!0;this.update(a)}}t(e)}));Kameleoon.Utils.addEventListener(document,"visibilitychange",(()=>{if("hidden"===document.visibilityState&&!Kameleoon.Internals.runtime.isIframe)t()}))}processTabSynchronization(){if(!Kameleoon.Internals.runtime.useBroadcastChannel)return;try{const e=Kameleoon.Internals.runtime.broadcastSynchranization=new BroadcastChannel("kameleoon_tab_sync");const a=Kameleoon.Internals.runtime.tabId;const t=t=>{e.postMessage({type:t,from:a})};e.onmessage=e=>{const{type:n,from:i}=e.data||{};if(i===a&&2!==n)return;switch(n){case 0:Kameleoon.Internals.runtime.immediateSaveActive=!0;t(1);break;case 1:if(!Kameleoon.Internals.runtime.immediateSaveActive){Kameleoon.Internals.runtime.immediateSaveActive=!0;if(!Kameleoon.Internals.runtime.isReloaded)this.save(1)}break;case 2:Kameleoon.Internals.runtime.immediateSaveActive=!0;break}};if(Kameleoon.Internals.runtime.isIframe){Kameleoon.Internals.runtime.immediateSaveActive=!0;t(2)}t(0);Kameleoon.Utils.addEventListener(window,"pagehide",(e=>{if(e.persisted&&Kameleoon.Internals.runtime?.broadcastSynchranization){Kameleoon.Internals.runtime.broadcastSynchranization?.close();Kameleoon.Internals.runtime.broadcastSynchranization=null}}));Kameleoon.Utils.addEventListener(window,"pageshow",(e=>{if(e.persisted)Kameleoon?.Internals?.runtime?.storedData?.processTabSynchronization?.()}))}catch(e){}}obtainField(e,a,t){return this[e][a]??t??null}resetForStartOfVisit(){this.Runtime={}}saveField(e,a,t){this[e][a]=t;this.save(0)}save(e){const a=2===e||Kameleoon.Internals.runtime.immediateSaveActive&&1===e;if(a)Kameleoon.Utils.createLocalData(Kameleoon.Internals.runtime.simulationMode?"kameleoonSimulationVisitorData":Kameleoon.Internals.runtime.dataKeyName,this,Kameleoon.Internals.runtime.simulationMode?1/24:Utils.MAX_STORAGE_DAYS,null,"LS",!0);else this.canSave=!0}update(e){this.Gatherer=e.Gatherer||this.Gatherer;this.Runtime=e.Runtime||this.Runtime;this.Vars=e.Vars||this.Vars;this.Visitor=e.Visitor||this.Visitor}}class VisitEvent{constructor(e){this.visitEvent=e}track(e){const t=()=>{const t=new this.visitEvent(e);Kameleoon.Internals.runtime.Visitor.saveToStoredData();if((!e||!e.notTrack&&!t.notTrack)&&Kameleoon.Internals.configuration.track)Kameleoon.Internals.runtime.RequestManager.addRequest(t);Kameleoon.Internals.runtime.storedData.save(this.visitEvent.save)};if(!Kameleoon.Internals.runtime.Visitor.currentVisit.isVisitFinished())t();else{Kameleoon.Internals.runtime.Visitor=new Visitor;Kameleoon.Gatherer.track(VisitEvent_Page);Kameleoon.Gatherer.track(VisitEvent_StaticData);Kameleoon.Internals.runtime.gathererRun=!0;t()}}}class VisitEvent_Main{constructor(t){this.obtainRequestData=()=>{let t="eventType="+this.eventType;for(const e in this){if("function"==typeof this[e]||VisitEvent_Main.NOT_TRACK_FIELD.has(e))continue;t+=`&${e}=${this.addValueParameter(this[e])}`}return t};this.addValueParameter=t=>{const e=t=>{try{return encodeURIComponent(t)}catch(e){return t}};if("object"==typeof t)return e(JSON.stringify(t));else if("string"==typeof t)return e(t);return t};this.time=(new Date).getTime();this.nonce=Kameleoon.Utils.obtainRandomString(VisitEvent_Main.NONCE_LENGTH,Analyst.HEXADECIMAL_ALPHABET);Kameleoon.Internals.runtime.Visitor.currentVisit.addEvent(this.time)}}VisitEvent_Main.NONCE_LENGTH=16;VisitEvent_Main.NOT_TRACK_FIELD=new Set(["eventType","time","notTrack","type","save"]);class VisitEvent_Activity extends VisitEvent_Main{constructor(){super();this.eventType="activity";this.clicks=Kameleoon.Internals.runtime.Gatherer.clicks;Kameleoon.Internals.runtime.Visitor.currentVisit.addClicks(this.clicks);Kameleoon.Internals.runtime.Gatherer.active=!1;Kameleoon.Internals.runtime.Gatherer.clicks=0}static initialize(){let e=()=>{Kameleoon.Internals.runtime.Gatherer.active=!0};let t=()=>{e();Kameleoon.Internals.runtime.Gatherer.clicks++};Kameleoon.Utils.addEventListener(document,"mousemove",e,!1);Kameleoon.Utils.addEventListener(document,"scroll",e,!1);Kameleoon.Utils.addEventListener(document,"click",t,!1);Kameleoon.Utils.setInterval((()=>{if(Kameleoon.Internals.runtime.Gatherer.active)Kameleoon.Gatherer.track(this)}),this.ACTIVITY_TRACKING_INTERVAL,!0)}}VisitEvent_Activity.ACTIVITY_TRACKING_INTERVAL=60*1e3;VisitEvent_Activity.save=0;class VisitEvent_AdBlocker extends VisitEvent_Main{constructor(){super();this.eventType="adBlocker";Kameleoon.Internals.runtime.Visitor.currentVisit.addAdBlocker()}}VisitEvent_AdBlocker.save=0;class VisitEvent_Experiment extends VisitEvent_Main{constructor(i){super();this.eventType="experiment";this.id=i.id;this.variationId=i.variationId;this.notTrack=i.notTrack;if(null==this.variationId)this.notTrack=!0;if(i.notSave)return;Kameleoon.Internals.runtime.Visitor.currentVisit.addExperiment(this.time,this.id,this.variationId)}}VisitEvent_Experiment.save=1;class VisitEvent_Conversions extends VisitEvent_Main{constructor(e){super();this.eventType="conversion";this.goalId=e.goalId;this.negative=!0===e.negative;let t,i=!1;let n=Kameleoon.Internals.runtime.storedData.obtainField("Gatherer","revenuesByGoalId",{});let s=n[this.goalId];if(this.negative)if(s&&s.length>0){t=s.splice(-1)[0];if(0==s.length)delete n[this.goalId]}else i=!0;else{t=e.revenue;if(isNaN(t))t=0;if(!s)s=[];s.push(t);n[this.goalId]=s.splice(-10)}this.revenue=t;if(!i){Kameleoon.Internals.runtime.storedData.saveField("Gatherer","revenuesByGoalId",n);Kameleoon.Internals.runtime.Visitor.currentVisit.addConversions(this.goalId,1,this.revenue,this.negative);}if(e.metadata){const t={};for(const i in e.metadata){const n=e.metadata[i];const s=Array.isArray(n)?n:[n];t[i]=s.map((e=>e.toString()))}this.metadata=t}}}VisitEvent_Conversions.save=1;class VisitEvent_Geolocation extends VisitEvent_Main{constructor({city:t,country:i,latitude:o,longitude:e,postalCode:n,region:s}){super();this.eventType="geolocation";this.city=t;this.country=i;this.latitude=o;this.longitude=e;this.postalCode=n;this.region=s;Kameleoon.Internals.runtime.Visitor.currentVisit.addGeolocation({city:t,country:i,latitude:o,longitude:e,postalCode:n,region:s})}}VisitEvent_Geolocation.save=0;class VisitEvent_Page extends VisitEvent_Main{constructor(){super();this.eventType="page";const e=Kameleoon.Utils.computeCurrentPageCleanAbsoluteURL();const r=document.title;const t=Kameleoon.Utils.computeCurrentPageCanonicalURL();const i=Kameleoon.Gatherer.Referrer.obtainCorrected(Kameleoon.Internals.runtime.Gatherer.startOfVisit);this.href=e&&e.slice(0,Kameleoon.Gatherer.MAX_HREF_LENGTH_IN_A_REQUEST);this.title=r.slice(0,Kameleoon.Gatherer.MAX_PAGE_TITLE_LENGTH_IN_A_REQUEST);this.keyPagesIndices=Kameleoon.Gatherer.KeyPage.obtainIndexes();this.referrersIndices=Kameleoon.Gatherer.Referrer.obtainIndexes(Kameleoon.Internals.runtime.Gatherer.startOfVisit);if(t)this.canonicalHref=t;if(null!=i)this.referrerHref=i;Kameleoon.Internals.runtime.Visitor.currentVisit.addPage(this.time,e,this.keyPagesIndices,this.referrersIndices)}}VisitEvent_Page.save=2;class VisitEvent_Product extends VisitEvent_Main{constructor(t){super();this.eventType="product";this.ean=t.ean;Kameleoon.Internals.runtime.Visitor.currentVisit.addProduct(this.ean)}}VisitEvent_Product.save=0;class VisitEvent_StaticData extends VisitEvent_Main{constructor(){super();this.eventType="staticData";this.obtainInfluences=(e,i)=>{let t={experiments:{},personalizations:{}};let s=e=>{for(let i in e)if(e[i][1]<0||"-1"==i||null==e[i][0]||"null"==e[i][0])delete e[i];return e};e.forEach((({ExperimentActivations:e,PersonalizationActivations:s})=>{for(let s in e){let n=e[s];if(n.influence){let e=n.influence-(i-n.times.slice(-1)[0]);t.experiments[s]=[parseInt(n.associatedVariationID),e]}}for(let e in s){let n=s[e];if(n.influence){let s=n.influence-(i-n.times.slice(-1)[0]);const a=n.expRule?n.associatedVariationID:1;t.personalizations[e]=[a,s]}}}));this.experimentInfluences=s(t.experiments);this.personalizationInfluences=s(t.personalizations)};const{Visitor:e,Device:i}=Kameleoon.Internals.runtime;const{Browser:t,OperatingSystem:s,Language:n}=Kameleoon.Gatherer;this.timeSincePreviousVisit=e.obtainTimeSincePreviousVisit();this.browser=t.obtain();this.browserIndex=t.obtainIndex();this.browserVersion=i.browserVersion;this.os=s.obtain();this.osIndex=s.obtainIndex();this.screenWidth=i.screenWidth;this.screenHeight=i.screenHeight;this.localeLanguageTag=n.obtainLocaleTag();this.deviceType=i.type.toLocaleUpperCase();this.visitNumber=e.currentVisit.visitNumber;this.obtainInfluences(e.visits,e.currentVisit.startDate)}}VisitEvent_StaticData.save=0;class VisitEvent_TargetingSegments extends VisitEvent_Main{constructor(t){super();this.eventType="targetingSegment";this.id=t.id;Kameleoon.Internals.runtime.Visitor.currentVisit.addTargetingSegment(this.time,this.id)}}VisitEvent_TargetingSegments.save=0;class CommandQueue{constructor(e,s){this.executeCommand=e=>{try{if(e.command)e=e.command;if("function"===typeof e)e();else{const s=e[0];const o=s.split(".");let t;let m;if("Kameleoon"!=o[0]){t=Kameleoon.API;m=Kameleoon.API[o[0]]}else m=Kameleoon.API[o[2]];o.forEach((e=>{if(null==t)t=window[e];else t=t[e]}));t.apply(m,Array.prototype.slice.call(e,1))}}catch(e){console.log(e)}};const o="IMMEDIATE";this.commands=e&&e.forEach?e:[];this.commands.push=e=>{if(s==o)e.level==s?this.executeCommand(e):this.commands.unshift(e);else this.executeCommand(e)};const t=[];if(s==o)for(let e=this.commands.length-1;e>=0;e--){const s=this.commands[e];if(s.level===o){t.push(s);this.commands.splice(e,1)}}else{this.commands.forEach((e=>{t.push(e)}));this.commands.splice(0,this.commands.length)}t.forEach(this.executeCommand);return this.commands}}class Actions{constructor(){this.campaignsListenerQueue=[];this.associateActionAndVariation=(e,n,i)=>{let t=!0;let o=!0;if(0===i)o=!1;else if(1===i)t=!1;if(null===n)e.trackingPerformed=!0;const a=Kameleoon.Internals.runtime.variations.find((e=>e.id==n));let s="Reference";if(e&&e.variations)e.variations.forEach((function(e,i){if(e.id&&e.name&&e.id==n)s=e.name}));const r=e.associatedVariation;if(e&&r&&n==r.id)s=r.name;if(e&&t)e.associatedVariation={id:n,name:s};if(e&&o&&!e.displayedVariation)e.associationMade=!1;if(a){if(e&&(Kameleoon.Internals.runtime.simulationMode&&-1==e.id||!e.associationMade)){if(t){e.associatedVariation=a;e.associationMade=!0}a.actionId=e.id;if(o)e.displayedVariation=new Variation(a)}}else{e.displayedVariation={id:n,name:s};}};this.stopCampaignListener=()=>{if(null!=this.campaignsListenerIntervalId){Kameleoon.Utils.clearInterval(this.campaignsListenerIntervalId);this.campaignsListenerIntervalId=null}};this.tickCampaignListener=()=>{const e=this.campaignsListenerQueue;if(0===e.length){this.stopCampaignListener();return}this.campaignsListenerQueue=[];this.process(e)};this.startCampaignListenerIfNeeded=()=>{if(null!=this.campaignsListenerIntervalId)return;this.campaignsListenerIntervalId=Kameleoon.Utils.setInterval(this.tickCampaignListener,Kameleoon.Internals.runtime.PAGE_LOADING_POLL_DELAY)};this.clear=()=>{this.campaignsListenerQueue=[];this.campaignsListenerIntervalId=null};this.initCampaignListener=()=>{if(0===this.campaignsListenerQueue.length){this.stopCampaignListener();return}this.startCampaignListenerIfNeeded()}}checkCapping(e,n,i,t,o){const a=Kameleoon.Internals.runtime.Visitor;const s=null!=t.expositionFrequencySameVisit&&a.obtainActionNumberActivations(n,i,null,o,!0,!1,!1,e)>=t.expositionFrequencySameVisit;if(s)return!1;const r=null!=t.expositionFrequencySameVisitor&&null!=t.expositionFrequencySameVisitorDelaySeconds&&a.obtainActionNumberActivations(n,i,o-1e3*t.expositionFrequencySameVisitorDelaySeconds,o,!0,!0,!1,e)>=t.expositionFrequencySameVisitor;if(r)return!1;const l=t.cappingPerVisitorNumberExpositions&&a.obtainActionNumberActivations(n,i,null,o,!0,!0,!1,e)>=t.expositionFrequencySameVisitorMax;if(l)return!1;const c=t.cappingPerVisitorNumberExposedVisits&&a.obtainActionNumberActivations(n,i,null,null,!0,!0,!0,e)>=t.exposedVisitsSameVisitorMax;if(c)return!1;const g=(t.cappingPerVisitorConvertGoal||t.rule&&t.cappingPerVisitorGoalId)&&a.obtainNumberConversions(t.cappingPerVisitorGoalId)>0;if(g)return!1;const p=null!=t.expositionFrequencyDelaySecondsBetweenTwoExpositions&&a.obtainActionNumberActivations(n,i,o-1e3*t.expositionFrequencyDelaySecondsBetweenTwoExpositions,o,!0,!0,!1,e)>=1;if(p)return!1;return!0}checkActionConsent(e){const n=e.experimentAction;const i=n?Kameleoon.Internals.runtime.Consent.AB_TESTING:Kameleoon.Internals.runtime.Consent.PERSONALIZATION;if(i)return!0;const t=n?Kameleoon.Internals.configuration.beforeAbtestConsent:Kameleoon.Internals.configuration.beforePersonalizationConsent;const o=n?Kameleoon.Internals.configuration.abtestConsentOptout:Kameleoon.Internals.configuration.personalizationConsentOptout;if(null==i){if("ALL"==t)return!0;if("PARTIALLY"==t&&e.technical)return!0;return!1}if(e.technical&&"RUN"==o)return!0;return!1}checkActionsTargeting(e){Kameleoon.Internals.runtime.Campaigns.obtainCampaignsList(1).forEach((e=>{e.previousExposition=e.exposition}));const n=[];for(let i=0,t=e.length;i0)this.initCampaignListener();if(e.length>0&&Kameleoon.Internals.runtime.targetingsEvent)Kameleoon.Internals.runtime.targetingsEvent.emit(e)}performActionsTracking(e){const n=[];for(let i=0,t=e.length;i{e.handleSpecialCase()}));}}class CampaignFactory{constructor(t){this.setBlocked=t=>{this.blockingReason=t;this.blocked=!0};this.setTargetingObject=(t,i,e,n)=>{if(!e)this[t]=null;else this[t]=Kameleoon.Targeting.obtainTargeting(e)||i.find((t=>t.id==e))||null;if(!n||n==e){this.targeting=void 0;this.rescheduleTargeting=null;this.numberTargetingCheckings=0;this.displayedVariation=null}};this.setTargetingSegment=t=>{this.setTargetingObject("targetingSegment",Kameleoon.Internals.runtime.targetingSegments,this.targetingSegmentId,t)};this.setTargetingTrigger=t=>{this.setTargetingObject("targetingTrigger",Kameleoon.Internals.runtime.targetingTriggers,this.targetingTriggerId,t)};this.obtainVariationAssignmentRandomNumber=()=>{let t="";this.variations.forEach((i=>{if(i.respoolTime)t+=i.respoolTime}));const i=Kameleoon.Internals.runtime.Visitor.obtainIdentifierValue();return Kameleoon.Utils.seededRandom(i+this.id+t,!0)};this.trigger=()=>{if(!this.targeting){this.blocked=!1;this.targeting=!0;this.displayedVariation=null}};for(const i in t)this[i]=t[i]}obtainVariationIdByDeviation(){const t=this.obtainVariationAssignmentRandomNumber();let i=0;for(let e=0,n=this.variations.length;ei.id.toString()==t));if(-1!==s)e[s]=i}else e.push(i);n[t]=i}obtainCampaign(i,t){if(null==i)return;const s=i.toString();if(null!=t)return t?this.experiments[s]:this.personalizations[s];return this.experiments[s]||this.personalizations[s]}obtainCampaignsList(i){const t="experiments"===i||0===i?"experiments":"personalizations";return"experiments"===t?this.experimentsList:this.personalizationsList}}class Consent{constructor(){this.disable=(e,n)=>{Kameleoon.Utils.sendKameleoonCustomEvent("Internals",{type:"consent/disable",consentType:e});if(e&&"BOTH"!=e)this[e]=!1;else{this.AB_TESTING=!1;this.PERSONALIZATION=!1}if(1!=n)this.write();Kameleoon.Utils.sendKameleoonCustomEvent.call(window,"LegalConsentUpdated",{legalConsentUpdate:this.getConsent()})};this.enable=(e,n)=>{Kameleoon.Utils.sendKameleoonCustomEvent("Internals",{type:"consent/enable",consentType:e});if(e&&"BOTH"!=e)this[e]=!0;else{this.AB_TESTING=!0;this.PERSONALIZATION=!0}if(Kameleoon.Internals.runtime?.RequestManager){Kameleoon.Internals.runtime.RequestManager.processRequests();this.purge()}if(1!=n)this.write();Kameleoon.Utils.sendKameleoonCustomEvent.call(window,"LegalConsentUpdated",{legalConsentUpdate:this.getConsent()})};this.getConfiguredConsent=()=>({AB_TESTING:Kameleoon.Internals.configuration.abtestConsent,PERSONALIZATION:Kameleoon.Internals.configuration.personalizationConsent});this.getConsent=()=>({AB_TESTING:this.AB_TESTING,PERSONALIZATION:this.PERSONALIZATION});this.hasGlobalConsent=()=>{return this.AB_TESTING||this.PERSONALIZATION};this.initialize=e=>{Kameleoon.Utils.sendKameleoonCustomEvent("Internals",{type:"consent/initialize",consent:e});this.AB_TESTING=e.AB_TESTING;this.PERSONALIZATION=e.PERSONALIZATION;this.initializeSdk()};this.initializeSdk=()=>{if(this.AB_TESTING)return;const e=e=>{if("boolean"===typeof e)return e;if(!e||"object"!==typeof e)return;const{consent:n}=e;if("boolean"===typeof n)return n;if("number"===typeof n){if(1===n)return!0;if(2===n)return!1}};try{const n=localStorage.getItem("kameleoonConsentData");if(!n)return;const t=JSON.parse(n);const o=Kameleoon.Utils.readLocalData("kameleoonVisitorCode","COOKIE");const s=e(t?.[o]);if("boolean"===typeof s)this.AB_TESTING=s}catch(e){}};this.purge=()=>{if(Kameleoon.Internals.runtime){const e=e=>{if(null!=e)for(const n in e)Kameleoon.Utils.createLocalData(e[n].name,e[n].value,e[n].days,e[n].domain,e[n].forceLocalAccess,e[n].jsonFormat,null,!0)};e(Kameleoon.Internals.runtime.localDataMap?.["LS"]);e(Kameleoon.Internals.runtime.localDataMap?.["COOKIE"]);Kameleoon.Internals.runtime.localDataMap=null;Kameleoon.Analyst.Actions.processAllActions();}};this.setup=()=>{let e={AB_TESTING:!1,PERSONALIZATION:!1};const n=Kameleoon.Internals.runtime.readFromStorageOrExternal("kameleoonLegalConsent","LS");if(null!=n)if(1==n)e={AB_TESTING:!0,PERSONALIZATION:!0};else e=n;else{e={AB_TESTING:"OFF"==Kameleoon.Internals.configuration.abtestConsent?!0:null,PERSONALIZATION:"OFF"==Kameleoon.Internals.configuration.personalizationConsent?!0:null};}this.initialize(e)};this.write=()=>{Kameleoon.Utils.createLocalData("kameleoonLegalConsent",this.getConsent(),Utils.MAX_STORAGE_DAYS,null,"LS",!0,null,!0)};this.AB_TESTING=!1;this.PERSONALIZATION=!1}}class Device{get adBlocker(){return Kameleoon.Internals.runtime.adBlocker}get os(){return Kameleoon.Gatherer.OperatingSystem.obtain()}get screenHeight(){return window.screen.height}get screenWidth(){return window.screen.width}get windowHeight(){return window.innerHeight}get windowWidth(){return window.innerWidth}constructor(){const e=Kameleoon.Utils.bowser.parsedResult=Kameleoon.Utils.bowser.parsedResult||Kameleoon.Utils.bowser.parse(navigator.userAgent);this.browser=e.browser.name||"Other";this.type="tablet"===e.platform.type?"Tablet":"mobile"===e.platform.type?"Phone":"Desktop";if("Safari"===this.browser&&"Desktop"===this.type&&"ontouchend"in document.documentElement)this.type="Tablet";let t=e.browser.version||"Safari"===this.browser&&e.os.version;try{if(t&&t.split(".").length>1)t=t.split(".")[0]+"."+t.split(".")[1]}catch(e){}this.browserVersion=t?parseFloat(t):null}}class Experiment extends CampaignFactory{constructor(i,t){super(i);this.executeGlobalScript=()=>{};this.handleSpecialCase=()=>{if(!0!==this.targeting&&this.redirectProcessed){this.performVariationAssignment(0);Kameleoon.Analyst.Actions.performActionsTracking([this])}else if(this.preAssignVariation)this.performVariationAssignment(0)};this.performVariationAssignment=i=>{if(this.displayedVariation&&0!==i&&!this.deferredLoading)return;if(void 0!==this.registeredVariationId&&this.assignmentTime)this.variations.forEach((i=>{if(this.registeredVariationId==i.id&&i.respoolTime>this.assignmentTime||null===this.registeredVariationId&&this.untrackedRespoolTime>this.assignmentTime)this.registeredVariationId=void 0}));if(void 0===this.registeredVariationId&&!Kameleoon.Internals.runtime.simulationMode&&null==this.variations.find((i=>i.id==this.registeredVariationId)))this.registeredVariationId=void 0;if(this.mentalistEnabled&&this.mentalistVariationReassignationPermission)this.registeredVariationId=void 0;if(void 0===this.registeredVariationId){if(this.mentalistEnabled){}else if(Kameleoon.Internals.runtime.customVariationSelectionFunction){this.registeredVariationId=Kameleoon.Internals.runtime.customVariationSelectionFunction(this);if(null!=this.registeredVariationId)if("reference"==this.registeredVariationId.toString())this.registeredVariationId=0;else if("none"==this.registeredVariationId.toString())this.registeredVariationId=null}else this.registeredVariationId=this.obtainVariationIdByDeviation();this.assignmentTime=Date.now();this.writeLocalData()}Kameleoon.Analyst.Actions.associateActionAndVariation(this,this.registeredVariationId,i)};this.writeLocalData=()=>{const i=this.registeredVariationId+(this.mentalistEnabled?"-mentalist":"")+"/"+this.assignmentTime;if(!this.simulationMode)Kameleoon.Utils.createLocalData("kameleoonExperiment-"+this.id,i,this.cookieDuration||30,this.cookieDomain,"LS",!1)};const e="kameleoonRedirect-"+this.id;const n=(t&&t[e])??Kameleoon.Utils.readLocalData(e,"LS",!1)??Kameleoon.Internals.runtime.parameters[e];if(null!=n){this.registeredVariationId=n;this.assignmentTime=Date.now();this.redirectProcessed=!0;Kameleoon.Utils.eraseLocalData(e,null,null)}const a="kameleoonExperiment-"+this.id;let s=t?t[a]:Kameleoon.Utils.readLocalData(a,"LS",!1);for(const i in Kameleoon.Internals.runtime.parameters)if(0==i.indexOf("kameleoonRedirect-"+this.id)){s=Kameleoon.Internals.runtime.parameters[i]+"/"+(new Date).getTime()+"/"+!1;this.writeLocalData()}if(s&&-1!=this.id){const i=s.split("/");this.registeredVariationId="null"==i[0]?null:i[0];this.assignmentTime=parseInt(i[1]);if(this.registeredVariationId){if("reference"==this.registeredVariationId.toString()){this.registeredVariationId=0;this.writeLocalData()}if("none"==this.registeredVariationId.toString()){this.registeredVariationId=null;this.writeLocalData()}}if(null!=this.winningVariationId&&!Kameleoon.Internals.runtime.simulationMode&&!Kameleoon.Internals.runtime.disableCache&&this.winningVariationId!=this.registeredVariationId)this.registeredVariationId=this.winningVariationId;}if(this.registeredVariationId&&-1!=this.registeredVariationId.toString().indexOf("-mentalist")){this.registeredVariationId=parseInt(this.registeredVariationId.toString().replace("-mentalist",""));this.mentalistEnabled=!0}if(this.registeredVariationId&&s&&null==this.deviation[this.registeredVariationId])this.registeredVariationId=void 0;this.setTargetingSegment();this.setTargetingTrigger();if(this.redirectProcessed&&null!=this.registeredVariationId)this.writeLocalData();const o=Kameleoon.Internals.runtime.storedData.obtainField("Runtime","blockedExperiments",[]);if(o.length>0&&-1!=o.indexOf(this.id))this.setBlocked("API");}static performMutualExclusiveGroup(){}}class Goals{constructor(){this.goals={};this.goalsList=[];this.run=()=>{const e=[];const n=[];const o=[];const t=[];const s={};this.getList().forEach((i=>{switch(i.type){case"ENGAGEMENT":n.push({goal:i});break;case"TIME_SPENT":o.push(i);break;case"SCROLL":t.push(i);break;case"CUSTOM":if(i.jsCode)Kameleoon.Utils.runProtectedScript(i.jsCode,`kameleoonCustomGoal-${i.id}.js`);break;}}));if(e.length>0)this.processConversions(e);Kameleoon.Utils.addEventListener(document,Kameleoon.Internals.runtime.mouseDownEvent,(e=>{this.processConversions(n)}),!0);if(o.length>0)Kameleoon.Utils.setInterval((()=>{const e=[];o.forEach((n=>{const o=Kameleoon.Internals.runtime.Visitor.currentVisit.lastEventDate-Kameleoon.Internals.runtime.Visitor.currentVisit.startDate;if((null==n.minTimeSpent||o>=n.minTimeSpent)&&(null==n.maxTimeSpent||o<=n.maxTimeSpent))e.push({goal:n})}));if(e.length>0)this.processConversions(e)}),1e3);if(t.length)Kameleoon.Utils.addEventListener(document,"scroll",(e=>{if(!document.body)return;const n=[];t.forEach((e=>{if(!e.sent){let o=null,t=null;switch(e.scrollTrackingType){case"PIXELS_HEIGHT":o=Math.ceil(document.documentElement.scrollTop||document.body.scrollTop)+window.innerHeight;t=e.scrollTrackingValue;break;case"PERCENTAGE":o=(Math.ceil(document.documentElement.scrollTop||document.body.scrollTop)+window.innerHeight)/document.body.scrollHeight*100;t=e.scrollTrackingValue;break;case"ELEMENT":o=window.innerHeight;const n=Kameleoon.Utils.querySelectorAll(e.selector);if(n.length>0)t=n[0].getBoundingClientRect().top+n[0].offsetHeight;break}if(null!==o&&null!==t&&t<=o){n.push({goal:e});e.sent=!0}}}));if(n.length>0)this.processConversions(n)}),!0);};this.processConversions=e=>{if(Kameleoon.Internals.runtime.gathererRun)for(let n=0,o=e.length;nthis.add(e)))}get(e){if(null!=e)return this.goals[String(e)]}getList(){return this.goalsList}runClickGoals(e){}}class KGeolocation{constructor(){let e=Kameleoon.Internals.runtime.storedData.obtainField("Runtime","geolocation");if(null==e)Kameleoon.Internals.runtime.RequestManager.addCallback((()=>{Kameleoon.Utils.performBeaconServerCall(Kameleoon.Internals.runtime.RequestManager.obtainGeolocationUrl(),(e=>{if(4==e.readyState&&(200==e.status||204==e.status)){let t=e.getResponseHeader("geoip_country_name");let o=e.getResponseHeader("geoip_region_name");let i=e.getResponseHeader("geoip_city");this.country=t?Kameleoon.Utils.decodeUTF8(t):null;this.city=i?Kameleoon.Utils.decodeUTF8(i):null;this.latitude=e.getResponseHeader("geoip_latitude");this.longitude=e.getResponseHeader("geoip_longitude");this.postalCode=e.getResponseHeader("geoip_postal_code");this.region=o?Kameleoon.Utils.decodeUTF8(o):null;this.loaded=!0;Kameleoon.Gatherer.track(VisitEvent_Geolocation,this);Kameleoon.Internals.runtime.storedData.saveField("Runtime","geolocation",this)}}),null)}));else{this.loaded=!0;this.country=e.country;this.city=e.city;this.latitude=e.latitude;this.longitude=e.longitude;this.postalCode=e.postalCode;this.region=e.region}}}const IGNORED_TAGS={SCRIPT:!0,META:!0,LINK:!0,STYLE:!0,TITLE:!0,BASE:!0,NOSCRIPT:!0};class KMutationObserver{static addMutationElementsToInternalObjects(e){for(let t=0;t{if(-1!==e.indexOf(".")||-1!==e.indexOf("#")){let r;let a;let l=e;if(-1!==l.indexOf(":")){let t=0;let n=!1;let o=!1;let r="";for(let i=0;i~\[]/.test(s)){o=!1;r+=s}continue}r+=s}l=r}if(-1!==l.indexOf("\\"))l=l.replace(/\\/g,"");if(-1!==l.indexOf("[")){const e=KMutationObserver.parseSelectorAttributes(l);if(e.length)o.push(...e);l=l.replace(/(\-)?(\[.*?\])/g,((e,t)=>t?e:""))}r=l.match(/\.([^\s.#>~]+)/g);a=l.match(/#([^\s.>~]+)/g);if(!i&&r)i=!0;if(!s&&a)s=!0;n.push(r||[]);t.push(a||[])}else if(-1!==e.indexOf("[")){const t=KMutationObserver.parseSelectorAttributes(e);if(t.length)o.push(...t)}}));if(0===n.length&&0===t.length&&0===o.length)e.childListOnly=!0;e.selectors=r;e.selectorClasses=n;e.selectorIDs=t;e.attributes=o;e.hasSelectorAttributes=o.length>0;e.hasClass=i;e.hasId=s;return e}static checkClassesForSelector(e,t){if(null==e)return!0;for(let t=0,n=e.length;t=0;e-=1){const o=n[e];KMutationObserver.filterWaitingQueue(o,t);if(!o||!o.useAntiFlicker||o.skip)continue;if(Kameleoon.Internals.runtime.domMutationThrottling&&null!=KMutationObserver.asyncMutationsTimeoutId||KMutationObserver.checkSelectorInDomTree(o)){const t=Kameleoon.Utils.querySelectorAll(o.selector);o.domSearching=!0;if(t.length){Kameleoon.Utils.runProtectedFunction((function(){o.callback(t)}),!0);n.splice(e,1)}}}}static performVariationsElementSet(e){}static performAsyncMutations(){Kameleoon.Internals.runtime.domMutationThrottling=!0;if(!KMutationObserver.asyncMutationsTimeoutId)KMutationObserver.asyncMutationsTimeoutId=Kameleoon.Utils.setTimeout((()=>{if(KMutationObserver.mutationList.length>=5e3)KMutationObserver.fillInternalObjectsForMutationObserver();else KMutationObserver.mutationList.forEach((e=>KMutationObserver.performChildListMutation(e)));KMutationObserver.mutationList=[];KMutationObserver.performWaitingElementPresentObject(0);Kameleoon.Utils.clearTimeout(KMutationObserver.asyncMutationsTimeoutId);KMutationObserver.asyncMutationsTimeoutId=null}),250)}static setMutationObserver(){if(Kameleoon.Internals.runtime.cantUseMutationObserver||Kameleoon.Internals.runtime.mutationObserver)return;KMutationObserver.fillInternalObjectsForMutationObserver();const e={attributes:!0,attributeOldValue:!0,childList:!0,characterData:!0,subtree:!0};let t=[];let n=!1;const o=Kameleoon.Utils.throttle((()=>{const e=t;const o=n;t=[];n=!1;if(o){KMutationObserver.performWaitingElementPresentObject(1);return}const r=KMutationObserver.createMutationBatchState();for(let t=0;t=3e3){KMutationObserver.mutationList=KMutationObserver.mutationList.concat(e);KMutationObserver.performAsyncMutations();return}let i=null;if(Kameleoon.Internals.runtime.waitingElementPresentObjects.length||Kameleoon.Internals.runtime.waitingSlowElementPresentObjects.length)i=KMutationObserver.createMutationBatchState();e.forEach((e=>{if("attributes"===e.type){if(i)i.attributes[e.attributeName]=!0;if("id"!==e.attributeName&&"class"!==e.attributeName)return;const t=e.target;if(!t)return;const n="id"===e.attributeName?t.id:t.className;if(e.oldValue===n)return;if("id"===e.attributeName)KMutationObserver.fillIdForOptimization(t);else KMutationObserver.fillClassesForOptimization(t,i)}else if("childList"===e.type){KMutationObserver.performChildListMutation(e,i);}}));KMutationObserver.performWaitingElementPresentObject(0,i);if(Kameleoon.Internals.runtime.waitingSlowElementPresentObjects.length){if(i.shouldCheckChildList)n=!0;if(!n)t.push(i);o()}}));if("function"===typeof Kameleoon.Internals.runtime.mutationObserver.observe)Kameleoon.Internals.runtime.mutationObserver.observe(document.documentElement,e);if(Kameleoon.Internals.runtime.singlePageSupport)KMutationObserver.setMutationObserverSPA()}static performChildListMutation(e,t){if("childList"!==e.type||!e.addedNodes.length)return;const n=e.addedNodes;for(let e=0;e{KMutationObserver.checkDynamicElements(1)}),400);Kameleoon.API.Core.runWhenElementPresent("body",(t=>{const n={childList:!0,subtree:!0};Kameleoon.Internals.runtime.mutationObserverSpa=new MutationObserver((function(t){Kameleoon.Internals.runtime.listenVariations=[];Kameleoon.Internals.runtime.mutationObserverSpa.disconnect();KMutationObserver.executeCallbacks(t);KMutationObserver.checkDynamicElements(0);if(Kameleoon.Internals.runtime.waitingSlowDynamicElements.length)e();o()}));const o=()=>{n.characterData=Kameleoon.ElementSet&&Kameleoon.ElementSet.pageElementSetsSpa.length>0||Kameleoon.Internals.runtime.listenSpaCallbacks.length>0;Kameleoon.Internals.runtime.mutationObserverSpa.observe(t[0],n)};o()}))}static performReplaceData(e){}static isIgnoredTagName(e){return!0===IGNORED_TAGS[e]}static parseSelectorAttributes(e){const t=[];const n=e.match(/\[[^\]]+\]/g);if(!n)return t;for(let e=0;e{Kameleoon.Internals.runtime.listenSpaCallbacks.forEach((e=>Kameleoon.Utils.runProtectedFunction(e,!0)))};KMutationObserver.checkDynamicElements=e=>{const t=1===e?Kameleoon.Internals.runtime.waitingSlowDynamicElements:Kameleoon.Internals.runtime.waitingDynamicElements;t.forEach((e=>{const t=Kameleoon.Utils.querySelectorAll(e.selector).filter((t=>null==t.getAttribute(e.attribute)));t.length>0&&e.callback(t)}))};KMutationObserver.checkElementSetIntegrity=()=>{};KMutationObserver.resetElementSet=(e,t,n)=>{};KMutationObserver.containsDomOperationElements=e=>{};class Logger{constructor(){this.send=(e,o,n)=>{if(Kameleoon.Internals.runtime?.parameters?.kameleoonDebug)console.log(e)}}}class RequestManager{constructor(){this.errorKey="kameleoonRequestEvents";this.engineTrueQuery="engine=true";this.processRequests=()=>{if(Kameleoon.Internals.runtime.Consent.hasGlobalConsent()){if(Kameleoon.Internals.runtime.tabIdCreated){delete Kameleoon.Internals.runtime.tabIdCreated;Kameleoon.Utils.secureSessionStorage("setItem","kameleoonTabId",Kameleoon.Internals.runtime.tabId)}if(this.callbacksToExecute.length>0){const e=this.callbacksToExecute.splice(0,1e3);e.forEach((e=>e()))}if(this.eventsToSend.length>0&&this.validateTrackingRequest()){const e=this.eventsToSend.splice(0,1e3);const t=this.obtainVisitUrl();const n=this.obtainRequestBody(e);this.send(t,"POST",n,(()=>{}),(()=>{this.createErrorEventsQueue(n)}));if(this.eventsToSend.length>0)this.processRequests()}}};this.obtainRequestBody=e=>{const t=Kameleoon.Internals.runtime.Consent.getConsent();const n=sessionStorage.getItem(this.errorKey);let s="";s+=e.reduce(((e,n)=>{if(!n.notTrack&&this.validateTrackingConsent(n.eventType,t))e+=n.obtainRequestData()+"\n";return e}),"");if(n){s+=n;sessionStorage.removeItem(this.errorKey)}return s};this.obtainVisitUrl=()=>{const e=Kameleoon.Internals.runtime.Visitor.currentVisit.visitorCode;const t=Kameleoon.Internals.runtime.tabId;return`${this.url}/visit/events?${this.engineTrueQuery}&siteCode=${this.siteCode}&visitorCode=${e}&itp=${"Safari"===Kameleoon.Internals.runtime.Device.browser}${t?`&tabId=${t}`:""}`};this.obtainIpUrl=()=>`${this.url}/ip?${this.engineTrueQuery}`;this.obtainGeolocationUrl=()=>`${this.url}/geolocation?${this.engineTrueQuery}`;this.obtainWeatherUrl=e=>`${this.url}/weather/${e?"forecast":"weather"}?${this.engineTrueQuery}`;this.send=(e,t,n,s,i,o)=>{const r=new XMLHttpRequest;r.open(t,e,!0);if(s)r.onreadystatechange=function(e){s.bind(r)(e.target)};if(i){r.onabort=function(e){i.bind(r)(e.target)};r.onerror=function(e){i.bind(r)(e.target)};r.ontimeout=function(e){i.bind(r)(e.target)}}r.timeout=o||15*60*1e3;r.send("POST"==t&&n?n:null);};this.sendActiveScript=()=>{};this.obtainRemoteSynchronizationData=(e,t)=>{this.send(`${this.url}/visit/visitor?${e}`,"GET",null,t)};this.sendProduct=(e,t)=>{this.send(`${this.url}/product/events?${this.engineTrueQuery}&siteCode=${this.siteCode}&ean=${encodeURIComponent(e.toString())}`,"POST",t);};this.eventsToSend=[];this.callbacksToExecute=[];this.url=Kameleoon.Internals.runtime.DATA_URL;this.siteCode=Kameleoon.Internals.configuration.siteCode;Kameleoon.Utils.setInterval(this.processRequests.bind(this),500);Kameleoon.Utils.addEventListener(window,Kameleoon.Internals.runtime.beforeUnloadEvent,"Safari"===Kameleoon.Internals.runtime.Device.browser?()=>this.eventsToSend.length&&this.createErrorEventsQueue(this.obtainRequestBody(this.eventsToSend)):this.processRequests.bind(this))}addCallback(e){if(Kameleoon.Internals.runtime.Consent.hasGlobalConsent())e();else this.callbacksToExecute.push(e)}addRequest(e){this.eventsToSend.push(e)}createErrorEventsQueue(e){if(e)sessionStorage.setItem(this.errorKey,(sessionStorage.getItem(this.errorKey)||"")+e)}validateTrackingConsent(e,t){return"experiment"!==e&&"personalization"!==e||t.AB_TESTING&&"experiment"===e||t.PERSONALIZATION&&"personalization"===e}validateTrackingRequest(){const n=(!Kameleoon.Internals.runtime.simulationMode||Kameleoon.Internals.runtime.enableRemoteVisitorSynchronization||Kameleoon.Internals.runtime.parameters["kameleoon-qa-mode"])&&!Kameleoon.Internals.runtime.proxyMode&&!Kameleoon.Internals.runtime.kameleoonSelectionIframeMode;return n}}class Targeting{constructor(){this.targetings={};this.targetingListenerQueue=[];this.obtainTargeting=e=>e&&this.targetings[e];this.checkTargetingCondition=(e,t,i)=>{let n;if(null==t.numberTargetingCheckings)t.numberTargetingCheckings=0;if(!this.checkIfTargetingMustBeComputed(t.targeting,t.rescheduleTargeting||0==t.numberTargetingCheckings,void 0))n={targeting:t.targeting,rescheduleTargeting:!1};else{let r=Kameleoon.Targeting["evaluate_"+t.type];let g;if(null!=r)g=r.bind(this)(t,e,i);else g=null;if(null==g)g={targeting:void 0,rescheduleTargeting:!1};let s=g.targeting;if(!0!==t.include)if(void 0===s){if(!0===g.excludedUndefinedIsTargeted)s=!0}else s=!s;n={targeting:s,rescheduleTargeting:this.checkIfTargetingMustBeComputed(s,g.rescheduleTargeting,void 0)};t.targeting=n.targeting;t.rescheduleTargeting=n.rescheduleTargeting;t.numberTargetingCheckings++}if(!0===n.targeting)n.weight=t.weight;else n.weight=0;return n};this.checkTargetingSegmentsTargeting=e=>{for(let t=0;t0)this.ensureTargetingListeners()};this.flushTargetingSegments=()=>{const e=this.targetingListenerQueue;if(0===e.length){if(null!=this.targetingListenerIntervalId){Kameleoon.Utils.clearInterval(this.targetingListenerIntervalId);this.targetingListenerIntervalId=null}return}this.targetingListenerQueue=[];this.processTargetingSegments(e)};this.ensureTargetingListeners=()=>{if(Kameleoon.Internals.runtime.domReady){if(null!=this.targetingListenerTimeoutId){Kameleoon.Utils.clearTimeout(this.targetingListenerTimeoutId);this.targetingListenerTimeoutId=null}if(null==this.targetingListenerIntervalId)this.targetingListenerIntervalId=Kameleoon.Utils.setInterval((()=>{this.flushTargetingSegments()}),Kameleoon.Internals.runtime.PAGE_LOADED_POLL_DELAY);return}if(null==this.targetingListenerTimeoutId)this.targetingListenerTimeoutId=Kameleoon.Utils.setTimeout((()=>{this.targetingListenerTimeoutId=null;this.flushTargetingSegments()}),Kameleoon.Internals.runtime.PAGE_LOADING_POLL_DELAY)};this.clear=()=>{this.targetings={};this.targetingListenerQueue=[];this.targetingListenerTimeoutId=null;this.targetingListenerIntervalId=null};this.checkTree=(e,t,i,n)=>{let r;if(null==t){r={targeting:!0,rescheduleTargeting:!1};if(i)r.weight=0}else{if(null==t.numberTargetingCheckings)t.numberTargetingCheckings=0;if(!this.checkIfTargetingMustBeComputed(t.targeting,t.rescheduleTargeting||0==t.numberTargetingCheckings,i)){r={targeting:t.targeting,rescheduleTargeting:!1};if(i)r.weight=t.weight}else{if(null!=t.targetingCondition)r=this.checkTargetingCondition(e,t.targetingCondition,n);else{let g=this.checkTree(e,t.leftChild,i,n);let s=Kameleoon.Internals.runtime.simulationMode||i;if(!s)switch(g.targeting){case!0:if(!t.orOperator)s=!0;break;case!1:if(t.orOperator)s=!0;break;case void 0:default:s=!0;break}let a=null;if(s)a=this.checkTree(e,t.rightChild,i,n);let l;switch(g.targeting){case!0:if(t.orOperator)l=!0;else switch(a.targeting){case!0:l=!0;break;case!1:l=!1;break;case void 0:default:l=void 0;break}break;case!1:if(t.orOperator)switch(a.targeting){case!0:l=!0;break;case!1:l=!1;break;case void 0:default:l=void 0;break}else l=!1;break;case void 0:default:if(t.orOperator)switch(a.targeting){case!0:l=!0;break;case!1:l=void 0;break;case void 0:default:l=void 0;break}else switch(a.targeting){case!0:l=void 0;break;case!1:l=!1;break;case void 0:default:l=void 0;break}break}r={targeting:l,rescheduleTargeting:this.checkIfTargetingMustBeComputed(l,g.rescheduleTargeting||s&&a.rescheduleTargeting,i)};if(i){let e;if(t.orOperator)e=Math.max(g.weight,a.weight);else e=g.weight+a.weight;r.weight=e}}t.targeting=r.targeting;t.rescheduleTargeting=r.rescheduleTargeting;if(i)t.weight=r.weight;t.numberTargetingCheckings++;r.computed=!0}}return r};this.computeDisplayableTree=e=>{let t=[];let i=[];this.computeDisplayableTreeFirstLevelAddIn(e,t,i);if(i.length>0){let e=[];let n=[];let r=this.createIterator(t);let g=this.createIterator(i);while(g.hasNext()){let t=g.next();if(Kameleoon.Utils.testEmptyMap(t.conditions)){if(g.hasNext())r.next()}else{n.push(t);if(g.hasNext())e.push(r.next())}}t=n.length>0?e.slice(0,n.length-1):e;i=n}return{firstLevelOrOperators:t,secondLevel:i}};this.computeDisplayableTreeFirstLevelAddIn=(e,t,i)=>{if(null!=e)if(null==e.targetingCondition)if(0==e.orGuiLevel){this.computeDisplayableTreeFirstLevelAddIn(e.leftChild,t,i);t.push(e.orOperator);this.computeDisplayableTreeFirstLevelAddIn(e.rightChild,t,i)}else i.push(this.computeDisplayableTreeSecondLevel(e));else i.push(this.computeDisplayableTreeSecondLevel(e))};this.computeDisplayableTreeSecondLevel=e=>{let t=[];let i=[];this.computeDisplayableTreeSecondLevelAddIn(e,t,i);if(i.length>0){let e=[];let n=[];let r=this.createIterator(t);let g=this.createIterator(i);while(g.hasNext()){let t=g.next();if(t.disabled){if(g.hasNext())r.next()}else{n.push(t);if(g.hasNext())e.push(r.next())}}t=n.length>0?e.slice(0,n.length-1):e;i=n}return{orOperators:t,conditions:i}};this.computeDisplayableTreeSecondLevelAddIn=(e,t,i)=>{if(null!=e)if(null==e.targetingCondition){this.computeDisplayableTreeSecondLevelAddIn(e.leftChild,t,i);t.push(e.orOperator);this.computeDisplayableTreeSecondLevelAddIn(e.rightChild,t,i)}else i.push(e.targetingCondition)};this.flattenTree=e=>{let t=(e,i)=>{if(null!=e)if(null!=e.targetingCondition)return!1===e.targetingCondition.targeting?["!",e.targetingCondition]:e.targetingCondition;else{let n=e.orOperator?"OR":"AND";let r=[t(e.leftChild,n),n,t(e.rightChild,n)];return"AND"==i&&"OR"==n?["(",r,")"]:r}};return Kameleoon.Utils.flatten(t(e,"OR"))};this.processAllTargetings=()=>{let e=Kameleoon.Internals.runtime.targetingSegments||[];e=e.concat(Kameleoon.Internals.runtime.targetingTriggers||[]);e.forEach((e=>{this.targetings[e.id]=e}));this.processTargetingSegments(e.filter(this.isTrackingSegment))};this.processTargetingSegments=e=>{this.checkTargetingSegmentsTargeting(e);let t=[];for(let i=0,n=e.length;i0)return e.slice(-t);return e}return[Kameleoon.Internals.runtime.Visitor.currentVisit]}checkIfTargetingMustBeComputed(e,t,i){let n=!0===t&&(void 0===e||!1===e&&!0===i);return n}createIterator(e){let t=0;return{hasNext:function(){return ti=>{const g=n&&Kameleoon.Internals.runtime.Campaigns.obtainCampaign(n);let a=null;const o=t=>{if(t&&t.targetingCondition&&t.targetingCondition.uniq===e)return t.targetingCondition;if(t&&t.leftChild){const n=o(t.leftChild);if(n)return n}if(t&&t.rightChild){const n=o(t.rightChild);if(n)return n}};if(g)a=o(g.targetingTrigger?.tree)||o(g.targetingSegment?.tree);else{const n=Kameleoon.Targeting.obtainTargeting(t)||Kameleoon.Internals.runtime.targetingSegments.find((n=>n.id==t))||Kameleoon.Internals.runtime.targetingTriggers.find((n=>n.id==t));a=n&&o(n.tree)}if(a)a.targeting=i};Targeting.prototype.evaluate_JS_CODE=function(targetingCondition,campaign,segment){let targeting;try{if(targetingCondition.timeout)if(targetingCondition.start){if(Date.now()-targetingCondition.start>=1e3*targetingCondition.timeout)return{targeting:!1,rescheduleTargeting:!1}}else targetingCondition.start=Date.now();if(!targetingCondition.valueGeneratedCode)if(targetingCondition.async){targetingCondition.uniq=targetingCondition.uniq??Kameleoon.Utils.obtainRandomString(4);targetingCondition.valueGeneratedCode="(function(setTargeting) {\n"+targetingCondition.value+`\n})(Kameleoon.Targeting.evaluate_FIND_UNIQ_CONDITION(${segment.id}, ${campaign?.id??null}, '${targetingCondition.uniq}'));`;Kameleoon.Utils.runProtectedScript(targetingCondition.valueGeneratedCode,"")}else targetingCondition.valueGeneratedCode="(function() {\n"+targetingCondition.value+"\n})();";if(targetingCondition.async)targeting=targetingCondition.targeting||void 0;else if(!targetingCondition.domReady||Kameleoon.Internals.runtime.domReady){const value=Kameleoon.Utils.runProtectedScript(targetingCondition.valueGeneratedCode,"",(()=>eval(targetingCondition.valueGeneratedCode)));targeting="boolean"==typeof value?value:void 0}}catch(t){targeting=!1;const n=segment?segment.name:null;console.log(t,n)}return{targeting:targeting,rescheduleTargeting:void 0===targeting}};Targeting.prototype.evaluate_PAGE_URL=function(e){let t=new RegExp(Kameleoon.Utils.computeURLRegExpNoKameleoonParameters(e.value));let a;try{a=t.test(decodeURI(Kameleoon.Utils.computeCurrentPageCleanAbsoluteURL()))}catch(e){try{a=unescape?t.test(unescape(Kameleoon.Utils.computeCurrentPageCleanAbsoluteURL())):!1}catch(e){a=!1}}return{targeting:a,rescheduleTargeting:!1}};Targeting.prototype.evaluate_KEY_MOMENT=function(e,n){let t;let i=Kameleoon.Targeting.obtainTargeting(e.linkedSegmentId)||Kameleoon.Internals.runtime.targetingSegments.concat(Kameleoon.Internals.runtime.targetingTriggers||[]).find((n=>n.id==e.linkedSegmentId));if(i)if(i.executeAsSeparate&&n){if(!e.linkedSegment){const t=i.trigger?"targetingTriggers":"targetingSegments";let g=Kameleoon.Utils.clone(Kameleoon.Internals.configuration[t].find((n=>n.id==e.linkedSegmentId))||null);if(!g&&Kameleoon.Internals.runtime.simulationMode&&Kameleoon.Internals.runtime.simulationModeData&&Kameleoon.Internals.runtime.simulationModeData[t])g=Kameleoon.Utils.clone(Kameleoon.Internals.runtime.simulationModeData[t].find((n=>n.id==e.linkedSegmentId))||null);if(Kameleoon.Internals.runtime.simulationMode&&g){g.originalId=g.id;g.linkedCampaignId=n.id;g.id=-Math.floor(1e5*Math.random());Kameleoon.Targeting.targetings[g.id]=g;e.linkedSegmentId=g.id;Kameleoon.Internals.runtime?.[t]?.push(g)}e.linkedSegment=g||{}}const g=Kameleoon.Targeting.checkTree(n,e.linkedSegment.tree||null,!1,e.linkedSegment||null);e.linkedSegment.targeting=g.targeting;e.linkedSegment.rescheduleTargeting=g.rescheduleTargeting;e.linkedSegment.numberTargetingCheckings=g.numberTargetingCheckings;t=e.linkedSegment.targeting}else{if(null==i.numberTargetingCheckings)Kameleoon.Targeting.processTargetingSegments([i]);e.value=i.name;e.targeting=i.targeting;t=i.targeting}return{targeting:t,rescheduleTargeting:void 0===t}};Targeting.prototype.evaluate_DEVICE_TYPE=function(e){return{targeting:e.value==Kameleoon.Internals.runtime.Device.type.toLocaleUpperCase(),rescheduleTargeting:!1}};class Tracking{constructor(){this.timeBeforeSendTracking=20*60*1e3;this.checkAndSetKameleoonTrackingTime=(t,e)=>{return!1};this.obtainTealiumData=()=>{};this.initIntegrationListener=t=>{};this.processCustomIntegration=t=>{}}clear(){}}class Variation{constructor(e){this.getAction=()=>Kameleoon.Internals.runtime.Campaigns.obtainCampaign(this.actionId);for(const t in e)this[t]=e[t]}applyJavascriptCode(e){if(this.javaScriptCode&&this.javaScriptCode.code&&(null==this.javaScriptCode.evaluated||e)){this.javaScriptCode.evaluated=!0;return Kameleoon.Utils.runProtectedScript(this.javaScriptCode.code,"kameleoonVariationJavaScriptCode-"+this.id+".js")}return null}preProcessRedirect(e){}process(){const e=Kameleoon.Internals.runtime.Campaigns.obtainCampaign(this.actionId);if(!this.styleSheetAdded){this.styleSheetAdded=!0;Kameleoon.Utils.addCSSStyleSheet(this.css,e,null)}if(this.javaScriptCode&&!this.permanentRefreshActive)if(!this.javaScriptCode.afterDOMReady)this.applyJavascriptCode(!1);else if(!this.permanentRefreshActive)Kameleoon.Utils.domReady((()=>{this.applyJavascriptCode(!1)}));const t="enginePollerForVariation"+this.id;if(Kameleoon.Internals.runtime[t]&&!this.permanentRefreshActive){if(Kameleoon.Internals.runtime.cantUseMutationObserver)Kameleoon.Utils.clearInterval(Kameleoon.Internals.runtime[t]);Kameleoon.Internals.runtime[t]=null}if(!Kameleoon.Internals.runtime[t]&&!Kameleoon.Internals.runtime.editorMode&&!Kameleoon.Internals.runtime.kameleoonSelectionIframeMode){this.permanentRefreshActive=!0;Kameleoon.Internals.runtime.listenVariations.push(this);Kameleoon.Internals.runtime[t]=!0;if(Kameleoon.Internals.runtime.cantUseMutationObserver)Kameleoon.Internals.runtime[t]=Kameleoon.Utils.setInterval((()=>{this.process()}),10)}}processReplaceData(e){}}class Visit{constructor(t){this.addActionTriggered=(t,e)=>{const i=e?"experimentsTriggered":"personalizationsTriggered";const s=Kameleoon.Internals.runtime.storedData.obtainField("Gatherer",i,{});s[t.toString()]=!0;Kameleoon.Internals.runtime.storedData.saveField("Gatherer",i,s);};this.addEvent=t=>{this.lastEventDate=t};this.addAdBlocker=()=>{this.Device.adBlocker=!0};this.addConversions=(t,e,i,s)=>{let n=s?-1:1;e*=n;i*=n;let a=this.conversions[t];let o=a?a.count:0;let r=a?a.revenue:0;let l=o+e;let u=r+i;if(l>0)if(u>=0)this.conversions[t]={count:l,revenue:u};else delete this.conversions[t];else delete this.conversions[t]};this.addCustomData=(t,e,i)=>{};this.addExperiment=(t,e,i)=>{if(null===i)return;if(void 0===this.ExperimentActivations[e])this.ExperimentActivations[e]={associatedVariationID:i,times:[]};this.ExperimentActivations[e].times.push(t);if(-1!=e){let t=Kameleoon.Internals.runtime.Campaigns.obtainCampaign(e,!0);let i=t?t.attributionWindow:Visitor.INFLUENCE_DELAY;if(i>0)this.ExperimentActivations[e].influence=i}};this.addGeolocation=t=>{this.Geolocation=t};this.addClicks=t=>{if(t>0)this.clicks+=t};this.addPage=(t,e,i,s)=>{let n=s.filter((t=>null!=t));this.pages.push({timestamp:t,keyPagesMatched:i,referrersMatched:n.length>0?n:[]});let a=this.pageURLsVisited[e];if(null==a){a=[];this.pageURLsVisited[e]=a}a.push(t);for(let t in this.productEansLastPage)this.productEansAllButLastPages[t]=!0;this.productEansLastPage={}};this.addPersonalization=(t,e,i,s)=>{};this.addProduct=t=>{this.productEansLastPage[t]=!0};this.addTargetingSegment=(t,e)=>{let i=this.activatedSegments[e];if(null==i){i=[];this.activatedSegments[e]=i}i.push(t);};this.addWeather=t=>{this.Weather=t};this.clearCustomDataPage=()=>{};this.computeActionNumberActivations=(t,e,i,s)=>{if(null==s[t])return 0;return this.computeObjectNumberPresence(e,i,s[t].times)};this.computeObjectNumberPresence=(t,e,i)=>{let s=0;for(let n=0,a=i.length;n=t)&&(null==e||a<=e))s++}return s};this.isVisitFinished=()=>this.lastEventDatethis.pages.some((e=>-1!=e.keyPagesMatched.indexOf(t)));this.obtainMeanPageDuration=()=>{};this.obtainNumberConversions=t=>{let e=this.conversions[t];return null==e?0:e.count};this.obtainPageNumberViews=(t,e,i,s)=>{let n=0;for(let a in this.pageURLsVisited)if(null!=a){let o=Kameleoon.Utils.computeRelativeURL(a);if((null==t||t.test(a)||t.test(o))&&(null==e||!e.test(a)&&!e.test(o)))n+=this.computeObjectNumberPresence(i,s,this.pageURLsVisited[a])}return n};this.obtainTimesStartedPages=()=>{let t=[];for(let e in this.pageURLsVisited)t.concat(this.pageURLsVisited[e]);return t.sort()};this.obtainPersonalizationNumberActivations=(t,e,i)=>this.computeActionNumberActivations(t,e,i,this.PersonalizationActivations);this.obtainReferrerIsPresent=t=>{let e=null==t?null:t+1;return this.pages.some((t=>-1!=t.referrersMatched.indexOf(e)))};this.visitNumber=t.visitNumber||0;this.landingPageURL=t.landingPageURL||null;this.productEansAllButLastPages=t.productEansAllButLastPages||{};this.productEansLastPage=t.productEansLastPage||{};this.startDate=t.startDate||0;this.pageURLsVisited=t.pageURLsVisited||{};this.activatedSegments=t.activatedSegments||{};this.visitorCode=t.visitorCode||"";this.customData=t.customData||{};this.clicks=t.clicks||0;this.lastEventDate=t.lastEventDate||t.lastActivityDate||this.startDate;let e=t.Device||{};this.Device={adBlocker:e.adBlocker||!1,browser:e.browser||"Other",browserVersion:e.browserVersion||null,os:e.os||"Other",screenHeight:e.screenHeight||null,screenWidth:e.screenWidth||null,type:e.type?e.type.toLocaleUpperCase():null};let i=t.Geolocation||{};this.Geolocation={city:i.city||null,country:i.country||null,latitude:i.latitude||null,longitude:i.longitude||null,postalCode:i.postalCode||null,region:i.region||null};let s=t.Weather||{};this.Weather={conditionCode:s.conditionCode||null,conditionDescription:s.conditionDescription||null,cloudiness:s.cloudiness||null,humidity:s.humidity||null,pressure:s.pressure||null,sunrise:s.sunrise||null,sunset:s.sunset||null,temperature:s.temperature||null,windSpeed:s.windSpeed||null};this.conversions=t.conversions||{};this.ExperimentActivations=t.ExperimentActivations||{};this.PersonalizationActivations=t.PersonalizationActivations||{};this.pages=t.pages||[]}obtainExperimentNumberActivations(t,e,i){return this.computeActionNumberActivations(t,e,i,this.ExperimentActivations)}}class Visitor{constructor(){this.addVisit=t=>{this.visits.push(t);this.currentVisit=t;this.totalVisits++;if(null==this.timeStartedEldestVisit)this.timeStartedEldestVisit=t.startDate;const e=this.visits.length;const i=Math.max(1,Kameleoon.Internals.configuration.maxNumberLocalVisits);if(e>i)this.visits=this.visits.slice(e-i)};this.obtainKeyPageIsVisited=t=>{for(let e=0,i=this.visits.length;e{for(let e=0,i=this.visits.length;e{let e=0;for(let i=this.visits.length-1;i>=0;--i)e+=this.visits[i].obtainNumberConversions(t);return e};this.obtainActionNumberActivations=(t,e,i,s,o,n,r,a)=>{const l=a?"obtainExperimentNumberActivations":"obtainPersonalizationNumberActivations";const m=this.visits.length;let c=0;if(m>0&&(o||n)){let e=0;let a=m;if(!n&&o)e=m-1;else if(n&&!o)a=m-1;for(let o=e;o0):e}}return c};this.obtainPageNumberViews=(t,e,i,s,o,n)=>{const r=this.visits.length;let a=0;if(r>0&&(o||n)){let l=0;let m=r;if(!n&&o)l=r-1;else if(n&&!o)m=r-1;for(let o=l;o{let t=0;if(this.visits.length>1){t=this.currentVisit.startDate-this.visits.slice(-2)[0].lastEventDate;t=Math.max(t,Kameleoon.Internals.runtime.Gatherer.configuration.maxVisitIdleDuration)}return t};this.obtainVisitorCode=t=>{let e=!1;let i=Kameleoon.Utils.readLocalData("kameleoonVisitorCode","COOKIE");const s=Kameleoon.Internals.runtime.storedData.obtainField("Gatherer","timeNextSynchronization",null);if(Kameleoon.Internals.configuration.useWideDomainSupport||Kameleoon.Internals.configuration.useVisitorCodeInLocalStorage){const t=Kameleoon.Internals.runtime.incomingStoredData?.["kameleoonVisitorCode"]??Kameleoon.Utils.readLocalData("kameleoonVisitorCode","LS");if(t)i=t}if(t||null==i){i=Kameleoon.Utils.obtainRandomString(Visitor.VISITOR_CODE_LENGTH,Analyst.CODE_ALPHABET);e=!0}Kameleoon.Utils.saveVisitorCode(i,null==s);this.visitorCode=i;return e};this.obtainVisitorFromStoredData=()=>Kameleoon.Internals.runtime.storedData.Visitor;this.saveToStoredData=()=>{this.saveFieldToStoredData("visits",this.visits);this.saveFieldToStoredData("totalVisits",this.totalVisits);this.saveFieldToStoredData("timeStartedEldestVisit",this.timeStartedEldestVisit)};this.setVisitorCode=t=>{if(this.visitorCode!=t){Kameleoon.Internals.runtime.newVisitorCode=!0;Kameleoon.Utils.saveVisitorCode(t);this.visitorCode=t;Kameleoon.Internals.runtime.Visitor.currentVisit.visitorCode=t;if(this.visits)this.visits.forEach((e=>{e.visitorCode=t}));Kameleoon.Internals.runtime.Campaigns.obtainCampaignsList(0).forEach((t=>{if(void 0!==t.registeredVariationId){t.registeredVariationId=void 0;t.performVariationAssignment(0)}}));this.saveToStoredData();Kameleoon.Gatherer.track(VisitEvent_Page);Kameleoon.Gatherer.track(VisitEvent_StaticData)}};this.updateFromStoredData=(t,e,i)=>{const s=this.obtainVisitorFromStoredData();const o=s.visits;if(!this.visitorCode){const t=this.obtainVisitorCode(i);if(t)i=!0}if(o){const t=o.slice(-1)[0].visitorCode;if(t!=this.visitorCode){const e=Kameleoon.Utils.readLocalData("kameleoonVisitorCode","LS")||Kameleoon.Utils.readLocalData("kameleoonVisitorCode","COOKIE");if(e==t||!Kameleoon.Internals.runtime.Consent.hasGlobalConsent()){this.visitorCode=t;try{delete Kameleoon.Internals.runtime.localDataMap.COOKIE["kameleoonVisitorCode"];delete Kameleoon.Internals.runtime.localDataMap.LS["kameleoonVisitorCode"]}catch(t){}}else if(e==this.visitorCode)i=!0}}if(i||t){e=!0;if(i)this.totalVisits=0}this.visits=[];if(!i&&o){o.forEach((t=>{this.addVisit(new Visit(t))}));this.totalVisits=s.totalVisits;this.timeStartedEldestVisit=s.timeStartedEldestVisit}let n=0;if(e||!this.currentVisit||this.currentVisit.isVisitFinished()){const{Device:t,storedData:e}=Kameleoon.Internals.runtime;const s=e.obtainField("Gatherer","startsOfVisitForCurrentPage");e.saveField("Gatherer","startsOfVisitForCurrentPage",s+1);Kameleoon.Internals.runtime.Gatherer.startOfVisit=!0;e.resetForStartOfVisit();e.saveField("Runtime","firstReferrerHref",Kameleoon.Gatherer.Referrer.obtainCorrected(!0)||null);e.saveField("Runtime","firstReferrersIndices",Kameleoon.Gatherer.Referrer.obtainIndexes(!0)||[null]);e.saveField("Runtime","landingKeyPagesIndices",Kameleoon.Gatherer.KeyPage.obtainIndexes()||[null]);let o;if(!this.currentVisit||i)o=0;else o=this.currentVisit.visitNumber+1;this.addVisit(new Visit({visitorCode:this.visitorCode,startDate:Date.now(),visitNumber:o,landingPageURL:Kameleoon.Utils.computeCurrentPageCleanAbsoluteURL(),Device:{browser:Kameleoon.Gatherer.Browser.obtain(),browserVersion:t.browserVersion,os:Kameleoon.Gatherer.OperatingSystem.obtain(),screenHeight:t.screenHeight,screenWidth:t.screenWidth,type:t.type}}));n=2}this.saveToStoredData();Kameleoon.Internals.runtime.storedData.save(n)};this.getCustomDataVisitor=()=>{const t={};return t};this.registerVisitsRequestSuccess=t=>{const e=[];for(let i=0,s=t.previousVisits.length;i0){const t=t=>{if(null!=this.currentVisit){const e=this.currentVisit;const i=[];for(let t=0,e=this.visits.length-1;tt.startDate-e.startDate));this.visits=[];let s=null;let o=null;for(let t=0,e=i.length;t1)Kameleoon.Gatherer.track(VisitEvent_StaticData);this.saveToStoredData()}return e;};this.compareCurrentVisitFromServer=t=>{try{const e=new Set(["Device","Geolocation","Weather"]);const i=new Set(["firstReferrerHref","landingKeyPagesIndices","firstReferrersIndices"]);const s=t=>null!==t&&"object"===typeof t&&!Array.isArray(t);for(const o in t){if(e.has(o))continue;const n=this.currentVisit[o];const r=t[o];if(s(n)&&s(r))for(const t in r)if(null==n[t])n[t]=r[t];if(i.has(o)&&t[o])Kameleoon.Internals.runtime.storedData.saveField("Runtime",o,t[o])}}catch(t){}};this.performRemoteVisitorSynchronization=()=>{if(Kameleoon.Internals.runtime.enableRemoteVisitorSynchronization&&!Kameleoon.Internals.runtime.isReloaded){const t=Kameleoon.Gatherer.Referrer.obtain()&&new URL(Kameleoon.Gatherer.Referrer.obtain()).origin;const e=t!=window.location.origin;if(e||Kameleoon.Internals.configuration.useFeatureFlagCondition){const t=t=>{if(t.previousVisits&&t.previousVisits.length)this.registerVisitsRequestSuccess(t);if(t.currentVisit)this.compareCurrentVisitFromServer(t.currentVisit)};const i=Kameleoon.Internals.configuration.enableHistoryReconciliation?0:e?Kameleoon.Internals.configuration.maxNumberLocalVisits:0;this.remoteSynchronisation("visitorCode",this.visitorCode,t,i)}}};this.obtainProductData=(t,e,i,s)=>{const o=`${Kameleoon.Internals.runtime.DATA_URL}/product/${t}`;i.siteCode=Kameleoon.Internals.configuration.siteCode;i.engine=!0;i.eans=encodeURIComponent(JSON.stringify((e instanceof Array?e:[e]).map((t=>t.toString()))));Kameleoon.Utils.performBeaconServerCall(Kameleoon.Utils.addParameterToURL(o,Kameleoon.Utils.parseObjectToUrlParams(i),!1),(function(t){if(4===t.readyState&&200===t.status)s(JSON.parse(t.response||"{}"))}),(function(t){console.error(t)}));};this.obtainIdentifierValue=()=>{let t=null;return t||this.visitorCode};this.visits=[];this.currentVisit=null;this.totalVisits=0;this.updateFromStoredData(!1);Object.defineProperty(this,"customData",{enumerable:!0,get:()=>this.getCustomDataVisitor()})}saveFieldToStoredData(t,e){Kameleoon.Internals.runtime.storedData.Visitor[t]=e}remoteSynchronisation(t,e,i,s){if("string"==typeof e&&e.length>0){const o={siteCode:Kameleoon.Internals.configuration.siteCode,engine:!0,currentVisit:"customData"!==t,format:"ENGINE",maxNumberPreviousVisits:"number"==typeof s?s:Kameleoon.Internals.configuration.maxNumberLocalVisits,version:3};"customData"==t&&(o.mappingValue=e);"visitorCode"==t&&(o.visitorCode=e);Kameleoon.Internals.runtime.remoteSynchronisationProcess=!0;Kameleoon.Internals.runtime.RequestManager.addCallback((()=>{Kameleoon.Internals.runtime.RequestManager.obtainRemoteSynchronizationData(Kameleoon.Utils.parseObjectToUrlParams(o),(t=>{if(4==t.readyState&&200==t.status){const e=JSON.parse(t.responseText);i&&i(e);Kameleoon.Utils.sendKameleoonCustomEvent.call(window,"RemoteSynchronizationPerformed",{visitsFromServer:e});delete Kameleoon.Internals.runtime.remoteSynchronisationProcess}}))}))}}}Visitor.VISITOR_CODE_LENGTH=16;Visitor.INFLUENCE_DELAY=1e3*60*60*24*7;try{window.Kameleoon=new KameleoonEngine}catch(o){console.log(o)} Kameleoon.Internals = {"configuration":{"API_HOST_NAME":"api","APP_HOST_NAME":"app","BACK_OFFICE_HOST_NAME":"old","STATIC_IMAGES_URL":"//static.experimentation.dev/js/editor/source/images/","STATIC_HOST_NAME":"static","EDITOR_HOST_NAME":"editor","DOMAIN":"kameleoon.com","SITE_RESOURCES_DOMAIN":"kameleoon.eu","GUI_ESTIMATED_LOADING_TIME":3000,"IMAGE_PATH":"https://7yqiqv3oxy.kameleoon.eu/images/","PROXY_HOST_NAME":"proxy","QOOXDOO_ESTIMATED_LOADING_TIME":2000,"SERVER_CALL_ESTIMATED_LOADING_TIME":500,"environment":"PRODUCTION","staticURL":"https://static.experimentation.dev/","maxNumberLocalVisits":25,"memberCode":"0","siteCode":"7yqiqv3oxy","abtestConsent":"OFF","abtestConsentOptout":"RUN","beforeAbtestConsent":"ALL","beforePersonalizationConsent":"ALL","personalizationConsent":"OFF","personalizationConsentOptout":"RUN","personalizationsDeviation":1,"experiments":[{"id":293163,"name":"Offer Badge Text (PLP) – US","baseURL":"https://husqvarna.com/us/","experimentAction":true,"executeCodeForReference":true,"forcedTechnical":true,"dateModified":1781683929000,"dateStatusModified":1740581653000,"goals":[366030,366025,366018],"deviation":{"0":0,"1077352":1},"variations":[{"name":"Reference","id":0,"deviation":0},{"name":"Variation 1","id":1077352,"deviation":1}],"targetingTriggerId":511300,"targetingSegmentConfiguration":"ALL_VISITORS","attributionWindow":"604800000","winningVariationId":1077352,"kameleoonTracking":{"mainGoalId":366030}},{"id":293164,"name":"Specified Offer Badge Text (PDP) – US)","baseURL":"https://husqvarna.com/us/","experimentAction":true,"executeCodeForReference":true,"forcedTechnical":true,"dateModified":1781684551000,"dateStatusModified":1740581570000,"goals":[366030,366018,366025],"deviation":{"0":0,"1077353":1},"variations":[{"name":"Reference","id":0,"deviation":0},{"name":"Offer text","id":1077353,"deviation":1}],"targetingSegmentId":511328,"targetingTriggerId":511331,"targetingTriggerConfiguration":"SITE","attributionWindow":"604800000","winningVariationId":1077353,"kameleoonTracking":{"mainGoalId":366030}},{"id":347608,"name":"(new) 8697v6c8 | Increase ATC with payments icons","baseURL":"https://husqvarna.com/us/","experimentAction":true,"executeCodeForReference":true,"forcedTechnical":true,"dateModified":1765532134000,"dateStatusModified":1765532134000,"goals":[366018,391896,366025,366026],"deviation":{"0":0.5,"1205325":0.5},"variations":[{"name":"Reference","id":0,"deviation":0.5},{"name":"Variation 1","id":1205325,"deviation":0.5}],"targetingTriggerId":404059,"targetingSegmentConfiguration":"ALL_VISITORS","attributionWindow":"604800000","googleAnalytics4Tracking":true,"kameleoonTracking":{"mainGoalId":366018}},{"id":374570,"name":"86999r4bh | Payment options info (Paypal)","baseURL":"https://www.husqvarna.com/us/chainsaws/460-rancher/","experimentAction":true,"executeCodeForReference":true,"forcedTechnical":true,"dateModified":1778230504000,"dateStatusModified":1774943866000,"goals":[366018,366025],"deviation":{"0":0,"1270372":1},"variations":[{"name":"Reference","id":0,"deviation":0},{"name":"Variation 1","id":1270372,"deviation":1}],"targetingTriggerId":460093,"targetingSegmentConfiguration":"ALL_VISITORS","attributionWindow":"604800000","winningVariationId":1270372,"kameleoonTracking":{"mainGoalId":366018}},{"id":378312,"name":"869c9ez4w | Test 4 callouts above ATC to boost Robotics PDP conversion US","baseURL":"https://www.husqvarna.com/us/robotic-lawn-mowers/automower-410-iq/","experimentAction":true,"executeCodeForReference":true,"forcedTechnical":true,"dateModified":1786342880000,"dateStatusModified":1775139915000,"goals":[366018],"deviation":{"0":0,"1279879":0.4999,"1279880":0.4999},"variations":[{"name":"Reference","id":0,"deviation":0},{"name":"Variation 1","id":1279879,"deviation":0.4999},{"name":"Variation 2","id":1279880,"deviation":0.4999}],"targetingTriggerId":460545,"targetingSegmentConfiguration":"ALL_VISITORS","attributionWindow":"604800000","kameleoonTracking":{"mainGoalId":366018}},{"id":378888,"name":"AWD 869c9ez4w | Test 4 callouts above ATC to boost Robotics PDP conversion US","baseURL":"https://www.husqvarna.com/us/robotic-lawn-mowers/automower-410-iq/","experimentAction":true,"executeCodeForReference":true,"forcedTechnical":true,"dateModified":1786342967000,"dateStatusModified":1775567190000,"goals":[366018,366025,366026,366019],"deviation":{"0":0,"1280961":1},"variations":[{"name":"Reference","id":0,"deviation":0},{"name":"Variation 1","id":1280961,"deviation":1}],"targetingTriggerId":464002,"targetingSegmentConfiguration":"ALL_VISITORS","attributionWindow":"604800000","winningVariationId":1280961,"kameleoonTracking":{"mainGoalId":366018}},{"id":415729,"name":"869czv1e3 | [Itteration 2] Test Conversational AI buying guide on PLP to increase conversions","baseURL":"https://www.husqvarna.com/us/robotic-lawn-mowers/","experimentAction":true,"executeCodeForReference":true,"forcedTechnical":true,"dateModified":1789989708000,"dateStatusModified":1788957163000,"goals":[418326,418334,418331,418328,418324,427639,366030],"deviation":{"0":0,"1376716":1},"variations":[{"name":"Reference","id":0,"deviation":0},{"name":"Variation 1","id":1376716,"deviation":1}],"targetingSegmentId":577242,"targetingTriggerId":569250,"attributionWindow":"604800000","winningVariationId":1376716,"googleAnalytics4Tracking":true,"kameleoonTracking":{"mainGoalId":418326}}],"personalizations":[],"targetingSegments":[{"id":511328,"name":"US","tree":{"targetingCondition":{"type":"PAGE_URL","disabled":false,"weight":1,"include":true,"value":"(.*)husqvarna\\.com/us(.*)"}},"new":true},{"id":577242,"name":"A segment for 869czv1e3 | [Itteration 2] Test Conversational AI buying guide on PLP to increase conversions","tree":{"targetingCondition":{"type":"DEVICE_TYPE","disabled":false,"weight":1,"include":true,"value":"PHONE"}}}],"targetingTriggers":[{"id":404059,"name":"PDP | isBuyableOnline","tree":{"targetingCondition":{"type":"JS_CODE","disabled":false,"weight":1,"include":true,"value":"if(document.querySelector(\"#add-to-cart-button-1\")){return true;}"}},"trigger":true},{"id":453240,"name":"US","tree":{"targetingCondition":{"type":"PAGE_URL","disabled":false,"weight":1,"include":true,"value":"^https?:\\/\\/(www\\.)?husqvarna\\.com\\/(us)(\\/.*)?$"}},"trigger":true},{"id":453242,"name":"isProductPage","tree":{"targetingCondition":{"type":"JS_CODE","disabled":false,"weight":1,"include":true,"value":"if(document.querySelector('[data-ui-component=\"ProductDetailsV2\"]') || document.querySelector('[data-ui-component=\"ProductDetails\"]')) return true;"}},"trigger":true},{"id":460093,"name":"A segment for Copy 86999r4bh | Payment options info (Paypal)","tree":{"orOperator":false,"orGuiLevel":1,"leftChild":{"targetingCondition":{"type":"KEY_MOMENT","disabled":false,"weight":1,"include":true,"linkedSegmentId":453240}},"rightChild":{"targetingCondition":{"type":"KEY_MOMENT","disabled":false,"weight":1,"include":true,"linkedSegmentId":453242}}},"trigger":true},{"id":460545,"name":"IQ PDP Page","tree":{"orOperator":true,"orGuiLevel":1,"leftChild":{"targetingCondition":{"type":"PAGE_URL","disabled":false,"weight":1,"include":true,"value":"(.*)https\\://www\\.husqvarna\\.com/us/robotic-lawn-mowers/automower-410-iq/(.*)"}},"rightChild":{"orOperator":true,"orGuiLevel":1,"leftChild":{"targetingCondition":{"type":"PAGE_URL","disabled":false,"weight":1,"include":true,"value":"(.*)https\\://www\\.husqvarna\\.com/us/robotic-lawn-mowers/automower-420-iq/(.*)"}},"rightChild":{"targetingCondition":{"type":"PAGE_URL","disabled":false,"weight":1,"include":true,"value":"^https\\://www\\.husqvarna\\.com/us/robotic-lawn-mowers/automower-440-iq/$"}}}},"trigger":true},{"id":464002,"name":"Trigger for AWD 869c9ez4w | Test 4 callouts above ATC to boost Robotics PDP conversion US","tree":{"targetingCondition":{"type":"PAGE_URL","disabled":false,"weight":1,"include":true,"value":"https\\://www\\.husqvarna\\.com/us/robotic\\-lawn\\-mowers/automower\\-435\\-iq\\-awd//?([\\?#].*)?$"}},"trigger":true},{"id":511300,"name":"A segment for Offer Badge Text (PLP) – US","tree":{"targetingCondition":{"type":"PAGE_URL","disabled":false,"weight":1,"include":true,"value":"(.*)/us/(.*)"}},"trigger":true},{"id":511331,"name":"Trigger for Specified Offer Badge Text (PDP) – US) 2026-06-17T10:22:17.494358904","tree":null,"trigger":true},{"id":569250,"name":"Trigger for 869czv1e3 | [Itteration 2] Test Conversational AI buying guide on PLP to increase conversions 2026-09-10T08:22:09.849319357","tree":{"targetingCondition":{"type":"PAGE_URL","disabled":false,"weight":1,"include":true,"value":"https\\://www\\.husqvarna\\.com/us/robotic\\-lawn\\-mowers//?([\\?#].*)?$"}},"trigger":true}],"variations":[{"name":"Variation 1","id":1077352,"css":"","elementSets":[],"javaScriptCode":{"code":"console.warn(\"\\n======================================================\\n⚠️ NOTICE: A/B Test in Progress ⚠️\\n\\nAn active A/B test is currently running, which may affect layout and functionality.\\nIf you notice unexpected changes, they may be related to this test.\\n\\nFor more information, please contact the Martech Optimization Team.\\n======================================================\\n\");const badgeTemplate='\\n
###text###
\\n';function getLanguage(){return document.documentElement.getAttribute(\"lang\")}async function loadGapiClient(){return new Promise(((e,t)=>{const n=document.createElement(\"script\");n.src=\"https://apis.google.com/js/api.js\",n.onload=()=>gapi.load(\"client\",(()=>initClient().then(e).catch(t))),n.onerror=()=>t(new Error(\"Error loading Google API script\")),document.body.appendChild(n)}))}async function initClient(){await gapi.client.setApiKey(\"AIzaSyANB8HL6NHJVSPMMoVoWrAvoMTyRL0R4Gc\"),await gapi.client.load(\"https://sheets.googleapis.com/$discovery/rest?version=v4\")}async function getData(){const e=function(){switch(getLanguage()){case\"en-us\":default:return\"US!A:E\";case\"en-ca\":return\"CA_EN!A:E\";case\"fr-ca\":return\"CA_FR!A:E\"}}(),t=await gapi.client.sheets.spreadsheets.values.get({spreadsheetId:\"1Psn8AjuT41fdACCx9mz4iKTl1aWehNord1X0g5DgJM4\",range:e}),[n,...a]=t.result.values;return a.map((e=>Object.fromEntries(e.map(((e,t)=>[formatKey(n[t]),e])))))}const formatKey=e=>e.toLowerCase().replace(/[^a-z0-9]/g,\" \").split(\" \").filter(Boolean).map(((e,t)=>t?e.charAt(0).toUpperCase()+e.slice(1):e)).join(\"\");function debounce(e,t){let n;return function(...a){clearTimeout(n),n=setTimeout((()=>e.apply(this,a)),t)}}async function updateBadges(e){const t=document.querySelectorAll(\".hbd-card\");if(t.length){const n=new Date;t.forEach((t=>{const a=t.querySelector(\"h3\");if(a){const i=a.textContent,o=e.filter((e=>e.title===i&&n>=new Date(e.startDate)&&n<=new Date(e.endDate))),r=t.querySelector('[data-testid=\"campaign-badge\"] > span');o.length&&r&&(r.textContent=o[0].text)}}))}}Kameleoon.API.Core.runWhenElementPresent(\".card__price\",(async function(){await loadGapiClient();const e=await getData();updateBadges(e);const t=debounce((()=>updateBadges(e)),200),n=new MutationObserver((e=>{e.forEach((e=>{e.target.classList.contains(\"hbd-card-commerce\")&&t()}))})),a={childList:!0,subtree:!0,attributes:!0};document.querySelectorAll(\".hbd-card\").forEach((e=>{n.observe(e,a)}));const i=document.querySelector(\".hui-grid__container\");i&&n.observe(i,a)}));","afterDOMReady":false}},{"name":"Offer text","id":1077353,"css":"","elementSets":[],"javaScriptCode":{"code":"const badgeTemplate='\\n
###text###
\\n';function getLanguage(){return document.documentElement.getAttribute(\"lang\")}async function loadGapiClient(){return new Promise(((e,t)=>{const a=document.createElement(\"script\");a.src=\"https://apis.google.com/js/api.js\",a.onload=()=>gapi.load(\"client\",(()=>initClient().then(e).catch(t))),a.onerror=()=>t(new Error(\"Error loading Google API script\")),document.body.appendChild(a)}))}async function initClient(){await gapi.client.setApiKey(\"AIzaSyANB8HL6NHJVSPMMoVoWrAvoMTyRL0R4Gc\"),await gapi.client.load(\"https://sheets.googleapis.com/$discovery/rest?version=v4\")}async function getData(){const e=function(){switch(getLanguage()){case\"en-us\":default:return\"US!A:E\";case\"en-ca\":return\"CA_EN!A:E\";case\"fr-ca\":return\"CA_FR!A:E\"}}(),t=await gapi.client.sheets.spreadsheets.values.get({spreadsheetId:\"1Psn8AjuT41fdACCx9mz4iKTl1aWehNord1X0g5DgJM4\",range:e}),[a,...n]=t.result.values;return n.map((e=>Object.fromEntries(e.map(((e,t)=>[formatKey(a[t]),e])))))}const formatKey=e=>e.toLowerCase().replace(/[^a-z0-9]/g,\" \").split(\" \").filter(Boolean).map(((e,t)=>t?e.charAt(0).toUpperCase()+e.slice(1):e)).join(\"\");Kameleoon.API.Core.runWhenElementPresent(\".hbd-page\",(async function(){try{if(void 0!==trackingLayer?.productInfo){const e=new Date;await loadGapiClient();const t=await getData(),a=trackingLayer?.productInfo?.articleNumber;if(a){const n=t.filter((t=>t.artNum===a&&e>=new Date(t.startDate)&&e<=new Date(t.endDate))),r=document.querySelector('[data-testid=\"campaign-badge\"] > span');r&&(r.textContent=n[0].text)}else console.log(\"articleNumber eller productInfo är inte definierad i trackingLayer\")}else console.log(\"trackingLayer är inte definierad\")}catch(e){console.error(\"Error loading promotions\",e)}}));","afterDOMReady":false}},{"name":"Variation 1","id":1205325,"css":".hbd-footer__payment-method-conatiner.ab-test-payments-icons{border-radius:20px;background:#f4f4f3;margin:0;padding:12px;gap:8px;justify-content:space-between;margin-top:12px;flex-wrap:nowrap;overflow:hidden}[data-ui-component=ProductDetailsCommerce]>div:first-of-type{margin-top:0}","elementSets":[],"javaScriptCode":{"code":"function handleProductLogic(e){console.warn(\"\\n======================================================\\n⚠️ NOTICE: A/B Test in Progress ⚠️\\n\\nAn active A/B test is currently running, which may affect layout and functionality.\\nIf you notice unexpected changes, they may be related to this test.\\n\\nFor more information, please contact the Martech Optimization Team.\\n======================================================\\n\");const t=document.querySelectorAll('[data-ui-component=\"ProductDetailsCommerce\"] button:last-of-type'),n=document.querySelector('[data-ui-component=\"ProductDetailsCommerce\"] [data-ui-component=\"WishlistToggle\"]'),o=t[t.length-1],c=document.querySelector(\".hbd-footer__payment-method-conatiner\");if(o&&c){const e=c.cloneNode(!0);e.classList.add(\"ab-test-payments-icons\"),n?n.insertAdjacentElement(\"beforeBegin\",e):o.insertAdjacentElement(\"afterEnd\",e)}}Kameleoon.API.Core.runWhenElementPresent(\"#product-details\",(()=>handleProductLogic(\"product\"))),Kameleoon.API.Core.runWhenElementPresent(\".hbd-product-bundle\",(()=>handleProductLogic(\"bundle\")));","afterDOMReady":false}},{"name":"Variation 1","id":1270372,"css":".ab-paypal{width:100%;background-color:var(--ab-color-grey100);padding:12px;display:flex;align-items:center;gap:12px;border-radius:16px;background:#fff;margin-top:8px}.ab-paypal figure{height:auto;display:flex;align-items:center;justify-content:center;margin:0}.ab-paypal figure.paypal{flex:0 0 32px}.ab-paypal figure.klarna{flex:0 0 96px;margin:-12px}.ab-paypal figure img{width:100%;height:auto}.ab-paypal .text-wrapper{flex:1}.ab-paypal .text-wrapper p{max-width:180px}.ab-paypal .mini-text{display:block;font-size:10px}@media (min-width:1200px){.ab-paypal{gap:24px}.ab-paypal .text-wrapper{display:flex;justify-content:space-between;gap:12px;align-items:center}.ab-paypal a{margin-top:0}}","elementSets":[],"javaScriptCode":{"code":"Kameleoon.API.Core.runWhenElementPresent(\"[data-ui-component=ProductDetailsCommerce]\",(function(e){console.warn(\"\\n======================================================\\n⚠️ NOTICE: A/B Test in Progress ⚠️\\n\\nAn active A/B test is currently running, which may affect layout and functionality.\\nIf you notice unexpected changes, they may be related to this test.\\n\\nFor more information, please contact the Martech Optimization Team.\\n======================================================\\n\");const t=document.createElement(\"script\");t.src=\"https://cdn.jsdelivr.net/npm/papaparse@5.4.1/papaparse.min.js\",t.type=\"text/javascript\",t.onload=function(){const e=document.createElement(\"script\");e.src=\"https://husqvarna-files.vercel.app/js/utils.js\",e.type=\"text/javascript\",e.onload=function(){!async function(){const e=document.documentElement.lang||\"en-gb\",t=localizedData[e]||localizedData[\"en-gb\"],n=trackingLayer.productInfo.articleNumber,a=e=>{const n=`\\n
\\n
\\n \\n
\\n
\\n

${e.infotext}

\\n
\\n ${t.link.text}\\n
\\n
\\n
\\n `,a=document.querySelector('[data-ui-component=\"AsideSection\"]')||document.querySelector('[data-ui-component=\"Aside\"] > div > div > div:last-of-type');a&&a.insertAdjacentHTML(\"beforeend\",n),document.querySelector(\"#abLearnMoreLink\").addEventListener(\"click\",(()=>{Kameleoon.API.Goals.processConversion(402558)}))};fetch(`https://docs.google.com/spreadsheets/d/e/2PACX-1vTsfLdz_DZYqBut57y6r6ej5GhMqFHuliWHGJLyzABiHi5VKuMprEy1Dp8SHNjVzY5r6-z7VTluyipS/pub?output=csv&gid=${t.gid}`).then((e=>e.text())).then((e=>{const t=Papa.parse(e,{header:!0,skipEmptyLines:!0}).data.map((e=>{const t={};return Object.keys(e).forEach((n=>{const a=n.toLowerCase().replace(/\\s+/g,\"\");t[a]=e[n]?.trim()})),t}));for(const e of t)if(e.sku===n){a(e);break}})).catch((e=>console.error(\"Kunde inte hämta Sheet-data:\",e)))}()},document.head.appendChild(e)},document.head.appendChild(t)}));const localizedData={\"en-us\":{link:{text:\"Exact price details in checkout\",href:\"#\"},img:{src:\"https://uigujqlo0m.kameleoon.eu/images/25154-94580ca2-8612-46f5-bc9c-5145ddeea976.png\",type:\"paypal\"},gid:\"0\"}};","afterDOMReady":false}},{"name":"Variation 1","id":1279879,"css":".ab-callout__items{display:flex;gap:24px;margin-top:24px;margin-bottom:16px;padding:16px 0;flex-wrap:wrap;border-bottom:1px solid rgba(var(--ui-color-black-rgb),.08);border-top:1px solid rgba(var(--ui-color-black-rgb),.08)}.ab-callout__item{display:flex;flex-direction:column;gap:16px;align-items:center;text-align:center;flex:0 0 calc(50% - 12px)}.ab-callout__item img{height:28px}.ab-callout__disclaimer{border-bottom:1px solid rgba(var(--ui-color-black-rgb),.08);padding-bottom:16px;font-size:.8rem!important}.ab-disclaimer-text.ab-disclaimer-collapsed{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ab-disclaimer-text.ab-disclaimer-expanded{display:block}.ab-disclaimer-toggle{background:0 0;border:none;padding:4px 0;cursor:pointer;font-size:inherit;text-decoration:underline;display:block;margin-top:4px;color:inherit}.ab-callout__disclaimer+[data-ui-component=EposCloudCoverageAccordion] details{border-top:none}@media (min-width:768px){.ab-callout__items{flex-wrap:nowrap}.ab-callout__item{flex:1}}","elementSets":[],"javaScriptCode":{"code":"Kameleoon.API.Core.runWhenElementPresent(\"[data-ui-component=ProductDetailsCommerce]\",(function(e){console.warn(\"\\n======================================================\\n⚠️ NOTICE: A/B Test in Progress ⚠️\\n\\nAn active A/B test is currently running, which may affect layout and functionality.\\nIf you notice unexpected changes, they may be related to this test.\\n\\nFor more information, please contact the Martech Optimization Team.\\n======================================================\\n\");const t=document.createElement(\"script\");t.src=\"https://husqvarna-files.vercel.app/js/utils.js\",t.type=\"text/javascript\",t.onload=function(){!async function(){const e=document.documentElement.lang||\"en-gb\",t=localizedData[e]||localizedData[\"en-gb\"],a=`\\n
\\n ${t.items.map((e=>`\\n
\\n \"\"\\n
${e.text}
\\n
\\n `)).join(\"\")}\\n
\\n
\\n ${t.disclaimer}\\n \\n
\\n `,n=document.querySelector('[data-ui-component=\"ProductDetailsCommerce\"] [data-ui-component=\"EposCloudCoverageAccordion\"]')||document.querySelector('[data-ui-component=\"ProductDetailsCommerce\"] [data-ui-component=\"WishlistToggle\"]');if(n){n.insertAdjacentHTML(\"beforebegin\",a);const e=n.previousElementSibling.querySelector(\".ab-disclaimer-toggle\"),i=n.previousElementSibling.querySelector(\".ab-disclaimer-text\");e.addEventListener(\"click\",(()=>{\"true\"===e.getAttribute(\"aria-expanded\")?(i.classList.replace(\"ab-disclaimer-expanded\",\"ab-disclaimer-collapsed\"),e.setAttribute(\"aria-expanded\",\"false\"),e.textContent=t.showMore):(i.classList.replace(\"ab-disclaimer-collapsed\",\"ab-disclaimer-expanded\"),e.setAttribute(\"aria-expanded\",\"true\"),e.textContent=t.showLess)}))}}()},document.head.appendChild(t)}));const localizedData={\"en-us\":{items:[{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-8cd68c62-c985-46e5-8926-dc75ae8f28eb.svg\",text:\"4-year warranty\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-a0841808-99ff-4048-8e64-3f36fd9db9e5.svg\",text:\"Free Shipping & Returns\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-2035210e-be46-4bb8-8b0f-249eb7265faa.svg\",text:\"100-day money-back guarantee *\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-540eabb0-1d8f-4b87-a003-f8b1cd3c10f9.svg\",text:\"Expert Customer Support\"}],disclaimer:\"100-day Money Back Guarantee – Money back guarantee applies to Automower iQ Series mowers purchased directly on Husqvarna.com (US only). Mower must be returned in working, undamaged order with original packaging. Return must be initiated within 100 days of receiving the mower.\",showMore:\"Show more\",showLess:\"Show less\"}};","afterDOMReady":false}},{"name":"Variation 2","id":1279880,"css":".ab-callout__items{display:flex;gap:24px;margin-top:24px;margin-bottom:16px;padding:16px 0;flex-wrap:wrap;border-bottom:1px solid rgba(var(--ui-color-black-rgb),.08);border-top:1px solid rgba(var(--ui-color-black-rgb),.08)}.ab-callout__item{display:flex;flex-direction:column;gap:16px;align-items:center;text-align:center;flex:0 0 calc(50% - 12px)}.ab-callout__item img{height:28px}.ab-callout__disclaimer{border-bottom:1px solid rgba(var(--ui-color-black-rgb),.08);padding-bottom:16px;font-size:.8rem!important}.ab-disclaimer-text.ab-disclaimer-collapsed{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ab-disclaimer-text.ab-disclaimer-expanded{display:block}.ab-disclaimer-toggle{background:0 0;border:none;padding:4px 0;cursor:pointer;font-size:inherit;text-decoration:underline;display:block;margin-top:4px;color:inherit}.ab-callout__disclaimer+[data-ui-component=EposCloudCoverageAccordion] details{border-top:none}@media (min-width:768px){.ab-callout__items{flex-wrap:nowrap}.ab-callout__item{flex:1}}","elementSets":[],"javaScriptCode":{"code":"Kameleoon.API.Core.runWhenElementPresent(\"[data-ui-component=ProductDetailsCommerce]\",(function(e){console.warn(\"\\n======================================================\\n⚠️ NOTICE: A/B Test in Progress ⚠️\\n\\nAn active A/B test is currently running, which may affect layout and functionality.\\nIf you notice unexpected changes, they may be related to this test.\\n\\nFor more information, please contact the Martech Optimization Team.\\n======================================================\\n\");const a=document.createElement(\"script\");a.src=\"https://husqvarna-files.vercel.app/js/utils.js\",a.type=\"text/javascript\",a.onload=function(){!async function(){const e=document.documentElement.lang||\"en-gb\",a=localizedData[e]||localizedData[\"en-gb\"],t=`\\n
\\n ${a.items.map((e=>`\\n
\\n \"\"\\n
${e.text}
\\n
\\n `)).join(\"\")}\\n
\\n
\\n ${a.disclaimer}\\n \\n
\\n `,n=document.querySelector('[data-ui-component=\"ProductDetailsCommerce\"] [data-ui-component=\"EposCloudCoverageAccordion\"]')||document.querySelector('[data-ui-component=\"ProductDetailsCommerce\"] [data-ui-component=\"WishlistToggle\"]');if(n){n.insertAdjacentHTML(\"beforebegin\",t);const e=n.previousElementSibling.querySelector(\".ab-disclaimer-toggle\"),i=n.previousElementSibling.querySelector(\".ab-disclaimer-text\");e.addEventListener(\"click\",(()=>{\"true\"===e.getAttribute(\"aria-expanded\")?(i.classList.replace(\"ab-disclaimer-expanded\",\"ab-disclaimer-collapsed\"),e.setAttribute(\"aria-expanded\",\"false\"),e.textContent=a.showMore):(i.classList.replace(\"ab-disclaimer-collapsed\",\"ab-disclaimer-expanded\"),e.setAttribute(\"aria-expanded\",\"true\"),e.textContent=a.showLess)}))}}()},document.head.appendChild(a)}));const localizedData={\"en-us\":{items:[{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-8cd68c62-c985-46e5-8926-dc75ae8f28eb.svg\",text:\"4-year warranty *\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-a0841808-99ff-4048-8e64-3f36fd9db9e5.svg\",text:\"Free Shipping & Returns\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-2035210e-be46-4bb8-8b0f-249eb7265faa.svg\",text:\"100-day money-back guarantee **\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-19d8d1af-ffbb-45a5-83df-4d5943033576.svg\",text:\"1-Year Free Blades Included ***\"}],disclaimer:\"Best in class warranty – 4 Years * – 4‑year warranty applies to Automower® iQ Series robotic mowers (US and Canada only). Warranty applies to the robotic mower unit; batteries are covered by a separate 3‑year warranty. 'Class' is defined as residential robotic mower in the U.S. and Canada as of 2026. See limited warranty policy for full details.

100-day Money Back Guarantee ** – Money back guarantee applies to Automower iQ Series mowers purchased directly on Husqvarna.com (US only). Mower must be returned in working, undamaged order with original packaging. Return must be initiated within 100 days of receiving the mower.

1 Year Free Blades *** – 1 year free blades included. Calculated based on recommended usage of 500-1000 mowing hours per blade set. Lawn size, grass type and terrain may impact blade performance. Only applies to Automower iQ Series.\",showMore:\"Show more\",showLess:\"Show less\"}};","afterDOMReady":false}},{"name":"Variation 1","id":1280961,"css":".ab-callout__items{display:flex;gap:24px;margin-top:24px;margin-bottom:16px;padding:16px 0;flex-wrap:wrap;border-bottom:1px solid rgba(var(--ui-color-black-rgb),.08);border-top:1px solid rgba(var(--ui-color-black-rgb),.08)}.ab-callout__item{display:flex;flex-direction:column;gap:16px;align-items:center;text-align:center;flex:0 0 calc(50% - 12px)}.ab-callout__item img{height:28px}.ab-callout__disclaimer{border-bottom:1px solid rgba(var(--ui-color-black-rgb),.08);padding-bottom:16px;font-size:.8rem!important}.ab-disclaimer-text.ab-disclaimer-collapsed{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ab-disclaimer-text.ab-disclaimer-expanded{display:block}.ab-disclaimer-toggle{background:0 0;border:none;padding:4px 0;cursor:pointer;font-size:inherit;text-decoration:underline;display:block;margin-top:4px;color:inherit}.ab-callout__disclaimer+[data-ui-component=EposCloudCoverageAccordion] details{border-top:none}@media (min-width:768px){.ab-callout__items{flex-wrap:nowrap}.ab-callout__item{flex:1}}","elementSets":[],"javaScriptCode":{"code":"Kameleoon.API.Core.runWhenElementPresent(\"[data-ui-component=ProductDetailsCommerce]\",(function(e){console.warn(\"\\n======================================================\\n⚠️ NOTICE: A/B Test in Progress ⚠️\\n\\nAn active A/B test is currently running, which may affect layout and functionality.\\nIf you notice unexpected changes, they may be related to this test.\\n\\nFor more information, please contact the Martech Optimization Team.\\n======================================================\\n\");const t=document.createElement(\"script\");t.src=\"https://husqvarna-files.vercel.app/js/utils.js\",t.type=\"text/javascript\",t.onload=function(){!async function(){const e=document.documentElement.lang||\"en-gb\",t=localizedData[e]||localizedData[\"en-gb\"],a=`\\n
\\n ${t.items.map((e=>`\\n
\\n \"\"\\n
${e.text}
\\n
\\n `)).join(\"\")}\\n
\\n
\\n ${t.disclaimer}\\n \\n
\\n `,n=document.querySelector('[data-ui-component=\"ProductDetailsCommerce\"] [data-ui-component=\"EposCloudCoverageAccordion\"]')||document.querySelector('[data-ui-component=\"ProductDetailsCommerce\"] [data-ui-component=\"WishlistToggle\"]');if(n){n.insertAdjacentHTML(\"beforebegin\",a);const e=n.previousElementSibling.querySelector(\".ab-disclaimer-toggle\"),i=n.previousElementSibling.querySelector(\".ab-disclaimer-text\");e.addEventListener(\"click\",(()=>{\"true\"===e.getAttribute(\"aria-expanded\")?(i.classList.replace(\"ab-disclaimer-expanded\",\"ab-disclaimer-collapsed\"),e.setAttribute(\"aria-expanded\",\"false\"),e.textContent=t.showMore):(i.classList.replace(\"ab-disclaimer-collapsed\",\"ab-disclaimer-expanded\"),e.setAttribute(\"aria-expanded\",\"true\"),e.textContent=t.showLess)}))}}()},document.head.appendChild(t)}));const localizedData={\"en-us\":{items:[{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-8cd68c62-c985-46e5-8926-dc75ae8f28eb.svg\",text:\"4-year warranty\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-7dc9d840-f00d-4e61-aab9-249e531daaea.svg\",text:\"Award Winning\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-2035210e-be46-4bb8-8b0f-249eb7265faa.svg\",text:\"100-day money-back guarantee *\"},{img:\"https://7yqiqv3oxy.kameleoon.eu/images/28234-540eabb0-1d8f-4b87-a003-f8b1cd3c10f9.svg\",text:\"Expert Customer Support\"}],disclaimer:\"100-day Money Back Guarantee – Money back guarantee applies to Automower iQ Series mowers purchased directly on Husqvarna.com (US only). Mower must be returned in working, undamaged order with original packaging. Return must be initiated within 100 days of receiving the mower.\",showMore:\"Show more\",showLess:\"Show less\"}};","afterDOMReady":false}},{"name":"Variation 1","id":1376716,"css":"","elementSets":[],"javaScriptCode":{"code":"Kameleoon.API.Core.runWhenElementPresent(\".hbd-page main\",(function(){const e=\"https://husqvarna-ai-chat-git-main-gracestudiose.vercel.app\",o=\"us\",t={used:\"hbd-chat-used-us\",opened:\"hbd-chat-opened-us\",impression:\"hbd-chat-impression-us\",trigImpr:\"hbd-chat-trigger-impression-us\"};if(\"9999\"!==new URL(window.location.href).searchParams.get(\"take\")){const e=document.querySelector('a[href*=\"take=9999\"]');if(e)return console.log(\"[overlay] loading all products, page will reload\"),void window.location.assign(e.href);console.warn('[overlay] no \"Load all products\" link found, list stays partial')}function n(e){try{return\"1\"===sessionStorage.getItem(e)}catch(e){return!1}}function i(e){try{sessionStorage.setItem(e,\"1\")}catch(e){}}function r(e,o){return!n(e)&&(i(e),o(),!0)}function s(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:\"kamClick\",elementInfo:{text:\"chatbot-overlay:\"+e}})}function a(){r(t.used,(function(){s(\"used\")}))}let c=null,l=0;const d=document.createElement(\"script\");d.src=e+\"/js/kameleoon-chat-widget-overlay.js\",d.onload=function(){const d=document.body;window.MyComponentLib.mount(\"chat-widget-overlay\",{key:\"inside-main-top\",props:{apiEndpoint:e+\"/api/chat\",market:o,apiKey:\"C1F56UhN9aONjyNzT1KcDyGnDjXAdM/mU7Ivwm7Pp4w=\",showIssueReporting:!1,buttonVisible:!0},target:d,position:\"beforeend\"}),r(t.impression,(function(){s(\"impression\")})),window.addEventListener(\"kameleoon:click\",(function(e){var o=e.detail.action;if(\"chatbot-engagement-clicked-product\"===o&&(Kameleoon.API.Goals.processConversion(418331),a(),s(\"clicked-product\")),\"chatbot-engagement-closed\"===o&&(Kameleoon.API.Goals.processConversion(418334),s(\"closed:\"+(n(t.used)?\"used\":\"unused\"))),\"chatbot-initiate\"===o){Kameleoon.API.Goals.processConversion(418326);const e=function(){const e=c&&Date.now()-l<3e3?c:\"floating\";return c=null,e}();n(t.opened)?s(\"reopen:\"+e):(i(t.opened),s(\"initiate:\"+e))}\"chatbot-select-item\"===o&&(Kameleoon.API.Goals.processConversion(418324),a(),s(\"select-item\")),\"chatbot-view-item-list\"===o&&(Kameleoon.API.Goals.processConversion(418328),a(),s(\"view-item-list\"))})),Kameleoon.API.Core.runWhenElementPresent('[data-ui-component=\"ProductListItems\"]',(function(){const e=document.querySelector('[data-ui-component=\"ProductListItems\"]');window.MyComponentLib.mountProductListTrigger({key:\"product-list-trigger\",target:e,position:\"beforebegin\",props:{market:o}});const i=e.previousElementSibling;if(i){if(i.addEventListener(\"click\",(function(){c=\"list-trigger\",l=Date.now()}),!0),\"IntersectionObserver\"in window&&!n(t.trigImpr)){const e=new IntersectionObserver((function(o){o.forEach((function(o){o.isIntersecting&&(e.disconnect(),r(t.trigImpr,(function(){s(\"trigger-impression\")})))}))}),{threshold:.5});e.observe(i)}}else console.warn(\"[overlay] product list trigger not found after mount\")}))},d.onerror=function(e){console.error(\"[overlay] failed to load kameleoon-chat-widget-overlay.js\",e),s(\"load-error\")},document.head.appendChild(d)}));","afterDOMReady":false}},{"id":0,"name":"Reference","css":"","elementSets":[]},{"id":null,"name":"Excluded"}],"goals":[{"id":341894,"name":"Retention rate","type":"ENGAGEMENT"},{"id":366018,"name":"Transaction","type":"CUSTOM"},{"id":366019,"name":"Begin checkout","type":"CUSTOM"},{"id":366020,"name":"Add To Cart - listing page","type":"CUSTOM"},{"id":366025,"name":"Add To Cart - product page","type":"CUSTOM"},{"id":366026,"name":"Dealer locator - product page","type":"CUSTOM"},{"id":366027,"name":"Newsletter signup","type":"CUSTOM"},{"id":366028,"name":"Remove from cart","type":"CUSTOM"},{"id":366030,"name":"View item","type":"CUSTOM"},{"id":369278,"name":"Click on Button/Link","type":"CUSTOM"},{"id":369279,"name":"Click on Button/Link 2","type":"CUSTOM"},{"id":391896,"name":"Buy now widget","type":"CUSTOM","jsCode":"(function(ID, triggerGoal) {\n\t\t\t\t\t // Write your conversion code here. Find examples below:\n//\n// triggerGoal(); → No params\n// triggerGoal(49.99) ; → With revenue\n// triggerGoal(49.99, { 5: \"Gold\" }); → With revenue and metadata\n\t\t\t\t\t})(391896, (...args) => Kameleoon.API.Goals.processConversion(391896, ...args));"},{"id":406529,"name":"Click on promo","type":"CUSTOM"},{"id":406530,"name":"Scroll","type":"SCROLL","scrollTrackingType":"PERCENTAGE","scrollTrackingValue":60},{"id":406531,"name":"Time on page > 30 sec","type":"TIME_SPENT","minTimeSpent":30001},{"id":406533,"name":"Click on Category Card","type":"CUSTOM"},{"id":407918,"name":"Click on focus card","type":"CUSTOM"},{"id":410264,"name":"Click on Scan now","type":"CUSTOM"},{"id":418324,"name":"Chatbot - Item selected","type":"CUSTOM"},{"id":418326,"name":"Chatbot - Initiated","type":"CUSTOM"},{"id":418328,"name":"Chatbot - Product List Viewed","type":"CUSTOM"},{"id":418331,"name":"Chatbot - Product clicked","type":"CUSTOM"},{"id":418334,"name":"Chatbot - closed","type":"CUSTOM"},{"id":427639,"name":"Transaction (Euro)","type":"CUSTOM"}],"scriptProduceTime":1790088666995,"timeZone":"Europe/Paris","webExperimentationSetup":true,"boLocale":"ENGLISH","graphicalEditorVersion":"v1","isNewEditorEnabled":true,"DATA_URL":"https://eu-data.kameleoon.eu","useMultipleSiteCodes":true,"useWideDomainSupport":true,"geolocation":true,"globalScript":"console.log(\"[Script Last Update]\",new Date(Kameleoon.Internals.configuration.scriptProduceTime).toLocaleString());class GlobalScript{handleConsent(){}triggerEvents(){}convertGoalsAndSetCDs(){}configExternalTools(){}init(){}}const globalScript=new GlobalScript;globalScript.init();","enableRemoteVisitorSynchronization":true,"enableRemoteVisitorSynchronizationItpOnly":true,"track":true,"trackerExcludedIPRanges":[],"useProduct":true,"Gatherer":"eyJtYXhWaXNpdElkbGVEdXJhdGlvbiI6MTgwMDAwMCwiZGlyZWN0Tm9uZVJlZmVycmVyT25seUZpcnN0IjpmYWxzZSwiYnJvd3NlcnMiOnsiMCI6eyJuYW1lIjoiQ0hST01FIn0sIjEiOnsibmFtZSI6IkVYUExPUkVSIn0sIjIiOnsibmFtZSI6IkZJUkVGT1gifSwiMyI6eyJuYW1lIjoiU0FGQVJJIn0sIjQiOnsibmFtZSI6Ik9QRVJBIn19LCJvc3MiOnsiMCI6eyJuYW1lIjoiV0lORE9XUyJ9LCIxIjp7Im5hbWUiOiJNQUMifSwiMiI6eyJuYW1lIjoiSU9TIn0sIjMiOnsibmFtZSI6IkxJTlVYIn0sIjQiOnsibmFtZSI6IkFORFJPSUQifSwiNSI6eyJuYW1lIjoiV0lORE9XUyBQSE9ORSJ9fSwibm9SZWZlcnJlclBhZ2VzIjpbXSwicmVmZXJyZXJzIjp7IjAiOnsibmFtZSI6Ikdvb2dsZSBBZFdvcmRzIiwicHJpb3JpdHkiOjAsImRldGVjdGlvbnMiOlt7Im1ldGhvZCI6MCwiYW5kIjpmYWxzZSwicGFyYW1ldGVycyI6Il5odHRwcz86Ly8od3d3XFwuKT9nb29nbGUoXFwuW2Etel17Mix9KSsvYWNsayhbPyYjXS4qfCkkIn0seyJtZXRob2QiOjEsImFuZCI6ZmFsc2UsInBhcmFtZXRlcnMiOiJbPyYjXWdjbGlkPSJ9XX0sIjEiOnsibmFtZSI6Ikdvb2dsZSBPcmdhbmljIFNlYXJjaCIsInByaW9yaXR5IjowLCJkZXRlY3Rpb25zIjpbeyJtZXRob2QiOjAsImFuZCI6ZmFsc2UsInBhcmFtZXRlcnMiOiJeaHR0cHM/Oi8vKHd3d1xcLik/Z29vZ2xlKFxcLlthLXpdezIsfSkrLyg/IWFjbGt8aW1ncmVzKS4qP1s/JiNdcT0uKiQifSx7Im1ldGhvZCI6MCwiYW5kIjpmYWxzZSwicGFyYW1ldGVycyI6Il5odHRwcz86Ly8od3d3XFwuKT9nb29nbGUoXFwuW2Etel17Mix9KSsvPyQifV19LCIyIjp7Im5hbWUiOiJCaW5nIE9yZ2FuaWMgU2VhcmNoIiwicHJpb3JpdHkiOjAsImRldGVjdGlvbnMiOlt7Im1ldGhvZCI6MCwiYW5kIjpmYWxzZSwicGFyYW1ldGVycyI6Il5odHRwcz86Ly8oW2Etel17Mix9XFwuKSpiaW5nKFxcLlthLXpdezIsfSkrLy4qP1s/JiNdcT0uKiQifSx7Im1ldGhvZCI6MCwiYW5kIjpmYWxzZSwicGFyYW1ldGVycyI6Il5odHRwcz86Ly8oW2Etel17Mix9XFwuKSpiaW5nKFxcLlthLXpdezIsfSkrLz8kIn1dfSwiMyI6eyJuYW1lIjoiWWFob28gT3JnYW5pYyBTZWFyY2giLCJwcmlvcml0eSI6MCwiZGV0ZWN0aW9ucyI6W3sibWV0aG9kIjowLCJhbmQiOmZhbHNlLCJwYXJhbWV0ZXJzIjoiXmh0dHBzPzovLyhbYS16XXsyLH1cXC4pKnlhaG9vKFxcLlthLXpdezIsfSkrLy4qP1s/JiNdcD0uKiQifSx7Im1ldGhvZCI6MCwiYW5kIjpmYWxzZSwicGFyYW1ldGVycyI6Il5odHRwcz86Ly8oW2Etel17Mix9XFwuKSp5YWhvbyhcXC5bYS16XXsyLH0pKy8/JCJ9XX0sIjQiOnsibmFtZSI6IkJhaWR1IE9yZ2FuaWMgU2VhcmNoIiwicHJpb3JpdHkiOjAsImRldGVjdGlvbnMiOlt7Im1ldGhvZCI6MCwiYW5kIjpmYWxzZSwicGFyYW1ldGVycyI6Il5odHRwcz86Ly8oW2Etel17Mix9XFwuKSpiYWlkdShcXC5bYS16XXsyLH0pKy8uKj9bPyYjXXdkPS4qJCJ9LHsibWV0aG9kIjowLCJhbmQiOmZhbHNlLCJwYXJhbWV0ZXJzIjoiXmh0dHBzPzovLyhbYS16XXsyLH1cXC4pKmJhaWR1KFxcLlthLXpdezIsfSkrLz8kIn1dfX0sImtleVBhZ2VzIjp7fSwiY3VzdG9tRGF0YSI6e319"}}; })();if (window.kameleoonLightIframe){if (window.kameleoonExternalIFrameLoadedData) { window.kameleoonQueue = window.kameleoonQueue || [];window.kameleoonQueue.push({level: 'IMMEDIATE',command: function () {Kameleoon.Utils.runProtectedScript(window.kameleoonExternalIFrameLoadedData);}}); Kameleoon.Analyst.load();}}else{Kameleoon.Analyst.load();}}